There is a correction to this video if you have issues with VNC crashing out every 90 seconds or so: ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
this video broke my kubuntu20.04 Don't ctrl+c ctrl+v on your PC, if you dont know how to go back to your native sddm . If you are using KDE, you will need to look for other manual. i`m not an expert.. just warning those who think ubuntu-based systems behave like original ubuntu distribution.
@@paul_wiggin yes this would be expected - Kubuntu uses a different desktop environment called KDE, hence Kubuntu. If you can get to a terminal try following vitux.com/how-to-install-the-kde-plasma-desktop-on-ubuntu-18-04-lts/ to get back to the KDE desktop environment. specifically change the display manager back to sddm
For those interested in getting a headless (no monitors attached) remote connection to work there are a few more steps to follow. I tested on RPI Ubuntu 20.10. Credits to Crazy-Logic, Technology Lowdown and Frog McRibbit. After you've done with tutorial #34 of Crazy-Logic, add a dummy monitor following Technology Lowdown tutorial ruclips.net/video/DcMaNhHkDp4/видео.html and make sure you create/move the .conf file inside the directory /etc/X11/xorg.conf.d/ (create cmd: sudo nano /etc/X11/xorg.conf.d/10-xorg-dummy.conf) (not specified in the video) Enable autologon for lightdm: ruclips.net/video/y9M2DQ0heCk/видео.html Not sure everything in the video is necessary but does not hurt (the lightdm.conf file shown in the video might not be as populated or even exist). Make sure you create a lightdm.conf file in /etc/lightdm/lightdm.conf (create cmd: sudo nano /etc/lightdm/lightdm.conf) with the following (replace pi with your user): [Seat:*] autologin-user=pi autologin-user-timeout=0 If you do all the above you should be able to login headless. I finally managed to connect without any monitor or cable attached :)
This video is great! It's the only guide I've been able to find online on this. Plus, it taught me a bit about how to write systemd unit files! Only problem is that I was getting errors when running it. After spending some time troubleshooting, I realized that I first needed to create and set a password file for the unit. I did not notice that in your video, but maybe this wasn't necessary a few years ago when the video came out. $ sudo x11vnc -storepasswd
Hello , thank for your vidéo, but i have an issue ! : Maybe you can help me, when i start a session android vnc viewer > x11vnc , no problem, but if my session run and my wifi disconnect (wifi on my phone) , its impossible for me to come back to my session ...always "the connection closed unexpectedly" the only way to clear the issue is to reboot my pc ...
Hey can you please help me the tutorial worked really great until the part were you checked the status of the server what ever I tried it kept saying (code=exited, status=1/failure) And a little further it said x11vnc.service: start request repeated to quickly X11vnc.service: Failed with result 'exit-code'.
I have one problem, for me at least the vnc only works if I have the device plugged into a screen/monitor. It will let me view but not interact nd no I am not in view-only mode. Other than that I really liked the tutorial!
So if you mean VNC will only work when a monitor is plugged into the VNC server physically, then this would be a somewhat expected behaviour. To get the logon screen part, we attach VNC to the Xserver at the Display point rather than the users session, so no screen means no session is available to connect to.
@@CrazyLogic Hmm ok, I would like to be able to have it so I don't need a screen plugged into the VNC server. Do you have any good things I could check out to get around that behavior? Thanks for getting back so quick!
@@wolfhound905 have a look at the man page here linux.die.net/man/1/x11vnc specifically the -display option - try replacing with -create and loose the :0 following it. Untested but looks like it might work for you - or give you a starting place to look for the solution from.
working perfectly but how to change the resolution of VM?..... I'm running on Azure but this way the resolution is fixed to 1024x768...I tried -geometry 1920x1080 but it only stretching the display not actually changing the resolution which looks dull......so is any way to change the server resolution?....auto adapting client resolution is also great if possible like in RDP
this one's a bit old now, but i have always had the same issues. there are ways to force a resolution but it affects the machine as well as the remote clients.
Hey, so it's not impossible to use with GDM, but there's alot more config. The crux is that with GDM there appears to be an issue with the handling of the Xauthority files, which results in being able to see the login screen but not a users session once they log in. I believe this is by design and is actually a security feature rather than a bug. As lightdm works I didn't dig any deeper tho.
When I try to connect VNC Viewer complains that "unable to connect to NVC Server using your chosen security setting". I tried lowering security settings in Properties but no luck. Any ideas?
Thanks! Worked perfectly. Is there any way to remove the lag completely? I am connecting from Windows (VNC Viewer) over the local network and moving screens or scrolling jumps significantly
Hey, thanks for the comment. Well Lag or latency is a side effect of the connection. so not really. some protocols do better in some situations than others, maybe rdc, or X or teamviewer may be better options for you, or not. There's also some command line options you could try like -rawfb; have a look here as it's a rabbit hole. www.karlrunge.com/x11vnc/x11vnc_opts.html
It's fine up until 5:24 but when i type in the same thing, it says "Unknown operation deamon-reload". How do I go about fixing this? Any help will be appreciated.
Hello, I know is a little bit late but i hope you can help me, I have multiple users in my computer and when I go to Switch User the screen goes black, any solution?
@@richiebrooks Can't say i've tried this and therefore haven't come across it - I suspect it's to do with the X_session auth but can't be of more help on this one.
I followed every step and configured it in AWA-EC2 Ubuntu. I can see The VNC desktop is: Jen-it02:0 PORT=5900 message but when I connect via VNC viewer it says Timed out waiting for a response from the computer. Any idea why?
hiya - you'll need to troubleshoot this on your hardware as many devices will output a screen without anything plugged in (VGA ect) - have a look here for a "fake monitor" driver - askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in
I can successfully connect to my VNC virtual server (thanks to this video) in a cloud server on ubuntu 20.04, however the max possible resolution is 640xsomething, do you know how to fix this issue? I tried googling but linux guides tend to be extremely technical and i'm a newb... thanks in advance!!
try: edit /etc/default/grub file adding following lines: GRUB_GFXMODE=1980x1200x32 GRUB_GFXPAYLOAD_LINUX=1980x1200x32 Then update grub config: sudo update-grub and reboot This may or may not work - but someone has passed it onto me previously.
Hey, thanks for sharing this. It solved my issue with launching the vnc server at boot. But now my whenever I connect, the VNC connection seems to drop after a few mins. I surfed online a lot, I also tried the -noxrecord option as mentioned in the post you shared. But no luck. Do you have any other suggestions?
im using ubuntu 20.04, I did the first half of trying to connect and getting: connecting to sesman ip 127.0.0.1 port 3350 sesman connect ok sending login info to session manager, please wait... login failed for display 0 yes i got the right password etc
So this configuration attaches the VNC server to the displays X session. If you want separate users at the same time, as in separate sessions, you'll need to run multiple X sessions, with multiple VNC server instances. Have a google about for it.
I am finding the service is crashing every 1-2 minutes even with no on connected to it. The logs shows signal 15 which tells it to stop. It then starts up automatically then dies again. I can see the log file grow so the crashing is continuous. I don't know who is issuing the signal 15 to tell it to stop.
hi Clint, seems like you have the same problem as a few others, where are you looking for your log file? i'll have a look on some of mine to see if they show the same.
@@CrazyLogic I added the option -oa to the ExecStart line, i put the log file in the /tmp folder. Not much shows up though, just "signal 15" and then you see it restart. Maybe I should have added -verbose to get more info. Next time I try it I'll add -verbose. I really would like x11vnc to work since it can attach to :0. I'm using tightvnc server now, seems to work but not as nice.
have a quick look at ubuntuforums.org/showthread.php?t=1612704&page=2&p=10082455#post10082455 and adding the -noxrecord to the command. I'll have a look and see if i can recreate the error. What VNC client are you using?
@@CrazyLogic I have added it to gdmwhich() function like this -> COMMAND = "$1 - noxrecord" Is that right? But still it's doing the same thing. Also sometime (very rare though) the OS (20.04) itself would shutdown/crash. Is it also could be because of the VNC? I'm using VNC Viewer 6.19.325 on Windows 10
I've just started working at a new firm and they gave me a little challenge. So I'm trying to remotely control the UR10e COLLABORATIVE INDUSTRIAL ROBOT via vnc server (I'm using vnc viewer on my windows computer). They are manually controlled via touch panels on a software named Polyscope. Now I've been told they run on linux and I know there are legitimate paid versions out there, but I just want to try it via this method first. So my question is, if this is the right way to do it or is there some difference in coding? Or is it the same because it is based on a linux system? I would really appreciate the help :D p.s. love the video, very thorough explanation on everything little detail. liked and subscribed immediately!
Why thanks - So this is a bit more complex as it's not guaranteed that it's Ubuntu underneath. So you probably know not all Linux is equal - first you'll need to know which distro is being used if not something custom. After you know that and you have shell access to it, then you'll need to check a few things like if it's running Xserver or Wayland - X11VNC relies on Xserver so probably wont work great if at all under Wayland (yes you can do both at the same time (X within Wayland) but I've never tested it). After knowing this you'll also need to know what display manager is being used, like GDM, lightDM ect, and then you'll need to find specifics for that set of options. It's a bit of a rabbit hole. Given the value of the robot and also it's a robot.... maybe a paid option that's officially supported would be a better option, it that's available. I am jealous that you have a UR10e to play with!! All the best :)
@@CrazyLogic Thank you very much! I'll try to dig up some more information. Is there a way I could somehow break something by trying this method? I really don't want to damage anything haha Yeah so far it's a really good job :D
@@jurevidmar4885 yeah - you could completely break the OS if it's using one way of displaying graphics and then you change that by accident ie - if the display manager has to be one for their software and you change that to LightDM it'll not work.
@@CrazyLogic Thanks for the warning. Then I'm gonna have to check what graphics displaying it's using first. But can I still try this method without the ""sudo LightDM" line? I know a lot of questions haha I'm a beginner at this :D
Just an update, it was a success. I was able to connect to the polyscope panel via VNC Viewer. Another problem I ran into was, that the robot wasn't connected to the internet so I couldn't just go with the sudo apt-get commands. I had to put the x11vnc file (some awesome people make "magic" files for the UR robots, so it was fairly simple from there on) on the flash drive and boot it from there with the /usr/bin/x11vnc. I still couldn't have figured this out without your guide, so thank you very much. I also got inspired a bit, so I'm gonna start playing around with linux systems a bit. Gonna have to watch more of your videos I guess. Keep up the good work my man! :D
superb Sir !!!!! .............. but there is one issue..after accessing sometime it shows "failed to recv data socket" & then closes. kindly help !!!!!!!!!
Try putting double quotes either side in the config and restarting the x11VNC service, also do you have a firewall running - try disabling this for a test to see if that's causing an issue.
Excellent video, it works but I have a problem, when I lock the session, the screen is black. When I login (directly on the computer) it recovers the screen again, what could be happening?
@@davidmauriciojimenezlopez1877 i'm not sure, tbh this is give or take what i would have suggested. What do you get back if you run 'systemctl status display-manager' ?
gdm has a security method where the login screen (and lock screen) have a different xauth to the users session. x11vnc can't/doesn't work with this, so lightdm is the workaround. the only bit that really changes is the greeter/login screen - once you're in it's back to the gnome desktop environment.
@@CrazyLogic thanks for the reply! Normally i have no issue using LightDM but i need to test a Script that do some changes to gdm and i have to see if that changes apply :/
Great video....but I must have hit a wrong key on one of the passwords when entering. I tried re-running the commands but it still won't accept my password for entering my VNC viewer. Maybe it is not overwritting the password file. Any suggestions ae welcome.
try removing the password "ExecStart=/usr/bin/x11vnc -forever -display :0 -auth guess"in the config file save the file and then "systemctl daemon-reload" then "systemctl stop x11vnc.service" then "systemctl start x11vnc.service"
Thank you in advance for your quick response I tried your suggestion but still no go....This is the line thats failing? And I notice my VNC IP is followed by :5900 AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files === Authentication is required to manage system service or unit files. Authenticating as: Ubuntu (ubuntu) I had tried another wqay to use VNC before I saw your fix...is that maybe where this issue is coming from? @@CrazyLogic
Hi, Thanks for the turorial, which seemed to work fine on my Raspberry Pi4 with ubuntu20.04, but the same problem of the service dropping after a few minutes (I thought it was linked to the start of kstars application until I read further the previous comments). I checked the status of X11vnc after dropping and got the following lines: x11vnc.service - x11vnc service Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled; vendor preset: enabled) Active: deactivating (stop-sigterm) (Result: timeout) Cntrl PID: 1554 (x11vnc) Tasks: 1 (limit: 4428) CGroup: /system.slice/x11vnc.service └─1554 /usr/bin/x11vnc -forever -display :0 -auth guess mai 29 10:04:05 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:05 Enabling NewFBSize protocol extension for client 192.168.1.83 mai 29 10:04:05 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:05 Switching from ZRLE to hextile Encoding for client 192.168.1.83 mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 client 2 network rate 3053.3 KB/sec (3056.2 eff KB/sec) mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 client 2 latency: 3.3 ms mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 dt1: 0.0018, dt2: 0.0210 dt3: 0.0033 bytes: 64512 mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 link_rate: LR_LAN - 3 ms, 3053 KB/s mai 29 10:04:17 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:17 non-existent cursor: which=10 mai 29 10:04:44 rpi4-ubuntu20-04 systemd[1]: x11vnc.service: start operation timed out. Terminating. mai 29 10:04:44 rpi4-ubuntu20-04 x11vnc[1554]: caught signal: 15 mai 29 10:04:44 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:44 deleted 57 tile_row polling images. Could you find a solution to this problem ? Regards, Pierre
Hiya - thanks for the log dump - I think i know what's causing this this now, so i'll check on the weekend and release an update if i can get it to work - I can confirm that on some of my systems i'm seeing the same. If you'ld like to try changing the system type in the service file to 'oneshot' rather than forking and see what happens. Let me know if it works for you.
@@CrazyLogic I have another issue which may be you can advise me. I changed from ubuntu-desktop to xubuntu-desktop because xubuntu consumes less resources esp. CPU on my Raspberry PI 4. Unfortunately I found that the VNC session hung - screen still keeps refreshing mouse can be moved. But I can't click or interact with the VNC session. This always happens after a few minutes. Any parameter to do to fix this? I tried both -nopw or -noxrecord but it doesn't help. Thanks
Pulling my hair out... for two days it refuses to connect from Windows11 to latest Ubutnu.... about to take the computer and throw it out the window...
theres no need to install another x-window desktop environment, just use "vino" vnc the built in vnc in ubuntu which works with its current desktop environment.
Vino is ok, but doesn't have as many options as x11vnc. Sometimes it's also not as stable. These are reasons I moved to x11vnc. But if vino works then that's a less stress and effort method.
@@CrazyLogic I was actually implying the need of install a desktop manager window server, the GUI software not the VNC software. Ubuntu already has a built in GUI window server and using VNC software to utilize it. It doesn’t make sense to now have two separate desktop GUI environments. The same concept which doesn’t make sense to install an extra desktop environment for Windows 10 or Mac OS, since those proper OS system already has a built in desktop environment which can effortlessly work with any VNC server software without needing to install a third party desktop GUI window manager. Ubuntu completely failed in making VNC software to work properly with their built in desktop environment. It can be done but not many people know how to do it so they install an extra desktop environment.
@@ShopperPlug are you referring to the switch to lightDM rather than GDM? If so - that is specifically to do with Xauth on the session and that GDM treats differently to lightDM. but i use it as replacement not additional.
@@CrazyLogic yes, that replacement in my opinion is not logical. It forces people to install another window manager as a replacement to make the Ubuntu Working properly when using VNC. But it’s not needed because you can actually make full use of the built in Ubuntu desktop manager in VNC. Ubuntu gives problems because it’s dumb and needs to sense a monitor to be hooked on to the graphics card. People use a dummy config file which tricks Ubuntu thinking a monitor is connected, therefore you can easily connect to Ubuntu via VNC without any 3rd party window manager and will work completely normal and fine.
@@ShopperPlug unfortunately not - the issue LightDM fixes is changing between user sessions over VNC, or recovering from a screen lock scenario - both are not possible with GDM on Ubuntu. The hooked in monitor is a separate issue to the reason why i use and recommend LightDM.
@@CrazyLogic I mean in both ways like RDC, If is not possible then to transfer files: please take a look prntscr.com/v7ez87 There is a parameter called -permitfiletranser. RealVNC and ThightVnc have suport for transfer but I cant figure out.
Hi great video. However I do not seem able to get it working from the login perspective. It works fine if I manually load it from the terminal. One thing to mention is that I had originally loaded vino using the commands from ruclips.net/video/Q7mEzoLAt2M/видео.html Also to mention that also seem to lose VNC connection after 1 - 2 minutes similar to Manpreet Raju reported before
Hi Dilip, i'm looking into this as it appears to affect some but not all. Using vino is a completely different system and won't work from logon due to the way that x11 sessions are authenticated. This is also the reason to move to lightDM from GDM3.
There is a correction to this video if you have issues with VNC crashing out every 90 seconds or so: ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
this video broke my kubuntu20.04
Don't ctrl+c ctrl+v on your PC, if you dont know how to go back to your native sddm .
If you are using KDE, you will need to look for other manual.
i`m not an expert.. just warning those who think ubuntu-based systems behave like original ubuntu distribution.
@@paul_wiggin yes this would be expected - Kubuntu uses a different desktop environment called KDE, hence Kubuntu. If you can get to a terminal try following vitux.com/how-to-install-the-kde-plasma-desktop-on-ubuntu-18-04-lts/ to get back to the KDE desktop environment. specifically change the display manager back to sddm
Hey, I followed your guide however I end up with this error after restart
x11vnc.service: Scheduled restart job, restart counter is at 5.
@@RmAndrei93 double check your .service file for errors, especially the exec line. this sounds like a typo or formatting glitch.
For those interested in getting a headless (no monitors attached) remote connection to work there are a few more steps to follow.
I tested on RPI Ubuntu 20.10. Credits to Crazy-Logic, Technology Lowdown and Frog McRibbit.
After you've done with tutorial #34 of Crazy-Logic, add a dummy monitor following Technology Lowdown tutorial ruclips.net/video/DcMaNhHkDp4/видео.html and make sure you create/move the .conf file inside the directory /etc/X11/xorg.conf.d/ (create cmd: sudo nano /etc/X11/xorg.conf.d/10-xorg-dummy.conf) (not specified in the video)
Enable autologon for lightdm: ruclips.net/video/y9M2DQ0heCk/видео.html
Not sure everything in the video is necessary but does not hurt (the lightdm.conf file shown in the video might not be as populated or even exist). Make sure you create a lightdm.conf file in /etc/lightdm/lightdm.conf (create cmd: sudo nano /etc/lightdm/lightdm.conf) with the following (replace pi with your user):
[Seat:*]
autologin-user=pi
autologin-user-timeout=0
If you do all the above you should be able to login headless.
I finally managed to connect without any monitor or cable attached :)
appreciated
Thank you so much for this clear and concise video. Also noting some of the hiccups or issues that you might run into with x11 VNC and gdm3.
This video is great! It's the only guide I've been able to find online on this. Plus, it taught me a bit about how to write systemd unit files!
Only problem is that I was getting errors when running it. After spending some time troubleshooting, I realized that I first needed to create and set a password file for the unit. I did not notice that in your video, but maybe this wasn't necessary a few years ago when the video came out.
$ sudo x11vnc -storepasswd
Awesome it worked for 18.04 too, Thx
Good tutorial only one that worked for me thank you, using ubuntu budgie 18.04
Great to hear!
Very helpfull thank you very much worked for me on ubuntu 20.04.4 lts
Thank you m8 this helped me alot :)
Thank you for making this
Hello , thank for your vidéo, but i have an issue ! : Maybe you can help me, when i start a session android vnc viewer > x11vnc , no problem, but if my session run and my wifi disconnect (wifi on my phone) , its impossible for me to come back to my session ...always "the connection closed unexpectedly" the only way to clear the issue is to reboot my pc ...
Thanks to help a nobbies, great job !!
you're welcome
thanks for sharing.
Very great tutorial!!
Thanks :)
thanks so much for this!! subbed
Most Welcome :)
Playing with containers. Don't expect this will work from within a container sharing a graphic screen with the host?
systemctl : system has not been booted with systemd as init system (PID 1).can't operate . help
Which OS and version are you running?
Hey can you please help me the tutorial worked really great until the part were you checked the status of the server what ever I tried it kept saying (code=exited, status=1/failure)
And a little further it said x11vnc.service: start request repeated to quickly
X11vnc.service: Failed with result 'exit-code'.
What do you get from a 'systemctl status x11vnc.service'?
I have one problem, for me at least the vnc only works if I have the device plugged into a screen/monitor. It will let me view but not interact nd no I am not in view-only mode. Other than that I really liked the tutorial!
So if you mean VNC will only work when a monitor is plugged into the VNC server physically, then this would be a somewhat expected behaviour. To get the logon screen part, we attach VNC to the Xserver at the Display point rather than the users session, so no screen means no session is available to connect to.
@@CrazyLogic Hmm ok, I would like to be able to have it so I don't need a screen plugged into the VNC server. Do you have any good things I could check out to get around that behavior? Thanks for getting back so quick!
@@wolfhound905 have a look at the man page here linux.die.net/man/1/x11vnc specifically the -display option - try replacing with -create and loose the :0 following it. Untested but looks like it might work for you - or give you a starting place to look for the solution from.
@@wolfhound905 Has it work for you? I could start the systemd with it but still can not connect to it
working perfectly but how to change the resolution of VM?..... I'm running on Azure but this way the resolution is fixed to 1024x768...I tried -geometry 1920x1080 but it only stretching the display not actually changing the resolution which looks dull......so is any way to change the server resolution?....auto adapting client resolution is also great if possible like in RDP
this one's a bit old now, but i have always had the same issues. there are ways to force a resolution but it affects the machine as well as the remote clients.
What is the idea behind switching from gnome to lightdm? A pity that it was not explained.
Hey, so it's not impossible to use with GDM, but there's alot more config. The crux is that with GDM there appears to be an issue with the handling of the Xauthority files, which results in being able to see the login screen but not a users session once they log in. I believe this is by design and is actually a security feature rather than a bug. As lightdm works I didn't dig any deeper tho.
When I try to connect VNC Viewer complains that "unable to connect to NVC Server using your chosen security setting". I tried lowering security settings in Properties but no luck. Any ideas?
Try removing the password from the config and try again.
I can’t run as service idk why, but it gives an error. I think the error is on ExecStart directory /usr/bin/x11vnc. Can you help?
Have a look in your systemd log files for an error and take it from there.
Thanks! Worked perfectly. Is there any way to remove the lag completely?
I am connecting from Windows (VNC Viewer) over the local network and moving screens or scrolling jumps significantly
Hey, thanks for the comment. Well Lag or latency is a side effect of the connection. so not really. some protocols do better in some situations than others, maybe rdc, or X or teamviewer may be better options for you, or not. There's also some command line options you could try like -rawfb; have a look here as it's a rabbit hole. www.karlrunge.com/x11vnc/x11vnc_opts.html
It's fine up until 5:24 but when i type in the same thing, it says "Unknown operation deamon-reload". How do I go about fixing this? Any help will be appreciated.
it's daemon not deamon XD
@@bubblesong5711 i get these things wrong very often - but as bubble says possibly a typo - if not What's the full command you are using?
Hello, I know is a little bit late but i hope you can help me, I have multiple users in my computer and when I go to Switch User the screen goes black, any solution?
have you installed the lightdm display manager?
@@CrazyLogic Yes, and it works when I log out and log in with a different user, but it doesn't work when I do only switch account.
@@richiebrooks Can't say i've tried this and therefore haven't come across it - I suspect it's to do with the X_session auth but can't be of more help on this one.
I followed every step and configured it in AWA-EC2 Ubuntu. I can see The VNC desktop is: Jen-it02:0
PORT=5900 message but when I connect via VNC viewer it says Timed out waiting for a response from the computer. Any idea why?
If your hosting in cloud you may need to open the firewall port up.
@@CrazyLogic That worked. Thanks 😊
I have problem with this when i using mono MinecraffClient.exe later i get null error conrction lost can u help?
have you tried ruclips.net/video/-jAiRyBLTPM/видео.html
Let me tell you one thing. You are… what I was looking for
most welcome
A little issue on my NUC (no video card) : VNC connection only available if HDMI output is connected. Can you make a fix and update the config? Please
hiya - you'll need to troubleshoot this on your hardware as many devices will output a screen without anything plugged in (VGA ect) - have a look here for a "fake monitor" driver - askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in
@@CrazyLogic you could make a video :)
I can get the VNC to work but my service wont work?
what errors do you get when running systemctl status x11vnc.xervice ?
I can successfully connect to my VNC virtual server (thanks to this video) in a cloud server on ubuntu 20.04, however the max possible resolution is 640xsomething, do you know how to fix this issue? I tried googling but linux guides tend to be extremely technical and i'm a newb... thanks in advance!!
try: edit /etc/default/grub file adding following lines:
GRUB_GFXMODE=1980x1200x32
GRUB_GFXPAYLOAD_LINUX=1980x1200x32
Then update grub config:
sudo update-grub
and reboot
This may or may not work - but someone has passed it onto me previously.
Hey, thanks for sharing this. It solved my issue with launching the vnc server at boot. But now my whenever I connect, the VNC connection seems to drop after a few mins. I surfed online a lot, I also tried the -noxrecord option as mentioned in the post you shared. But no luck. Do you have any other suggestions?
Hi Karthik, i'm looking into this as it appears to affect some but not all.
@Crazy-Logic, Appreciate it. Thanks👍🏻
@@karthikrenganathan8059 ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
im using ubuntu 20.04, I did the first half of trying to connect and getting:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
login failed for display 0
yes i got the right password etc
Have you changed to lightdm and rebooted?
It is working only for one user login how can it be done multi user can login at time
So this configuration attaches the VNC server to the displays X session. If you want separate users at the same time, as in separate sessions, you'll need to run multiple X sessions, with multiple VNC server instances. Have a google about for it.
I am finding the service is crashing every 1-2 minutes even with no on connected to it. The logs shows signal 15 which tells it to stop. It then starts up automatically then dies again. I can see the log file grow so the crashing is continuous. I don't know who is issuing the signal 15 to tell it to stop.
hi Clint, seems like you have the same problem as a few others, where are you looking for your log file? i'll have a look on some of mine to see if they show the same.
@@CrazyLogic I added the option -oa to the ExecStart line, i put the log file in the /tmp folder. Not much shows up though, just "signal 15" and then you see it restart. Maybe I should have added -verbose to get more info. Next time I try it I'll add -verbose. I really would like x11vnc to work since it can attach to :0. I'm using tightvnc server now, seems to work but not as nice.
@@cneuzil ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
I'm connecting from my windows 10 os and the VNC connection keeps dropping after 1-2 minutes.
Do you know what's wrong here?
have a quick look at ubuntuforums.org/showthread.php?t=1612704&page=2&p=10082455#post10082455 and adding the -noxrecord to the command. I'll have a look and see if i can recreate the error. What VNC client are you using?
@@CrazyLogic I have added it to gdmwhich() function like this -> COMMAND = "$1 - noxrecord"
Is that right? But still it's doing the same thing. Also sometime (very rare though) the OS (20.04) itself would shutdown/crash. Is it also could be because of the VNC?
I'm using VNC Viewer 6.19.325 on Windows 10
@@manpreetraju4105 ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
I've just started working at a new firm and they gave me a little challenge. So I'm trying to remotely control the UR10e COLLABORATIVE INDUSTRIAL ROBOT via vnc server (I'm using vnc viewer on my windows computer). They are manually controlled via touch panels on a software named Polyscope. Now I've been told they run on linux and I know there are legitimate paid versions out there, but I just want to try it via this method first. So my question is, if this is the right way to do it or is there some difference in coding? Or is it the same because it is based on a linux system? I would really appreciate the help :D
p.s. love the video, very thorough explanation on everything little detail.
liked and subscribed immediately!
Why thanks - So this is a bit more complex as it's not guaranteed that it's Ubuntu underneath. So you probably know not all Linux is equal - first you'll need to know which distro is being used if not something custom. After you know that and you have shell access to it, then you'll need to check a few things like if it's running Xserver or Wayland - X11VNC relies on Xserver so probably wont work great if at all under Wayland (yes you can do both at the same time (X within Wayland) but I've never tested it). After knowing this you'll also need to know what display manager is being used, like GDM, lightDM ect, and then you'll need to find specifics for that set of options. It's a bit of a rabbit hole. Given the value of the robot and also it's a robot.... maybe a paid option that's officially supported would be a better option, it that's available.
I am jealous that you have a UR10e to play with!!
All the best :)
@@CrazyLogic Thank you very much! I'll try to dig up some more information. Is there a way I could somehow break something by trying this method? I really don't want to damage anything haha
Yeah so far it's a really good job :D
@@jurevidmar4885 yeah - you could completely break the OS if it's using one way of displaying graphics and then you change that by accident ie - if the display manager has to be one for their software and you change that to LightDM it'll not work.
@@CrazyLogic Thanks for the warning. Then I'm gonna have to check what graphics displaying it's using first. But can I still try this method without the ""sudo LightDM" line? I know a lot of questions haha I'm a beginner at this :D
Just an update, it was a success. I was able to connect to the polyscope panel via VNC Viewer. Another problem I ran into was, that the robot wasn't connected to the internet so I couldn't just go with the sudo apt-get commands. I had to put the x11vnc file (some awesome people make "magic" files for the UR robots, so it was fairly simple from there on) on the flash drive and boot it from there with the /usr/bin/x11vnc. I still couldn't have figured this out without your guide, so thank you very much. I also got inspired a bit, so I'm gonna start playing around with linux systems a bit. Gonna have to watch more of your videos I guess.
Keep up the good work my man! :D
superb Sir !!!!! .............. but there is one issue..after accessing sometime it shows "failed to recv data socket" & then closes.
kindly help !!!!!!!!!
does it happen roughly every 90 seconds? if so i think i've a solution - try changing from a forking type or service to a one shot or simple.
ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation
So how can I delete the desktop
not really sure what you mean by delete the desktop?
@@CrazyLogic I figured it out
It doesn't accept my vnc viewer password I set...
Try putting double quotes either side in the config and restarting the x11VNC service, also do you have a firewall running - try disabling this for a test to see if that's causing an issue.
Can I enable port forwarding and access it from another network?
Yes, but when using the client you'll need to specify that port.
Or if you just open and forward the same port 5900, you'll just need the 'external' IP address
Can't we skip to install lightdm?
you may find you have issues loggin on - if you find another display manager that works - with log on/off and locking, please let everyone know.
Excellent video, it works but I have a problem, when I lock the session, the screen is black. When I login (directly on the computer) it recovers the screen again, what could be happening?
have you switched the display manager to lightDM - as this is the normal GDM behaviour
@@CrazyLogic thanks. I apply sudo dpkg-reconfigure lightdm, choose lightdm, next reboot and behaviour is the same black screen on blocking
@@davidmauriciojimenezlopez1877 i'm not sure, tbh this is give or take what i would have suggested. What do you get back if you run 'systemctl status display-manager' ?
@@CrazyLogic Active: active (running) since Wed 2021-07-07 11:04:30 -05; 1min 28s ago
Docs: man:lightdm(1)
Process: 812 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
Main PID: 818 (lightdm)
Tasks: 13 (limit: 38089)
Memory: 149.7M
CGroup: /system.slice/lightdm.service
├─ 818 /usr/sbin/lightdm
└─1008 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
jul 07 11:04:32 XXX lightdm[1366]: PAM adding faulty module: pam_kwallet.so
jul 07 11:04:32 XXX lightdm[1366]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
jul 07 11:04:32 XXX lightdm[1366]: PAM adding faulty module: pam_kwallet5.so
jul 07 11:04:32 XXX lightdm[1366]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "cdjimene2"
jul 07 11:04:32 XXX lightdm[1366]: pam_unix(lightdm:auth): Couldn't open /etc/securetty: No such file or directory
jul 07 11:04:59 XXX lightdm[1366]: pam_unix(lightdm:auth): Couldn't open /etc/securetty: No such file or directory
jul 07 11:04:59 XXX lightdm[1366]: gkr-pam: unable to locate daemon control file
jul 07 11:04:59 XXX lightdm[1366]: gkr-pam: stashed password to try later in open session
jul 07 11:04:59 XXX lightdm[1366]: pam_unix(lightdm:session): session opened for user XXXXXX by (uid=0)
jul 07 11:04:59 XXX lightdm[1366]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
so, there is really no way to use this with gdm?
gdm has a security method where the login screen (and lock screen) have a different xauth to the users session. x11vnc can't/doesn't work with this, so lightdm is the workaround. the only bit that really changes is the greeter/login screen - once you're in it's back to the gnome desktop environment.
@@CrazyLogic thanks for the reply! Normally i have no issue using LightDM but i need to test a Script that do some changes to gdm and i have to see if that changes apply :/
Great video....but I must have hit a wrong key on one of the passwords when entering. I tried re-running the commands but it still won't accept my password for entering my VNC viewer. Maybe it is not overwritting the password file. Any suggestions ae welcome.
try removing the password "ExecStart=/usr/bin/x11vnc -forever -display :0 -auth guess"in the config file save the file and then "systemctl daemon-reload" then "systemctl stop x11vnc.service" then "systemctl start x11vnc.service"
Thank you in advance for your quick response
I tried your suggestion but still no go....This is the line thats failing? And I notice my VNC IP is followed by :5900
AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: Ubuntu (ubuntu)
I had tried another wqay to use VNC before I saw your fix...is that maybe where this issue is coming from?
@@CrazyLogic
Hi,
Thanks for the turorial, which seemed to work fine on my Raspberry Pi4 with ubuntu20.04, but the same problem of the service dropping after a few minutes (I thought it was linked to the start of kstars application until I read further the previous comments).
I checked the status of X11vnc after dropping and got the following lines:
x11vnc.service - x11vnc service
Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled; vendor preset: enabled)
Active: deactivating (stop-sigterm) (Result: timeout)
Cntrl PID: 1554 (x11vnc)
Tasks: 1 (limit: 4428)
CGroup: /system.slice/x11vnc.service
└─1554 /usr/bin/x11vnc -forever -display :0 -auth guess
mai 29 10:04:05 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:05 Enabling NewFBSize protocol extension for client 192.168.1.83
mai 29 10:04:05 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:05 Switching from ZRLE to hextile Encoding for client 192.168.1.83
mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 client 2 network rate 3053.3 KB/sec (3056.2 eff KB/sec)
mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 client 2 latency: 3.3 ms
mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 dt1: 0.0018, dt2: 0.0210 dt3: 0.0033 bytes: 64512
mai 29 10:04:07 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:07 link_rate: LR_LAN - 3 ms, 3053 KB/s
mai 29 10:04:17 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:17 non-existent cursor: which=10
mai 29 10:04:44 rpi4-ubuntu20-04 systemd[1]: x11vnc.service: start operation timed out. Terminating.
mai 29 10:04:44 rpi4-ubuntu20-04 x11vnc[1554]: caught signal: 15
mai 29 10:04:44 rpi4-ubuntu20-04 x11vnc[1554]: 29/05/2020 10:04:44 deleted 57 tile_row polling images.
Could you find a solution to this problem ?
Regards,
Pierre
Hiya - thanks for the log dump - I think i know what's causing this this now, so i'll check on the weekend and release an update if i can get it to work - I can confirm that on some of my systems i'm seeing the same. If you'ld like to try changing the system type in the service file to 'oneshot' rather than forking and see what happens. Let me know if it works for you.
@@CrazyLogic Thanks for this greate video. It works great with my Pi4 Ubuntu 20.04. Yes, I use 'oneshot' instead and it seems to work great.
@@jintanasap-anek3060 great news and thanks for the feedback.
@@CrazyLogic I have another issue which may be you can advise me. I changed from ubuntu-desktop to xubuntu-desktop because xubuntu consumes less resources esp. CPU on my Raspberry PI 4. Unfortunately I found that the VNC session hung - screen still keeps refreshing mouse can be moved. But I can't click or interact with the VNC session. This always happens after a few minutes. Any parameter to do to fix this? I tried both -nopw or -noxrecord but it doesn't help. Thanks
@@jintanasap-anek3060 i havent tried the xubuntu-desktop, i'll add it to my todo list to see what i can find in a week or so
How to enable multiuser access
x11VNC is not designed for this - it can be achieved by running multiple servers on different ports for each remote user, but it's a bit messy.
Pulling my hair out... for two days it refuses to connect from Windows11 to latest Ubutnu.... about to take the computer and throw it out the window...
theres no need to install another x-window desktop environment, just use "vino" vnc the built in vnc in ubuntu which works with its current desktop environment.
Vino is ok, but doesn't have as many options as x11vnc. Sometimes it's also not as stable. These are reasons I moved to x11vnc. But if vino works then that's a less stress and effort method.
@@CrazyLogic I was actually implying the need of install a desktop manager window server, the GUI software not the VNC software. Ubuntu already has a built in GUI window server and using VNC software to utilize it. It doesn’t make sense to now have two separate desktop GUI environments. The same concept which doesn’t make sense to install an extra desktop environment for Windows 10 or Mac OS, since those proper OS system already has a built in desktop environment which can effortlessly work with any VNC server software without needing to install a third party desktop GUI window manager. Ubuntu completely failed in making VNC software to work properly with their built in desktop environment. It can be done but not many people know how to do it so they install an extra desktop environment.
@@ShopperPlug are you referring to the switch to lightDM rather than GDM? If so - that is specifically to do with Xauth on the session and that GDM treats differently to lightDM. but i use it as replacement not additional.
@@CrazyLogic yes, that replacement in my opinion is not logical. It forces people to install another window manager as a replacement to make the Ubuntu Working properly when using VNC. But it’s not needed because you can actually make full use of the built in Ubuntu desktop manager in VNC. Ubuntu gives problems because it’s dumb and needs to sense a monitor to be hooked on to the graphics card. People use a dummy config file which tricks Ubuntu thinking a monitor is connected, therefore you can easily connect to Ubuntu via VNC without any 3rd party window manager and will work completely normal and fine.
@@ShopperPlug unfortunately not - the issue LightDM fixes is changing between user sessions over VNC, or recovering from a screen lock scenario - both are not possible with GDM on Ubuntu. The hooked in monitor is a separate issue to the reason why i use and recommend LightDM.
Forking or simple?
simple seems to work better.
Hello!
Is there a way to copy/paste files?
Do you mean on the machine, or from host to host? VNC doesn't have an implementation for remote transfers
@@CrazyLogic I mean in both ways like RDC, If is not possible then to transfer files: please take a look prntscr.com/v7ez87 There is a parameter called -permitfiletranser. RealVNC and ThightVnc have suport for transfer but I cant figure out.
I tried this. does not work
have you applied the correction in the correction video? ruclips.net/video/-jAiRyBLTPM/видео.html
Thanks (+Debian)
Which Button do I press at 5:13?
ctrl+o to save and ctrl+x to close and return to the terminal :)
@@CrazyLogic thx. First time on Linux. It works now :)
@@Nick-yj4yi Welcome - persevere though :)
i am unbale create multipale session
Correct. This is a shared session technique. For multiple sessions yould need to do something else.
I have problem with password
ok - try removing the password and seeing if it works - you'll need to reload the file into systemd
Hi great video. However I do not seem able to get it working from the login perspective. It works fine if I manually load it from the terminal. One thing to mention is that I had originally loaded vino using the commands from
ruclips.net/video/Q7mEzoLAt2M/видео.html
Also to mention that also seem to lose VNC connection after 1 - 2 minutes similar to Manpreet Raju reported before
Hi Dilip, i'm looking into this as it appears to affect some but not all. Using vino is a completely different system and won't work from logon due to the way that x11 sessions are authenticated. This is also the reason to move to lightDM from GDM3.
ruclips.net/video/-jAiRyBLTPM/видео.html for a solution and explanation to the connection issue
FYI your video is 100% copied here: ruclips.net/video/pmI3OHYziRg/видео.html
just say the word gnome once lmfao, not g nome or nome, just gnome
if i don't need the password can i omit the (-passwd password) in the /lib/systemd/system/x11vnc.service ?
yep