When everything finished I noticed I could not remote desktop it using VNC as I always do then the problems started. Searching in Google I found that this is a known issue in this version and a lot of users keep complaining about it ( myself among them ).
Looking for another options to access my server remotely I found that X11VNC was my best option. The best thing about it is its great options it has for command line control and the best thing is that even if there is no user log in into the terminal you can still start the server, this was a huge limitation about Vino-VNC (the default VNC server Ubuntu ships). First a user has to log in so the server could start, there was no way to start it from command line or ssh. It demands to have a monitor attached.
Anyways after the usual "sudo-apt install X1vnc" to install the required x11vnc packages these are the commands you need to run in order to make it work:
if there is user a user already logged in:
x11vnc -display :0if nobody is logged in:
sudo x11vnc -auth /var/run/lightdm/root/:0 - display :0If you notice, you will need to run it as super user since that path needs super user privileges.
The -auth parameter needs the path to the display manger if no one is logged into, but there is a greeter login program like gdm ( Ubuntu ), kdm ( Kubuntu ), xdm ( Xubuntu) , etc running so it might vary on different platforms. You can try 2 things:
This will try to guess the path
x11vnc -auth guess -display :0Sometimes executing:
ps wwwaux | grep authcan show you the path to that file, in my case it did.
This tool has tons of options but one I really found useful is the geometry option, which lets scale the screen to fit your needs or if you are connecting from slow internet bandwidth :
x11vnc -display :0 -geometry 1024x764Once the server is up and running you should something like this:
The VNC desktop is [YOUR SERVER NAME]:0 PORT=5900And you are all set and ready to connect using your favorite client.
Connecting to the login screen |
You can find all the documentation and all the options you can use in this page and here
Hopes it helps while we wait for the bug to be fixed.
Happy coding :)
Thank-you, sir! You provide a clear and concise summary of the basic options to get x11vnc up and running. Anything X-related always has strange options. Thanks for providing the method to identify your respective display manager as well. Posts like yours keep Ubuntu on my desktop. thnx!
ReplyDeleteHello.
ReplyDeleteIt's realy good and useful article.
Now, I have not any problem with my remote connect after server restart. Thank you very much.
Best wishes
Daniel
POLAND
Just a small typo sudo x11vnc -auth /var/run/lightdm/root/:0 - display :0 should read sudo x11vnc -auth /var/run/lightdm/root/:0 -display :0
ReplyDeleteThanks! It's very helpful!
ReplyDelete