Walking in Light with Christ - Faith, , Diary Articles & tips and tricks on GNU/, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog Quick way to access remotely your GNU / Linux Desktop - Access Linux Desktop from Mac and

Author : admin

For M$ Windows users its always handy to have remote access to your home PC or notebook via Remote Desktop (RDP) protocol.

However in GNU / Linux, there is no native implementation of RDP protocol. So if you're using Linux as your Desktop like me you will probably want to be able to access the Linux system remotely not only via terminal with SSH using (Putty) or MobaXTerm all in one tabbed Windows terminal program but also be able to use your Linux GNOME / KDE Graphical environment from anywhere on the .

This will make you ponder - Is it possible to access Linux Desktop via proprietary RDP protocol and if not how you can achieve remote GUI access to Linux?

1. Using Linux Xorg and Xming Xserver for Windows

Most people should already know of Linux ability to start multiple Xserver sessions remotely which is the native way to access between two Linux hosts or access remotely Linux from other Linux like OS. It is also possible to use xinit / startx / xhost commands to establish remotely connection to new or running Linux (Xorg) Xserver by using them in combination with XMing - XServer for Windows running on the Windows host and Debian package (x11-xserver-utils) - providing xhost cmd, however this method is a bit complicated and not so convenient.

I used to be using this method XMing (whose mirror is here), earlier in my university years to use remotely my Debian Linux from Windows 98 and this works perfectly fine.

2. Using RDP emulation with server

in order to be able to access your desk from any friend or computer club in the world using standard available in MS Windows Remote Desktop client (mstsc.exe). There is also another alternative way by using Windows RDP experimental server xrdp:

1 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog

apt-cache show xrdp |grep -i descr -A 3 Description: (RDP) server Based on research work by the project, xrdp uses the Remote Desktop Protocol to present a graphical login to a remote client. xrdp can connect to a VNC server or another RDP server.

To make your Linux host accessible via RDP:

On Debian / Ubuntu etc. deb based Linux:

apt-get update apt-get install xrdp

$ /etc/init.d/xrdp status Checking status of Remote Desktop Protocol server xrdp [ OK ] Checking status of RDP Session Manager sesman

/etc/init.d/xrdp start

On Fedora Linux:

yum -y install xrdp systemctl enable xrdp.service systemctl start xrdp.service systemctl enable xrdp-sesman.service systemctl start xrdp-sesman.service

It is possible to access remote Linux host using xrdp RDP server, but this will only work in older releases

2 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog of mstsc.exe (Windows XP / Vista / 2003) and will not work on Windows 7 / 8, because in MS Windows 7 and onwards RDP proto version has changed and the client no longer has compatability with older mstsc releases. There is a work around for this for anyone who stubbornly want to use RDP protocol to access Linux host. If you want to connect to xrdp from Windows 7 you have to copy the old RDP client (mstsc.exe and mstscax.dll) from a WinXP install to the Windows 7 box and run it independently, from the default installed ones, anyways this method is time consuming and not really worthy ...

3. Using the VNC withTightVNC server / client

Taking above in consideration, for me personally best way to access Linux host from Windows and Mac is to use simply the good old VNC protocol with TightVNC.

TightVNC is cross-platform free and open source remote Desktop client it uses RFB protocol to control another computer screen remotely.

To use to access remote Debian / Ubuntu - deb based Linux screen, tightvncserver package has to be installed:

apt-cache show tightvncserver|grep -i desc -A 7 Description-en: virtual network computing server software VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing `desktop' environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures. . This package provides a server to which X clients can connect and the server generates a display that can be viewed with a vncviewer. --

apt-get --yes install tightvncserver ...

TightVNCserver package is also available in default repositories of Fedora / CentOS / RHEL and most

3 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog other RPM based distros, to install there:

yum -y install tightvnc-server ...

Once it is installed to make tightvncserver running you have to start it (preferrably with non-root user), usually this is the user with which you're using the system:

tightvncserver

You will require a password to access your desktops.

Password: Verify: Would you like to enter a view-only password (y/n)? n

New 'X' desktop is rublev:4

Creating default startup script /home/hipo/.vnc/xstartup Starting applications specified in /home/hipo/.vnc/xstartup Log file is /home/hipo/.vnc/rublev:4.log

4 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog

To access now TightVncserver on the Linux host Download and Install TightVNC Viewer client

note that you need to download TightVNC Java Viewer JAR in ZIP archive - don't install 32 / 64 bit installer for Windows, as this will install and setup TightVNCServer on your Windows - and you probably don't want that (and - yes you will need to have Oracle Java VM installed) ...

Once unzipped run tightvnc-jviewer.jar and type in the IP address of remote Linux host and screen,

5 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog where TightVNC is listening, as you can see in prior screenshot my screen is :4, because I run tightvnc to listen for connections in multiple X sessions. once you're connected you will be prompted for password, asker earlier when you run tightvncserver cmd on Linux host.

If you happen to be on a Windows PC without Java installed or Java use is prohibited you can use TightVNC Viewer Portable Binary (mirrored here)

If you have troubles with connection, on Linux host check the exact port on which TightVncServer is running:

ps ax |grep -i Tightvnc

8630 pts/8 S 0:02 Xtightvnc :4 -desktop X -auth /var/run/gdm3/auth-for- hipo-7dpscj/database -geometry 1024x768 -depth 24 -rfbwait 120000 -rfbauth /home/hipo/.vnc/passwd -rfbport 5904 -fp /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/ usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb

6 / 7 Walking in Light with Christ - Faith, Computing, Diary Articles & tips and tricks on GNU/Linux, FreeBSD, Windows, mobile phone articles, religious related texts http://www.pc-freak.net/blog

Then to check, whether the machine you're trying to connect from doesn't have rules preventing the connection use (telnet) - if installed on the Windows host:

telnet www.pc-ferak.net 5904 Trying 192.168.56.101... Connected to 192.168.56.101. Escape character is '^]'. RFB 003.008

telnet> quit Connection closed.

7 / 7

Powered by TCPDF (www.tcpdf.org)