I am having difficulty setting up vnc on a ubuntu server so that multiple authorised users can log to establish remote desktop sessions, without anyone needing to be logged in at the console. While we can easily get remote command line access (putty / ssh), we need the graphical interface e.g. for eclipse.
An attempt to log in from Windows using RealVNC's VncViewer, connecting to port 5901, 5902, or 5903, fails with an immediate message "The connection closed unexpectedly". Attempts to connect to other unconfigured ports fail as expected with a "connection refused" error.
I did succeed in getting remote desktop access using xming, but it was far too slow to be practical. In my previous job there was the kind of setup I'm trying to get working here and it was very successful. That was under Centos 5.
I've described below what I did. I'm sorry for the verbose description, but since I'm not sure where it's going wrong, I don't know which detail to leave out. I've tried searching the internet and found lots of threads dealing with similar difficulties with some solutions, but none seem to deal with exactly my situation, and the solutions refer to files not present on my system.
I'm a newbe to ubuntu, and a comparative newbe to linux. I would appreciate any help, or directions to elsewhere I might try.
----------------------------------------------------------
My system is Ubunto 9.04 64-bit server
From uname -a I get
Linux dh15k 2.6.28-16-server #55-Ubuntu SMP Tue Oct 20 20:37:10 UTC 2009 x86_64 GNU/Linux
For now at least, I'm trying all of this within a local network.
Here's what I did:
1. Using the Synaptic Package Manager, I installed the vnc4server (installed
version 4.1.1+x.org 1.0.2-0ubuntu7)
2. To /etc/services, I added the following lines:
#----------------------------------------------------
vnc-1 5901/tcp
vnc-2 5902/tcp
vnc-3 5903/tcp
#----------------------------------------------------
3. I added a file /etc/xinetd.d/xnvserver with the following content:
#-------------------------------------------
service vnc-1
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 640x480 -depth 8 securitytypes=none log_on_failure += USERID IdleTimeout=604800
}
service vnc-2
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 800x600 -depth 16 securitytypes=none log_on_failure += USERID IdleTimeout=604800
}
service vnc-3
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1000x760 -depth 16 securitytypes=none log_on_failure += USERID IdleTimeout=604800
}
#-------------------------------------------------------------------------------
4. I started System/Administration/Login Window and on the Remote tab, set style to be "Same as Local". I clicked on the "Configure XDMCP" button and ticked the box "Honor indirect requests".
Using ctrl-backspace I restarted GDM.
5. I restarted xinetd:
sudo /etc/init.d/xinetd restart
* Stopping internet superserver xinetd
* Starting internet superserver xinetd
Using the log viewer, from Syslog I can see that xinet.d has restarted. The log entries include the following:
Oct 27 15:31:01 dh15k xinetd[17031]: Reading included configuration file: /etc/xinetd.d/vncservers [file=/etc/xinetd.d/vncservers] [line=28]
and
Oct 27 15:31:01 dh15k xinetd[17031]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Oct 27 15:31:01 dh15k xinetd[17031]: Started working: 3 available services
6. To verify that my network or my vncviewer are not the source of the problem, I enabled a remote desktop:
/System/Preferences/Remote Desktop
I ticked the "Allow other users to view your desktop" and the "Allow other users to control your desktop".
Having done so, using vncviewer on the Windows system I was able to connect to my ubuntu system (xxx.xxx.xxx:0)and got the full desktop as expected.
This is probably the wrong place to be asking this, and no doubt it's a problem already well solvedin ubuntu, but I can't find what to do.
What next ??
Thanks in advance.
Bookmarks