Connect using Windows RDP
You'll need xrdp together with x11vnc if you want remote access to your Unity desktop.
First, install xrdp and x11vnc:
apt-get install xrdp x11vnc
Then edit /etc/xrdp/xrdp.ini
and make sure it contains at least the following:
[globals] bitmap_cache=yes bitmap_compression=yes port=3389 crypt_level=high channel_code=1 max_bpp=24 [xrdp1] name=Remote Desktop lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=5900
Restart xrdp for the changes to take effect:
/etc/init.d/xrdp restart
Now open up a terminal window (Ctrl+Alt+T) and set up a VNC password (you don't want to leave wide open access to your desktop from the internet):
x11vnc -usepw
You'll be prompted to set up a password, that will be used for RDP authentication.
The last step is to start x11vnc. There are tons of options that you can use, but here is an example to get you started (run this in the same terminal window you just opened):
x11vnc -rfbauth ~/.vnc/passwd -display WAIT:0 -reopen -nevershared -forever -wirecopyrect always -scrollcopyrect always -norepeat -1 -xkb -capslock -skip_keycodes 187,188 -bg -o ~/x11vnc.log &
The & at the end will leave x11vnc running the background, so you can close the terminal window and leave it running.
You'll need to add this command to your startup scripts if you want x11vnc to run automatically after a reboot.
Related videos on Youtube
Muhammad Muazzam
Having 12 years of working experience in multiple technologies. My work experience is including databases applications development using Oracle PL/SQL , PHP & Mysql, Wordpress, Zencart, Amazon API, Visual Basic, Crystal Reports, MS Access and MS SQL Server.
Updated on September 18, 2022Comments
-
Muhammad Muazzam over 1 year
I want to connect Ubuntu LTS via windows7 RDP. Is there any other settings these settings are not working.
https://community.hpcloud.com/article/using-windows-rdp-access-your-ubuntu-instance
-
Muhammad Muazzam over 9 yearsStill not being connected.
-
ATAKAMA over 9 yearsYou need to provide more information. Does the xrdp login screen show up? Is the firewall on the local machine configured to allow connections to port 3389? If you're connecting from the internet to a host behind a NAT router, is port forwarding set up correctly? Also, post the contents of x11vnc.log in your home directory.
-
ATAKAMA over 9 yearsPlease post the log as a comment, not as an edit suggestion. Also, please answer the rest of the questions.
-
Muhammad Muazzam over 9 years31/12/2014 08:50:43 passing arg to libvncserver: -rfbauth 31/12/2014 08:50:43 passing arg to libvncserver: /root/.vnc/passwd 31/12/2014 08:50:43 passing arg to libvncserver: -nevershared 31/12/2014 08:50:43 x11vnc version: 0.9.12 lastmod: 2010-09-09 pid: 29028 31/12/2014 08:50:43 31/12/2014 08:50:43 wait_for_client: WAIT:0 31/12/2014 08:50:43 31/12/2014 08:50:43 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/2560 31/12/2014 08:50:43 31/12/2014 08:50:43 Autoprobing TCP port 31/12/2014 08:50:43 Autoprobing selected port 5900 31/12/2014 08:50:43 Listening also on IPv6 port 5900 (socket 4)
-
Muhammad Muazzam over 9 yearsWindows remote desktop shows connection failed message even if turn off windows firewall.
-
ATAKAMA over 9 yearsYou need to make sure the Ubuntu machine allows connections to port 3389. Also, xrdp should be listening on port 3389 (not some other process). Next, if the Ubuntu machine is behind a NAT router and the Windows machine connects over the internet, you need to configure the router to forward connections to port 3389 to your Ubuntu machine. These are network/firewall configuration issues, not related to RDP itself.
-
Muhammad Muazzam over 9 yearsroot@server:~# sudo netstat -tapen | grep ":3389 " tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 123 1645792941 29157/xrdp
-
Muhammad Muazzam over 9 yearsNow I have error in connection 127.0.0.1 6210 on vnc login consolse
-
Muhammad Muazzam over 9 yearsNow the connectivity issue resolved by setting port 5902 in xrdp.ini after check listening port of vnc. How to get desktop GUI as it show terminal only?