Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app on remote pc won't start #2

Open
marco6971 opened this issue Sep 13, 2021 · 13 comments
Open

app on remote pc won't start #2

marco6971 opened this issue Sep 13, 2021 · 13 comments

Comments

@marco6971
Copy link

marco6971 commented Sep 13, 2021

Hi,
when i'm trying to connect the two instances i obtain this error on the remote pc (it's a red sentence):

:0: Protocol not found
Did you mean file::0?

The last thing I obtain on the client is:

TCP server is listening on port 12346. Waiting for client to connect...
Client connected!
translate_mouse_coords: video/win size values cannot be 0
translate_mouse_coords: video/win size values cannot be 0 ---> continue with this message until i close it.

I'm trying to connect a remote that as two display with a laptop.
On the laptop i have Ubuntu 21.04
on the remote Ubuntu 20.04.1 LTS

@morrolinux
Copy link
Owner

The last thing I obtain on the client is:

TCP server is listening on port 12346. Waiting for client to connect...

This is not the client. It's the server you run locally and it waits for clients to connect.

:0: Protocol not found

Make sure you are running an Xorg session and not a Wayland session. You can easily check that (and choose the right one) on the login screen by clicking on the gear shaped button, before entering the login password.

It should look something like this:

image

@marco6971
Copy link
Author

So i have the server on the local machine and the client on the remote one?
On the controlled machine (remote):
image

On the controller machine (local):
image

@morrolinux
Copy link
Owner

So i have the server on the local machine and the client on the remote one?

Yes, the viewer app is a server which waits for the remote host to connect. It might sound counterintuitive but it has its perks.

It looks like you're correctly running on X11 on the remote (controlled) machine. What does
echo $DISPLAY say?

@marco6971
Copy link
Author

the output of echo $DISPLAY is:
:0
even for remote and client

@morrolinux
Copy link
Owner

Looks ok.... What's the content of your hprdp file? (See the README)

@marco6971
Copy link
Author

at the beginning i had this fail
image

then I replace this (create by appImage):
echo $BASHPID > /tmp/ffmpeg.pid; ffmpeg -f x11grab -draw_mouse 0 -s 1920
1600x1080
900 -framerate 30 -i $DISPLAY -c:v libx264 -preset medium -profile high -pix_fmt yuv420p -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 5>

with this (on README):
echo $BASHPID > /tmp/ffmpeg.pid; ffmpeg -f x11grab -draw_mouse 0 -s $screensize -framerate 30 -i $DISPLAY -c:v libx264 -preset medium -profile high -pix_fmt yuv420p -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 512k -f mpegts tcp://127.0.0.1:12345

This made change the error from this one in yellow to the red one sent after, I thought it was an improvment

@morrolinux
Copy link
Owner

You should try deleting that file and laughing the AppImage again. It will be re-generated, hopefully with the right settings, or at least with something specific to your system so that we can work on that.

@marco6971
Copy link
Author

marco6971 commented Sep 14, 2021

it's the exact thing that i do for sending you the code earlier
I've tried to rebuilt from git but nothing change (removing hprdp first)

@morrolinux
Copy link
Owner

If your hprdp file looks exactly like this:

echo $BASHPID > /tmp/ffmpeg.pid; ffmpeg -f x11grab -draw_mouse 0 -s 1920
1600x1080
900 -framerate 30 -i $DISPLAY -c:v libx264 -preset medium -profile high -pix_fmt yuv420p -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 5>

Something went wrong in its generation. There is a misplaced 1920 followed by a carriage return before the actual resolution 1600x1080 which is followed by another carriage return and a 900 (what is that?) then the whole thing is truncated on bufsize with > which shouldn't be there.

Here is what it should look like (assuming that your remote screen resolution is 1600x1080):

echo $BASHPID > /tmp/ffmpeg.pid; ffmpeg -f x11grab -draw_mouse 0 -s 1600x1080 -framerate 30 -i $DISPLAY -c:v libx264 -preset medium -profile high -pix_fmt yuv420p -tune zerolatency -b:v 2000K -minrate 2000K -maxrate 2000K -bufsize 512k -f mpegts tcp://127.0.0.1:12345

Try putting this in the hpdrdp file and let me know how it goes.

However it remains a mistery to me how the original file got so messed up.

@marco6971
Copy link
Author

works fine, thanks a lot.
I've checked my display:
1920x1080
1600x900

@morrolinux
Copy link
Owner

works fine, thanks a lot.
I've checked my display:
1920x1080
1600x900

Cool, I'm happy to hear that.

And I think I've got a clue on what might have happened here: can you post your full xrandr output?

@marco6971
Copy link
Author

sorry for the wait

xrandr
Screen 0: minimum 8 x 8, current 3668 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
1920x1080 60.00*+ 59.94 50.00 29.97 25.00 23.98 60.05 60.00 50.04
1680x1050 59.95
1440x900 74.98 59.89
1360x768 60.02
1280x1024 75.02 60.02
1280x960 60.00
1280x800 59.81
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94
HDMI-0 connected 1600x900+2068+90 (normal left inverted right x axis y axis) 443mm x 249mm
1600x900 60.00*+
1440x900 59.89
1280x1024 60.02
1280x720 60.00
1024x768 60.00
800x600 60.32
640x480 59.94

@morrolinux
Copy link
Owner

morrolinux commented Dec 10, 2021

Thanks for getting back to me, I've been quite busy and forgot to give you some feedback.
I found the culprit and basically all is needed is a better way of getting screen resolution or even just a more robust way of filtering xrandr output. I'll have a look at it later this year, and keeping the issue open for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants