Introduction
This article aims to summarize configuration of Ubuntu machines to be remotely accessed. All configurations were successfully tested on both Hardy and Intrepid. VNC (Virtual Network Computing) and its client Vinagre are the core packages.
Important Note: At the time this article was written, safety features for protection against “sniffers” from obtaining unencrypted passwords flowing to remote computers are not covered, as this subject is not fully understood by the author, who commits to resume to that at a later stage. Anyone who is familiar with the topic and wants to cooperate is very welcome.
Two typical scenarios are depicted, and each configuration is detailed. In all cases, it is assumed there are two computers in use: the local and the remote ones. The remote one is targeted to be accessed, whilst the local one is the enabler for that.
1.“Help Desk” type of access: The local user requests access to the remote user, which shall accept the request.
2.“Administrator” type of access: The remote machine is accessed by the administrator, who usually has a specific account (user name/password) on that machine. The remote login takes place exactly as if the remote user is in front of the machine. The remote user may even ignore that his computer is being accessed.
Help Desk access
The default installation of Hardy and Intrepid, both tested by the author, have, in principle, all the needed packages for the task. All configuration is done through the GNOME interface on the remote system:
Go to System > Preferences > Remote Desktop. The window “Remote Desktop Preferences” is opened.
On tab General, check the following boxes:
Allow other users to view your desktop;
Allow other users to control your desktop;
Ask you for confirmation.
(Optional)Leave unchecked the box:
Require the user to enter this password. If checked, the typed password will be requested when opening the remote session.
On tab Advanced, leave unchecked all check boxes under Network and Security. Under Notification Area, check “Only display an icon when there is someone connected”.
Restart the computer (preferable) and test connection on the machine you have just configured, by typing the below command on Terminal. A fake remote connection (actually, a local connection) is established and you shall see the standard GNOME welcome screen:
Most likely, port 5900 will work. In general, ports can be 5900 to 5909.
Administrator access
The default installation of both Hardy and Intrepid seem not to fulfil all the needs, therefore extra packages (all in Ubuntu repositories) have to be installed on the remote system. Here, both the GNOME and the Terminal interfaces are used:
Go to System > Administration > Login Window:
Remote tab, choose Style as “Same as Local” and “Default” Welcome Message.
Button “Configure XDMCP” will then show up. Click on it.
Window “XDMCP Login Window Preferences” will show up. Uncheck “Honor indirect requests”. Close all windows.
Open Terminal:
Install the missing packages:
Edit the Gnome Desktop Manager configuration file:
Find the below text and uncomment the “RemoteGreeter” line. Save and close the file.
Code:
# The greeter for xdmcp logins, usually you want a less graphically intensive
# greeter here so it's better to leave this with gdmlogin
RemoteGreeter=/usr/lib/gdm/gdmlogin
Set the VNC password. It will be required when authenticating the remote connection:
Add VNC service to xinetd. Probably, an empty file is created:
Paste the following lines onto the file. Save it and close it.
Code:
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
Restart the computer (preferable, rather than just restarting xinetd, VNC) and test connection on the machine you have just installed VNC, by typing the below command on Terminal. A fake remote connection (actually, a local connection) is established and you shall see the standard GNOME welcome screen:
Note that the code on file Xvnc explicitely defines port 5901.
Establishing remote connection
Note: When this article was written, Hardy and Intrepid had different versions of Vinagre installed (respectively 0.5.1 and 2.24.1). There are slight differences between them. The below description considers Hardy.
On remote computer's GNOME, choose Applications > Internet > Remote Desktop Viewer. The application Vinagre will show up. Click on Connect.
On Host, type the IP address of the machine you want to access remotely. For instance:
192.168.0.100
On Port, accept the default 5900 (or 5901 for Administrator access). If it doesn't work, you can find the correct port (590x) by scanning the open ports of the remote computer (System > Administration > Network Tools, tab Port Scan).
Click Connect, and connection is established.
References
http://www.movingtofreedom.org/2007/...dgy-gnu-linux/
http://ubuntuforums.org/showthread.php?t=795036
Bookmarks