Changes

Jump to: navigation, search

Remote Access to the Ubuntu Linux Desktop

2,872 bytes added, 18:23, 28 June 2007
Establishing a Secure Remote Desktop Session from a Windows System
Enter 5900 as the ''Source port'' and localhost:5900 as the ''Destination'' and click on ''Add''. Finally return to the main screen ny clicking on the ''Session'' category. Enter a name for the session in the ''Saved Sessions'' text field and press save. Click on ''Open'' to establish the connection. A termial window will appear with the login prompt from the remote system. Enter your user login and password credentials.
The SSH connection is now established. Launch the TightVNC viewer and enter localhost::5900 in the ''VNC Server'' text field and click on ''Connect''. The viewer will establish the connection, prompt for the password and then display the desktop. You are now accessing the remopte remote desktop of a Linux system on Windows. == Creating Additional Desktops == In the examples so far we have only covered remote access to the primary desktop. By primary desktop we mean the desktop you see when you sit at your computer and turn on the monitor. While this is fine for a single user system we should not lose sight of the fact that Linux is a multi-user operating system and it will opften be necessary for more than one person to have remote desktop access at a time. While it might be fun to watch everyone fight over the mouse point as they share the same desktop it is clear that not much work will get done. The solution to this is to run multiple desktops for the users to connect to. New desktop environments are created using the ''vncserver'' utility. The first step is to assign a password to protect these desktops. THis can be achieved using the ''vncpasswd tool. Run this tool from the command-line prompt in a terminal window and enter the password of your choice. The desktop we have used so far in this chapter is desktop '':0''. New desktops must be assigned different numbers. For example to launch desktop ''1:'' run the following command from a terminal window command-line prompt: <pre>vncserver :1</pre> This will start a new desktop in the background ready for a remote user to connect to. To connect to the desktop follow tyhe steps for connecting to desktop '':0'' outlined above but this time use port 5901 instead of port 5900 (you will similarly use port 5902 for desktop :2 and so on). When the desktop appears you will notice that it does look much like the standard desktop: [[Image:Example.jpg]] The problem here is that we need to configure the VNC session to launch the correct desktop. To do this shutdown the VNC desktop session as follows: <pre>vncserver -kill :1</pre> Next go to your home folder and edit the .vnc/xstartup file. This will look similar to the following file: <pre>#!/bin/sh # Uncomment the following two lines for normal desktop:# unset SESSION_MANAGER# exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &twm &</pre> To configure thius startup script to launch the standard desktop (known as the GNOME desktop) change the ''twm&'' line so that the file reads: <pre>#!/bin/sh # Uncomment the following two lines for normal desktop:# unset SESSION_MANAGER# exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &gnome-session &</pre> Restart the vncserver and reconnect fromthe remote system. The full desktop should now appear in the VNC viewer window.

Navigation menu