Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to access an Ubuntu machine remotely via VNC. But I can access the Ubuntu machine only if the user is logged in. I want to access the ubuntu machine via VNC from the login screen itself. We can access all windows machines from the login screen. However we were not able to access the Ubuntu machine from the login screen. There is some way but I am not aware of the details. Can someone give a solution to this problem?

share|improve this question
If the other machine is on the same LAN it would be feasible to just use XDMCP instead of VNC. If it's not on the same LAN, unaccelerated X over the network might be too slow. –  Robin Green Apr 16 '11 at 7:05

3 Answers 3

up vote 8 down vote accepted

Your best bet is to install xrdp Install xrdp. After installation, you can use an RDP client to connect to the machine - you will then be prompted for your credentials as you would be on the login screen.

share|improve this answer
I have installed xrdp but still i am unable to access the ubuntu machine from the login screen. –  karthick87 May 17 '11 at 12:34
@karthick: Are you connecting to the machine with VNC or using an RDP client? –  Nathan Osman May 17 '11 at 15:48
I dont find RDP client in my machine. Where it will be located ? –  karthick87 May 18 '11 at 5:43
@karthick: Are you using Ubuntu as your client? If so, the program to use is called "Terminal Server Client". On Windows, it's called "Remote Desktop" IIRC. –  Nathan Osman May 18 '11 at 6:15
Yeah thank you. Is it possible to create a launcher for Terminal Server Client ? –  karthick87 May 18 '11 at 7:05

To enable GDM login over a VNC ssh remote connection try with X11vnc. See also this answer.

share|improve this answer

Here's how to do it with VNC, if you don't want to use RDP:

  1. Install X11VNC server : sudo apt-get x11vnc (Or through Ubuntu Software Center -> X11VNC Server)
  2. sudo mkdir /etc/x11vnc
  3. sudo x11vnc -storepasswd in /etc/x11vnc/passwd
  4. sudo x11vnc -storepasswd /etc/x11vnc/passwd
  5. enter the password you want to set for VNC access
  6. choose y to save pass
  7. sudo nautilus
  8. from within root nautilus, create an empty file in /etc/init called x11vnc.conf
  9. Paste this into the file:

start on login-session-start


sudo x11vnc -xkb -forever -auth /var/run/lightdm/root/:0 -display :0 -rfbauth /etc/x11vnc/passwd -rfbport 5900 -bg -o /var/log/x11vnc.log

end script

  1. Save and close
  2. Restart Ubuntu
  3. That's it! You should now be able to connect with any VNC client even before login.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.