View Full Version : HOWTO: Set up VNC server with resumable sessions
Pollywoggy
February 24th, 2007, 01:33 PM
[EDIT], Ok, I've gotten somewhere. While i was unable to even get to the password screen before, I now have an X server booting up. This post i (http://ubuntuforums.org/showpost.php?p=1951958&postcount=202) fixed it for me, the
-fp /usr/share/X11/fonts/misc needs to be changed to -fp /usr/share/fonts/X11/misc in your /etc/xinetd.d/Xvnc. Thanks bhamail!
Thanks, this helped me. I am now getting a screen. There is nothing on it but this is progress. I should have thought to check the path to the fonts when I first tried this and got errors, but I didn't.
Tadhg
February 24th, 2007, 01:39 PM
yea, unfortunately im getting the grey screen of death and i havent a clue how to fix it
Pollywoggy
February 24th, 2007, 01:46 PM
im having a little trouble with this.
VNC Viewer Free Edition 4.1.1 for X - built Jan 6 2007 09:49:08
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Sat Feb 24 15:18:13 2007
CConn: connected to host 127.0.0.1 port 5901
main: End of stream
This happened to me when I did not have a password set.
I then used the vncpasswd command to set one.
Pollywoggy
February 24th, 2007, 02:02 PM
im having a little trouble with this.
I'm trying to tunnel the VNC connection through another machine, so I set up a SSH session:
ssh -L 5901:192.168.0.5:5901 username@host.co -p 993
I just tried this and it works for me, but I am still getting the plain grey screen on the remote host. Some other setup must be required to get this working but the ssh part works.
I am using kdm, not gdm, so perhaps that is the reason I am getting the plain screen with nothing on it once I connect.
SBFC
February 25th, 2007, 10:51 AM
Aye, the grey screen of nothingness it is. Still haven't figured out what is causing it.
I'm especially perturbed since everything actually worked until I chose to 'Exit' Fluxbox.
Arg...
grumpymole
February 26th, 2007, 04:43 AM
If I remember, the grey-screen means that you have set up the connection, but the X server serving the session was not able to start an X session. Possible reasons are usually: (1) XDMCP is not enabled, or (2) problem with the script that starts the X session. Something set in it not allowing the X server to start.
Cheers
Pollywoggy
February 26th, 2007, 07:01 PM
I finally got this working in kubuntu using the following:
http://ubuntuforums.org/showthread.php?t=259448
There is a problem, though. When I do:
xvncviewer remotehost :1
xvncviewer connects not to "remotehost" but to localhost. It does this even if I use remotehost's IP address in place of "remotehost" in the xvncviewer command.
Pollywoggy
February 26th, 2007, 09:14 PM
I finally got this working in kubuntu using the following:
http://ubuntuforums.org/showthread.php?t=259448
There is a problem, though. When I do:
xvncviewer remotehost :1
xvncviewer connects not to "remotehost" but to localhost. It does this even if I use remotehost's IP address in place of "remotehost" in the xvncviewer command.
I got it working in kubuntu but it does not work in Debian Sarge and I believe it's because XFree86 is installed there, not xorg. Also the fonts must be in a different place in Debian Sarge.
zupidupi
February 27th, 2007, 11:16 AM
Hiya,
I'm fighting with the vnc as well. I have a a standard Ubuntu (Edgy) installation on a server, to which I want to set up a vnc-connection from a client running a live-cd bootup.
I've followed the step-by-step-guide at
http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
rather closely.
I have no problem connecting when both are running Gnome. I issue the command "vncviewer 192.168.1.102:1" from a terminal on the client, enter the vnc-password, and I get a login-window which works A-OK.
The problem arises when I try to open a connection *with the server in console mode*. I remove the gdm-link in the rc2.d-directory, start up the server again. When I try to connect again I get to enter the vnc-password, but then I get nothing but a grey screen.
It seems to me that I'm missing something. I read in another thread that it wouldn't be necessary to run a x-session on the server in order to get a GUI with vnc (http://www.linuxquestions.org/questions/showthread.php?t=523864, post #7) but I obviously need to do something else - fiddle with some settings, run some other daemon/program - you tell me!
Any help for solving this would be much appreciated!
Thx in advance,
Mike
Pollywoggy
February 27th, 2007, 01:54 PM
Hiya,
I'm fighting with the vnc as well. I have a a standard Ubuntu (Edgy) installation on a server, to which I want to set up a vnc-connection from a client running a live-cd bootup.
I've followed the step-by-step-guide at
http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
rather closely.
I have no problem connecting when both are running Gnome. I issue the command "vncviewer 192.168.1.102:1" from a terminal on the client, enter the vnc-password, and I get a login-window which works A-OK.
The problem arises when I try to open a connection *with the server in console mode*. I remove the gdm-link in the rc2.d-directory, start up the server again. When I try to connect again I get to enter the vnc-password, but then I get nothing but a grey screen.
It seems to me that I'm missing something. I read in another thread that it wouldn't be necessary to run a x-session on the server in order to get a GUI with vnc (http://www.linuxquestions.org/questions/showthread.php?t=523864, post #7) but I obviously need to do something else - fiddle with some settings, run some other daemon/program - you tell me!
Any help for solving this would be much appreciated!
Thx in advance,
Mike
There is a line in /etc/xinetd.d/Xvnc which points to where the fonts are located. I had to change this line, the default one was incorrect. Another thing is that on one of my systems, I am running Debian and that fonts line is incorrect but I can't find the correct path, so I can't use this method, I have to ssh to that host and start the vncserver as a user.
It's working on my machine that runs kubuntu Edgy. These are the vnc packages I have installed in kubuntu:
ii vnc4-common 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 Virtual network computing server software
ii vnc4server 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 Virtual network computing server software
ii xvncviewer 3.3.7-12ubuntu1 Virtual network computing client software
If you have xvnc4viewer installed, you should probably remove that. xvncviewer is the one you want.
I was even able to use VNC from a laptop running wifi, I just ran a command similar to
ssh -L 5901:192.168.1.100:5900 pollywog@remotehost
followed by
vncviewer localhost:5901
It's working on kubuntu but not Debian Sarge. On Sarge I use tightvncserver and it works but it's not as good as the setup on kubuntu. For one thing, I have to manually start the server in Sarge.
Underpants
March 2nd, 2007, 10:02 PM
Ok, to resume a session you started on your physical display (display :0) all you really need is to turn on Ubuntu's remote desktop feature using the Remote Desktop Preferences dialog box accessible from System->Preferences->Remote Desktop menu item. Just check the first two options there (allow other users to view your desktop and allow other users to control your desktop) and set the password in the bottom of the dialog box (check the REuqire password option), and you're done !
The above uses the built in VNC capability that Ubuntu comes installed with, but the drawback is that it's a little slow, and you need to enable it for each user which wants to allow his desktop to be view or controlled remotely. Also this doesn't allow remote VNC clients to log in to GDM, only to view a GDM session that was started by someone actually using the physical display. So if currently no one is logged in, a remote user cannot connect to display :0 and start a new session.
But don't worry - there is a better way which allows you to view the phyical display remotely and also log-in to a new session from GDM (using a remote VNC client) ! And it works faster (as fast as the regular VNC server), and works for all users. Here's how to do that :
1. Install x11vnc package
sudo apt-get install x11vnc
2. Add x11vnc service to xinetd:
sudo gedit /etc/xinetd.d/x11vnc
Enter this into the new file:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}
3. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)
sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo killall x11vnc
sudo /etc/init.d/xinetd start
4. From a remote machine use your VNC client to connect to display :0
vncviewer vnchost:0
Note that after loggging from GDM and also after logging out from the X-session back and going back to GDM, the VNC client gets disconnected for some reason. So you just need to re-connect and you will get back into the session you logged into. When logging out, the disconnect happens when gnome asks you to confirm your intention to log out, so it's best to turn off the log-out confirmation dialog box by going to System->Preferences->Sessions and un-checking the "ask on logout" option.
Please tell me how this works out for you....I plan to add this to the HOWTO
Alright...
I followed this:
http://ubuntuforums.org/showthread.php?p=771174#post771174
And everything goes well. I can connect at any time, but it doesn't prompt me for a password or anything of that nature.
I'd like to add the option to use a password file, or only enable localhost connections for SSH tunneling...
I need help securing this thing...
This works
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
This does not. When I try to connect I get an "EndOfStream" error with the linux viewer, or the windows viewer will give me fits about protocol negotiation.
server_args = -inetd -o /var/log/x11vnc.log -display :0 -rfbauth /home/aaron/.vncpasswd -many -bg
Help
Pollywoggy
March 2nd, 2007, 10:12 PM
I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.
Underpants
March 2nd, 2007, 10:25 PM
I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.
There sure is. check the man page.
slAoD
March 12th, 2007, 02:26 PM
I wonder if there is a way to force the VNC server to bind to localhost. I can then use SSH tunneling through localhost. I can do that now but it would be nice to be able to force the VNC server to only accept connections through localhost.
you could just block ports 5900-5901 with iptables..
So i have a question too.... i can connect to both 0,1 displays but i can't connect to display 1 with vnc over ssh.though i can connect to display 0 with vnc over ssh and display 1 with plain vnc (in port 5901)...any proposals?
note that i have configured both displays as mentioned in this thread.
Pollywoggy
March 12th, 2007, 03:25 PM
you could just block ports 5900-5901 with iptables..
So i have a question too.... i can connect to both 0,1 displays but i can't connect to display 1 with vnc over ssh.though i can connect to display 0 with vnc over ssh and display 1 with plain vnc (in port 5901)...any proposals?
note that i have configured both displays as mentioned in this thread.
I recall I had a similar problem relating to displays.
fuzzyeric
March 26th, 2007, 10:36 PM
I've been fighting with getting vnc4server working on AMD64 without any luck. An interesting current symptom is that I seem to have a link cycle now. (Both members of the cycle go away when vnc4server is removed.)
With:
vnc4-common_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
and
vnc4server_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
$ which Xvnc
/usr/bin/Xvnc
$ ls -laF /usr/bin/Xvnc
lrwxrwxrwx 1 root root 22 2007-03-26 21:16 /usr/bin/Xvnc -> /etc/alternatives/Xvnc*
$ ls -laF /etc/alternatives/Xvnc
lrwxrwxrwx 1 root root 14 2007-03-26 21:16 /etc/alternatives/Xvnc -> /usr/bin/Xvnc4*
Strangely, even with this, I get activity when I Xvnc manually. However, the net result is the "typical" xsession-less gray screen. Feh.
So, ..., two questions: How can a link cycle work at all? and Has anyone got a solution for the gray screen of limbo?
fuzzyeric
March 30th, 2007, 10:52 PM
Ignoring my brain damaged problem distinguishing (/usr/bin/)Xvnc and Xvnc4, is there any progress with getting a window manager to actually start under vnc4server on AMD64?
I've been fighting with getting vnc4server working on AMD64 without any luck. An interesting current symptom is that I seem to have a link cycle now. (Both members of the cycle go away when vnc4server is removed.)
With:
vnc4-common_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
and
vnc4server_4.1.1+xorg1.0.2-0ubuntu1.6.10.1_amd64.deb
$ which Xvnc
/usr/bin/Xvnc
$ ls -laF /usr/bin/Xvnc
lrwxrwxrwx 1 root root 22 2007-03-26 21:16 /usr/bin/Xvnc -> /etc/alternatives/Xvnc*
$ ls -laF /etc/alternatives/Xvnc
lrwxrwxrwx 1 root root 14 2007-03-26 21:16 /etc/alternatives/Xvnc -> /usr/bin/Xvnc4*
Strangely, even with this, I get activity when I Xvnc manually. However, the net result is the "typical" xsession-less gray screen. Feh.
So, ..., two questions: How can a link cycle work at all? and Has anyone got a solution for the gray screen of limbo?
fuzzyeric
March 30th, 2007, 11:39 PM
In case it was inobvious, I'm still pursuing an AMD64 solution because the "wget $1; wget $2; dpkg -i $1; dpkg -i $2" instructions for AMD64 users are completely unworkable. Both wget()s for the *4.0-7.3_amd64.deb files succeed. However, the dpkg() invocations fail with:
dpkg: dependency problems prevent configuration of vnc4server:
vnc4server depends on libstdc++5 (>= 1:3.3.4-1); however:
Package libstdc++5 is not installed.
vnc4server depends on xserver-common; however:
Package xserver-common is not installed.
I suspect the first is that my existing libstdc++6 (4.1.1-13) isn't a viable substitute for libstdc++5.
I suspect the second is that xserver-xorg-common doesn't exist, xserver-common having been replaced with x11-common about 15 months ago.
Of course, insisting that dpkg --ignore-depends the relevant packages will get both packages installed; and neither will work.
/usr/bin/Xvnc: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
So, the AMD64-specific instructions appear not to work on AMD64.
fuzzyeric
March 31st, 2007, 12:35 AM
I too have the "gray screen" on AMD64 problem. I've traced this problem down a bit. It's caused by
1) I don't start a GUI on display :0. (It's a headless server in a closet. No point in wasting a couple hundred MB in pointless footprint.)
2) Xvnc starts no window manager.
So, although KDE is an XDMCP server, it's not running and isn't started by the xinetd->Xvnc chain.
Resolution: Use vnc4server, which not only can start Xvnc, but can *also* start your window manager et al. Modify the /etc/xinetd.d/Xvnc file to read as:
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/vnc4server
server_args = :1 -geometry 1280x768 -depth 16 -query localhost -inetd -o
nce -fp /usr/share/fonts/X11/misc,/usr/share/fonts/X11/misc/,/usr/share/fonts/X1
1/Type1/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/ -DisconnectCli
ents=0 -AlwaysShared -IdleTimeout=0 passwordFile=/root/.vncpasswd
port = 5901
}
What's changed is the name of the server. The arguments have also been sorted to suit the syntax of vnc4server. Note that your desired arguments might be a bit different from mine.
fuzzyeric
March 31st, 2007, 12:38 AM
Note: this uses the vnc4server package from the universe repository, version 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 .
tubelius
April 5th, 2007, 06:22 AM
I have a problem. How can I get this working with fvwm2 window manager. I just get grey screen when I Login..
Pollywoggy
April 5th, 2007, 06:40 PM
I think the reason you are just getting a plain gray screen is that on the remote (server) side, you need to:
cd -
vi .vnc/xstartup
in the file xstartup put something like
fvwm2 &
Because of the way VNC is set up in this HOWTO, I believe you have to do that in /root rather than in your normal user directory.
tubelius
April 5th, 2007, 08:05 PM
Thanks for your reply, but it didn't solve the problem.
I tried creating that ~/.vnc/xstartup and /root/.vnc/xstartup with "xinit" line. xinit command works in terminal with my user and root user. I still get the same grey screen if I login with VNC. The xstartup file was not present, I had to create it. Could the config file be wrong / somewhere else?
Some details:
tubelius@radiant:/root$ locate xstartup
/home/tubelius/.vnc/xstartup
/root/.vnc/xstartup
tubelius@radiant:/root$ more /home/tubelius/.vnc/xstartup
xinit
tubelius@radiant:/root$ more /root/.vnc/xstartup
xinit
tubelius@radiant:/root$ more /home/tubelius/.xinitrc
/usr/bin/fvwm-themes-start
tubelius@radiant:/root$ more /root/.xinitrc
/usr/bin/fvwm-themes-start
Pollywoggy
April 5th, 2007, 10:44 PM
You followed the instructions for Ubuntu and you are using gdm as your session manager?
The instructions are slightly different for kdm.
tubelius
April 5th, 2007, 11:19 PM
Session manager is the login screen, right? I logged in from terminal and started fvwm manually. I try installing/fixing that gdm. Thanks.
Update: I got the gdm working, I can now login and run fvwm fron gdm login screen.
tubelius
April 6th, 2007, 12:03 AM
The GDM is working now, but I still get the grey screen when I login. How can I access GDM from VNC? I tried without xstartup file and with "gdm" command in it too. I still get no GDM running on Xvnc.
Pollywoggy
April 6th, 2007, 01:38 AM
The GDM is working now, but I still get the grey screen when I login. How can I access GDM from VNC? I tried without xstartup file and with "gdm" command in it too. I still get no GDM running on Xvnc.
Don't put gdm in the xstartup file. GDM (Gnome Desktop Manager) is your session manager and it should start automatically when you boot into Ubuntu. If it doesn't, do 'sudo dpkg-reconfigure gdm' and specify gdm as your session manager.
Did you enable XDMCP as shown in the first post of this thread? Since it appears you did not have gdm installed then, I think perhaps you had not done that. Also make sure you install only the packages shown and no other VNC packages.
You probably don't need the xstartup file if you follow the HOWTO exactly. I only use it because sometimes I start vncserver from my user account on the remote host.
Oh one more thing. You only need to run a session manager on the remote host and it can be gdm, kdm, or maybe xdm.
The session manager running on the remote host will give you a choice of window managers depending on what is installed. It will work the same as it does on your local machine.
tubelius
April 6th, 2007, 02:45 AM
Hey, I rebooted and it started working. Maybe the GDM wasn't working properly untill the reboot.
Thank you very much for your help.
Pollywoggy
April 6th, 2007, 11:43 AM
Hey, I rebooted and it started working. Maybe the GDM wasn't working properly untill the reboot.
Thank you very much for your help.
When you make changes to gdm, you need to restart it (you do not need to reboot) and when you make changes to xinetd.conf or inetd.conf, you need to restart xinetd or inetd.
About the only time you need to reboot in Linux is when you are booting to a new kernel.
to restart xinetd:
/etc/init.d/xinetd restart
for gdm:
/etc/init.d/gdm restart
Pollywoggy
April 7th, 2007, 12:16 PM
I just tried something that seems really useful.
I downloaded the deb-src packages for gdm and in the debian/rules file, I added the option
--enable-secureremote=yes
When the package was done compiling, I installed it and rebooted the machine.
Now when I use xvncviewer to connect, I get the gdm login with an option to login directly to another machine via xdmcp. I am not sure of this but I think this will only work if the remote host is running sshd (ssh server). The nice thing is that you do not need to login to the local machine first, you can login directly to the remote machine.
GDM is not compiled with --enable-secureremote=yes by default, so you will need to compile it after executing 'sudo apt-get build-dep gdm'
Hubris2
April 7th, 2007, 12:22 PM
VNC is not considered to be terribly secure....I wouldn't implement it on an important box without restricting logons to local...and using SSH to tunnel in.
Pollywoggy
April 7th, 2007, 12:37 PM
I need to add that I recompiled gdm with the secure option (see my previous post) on the client machine. When I get gdm's login window, there is a choice of sessions (KDE, Gnome, etc) but there is one more that reads "secure remote connection" or something like that. I select it and then a window opens up without my having to login to the local machine at all. The window asks for the hostname of the remote host. This only works if the remote host is running SSH.
I then get a prompt for my login and SSH passphrase. When I am logged in it looks as though I am sitting in front of the remote host.
I don't think it is necessary to compile the remote host (the vnc server) gdm with this option, only the client.
Since the passphrase works, I must have somehow been logged in at the local machine though it is not obvious.
simon0t7
April 8th, 2007, 03:28 PM
hm.. i just installed ubuntu 6.1 on my new amd machine, but I'm getting a problem when trying to install the resumable vnc software. I dont think i can live without it after installing it on my other machine.
anyways, I'm stuck at the vnc4server installation step:
I'm using an AMD Sempron processor
simon@albatron:~$ sudo dpkg -i vnc4server_4.0-7.3_amd64.deb
Selecting previously deselected package vnc4server.
(Reading database ... 87464 files and directories currently installed.)
Unpacking vnc4server (from vnc4server_4.0-7.3_amd64.deb) ...
dpkg: dependency problems prevent configuration of vnc4server:
vnc4server depends on xserver-common; however:
Package xserver-common is not installed.
dpkg: error processing vnc4server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
vnc4serve
if I remove vnc4server and attempt to install xserver-common I get broken packages.
The following packages have unmet dependencies:
openoffice.org-l10n-en-gb: Depends: openoffice.org-common (>= 2.0.4~rc3) but it is not going to be installed or
language-support-en but it is not going to be installed
Depends: openoffice.org-common (< 2.0.5) but it is not going to be installed or
language-support-en but it is not going to be installed
openoffice.org-l10n-en-za: Depends: openoffice.org-common (>= 2.0.4~rc3) but it is not going to be installed or
language-support-en but it is not going to be installed
Depends: openoffice.org-common (< 2.0.5) but it is not going to be installed or
language-support-en but it is not going to be installed
E: Broken packages
what should i do? I did follow the other steps of xdmcp & getting the extra repositories.
The other thing I've done so far was install ssh, nvidia driver and run synaptic upgrade
Thanks,
S
Pollywoggy
April 8th, 2007, 03:42 PM
hm.. i just installed ubuntu 6.1 on my new amd machine, but I'm getting a problem when trying to install the resumable vnc software. I dont think i can live without it after installing it on my other machine.
anyways, I'm stuck at the vnc4server installation step:
I'm using an AMD Sempron processor
if I remove vnc4server and attempt to install xserver-common I get broken packages.
what should i do? I did follow the other steps of xdmcp & getting the extra repositories.
The other thing I've done so far was install ssh, nvidia driver and run synaptic upgrade
Thanks,
S
This is what I have on my kubuntu Edgy system, in addition to having installed gdm in place of kdm:
ii vnc4-common 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 Virtual network computing server software
ii vnc4server 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 Virtual network computing server software
ii xvncviewer 3.3.7-12ubuntu1 Virtual network computing client
You can use kdm but kdm will not give you the option of securely (ssh) connecting to the remote host. gdm will give that option only if you compile it yourself with the option enabled.
I would try 'sudo apt-get remove vnc4server', then try to remove vnc-common and then install vnc4-common and vnc4-server. The HOWTO says that xvnc4viewer will not work. Install xvncviewer last.
simon0t7
April 8th, 2007, 08:34 PM
hm.. those two packages don't exist for me vnc4-server and vnc4-common
Pollywoggy
April 8th, 2007, 08:52 PM
hm.. those two packages don't exist for me vnc4-server and vnc4-common
pollywog@slider:~$ apt-cache policy vnc4-common
vnc4-common:
Installed: 4.1.1+xorg1.0.2-0ubuntu1.6.10.1
Candidate: 4.1.1+xorg1.0.2-0ubuntu1.6.10.1
Version table:
*** 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 0
500 http://security.ubuntu.com edgy-security/universe Packages
500 http://archive.ubuntu.com edgy-security/universe Packages
100 /var/lib/dpkg/status
4.1.1+xorg1.0.2-0ubuntu1 0
500 http://us.archive.ubuntu.com edgy/universe Packages
You will need to enable 'universe' in your /etc/apt/sources.list
simon0t7
April 9th, 2007, 07:23 PM
Ahh...I blindly copied the sources list from the 5.10 file, so the links were busted
Installed but not fully configured
simon@albatron:~$ vncviewer localhost:1
VNC viewer version 3.3.7 - built Jul 4 2006 10:09:06
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
almost there....
I did enable remote logobe, and for configure XDMCP, i had that unchecked (disabled)
gurgle
April 10th, 2007, 12:31 AM
i am still getting the "grey x" screen. any fix out for this yet?
simon0t7
April 11th, 2007, 06:57 AM
sweet! got mine up and running
gurgle: I got that problem too, but after I installed the display drivers and downgraded vnc4server to vnc4server /edgy, the problem went away.
if you install the newest upgrades in gdm or through apt-get ugprade, it will upgrade to a newer vnc4server which prevented me from vncing back into the system
deserthowler
April 15th, 2007, 09:32 PM
I tried this and it worked just as you said. Great. :KS :KS :KS :KS :KS
I am running UBUNTU 6.06 on a PII as a server and a Sun U30 running Debian Etch.
Earl Violet
Hubris2
April 20th, 2007, 12:37 PM
I just did an upgrade to Feisty, and find myself back able to connect in via SSH, but VNC sessions to :1 are immediately disconnected. Since I'm currently working from a shell, it's the hard way to configure things..especially if not positive what needs to be done.
GDM remote is enabled, the VNC password is set, I have connectivity through a SSH....did we ever figure out exactly what the step was to fix immediate disconnects the moment you try connect to a VNC4Server session?
Thanks!
It seems that Feisty doesn't change the version of Vnc4Server from the 'latest' on Edgy...that broke a number of our sessions. Perhaps a downgrade would fix things like it did before. As I'm currently stuck at a shell, I can't run update manager to verify what the last version was. I know I can downgrade from a command prompt, but I need to know the exact name of the older vnc4server package. Can anyone help me out?
Update - I removed the default VNC4Server package the installed with Feisty, and manually downloaded vnc4server_4.1.1+xorg1.0.2-0ubuntu1_i386.deb . When installed, my errors about refusing connections went away. One problem....it gives me the Gnome login prompt, but after I enter my ID and pass...it just puts me back to the login prompt. If I put in an incorrect password it states it - when it's correct there's no error, it just won't let me past the login screen.
I'm already signed in on display 0, before it used to give a warning but allow a second login on display 1. Has something changed to not allow multiple Gnome logins with the same ID?
Hubris2
April 23rd, 2007, 09:16 AM
Does anybody know why I might be able to connect to a session on display 1, but when I enter a correct username and password combo, I'm just returned to a gnome login prompt? If my password is incorrect it tells me....but when everything is correct, the login just doesn't happen.
During this time I see one entry in the syslog, about Transport Endpoint not being connected.
Alternatively, can someone recommend another VNC server that has similar functionality to VNC4Server, but that doesn't seem to have problems like many have expressed here...and have been documented in bug reports since January?
Thanks,
sefs
April 23rd, 2007, 01:01 PM
How do you do the first part of this article on feisty.
that is the enabling of the xdmcp
Thanks.
gesquive
April 24th, 2007, 12:24 AM
This goes for both Fiesty and Edgy:
Goto System -> Administration -> Login Window and click on the Remote tab.
In the Style dropdown select "Same as Local". This should make a "Configure XDMPC" button to appear in the bottom right corner. Just click on it and make sure that "Honor indirect requests" is checked. The default settings worked just fine for me.
shill88
April 28th, 2007, 06:15 PM
I tried installing using this guide but I get ReadFromRFBServer: rdr::EndOfStream after I enter the VNC password for VNCViewer.
I tried downgrading to the edgy version using the following command.
sudo apt-get install vnc4viewer/edgy
but it returns
E: Couldn't find package vnc4viewer
How can I fix this error or install the edgy version?
Thanks
Shawn
scarpent
April 28th, 2007, 08:05 PM
You need vnc4server/edgy, not vnc4viewer/edgy.
This thread was very helpful to me in getting this working -- I wrote up a howto at:
http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
That has everything I learned consolidated. I saw that same EndOfStream error also.
shill88
April 28th, 2007, 09:48 PM
shawn@shawn-desktop:~$ sudo apt-get install vnc4server/edgy xinetd
Password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Release 'edgy' for 'vnc4server' was not found
Sorry I should have put that before.
This is on Feisty BTW
Shawn
bhamail
April 28th, 2007, 10:00 PM
Hi Shawn,
I don't know how to make this work on Fiesty (in fact, I just upgraded a box to Fiesty, and I'm now back to square one...). If anyone knows how to make this work on Fiesty, please post!
Dan
Hubris2
May 1st, 2007, 02:17 PM
As near as I can tell..the most recent binary in the repository (a custom build for Ubuntu) for VNC4Server is broken...it has problems that lead to connection problems (which I am experiencing since my upgrade to Feisty) and others are also able to connect, but have issues running certain applications (related to the version of GCC used to compile the custom version).
A number of people have made suggestions that 'fix' things for them, but in my experience, nobody has actually found the 'solution' to these issues. There is an official bug report on the issue and has been for months, but the binary is not being fixed, and nobody is assigned to the problem.
Today, if you follow this guide, I do not believe you will have a working VNC session - whether in Edgy or Feisty.
dantemustdie94
May 3rd, 2007, 08:58 PM
Hey this was very helpful. When I connect on localhost the screen is black and when I connect remotely the screen is black here is a screen shot of what I get. http://img68.imageshack.us/img68/1016/vncgaynesson1.jpg the mouse moves and on the vncviewer but not on the machine with the vncserver
scarpent
May 4th, 2007, 03:27 PM
Here's something, perhaps some hope for the problem of the broken vnc4server. Warren over at grumpymole mentions a -extension XFIXES option you can add to your command that appears to work with the latest vnc4server. There is also an new option in Feisty Fawn you have to get right so you can have multiple logons.
Warren's post: http://grumpymole.blogspot.com/2007/04/workaround-for-vnc4server-end-of-stream.html
Discussion at launchpad.net: https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/78282
I upgraded one of my Ubuntu Edgy (6.10) machines with the latest vnc4server (through the GUI software updater), and confirmed that it broke my VNC setup. (Viewer is prompted for password, but got a "connection closed" immediately after typing in password.) Then I tried the -extension XFIXES option in /etc/xinetd.d/Xvnc and after a reboot VNC worked again. I'm going to update my guide at movingtofreedom.org with this info.
I don't have any Feisty machines so can't confirm about the multiple logon setting.
Hope this is helpful for somebody!
Aellus
May 4th, 2007, 04:05 PM
Hey guys,
I too have been fighting with the rdr::EndOfStream error for a while, couldn't figure out how to do this at all with GDM. I had the same problem on Edgy, gave up and just left a user logged in and used the normal vnc util that comes with Ubuntu. I just recently upgraded to Feisty and had the same problem.
The link above solved my problem completely... adding the following line to the server_args in the Xvnc script worked!
-extension XFIXES
willsomebody
May 5th, 2007, 06:34 PM
I am a complete linux noob.
When I try to set the password with this command: sudo vncpasswd /root/.vncpasswd, it tells me the password is too short. What am I doing wrong?
penno
May 6th, 2007, 04:29 AM
Great guide Tichondrius and everyone who contributed. ^_^ Thank you.
Does anyone know how to get copy and paste working? (From remote to host and vice versa?) I've played around with the -SendCutText and -AcceptCutText parameters in the server_args section of Xvnc, but to no avail.... Sad huh.
Hubris2
May 8th, 2007, 09:18 AM
I can also confirm that updating to the latest version available from the repositories and adding the -extension XFIXES yields exactly the same result as does going back to the old version....it does not immediately disconnect after you enter your VNC password. Thanks!
However....as indicated, I am having exactly the same results...which in my case is not good. I get a Gnome login prompt, and when I enter a correct ID and password, it just returns to the login prompt. My syslog shows the following entry:
warning: can't get client address: Transport endpoint is not connected
I've had this problem ever since I upgraded to Feisty, and haven't been able to use VNC4Server once - although it worked perfectly under Edgy.
Does anyone have any suggestions?
Thanks,
schwieb
May 8th, 2007, 12:34 PM
If you are having trouble using this with multiple users in Feisty, there is a simple fix.
Go to System > Administration > Login Window
On the "General" tab uncheck the box marked "Disable multiple logins for a single user"
hotani
May 8th, 2007, 01:43 PM
Trying to set this up on Dapper. I've done everything in this thread (several times), rebooted, reconfigured, re-edited, etc....
But I'm still getting this same frakking error:
VNC viewer version 3.3.7 - built Mar 8 2007 21:56:52
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server
I even have it working on another identical machine. I can't see a difference between the two. What is happening here?
After making several of the gdm.conf file changes, I noticed in the WORKING config, that under [xdmcp], it was set to 'false'!
The XDMCP setting mentioned in the first post doesn't even exist. The config is called "Login Window" and has no such method of "enabling xdmcp". And according to my working config, it isn't even necessary.
What is this "ConnectToTcpAddr" error? VNC is set up, the password is set up, the firewall has the port open.
EDIT: wow. in the Xvnc file, it will throw the above error if you change the formatting from:
service Xvnc
{
to:
service Xvnc {
So that was a stupid error on my part, I am extremely anal about my own code and just reformatted it to fit. I had no idea it would be so finicky. Oh well. Anyway, my above comments stand: the 'allow indirect login' box does NOT need to be unchecked, the edits to gdm.conf are completely unnecessary, and if you leave the formatting alone in the Xvnc file, you should be fine. *grumble, grumble*
Sharpeee
May 10th, 2007, 11:20 AM
Okay, I followed the how-to exactly, but it doesn't work. When I try to connect to the server I get this after I entered the password:
vncviewer localhost:1
VNC Viewer Free Edition 4.1.1 for X - built Jan 7 2007 17:30:38
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Thu May 10 17:08:23 2007
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Thu May 10 17:08:27 2007
main: End of stream
Just to get this far I had to install xvnc4viewer, the "standard" vncviewer refused it totally.
I'm running a fresh install of Feisty if that helps.
SeanOB
May 10th, 2007, 05:28 PM
I'm on an AMD64 with a fresh install of feisty.
VNC was the first app I wanted to install b/c I don't have a KVM yet...
I was originally planning on just manually running vncserver something like this:
vncserver -geometry 1920x1200 -desktop "My Desktop"
I couldn't get connected... so I went through the TODO - figuring I'd just take the trodden path, even if it's not quite what I want.
Ultimately I'd like my users to be able to run vncserver from the command line and then connect as needed to their own sessions - each with resolutions appropriate for their PCs.
The trodden path didn't work for me either; and that's *with* the - -extension XFIXES addition to the Xvnc script.
Are there any other tricks that I need to be aware of? Maybe something AMD64 specific?
I did NOT follow the TODO AMD64 manual download steps because apt got me a version that was more up-to-date than the manual download told me to get.
OH - here's what I get when I try to connect... I get a connection failed do you want to reconnect message dialog box from RealVNC. When I click yes the desktop pops up - filled PINK (not the X gray pattern) that goes away almost as soon as it pops up.
Any ideas of where I can look? I don't even know where to look for logs for this. I just blindly followed the TODO.
Thanks!
Sean
danzinho
May 11th, 2007, 06:49 AM
Hi everyone
I've followed the HOWTO taking note of the XFIXES issue (which got round one problem). All seems well until I issue
$ vncviewer localhost:1
I get this
VNC viewer version 3.3.7 - built Jul 4 2006 10:04:48
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.8 (viewer 3.3)
Password:
VNC authentication succeeded
Desktop name "x11"
Connected to VNC server, using protocol version 3.3
VNC server default format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
Using default colormap and visual, TrueColor, depth 24.
Got 256 exact BGR233 colours out of 256
Using BGR233 pixel format:
8 bits per pixel.
True colour: max red 7 green 7 blue 3, shift red 0 green 3 blue 6
Using shared memory PutImage
and then dappled black/white screen seen by an earlier poster. It has a simple black diagonal cross cursor which moves but doesn't respond to mouse clicks.
Can anyone help me take the final step to getting VNC working?
Many thanks
Daniel
deserthowler
May 14th, 2007, 02:37 AM
I haven't had a chance to look at this thread for a while so am kind of behind. The b/w tweed you are seeing might be twm. It looks like twm on my Debian Sarge server. Check if you have TWM and menu loaded on your machine.
If you don't have menu, that could account for no response to mouse clicks.
I think twm is the default window manager for some of the vnc servers. You might need to reconfigure to get it to open to the gnome or kde login manager.
I'm not sure as twm was my default manager for my server.
Earl
danzinho
May 14th, 2007, 05:44 AM
Dear Earl
I think you're onto something when you say maybe the wrong windows manager (TWM) is being started. A while back, on another flavour of Linux, I did have to change the configuration to get my normal GDE going. At that time VNC looked at a bunch of files in ~/.vnc/ including one, xstartup, that had this line in it
/usr/bin/startkde &
If this is all right then the question is simple - where is the corresponding file now that I need to edit to point at KDE?
Thanks for your help
Dan
heckheck
May 19th, 2007, 10:19 PM
Hi everyone
I've followed the HOWTO taking note of the XFIXES issue (which got round one problem). All seems well until I issue
$ vncviewer localhost:1
and then dappled black/white screen seen by an earlier poster. It has a simple black diagonal cross cursor which moves but doesn't respond to mouse clicks.
Can anyone help me take the final step to getting VNC working?
Many thanks
Daniel
The HOWTO is good, but it misses a few tricks that will help to resolve your problem. Basically I was in the same boat as you, working from a brand new Feisty installation. All it takes is a few tweaks and you should be good to go.
First off, the window manager you see (tweed) is the twm window manager. There is no mouse support, because this window manager isn't fully installed on your system. Specifically, the menu package is not installed. If you start aptitude or synaptic and properly install twm, you would have a working system. But what you really want is GNOME, right?
Well to get that you need to get vncserver operating with the correct config files. The HOWTO steps don't cover creating a xstartup config file for VNC to use that will allow you to choose your window manager (you're getting twm just by pure default). The easiest way to do this is as follows (cut from my personal TWIKI, so forgive the format hack job):
* Installation with aptitiude
root@heckmedia:~# aptitude install vnc4server xinetd
* First as root, we want to first establish configuration files in the /root/.vnc directory. This requires creating a VNC password.
root@heckmedia:~# vncpasswd
Password:
Verify:
* Next, invoke the vncserver to cause the rest of the configuration files to be created. Immediately kill the server, since we won't be using it (instead xinetd will start the vncserver on demand when we try to VNC in).
root@heckmedia:~# vncserver
New 'heckmedia:1 (root)' desktop is heckmedia:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/heckmedia:1.log
root@heckmedia:~# vncserver -kill :1
Killing Xvnc process ID 12108
* Now change the session window manager in the /root/.vnc/xstartup file from 'twm' to 'gnome-session'
root@heckmedia:~# cd .vnc/
root@heckmedia:~/.vnc# ls
heckmedia:1.log passwd xstartup
root@heckmedia:~/.vnc# emacs xstartup
root@heckmedia:~/.vnc# diff xstartup xstartup~
12c12
< gnome-session &
---
> twm &
* Next we need some configuration to start Xvnc as a service under xinetd. Create the file /etc/xinetd.d/Xvnc using cat and input redirection. Close the input stream with a Control-D.
root@heckmedia:~/.vnc# cd /etc/xinetd.d/
root@heckmedia:/etc/xinetd.d# cat > Xvnc
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 1280x1024 -depth 24 -once -DisconnectClients=0 -NeverShared passwordFile=/root/.vnc/passwd -extension XFIXES
port = 5901
}
* Now stop and restart the xinetd daemon, killing any Xvnc processes in between.
root@heckmedia:/etc/xinetd.d# /etc/init.d/xinetd stop
Stopping internet superserver: xinetd.
root@heckmedia:/etc/xinetd.d# killall Xvnc
root@heckmedia:/etc/xinetd.d# /etc/init.d/xinetd start
Starting internet superserver: xinetd.
* A reboot seems necessary at this point. I have not been successful using VNC the first time without it.
* Finally try to login from a remote computer to IP Address:1 using a VNC client.
* It is also possible to test using vncviewer to localhost:1
* Sessions will not end when you close the VNC client unless you log out!
That should just about do it. You should now be able to remotely login.
Good luck,
h_h
danzinho
May 22nd, 2007, 06:24 AM
Dear h h
Thanks very much for the reply. Unfortunately, I still seem to be missing something. I've changed the configuration files like you said, but I'm still getting the tweed window manager.
/root/.vnc/xstartup looks like this
--------------------------------------------------------------------------------------------
#!/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/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
--------------------------------------------------------------------------------------------
and /etc/xinetd.d/Xvnc looks like this
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 1280x1024 -depth 24 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vnc/passwd -extension XFIXES
port = 5901
}
Some queries
-- should those lines at the top of xstartup remain commented out? I did try uncommenting but that didn;t seem to help. It's not clear what a 'normal desktop' means in this context.
-- -fp /usr/share/fonts/X11/misc in Xvnc seems necessary for me - I get additional errors otherwise.
-- this setup seems to imply that logging on via vnc would be as root. That might have security issues and I'd rather just log on as me anyway. What would need changing to allow that?
-- any idea why I'm still getting the dratted tweed manager?!
Thanks very much for your help
Daniel
BDNiner
May 22nd, 2007, 01:06 PM
Wow these instructions actually worked for me. First time i have followed instructions on linux and they have worked the first time. The instructions at the beginging of the thread did work. I am new the linux so i have no idea why, i am just happy that it works and i didn't spend all day on it.
Ok, to resume a session you started on your physical display (display :0) all you really need is to turn on Ubuntu's remote desktop feature using the Remote Desktop Preferences dialog box accessible from System->Preferences->Remote Desktop menu item. Just check the first two options there (allow other users to view your desktop and allow other users to control your desktop) and set the password in the bottom of the dialog box (check the REuqire password option), and you're done !
The above uses the built in VNC capability that Ubuntu comes installed with, but the drawback is that it's a little slow, and you need to enable it for each user which wants to allow his desktop to be view or controlled remotely. Also this doesn't allow remote VNC clients to log in to GDM, only to view a GDM session that was started by someone actually using the physical display. So if currently no one is logged in, a remote user cannot connect to display :0 and start a new session.
But don't worry - there is a better way which allows you to view the phyical display remotely and also log-in to a new session from GDM (using a remote VNC client) ! And it works faster (as fast as the regular VNC server), and works for all users. Here's how to do that :
1. Install x11vnc package
sudo apt-get install x11vnc
2. Add x11vnc service to xinetd:
sudo gedit /etc/xinetd.d/x11vnc
Enter this into the new file:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}
3. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)
sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo killall x11vnc
sudo /etc/init.d/xinetd start
4. From a remote machine use your VNC client to connect to display :0
vncviewer vnchost:0
Note that after loggging from GDM and also after logging out from the X-session back and going back to GDM, the VNC client gets disconnected for some reason. So you just need to re-connect and you will get back into the session you logged into. When logging out, the disconnect happens when gnome asks you to confirm your intention to log out, so it's best to turn off the log-out confirmation dialog box by going to System->Preferences->Sessions and un-checking the "ask on logout" option.
Please tell me how this works out for you....I plan to add this to the HOWTO
BDNiner
May 22nd, 2007, 01:28 PM
i guess i spoke too soon. After a reboot i was unable to connect using the same options as before. I had to use vnc to connect to x.x.x.x:2 instead of x.x.x.x:1 like i did the first time. when i connect to x.x.x.x:1 i get the same grey screen. Also i need to keep looking and find out how to load these option on login.
BDNiner
May 23rd, 2007, 01:09 PM
After i did what is outlined in this post i was able to connect fine. the machine even shows up on the options menu before you log in.
I have just got to the bottom of this one myself.
gdm needs to be running, and xdmcp also needs to be enabled.
To start gdm use the following command on the machine you are trying to remote to ( this assumes you can either physically access it, or you have already "ssh"ed in Terminal)
sudo /etc/init.d/gdm start (you might then need to wait a minute, depending on the speed on your machine)
Next ensure that XDMCP is enabled
sudo gedit /etc/X11/gdm/gdm.conf
or
sudo nano /etc/X11/gdm/gdm.conf (if doing this through Terminal)
and find the [xdmcp] section at the end of the file
change
Enabled=False
to
Enabled=True
Then save and then best to reboot. of course if gdm is not loaded on boot, you will have to start it again
sastian
May 23rd, 2007, 04:04 PM
The HOWTO is good, but it misses a few tricks that will help to resolve your problem. Basically I was in the same boat as you, working from a brand new Feisty installation. All it takes is a few tweaks and you should be good to go.
First off, the window manager you see (tweed) is the twm window manager. There is no mouse support, because this window manager isn't fully installed on your system. Specifically, the menu package is not installed. If you start aptitude or synaptic and properly install twm, you would have a working system. But what you really want is GNOME, right?
Well to get that you need to get vncserver operating with the correct config files. The HOWTO steps don't cover creating a xstartup config file for VNC to use that will allow you to choose your window manager (you're getting twm just by pure default). The easiest way to do this is as follows (cut from my personal TWIKI, so forgive the format hack job):
* Installation with aptitiude
root@heckmedia:~# aptitude install vnc4server xinetd
* First as root, we want to first establish configuration files in the /root/.vnc directory. This requires creating a VNC password.
root@heckmedia:~# vncpasswd
Password:
Verify:
* Next, invoke the vncserver to cause the rest of the configuration files to be created. Immediately kill the server, since we won't be using it (instead xinetd will start the vncserver on demand when we try to VNC in).
root@heckmedia:~# vncserver
New 'heckmedia:1 (root)' desktop is heckmedia:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/heckmedia:1.log
root@heckmedia:~# vncserver -kill :1
Killing Xvnc process ID 12108
* Now change the session window manager in the /root/.vnc/xstartup file from 'twm' to 'gnome-session'
root@heckmedia:~# cd .vnc/
root@heckmedia:~/.vnc# ls
heckmedia:1.log passwd xstartup
root@heckmedia:~/.vnc# emacs xstartup
root@heckmedia:~/.vnc# diff xstartup xstartup~
12c12
< gnome-session &
---
> twm &
* Next we need some configuration to start Xvnc as a service under xinetd. Create the file /etc/xinetd.d/Xvnc using cat and input redirection. Close the input stream with a Control-D.
root@heckmedia:~/.vnc# cd /etc/xinetd.d/
root@heckmedia:/etc/xinetd.d# cat > Xvnc
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 1280x1024 -depth 24 -once -DisconnectClients=0 -NeverShared passwordFile=/root/.vnc/passwd -extension XFIXES
port = 5901
}
* Now stop and restart the xinetd daemon, killing any Xvnc processes in between.
root@heckmedia:/etc/xinetd.d# /etc/init.d/xinetd stop
Stopping internet superserver: xinetd.
root@heckmedia:/etc/xinetd.d# killall Xvnc
root@heckmedia:/etc/xinetd.d# /etc/init.d/xinetd start
Starting internet superserver: xinetd.
* A reboot seems necessary at this point. I have not been successful using VNC the first time without it.
* Finally try to login from a remote computer to IP Address:1 using a VNC client.
* It is also possible to test using vncviewer to localhost:1
* Sessions will not end when you close the VNC client unless you log out!
That should just about do it. You should now be able to remotely login.
Good luck,
h_h
I have tried this on a new server i just set up but i didnt do it as root..
and i have no xstartup file.. should i make one or startover as root and itll make one then?
:(
antoniuk
May 31st, 2007, 01:36 PM
Looks like I needed to update my vnc client to get it to work with vnc4server. I think there was some authentication thingies (technical term) updated that only allow for something or another... eithr way all is well again
Lowfront
June 9th, 2007, 11:04 PM
Ok so I went through this guide and got to the point of being able to "remote" connect to the same machine I worked on
I want to be able to remote connect from my laptop to the computer while I'm away for the day. How would I go about doing this.
I believe I have the desktop set up properly just need to figure out what do to with the laptop.
This is what I attemped to do........no clue though
lowfront@lowfront-x60:~$ vncviewer 192.168.1.103::5901
VNC viewer version 3.3.7 - built Mar 8 2007 21:56:52
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server
mpadams
June 12th, 2007, 02:05 PM
1. Add "flags = IPv6" to the x11vnc file.
2. Restart xinetd if needed.
3. Use the IPv6 TightVNC viewer (free) or RealVNC 4.1 (pay) to access it. Not sure what other Linux or Windows clients support IPv6 at this time.
http://jungla.dit.upm.es/~acosta/paginas/vncIPv6.html
http://www.realvnc.com/products/enterprise/4.1/ipv6.html
Reference: "IPv6 in Practice" http://www.benedikt-stockebrand.de/books_e.html
beengone
June 29th, 2007, 03:44 PM
Running Xubuntu 7
for step 4:
Add vnc service to xinetd:
Code: sudo gedit /etc/xinetd.d/Xvnc
I get errors.
Warning: unknown mime-type for "/etc/xinetd.d/Xvnc" - - using "application/*"
Error: now write permission for file "/etc/xinetd.d/Xvnc"
Any idea how to fix this?
hobs0n
July 1st, 2007, 01:59 AM
First I wanna say: Thank you for making this great newb helping guide thread :D
My problem is: when I run the test you said "vncviewer localhost:1" it says: "ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)"
I followed your guide and did all as you said but I couldnt find the "enable xdmcp" options. Im running latest Xubuntu so I guess the xdmcp options isnt where it says it is in your guide?
hotani
July 1st, 2007, 03:22 AM
hobs0n: the "enable xdmcp" option is not there. Instead of marking a checkbox for it, go into the 'login window' prefs and under the 'remote' tab, set it to 'simple' which should do the same thing.
Also, I had the same problem when trying to run locally. use "localhost:5900" or whatever port you are using instead of "localhost:1" which did it for me.
hobs0n
July 1st, 2007, 03:56 AM
Ok, I started the "login window" app and the remote tab, I found no simple, my options was: same as local, plain, plain with face browser. I guess instead of simple its called plain? I selected plain and connected to my port that was 5901, still get the same "ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)" error. What am I doing wrong?
hotani
July 1st, 2007, 04:30 PM
right - sorry, it is 'plain' and not 'simple', i'm getting my control panels mixed up.
As for the error, I'm not sure what is causing that. Do you have the vnc port open on the machine? And is the xinetd server awaiting connections (via the Xvnc script in the howto)?
hobs0n
July 2nd, 2007, 11:42 AM
I rechecked the howto and found nothing wrong what I have done, altho when I read deeper in the thread I found when I ran "grep xinetd /var/log/syslog" as Tichondrius said I get HEAPS of error messages :
"Jul 2 17:30:42 vargtass-server xinetd[7572]: warning: can't get client address: Transport endpoint is not connected
Jul 2 17:30:42 vargtass-server xinetd[7573]: warning: can't get client address: Transport endpoint is not connected
Jul 2 17:30:42 vargtass-server xinetd[7191]: Deactivating service Xvnc due to excessive incoming connections. Restarting in 10 seconds.
Jul 2 17:30:52 vargtass-server xinetd[7191]: Activating service Xvnc"
Earlier in the log file it shows:
"Jul 2 17:28:10 vargtass-server xinetd[7191]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26]
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing chargen
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing chargen
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing daytime
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing daytime
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing discard
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing discard
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing echo
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing echo
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing time
Jul 2 17:28:10 vargtass-server xinetd[7191]: removing time
Jul 2 17:28:10 vargtass-server xinetd[7191]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Jul 2 17:28:10 vargtass-server xinetd[7191]: Started working: 1 available service
Jul 2 17:28:57 vargtass-server xinetd[7207]: warning: can't get client address: Transport endpoint is not connected"
Might this be that it isnt listening to the port??
EDIT: I add the I just restarted the machine which didnt help, I also want to say that in the Post (http://ubuntuforums.org/report.php?p=688683) in this page, Tichondrius said: "sudo Xvnc :2 -query localhost -geometry 1280x1024 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd" and I tried that and it said: "Unrecognized option: -DisconnectClients=0" and I tried to remove that option and then it said that command was wrong and I tried remove more options but I gave it up.
Might this be that my VNC server is wrong or that its a different version? How can I check what version I got?
EDIT2: Hpw do I check if my machine has that port open?
bouzzi
July 12th, 2007, 11:24 PM
HI
I have the french 7.04 Feisty Fawn version of Ubuntu and I cannot figure how to get to this part of your steps :
1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP--> You can disable "Honor Indirect Requests"
When I get there, I don't see nothing about XDMCP...
Is there an other way to enable XDMCP?
In a config file ???? maybe ?
For each other steps, I worked well... I think
But in vncviewer I get a grey screen with X cursor giving me nothing to do but moving it...
Thanx
Bouzzi
prostock3
July 13th, 2007, 11:14 AM
I just used this tutorial to install vnc4, and my friend gt onto a session without pass word or login
He pointed me to this demo of how to break in:
http://hydrogen.oshean.org/vnc-exploit.htm
And told me to upgrade my version. What security precautions do you guys recommend for vnc?
Thanks.:guitar:
hotani
July 13th, 2007, 02:15 PM
HI
I have the french 7.04 Feisty Fawn version of Ubuntu and I cannot figure how to get to this part of your steps :
1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP--> You can disable "Honor Indirect Requests"
When I get there, I don't see nothing about XDMCP...
Is there an other way to enable XDMCP?
In a config file ???? maybe ?
Go to Administration -> Login Window -> Remote tab -> style: "plain"
For each other steps, I worked well... I think
But in vncviewer I get a grey screen with X cursor giving me nothing to do but moving it...
Thanx
Bouzzi
A reboot cleared the gray screen problem for me.
kurgbe
July 15th, 2007, 06:00 AM
There is a detailed tutorial on the installation of vnc on Ubuntu, including info on XDMCP for 7.04
http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
henryhynd
July 17th, 2007, 10:23 AM
Thanks a heaps for this how to, been wondering how i could achieve something like this for sometime... then LTSP conflicted with something and did some very dodgy things!
but yeh, all good now... cheers to the author!
Henry
netvampire
July 22nd, 2007, 07:31 PM
thanks. worked like a charm.
cheetah86
August 1st, 2007, 10:09 PM
Does anyone know of a program or command(s) that allow you to send windows from the real desktop (:0) to the VNC desktop (:1) or vice versa?
kostin
August 3rd, 2007, 12:51 AM
Hello
Is it possible to set up remote connection via VNC for more than one user?
I can login only as root with this manual.
How can I set up remote for 2 users (root & user1)?
(Sorry for my English)
Underpants
August 15th, 2007, 11:27 AM
I use this to run x11vnc for my gnome based systems.
/etc/xinetd.d/x11vnc
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -localhost
disable = no
}
can anyone assist in changing this to work with a KDE/Kubuntu system?
asutherlandus
August 16th, 2007, 03:03 PM
I worked my way through the tutorial and got vnc4 working on my EM64T box.
Now it has mysteriously stopped working. Having spent a full day trying to debug I'm stuck. Any help would be appreciated.
vncserver fails to start either manually or via xinetd when I am logged in via gdm.
However, if I switch to text login via alt-ctrl-f1 then stop gdm and restart using startx I can get vncserver to run. However in this mode I get the basic grey X screen with no login.
So there is some difference between these two ways of starting X and I'm not sure what the difference is.
Any ideas? I have tried every thing in the tutorial short of reinstall ubuntu and start over.
thanks,
Andrew
lns
September 10th, 2007, 06:23 PM
Can you elaborate on how LTSP "conflicted with something and did some very dodgy things"? I'm about to deploy a fairly large number of VNC services using this HOWTO - all of them happen to be LTSP servers as well.
Thanks for any insight!!
Thanks a heaps for this how to, been wondering how i could achieve something like this for sometime... then LTSP conflicted with something and did some very dodgy things!
but yeh, all good now... cheers to the author!
Henry
krunge
September 13th, 2007, 08:57 AM
I use this to run x11vnc for my gnome based systems.
/etc/xinetd.d/x11vnc
service x11vnc
{
...
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -localhost
}
can anyone assist in changing this to work with a KDE/Kubuntu system?
For KDM (or XDM) display manager it will be tricky because the -auth filename is random. E.g. on a KDM running system I have, "ps wwwwwaux | grep auth" reveals the auth file:
/usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-ghswan
So the "/var/lib/xdm/authdir/authfiles/A:0-ghswan" will change each reboot, etc.
The only way I can think of handling this is via a wrapper script, say:
/etc/xinetd.d/x11vnc
service x11vnc
{
...
server = /usr/local/bin/x11vnc_WRAPPER
server_args =
}
where /usr/local/bin/x11vnc_WRAPPER might look like:
#!/bin/sh
authfile=`ps wwwwwaux | grep '/X.*-auth' | grep -v grep | sed -e 's/^.*-auth *//' -e 's/ .*$//' | head -n 1`
if [ -r "$authfile" ]; then
exec /usr/bin/x11vnc -inetd -o /var/log/x11vnc.log -display :0 -auth "$authfile" -localhost
fi
exit 1
(untested)
In the x11vnc 0.9.3 dev tarball this is automated to some degree. I believe the x11vnc cmdline would be something like:
server_args = -inetd -o /var/log/x11vnc.log -find -env FD_XDM=1 -localhost
This works from the cmdline; but I haven't tried with inetd yet.
krunge
September 13th, 2007, 10:01 AM
I just tried /usr/local/bin/x11vnc_WRAPPER under xinetd. To have it work one needs to get rid of the -localhost and also set COLUMNS to be wide since inetd isn't connected to a terminal.
/usr/local/bin/x11vnc_WRAPPER:
#!/bin/sh
export COLUMNS=256
authfile=`ps wwwwwaux | grep '/X.*-auth' | grep -v grep | sed -e 's/^.*-auth *//' -e 's/ .*$//' | head -n 1`
if [ -r "$authfile" ]; then
exec /usr/bin/x11vnc -inetd -o /var/log/x11vnc.log -display :0 -auth "$authfile"
fi
exit 1
lns
September 13th, 2007, 12:44 PM
Well, I tried following this HOWTO on one of my LTSP servers.
There seems to be a conflict with xinetd and inetd - once you install xinetd, inetd is disabled, effectively shutting down all of the services in inetd (LTSP uses 'ldminfod' and 'tftpd' under inetd to function). Obviously, thin clients were unable to boot after this.
Is there any way we can provide a line in inetd for this howto, for those who require it?
Also, as a (temporary) workaround, I used a program called "XWinLogon" - which is an XServer for Windows (free) which doesn't require any modification to the Linux installation as it's transport is XDMCP.
Fubarovic
September 14th, 2007, 09:11 AM
I solved the dreadful endpoint error I got from xinetd by changing the color depth to 24 bits (the same as the local desktop). I tried setting it to 8 bits to save network bandwidth but that gave me the endpoint errors.
chaeron
September 19th, 2007, 03:31 PM
HI
1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP--> You can disable "Honor Indirect Requests"
When I get there, I don't see nothing about XDMCP...
Is there an other way to enable XDMCP?
Go to System->Administration->Login Screen Setup and click on the Remote tab. Then change the style to "same as local". Then a button will appear on the bottom of the panel to Configure XDMCP, click that, disable "Honor Indirect Requests" and you're good to go, almost (see below!)
But in vncviewer I get a grey screen with X cursor giving me nothing to do but moving it...
i
You also need to do the following:
sudo gedit /etc/gdm/gdm.conf
then find this rule:
# 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
remove the '#' in the last line so there should be:
# 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
You also have to change another part of the gdm.conf file.
Look for the following piece of text in /etc/gdm/gdm.conf
[xdmcp]
# Distributions: Ship with this off. It is never a safe thing to leave out on
# the net. Setting up /etc/hosts.allow and /etc/hosts.deny to only allow local
# access is another alternative but not the safest. Firewalling port 177 is
# the safest if you wish to have xdmcp on. Read the manual for more notes on
# the security of XDMCP.
Enable=false
Change the Enable=false to Enable=true
Then do a restart, and it should fix your grey screen issue. It did for me.
chaeron
September 19th, 2007, 03:35 PM
I've gotten both Xvnc and x11vnc to work on Feisty following the advice in this thread.
However, when I use a viewer on mymachine:0, the VNC viewer does not ask for a password. It blasts you right into the session.
Anyone figured out a way to configure x11vnc to force the entry of a password before making the VNC viewer connection?
Thanks!
chaeron
September 19th, 2007, 04:43 PM
Solved it....to make x11vnc force the vnc viewer to enter a password, just add the following parameter to the server args line:
-rfbauth /root/.vncpasswd
Which means that the full /etc/xinetd.d/x11vnc file should look like:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -rfbauth /root/.vncpasswd
disable = no
}
Marvelous!
chaeron
September 19th, 2007, 05:03 PM
For those that are interested, I've created a PDF summary of this thread, with the key steps required to set up VNC on Ubuntu with resumable sessions, including getting access to the physical display (:0).
These are the steps I've taken on three Feisty machines, one real (system76 box) and two virtual (running under VMWare).
No AMD info in the file though, you'll have to scan the thread for AMD specific fixes I'm afraid.
http://www.chaeron.com/software/SettingUpVNCOnUbuntu.pdf
Many, many thanks to all those that took the time to figure all this out!
Enjoy!
timander2002
September 22nd, 2007, 06:48 PM
I followed this howto. still I found that I am getting the gnome prompt, however, it continues to prompt me, first for the user name, then the password. This repeats.
What am I doing wrong??
mongrol
September 22nd, 2007, 10:15 PM
4 hours into this and I've managed to get VNC started. However, I can't get the GDM login prompt up. I've went over the gdm.conf twice, enabled it in the login window control panel. All I get is the grey root window and the wristwatch mouse cursor.
lns
October 7th, 2007, 03:02 AM
I've posted a quick alternative to using xinetd in this HOWTO. I was running into the problem of xinetd interfering with the default inetd and therefore LTSP functionality, so I coded Xvnc to launch via inetd.conf . Hope this helps anyone else in this situation.
http://ubuntuforums.org/showthread.php?p=3489584#post3489584
swapmon
October 11th, 2007, 07:59 PM
I followed this howto. still I found that I am getting the gnome prompt, however, it continues to prompt me, first for the user name, then the password. This repeats.
What am I doing wrong??
I ran into the same problem until I enabled multiple logins by the same user.
To change this setting navigate to System->Administration->Login Window. In the General tab uncheck the "Disable multiple logins for a single user" field.
After doing this I was able to login on the second attempt.
gtswanny
October 12th, 2007, 01:23 PM
Argggh, I can't even get past the first step.
when I "sudo apt-get install vnc4server" all I get is the:
E: Couldn't find package vnc4server
This is a new 7.04 server install. Up until this point I've had no problems finding and installing packages. I have verified that sources.list is setup properly according to all tutorials I can find. I have searched everywhere and I can't find any references to this problem, and now at wits end. Any ideas? Thanks.
Hubris2
October 15th, 2007, 07:06 PM
Does anyone know if it's possible to transfer running applications from a VNC session back to display:0 ? After I remote my box from work, I have to shut down all my apps and restart them on the local system. Can the apps be moved between desktops like they can between virtual desktops on the physical display?
brianmrowe
October 16th, 2007, 02:59 PM
4 hours into this and I've managed to get VNC started. However, I can't get the GDM login prompt up. I've went over the gdm.conf twice, enabled it in the login window control panel. All I get is the grey root window and the wristwatch mouse cursor.
I am having this exact same experience. I can ssh -X into the box and launch the apps I want, but that is not really ideal. I was hoping VNC would perform a little better than this.... which is really bad. If not maybe I am wasting my time. I'm using 7.04. I can see xvnc started. I get passed the vnc authentication succeeded. It opens the screen and waits. no gdm login. IT dies eventually
error says:
ReadFromRFBServer: rdr::EndOfStream.
kacheng
October 16th, 2007, 03:11 PM
gtswanny: Make sure if you are using vnc4server that you use the '-extension XFIXES' parameter.
brianmrowe: Are you connecting to port 5901 or 5902, which are presumably the displays you configured in xvnc.conf? 5900 will not work, as that is the display used by the console.
gtswanny
October 17th, 2007, 12:27 AM
gtswanny: Make sure if you are using vnc4server that you use the '-extension XFIXES' parameter.
Thanks! Actually my problem was universe was not turned on even though I *swear* I checked it. I did use your paremeters as suggested.
I now have it all working per this tutorial and even upgraded the dist to Gutsy RC.
Distortedgamer
October 19th, 2007, 06:35 PM
Is there away to enable XDMCP from CLI??? I am remoted in from work through SSH but I want to figure out how to connect with Desktop from a winXP machine. Thanks for the tutorial though!
gtr225
October 21st, 2007, 08:18 AM
How do I enable XDMCP in Ubuntu 7.10?
chaeron
October 21st, 2007, 11:05 AM
How do I enable XDMCP in Ubuntu 7.10?
Same way as in Feisty. Use the instructions I posted earlier.
gtr225
October 21st, 2007, 12:44 PM
Same way as in Feisty. Use the instructions I posted earlier.
Apparently I don't have that option.
chaeron
October 21st, 2007, 12:50 PM
Apparently I don't have that option.
What are you doing on the Security tab?
The settings you need to make are on the General and Remote tabs only.
RTFM, carefully. ;-)
gtr225
October 21st, 2007, 12:57 PM
Isn't this what I'm supposed to do? 1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP--> You can disable "Honor Indirect Requests"
chaeron
October 21st, 2007, 01:13 PM
Isn't this what I'm supposed to do? 1. Enable XDMCP
System->Administration->Login Screen Setup
Tab Security->Enable XDMCP
Tab XDMCP--> You can disable "Honor Indirect Requests"
Those were not my instructions, and are misleading. Try downloading the PDF I posted, as it will give you step by step instructions, which worked fine for me on Gutsy, installing on 3 new machines yesterday.
Try this instead:
Go to System->Administration->Login Screen Setup and click on the Remote tab. Then change the style to "same as local". Then a button will appear on the bottom of the panel to Configure XDMCP, click that, disable "Honor Indirect Requests" and you're good to go, almost (see below!)
If you read the whole thread, maybe you wouldn't be having these troubles. ;-)
Like I said, RTFM.
roningaijin
October 22nd, 2007, 09:37 PM
I had problems after upgrading to gutsy. I was getting the problem regarding the connection being refused that is posted about on the first page of this thread. I couldn't find a solution, so I kept experimenting until I got it to work.
I found this by trying to execute the same page the xinetd daemon is trying to execute when it starts Xvnc. It said something about a font called "Fixed" not being found.
Try executing this to see if an error comes up:
sudo Xvnc :2 -query localhost -geometry 1280x800 -depth 16 -once -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
It turns out that Gutsy moved my fonts from /usr/share/X11/fonts/misc here to /usr/share/fonts/X11/misc. I correct the "-fp /usr/share/X11/fonts/misc" option in the Xvnc.conf file, and it works fine now. Here is my Xvnc.conf:
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 1280x800 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
turbotom
October 26th, 2007, 01:25 PM
I had vnc4server working wonderfully in Feisty, then I upgraded to Gutsy (I can't resist upgrading) and now I get the damned gray screen with the X cursor!
The Xvnc config file has the changed font directory and xfixes arguments that Feisty needed.
I'm sure others, who are smarter than me, ran into this problem.
Jose Catre-Vandis
October 27th, 2007, 09:23 PM
Been successfully using this howto for some time, until I upgraded to Gutsy on my host machine. Found that with Compiz enabled I could not enter a password in the authentication box. Vnc-ing without compiz and from other machines works fine.
installed xtightvncviewer from the repos and then using the command
xtightvncviewer myserver:1
gave me back a working password box
sefs
October 30th, 2007, 01:12 PM
1) left click in the field you cannot set focus too and keep depressed
2) click on the right mouse button with left mouse button still depressed, and release right mouse button and left mouse button
3) cursor will magically appear in pesky field
4) type in password
This should work 100% of the time, and as you get nimble with it ... it would be like performing a single left click as one should
giruzz
November 1st, 2007, 04:36 PM
I had vnc4server working wonderfully in Feisty, then I upgraded to Gutsy (I can't resist upgrading) and now I get the damned gray screen with the X cursor!
The Xvnc config file has the changed font directory and xfixes arguments that Feisty needed.
I'm sure others, who are smarter than me, ran into this problem.
Same here.
Any suggestions? I tried a couple of things and didn't work...
g.
corvuscorax
November 7th, 2007, 01:31 PM
I also had my Terminal Server Client using VNC setup under feisty, and it also broke under Gutsy with compiz enabled, making it impossible for the password box to get focus. I found after some experimentation that if, after the password prompt is up, you open the network tools and ping the box you want to connect to, that the password field will then allow get focus to be set.
Linuxnz
November 11th, 2007, 08:22 PM
Can someone tell me if Realvnc should work ok with Gutsy Ubuntu? I have followed this thread and set up the standard Realvnc and I cannot get it work. xinetd is working fine, netstat has all the right stuff, go to connect (locally with vncviewer) and 10061, connection refused or reset.
Set vncpasswd etc, still no joy. I do notice there is no Xvnc process in the ps -ef report, but assume I would only see that if I had a stable connection?
Have set up Realvnc fine on Kubuntu (originally Feisty upgraded to Gutsy), without xinetd, just manual start ie; running vncserver command. Have x11vnc working fine on Xubuntu (Feisty) box.
Is there any / much difference between standard Realvnc and vnc4server? Should I just deinstall Realvnc and reinstall vnc4server?
Any other ideas on how I can trouble shoot the set up?
Any help much appreciated - Chris NZ
kingjm
November 12th, 2007, 08:04 PM
I am uding dapper lts and your directions (http://ubuntuforums.org/showthread.php?t=122402&highlight=vnc&page=12) worked excellent!
Is there a way to use a display model where one login will be 1024x768 and another at 800x600 and so on? I know that I can change the resolution in the xvnc configuration file. This could be useful when loging in with vnc and using display =0 or =1 or =2 and so on.
Could use brackets perhpas
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = root
server = /usr/bin/Xvnc
if port = 5901
{
server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
}
if port = 5902
{
server_args = -inetd :1 -query localhost -geometry 800x600 -depth 24 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
}
else port = 5900
{
server_args = -inetd :1 -query localhost -geometry 800x600 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
}
}I don't know but any thoughts
BassKozz
November 20th, 2007, 09:58 PM
I am having trouble getting this to work, I followed these instructions and when I try and connect from my WinXP box using TightVNC I get the following error message:
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/ScreenShot28.jpg
Any ideas?
Thanks again,
-BassKozz
fatmcgav
November 21st, 2007, 05:14 AM
HI there,
I managed to get this working using the following guide (http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/), however i've now got a slightly weird bug.
When i connect on :1, it gives me the login screen, and i can login fine.
Once i'm logged in however, the menu at the top doesnt work - so i cant get to applications, places, power button etc...
Any ideas why???
Cheers
Gavin
deep75
November 21st, 2007, 05:56 AM
Hi!
I'm a Ubuntu newbie, with this guide I set up my linux box for remote VNC session :) thank's !!!
I have a little problem, occasionally I put a CD or USB key in the remote machine, but I can't mount them without log in locally. Is possible to mount device remotely?
Because the remote pc have no monitor nor keyboard and mouse.. so it's quite difficult for me log in locally :)
I control with tightVNC on windows xp machine (...for now...)
THNX
ResumeMan
November 22nd, 2007, 04:01 AM
Well I think I did everything according to the pdf instructions. All seems to go ok but when I try to connect from the server computer (localhost:1) I get a "connection refused (111)" error.
I tried revising my Xvnc.conf file per roningaijin, but that didn't seem to help.
Anything obvious I'm doing wrong? FWIW, I'm using gOS, not regular Ubuntu, but I don't think that should matter much, should it?
ResumeMan
November 22nd, 2007, 07:41 PM
Er, I don't think I ever actually RAN vncserver on the host machine before #-o
Now I'm able to access it but am getting the infamous gray screen and black X. Off to research that one...
Skip Da Shu
November 23rd, 2007, 02:30 AM
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/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
port = 5901
}
For my Xubuntu Gutsy 7.10 the server arg for fonts in Xvnc needed to be-fp /usr/share/fonts/X11/misc
BassKozz
November 23rd, 2007, 11:44 AM
I am having trouble getting this to work, I followed these instructions and when I try and connect from my WinXP box using TightVNC I get the following error message:
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/ScreenShot28.jpg
Any ideas?
Thanks again,
-BassKozz
Since I haven't heard anything I went ahead and installed UltraVNC and RealVNC to see if I might have better luck with one of those clients, here are the results...
UltraVNC
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/UltraVNC1.jpg
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/UltraVNC2.jpg
RealVNC
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/RealVNC1.jpg
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/RealVNC2.jpg
I can't figure out for the life of me what I am doing wrong here... I am trying to connect to the box on my local LAN, but I setup port forwarding anyways and tried to connect via my WAN IP address and got the same results. On another note, I was able to get Xming working perfectly, but I can't get an answer on whether or not I can use Xming as a "Full Desktop Environment"/VNC replacement (http://ubuntuforums.org/showthread.php?t=619611)?
Please someone help me here... I can't even do a simple VNC connection from the actual machine I am on vncviewer localhost:1 it gives me a CConn: connected to host localhost port 5901
main: read: Connection reset by peer (104)
http://i4.photobucket.com/albums/y105/basskozz/xubuntu/VNC-104error.png:(
PLEASE SOMEONE HELP
Skip Da Shu
November 23rd, 2007, 03:44 PM
Er, I don't think I ever actually RAN vncserver on the host machine before #-o
Now I'm able to access it but am getting the infamous gray screen and black X. Off to research that one...
Well let us know because that's where I ended up also so I went back to my kludge 2 step x11vnc setup detailed HERE (http://ubuntuforums.org/showthread.php?t=42941&page=10&highlight=autostarted) in post #96.
knoid
December 4th, 2007, 01:55 AM
I'm having exactly the same problem as you guys. I followed all the instructions at http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html to set this up.
I can connect OK if I just run vnc4server on it's own:
sudo vnc4server -query localhost -geometry 1280x1024 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
With the above, I can connect successfully with any VNC client.
So then I kill vnc4server (sudo vnc4server -kill :1; sudo killall Xvnc; sudo killall xinetd) and sudo /etc/init.d/xinetd start.
sudo netstat -tap | grep xinetd reveals that xinetd is listening on port 5901as expected.
On connecting I get the exact same messages as posted by Baskozz above.
Looking in syslog (which I wouldn't have thought to do without this post: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/) for xinetd events I get the following:
Dec 3 09:03:13 Vault xinetd[7172]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 3 09:03:13 Vault xinetd[7172]: Started working: 1 available service
Dec 3 09:03:24 Vault xinetd[7173]: warning: can't get client address: Transport endpoint is not connected
Several hundred instances of the "transport endpoint" line follow, then:
Dec 3 09:03:24 Vault xinetd[7222]: warning: can't get client address: Transport endpoint is not connected
Dec 3 09:03:24 Vault xinetd[7172]: Deactivating service Xvnc due to excessive incoming connections. Restarting in 10 seconds.
Dec 3 09:03:34 Vault xinetd[7172]: Activating service Xvnc
Dec 3 09:03:36 Vault xinetd[7223]: warning: can't get client address: Transport endpoint is not connected
So when I connect to 5901, xinetd is attempting to launch the Xvnc server but it all goes pear-shaped....why?
digitalhack
December 24th, 2007, 12:09 AM
knoid,
Your problem could the same one I had. In EDIT2 grumpymole says to append "-extensions XFIXES" to the server_args. I had to change this to "-extension XFIXES" with no "s".
In /etc/xinetd.d/Xvnc the server_args line in my configuration is:
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
Note that all server_args must be on the same line and not broken like they may be in this post.
Hope this helps,
Greg D
digitalhack
giruzz
December 25th, 2007, 06:41 PM
knoid,
Your problem could the same one I had. In EDIT2 grumpymole says to append "-extensions XFIXES" to the server_args. I had to change this to "-extension XFIXES" with no "s".
In /etc/xinetd.d/Xvnc the server_args line in my configuration is:
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
Note that all server_args must be on the same line and not broken like they may be in this post.
Hope this helps,
Greg D
digitalhack
I've just updated my parents' PC and I lot the gray screen to get the same error as knoid. Unfortunately your suggestion doesn't work.
g.
giruzz
December 30th, 2007, 05:34 PM
I'm having exactly the same problem as you guys. I followed all the instructions at http://grumpymole.blogspot.com/2006/12/xubuntu-remote-desktop-with-vnc4server.html to set this up.
I can connect OK if I just run vnc4server on it's own:
sudo vnc4server -query localhost -geometry 1280x1024 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
With the above, I can connect successfully with any VNC client.
So then I kill vnc4server (sudo vnc4server -kill :1; sudo killall Xvnc; sudo killall xinetd) and sudo /etc/init.d/xinetd start.
sudo netstat -tap | grep xinetd reveals that xinetd is listening on port 5901as expected.
On connecting I get the exact same messages as posted by Baskozz above.
Looking in syslog (which I wouldn't have thought to do without this post: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/) for xinetd events I get the following:
Dec 3 09:03:13 Vault xinetd[7172]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 3 09:03:13 Vault xinetd[7172]: Started working: 1 available service
Dec 3 09:03:24 Vault xinetd[7173]: warning: can't get client address: Transport endpoint is not connected
Several hundred instances of the "transport endpoint" line follow, then:
Dec 3 09:03:24 Vault xinetd[7222]: warning: can't get client address: Transport endpoint is not connected
Dec 3 09:03:24 Vault xinetd[7172]: Deactivating service Xvnc due to excessive incoming connections. Restarting in 10 seconds.
Dec 3 09:03:34 Vault xinetd[7172]: Activating service Xvnc
Dec 3 09:03:36 Vault xinetd[7223]: warning: can't get client address: Transport endpoint is not connected
So when I connect to 5901, xinetd is attempting to launch the Xvnc server but it all goes pear-shaped....why?
got any luck?
g.
xxbill420xx
February 1st, 2008, 04:18 PM
Well, I've read through this whole thread and I can't seem to solve the problem I'm having... I have attached a screen shot showing what my VNC- Viewer screen pulls up when I try to log in. It is a gray box with a console stuck in it! Strange I know :-/ If anyone has any ideas let me know please.
http://img171.imageshack.us/img171/1099/vnchelpge6.png (http://img171.imageshack.us/img171/1099/vnchelpge6.png)
Originally I tried a variety of methods to get this running. On the server I am attempting to make it work it is running the latest distro of Ubuntu. It is running the desktop version and already has a X11 window system working and in place. However the problem lies in the fact I do not have a monitor to run on that machine, which is why I was hoping to get this working on it.
Oh something else to note, whenever I would try and connect to the VNC server on port 5900 or 5901 it would accept the connection, and then crash disabling further connections. To get this far I ran a netstat and noticed I was listening for connections on 5900, 5901 and 5902. Where the 5902 came from I have no idea, but that is the one I connected to where it gives me the image shown in the screenshot.
Thanks
Console output attached below (in bold is when it crashes)
For Client:
nimda@nimda:~$ vncviewer 192.168.1.2:5901
VNC viewer version 3.3.7 - built Mar 8 2007 21:56:52
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)
nimda@nimda:~$ vncviewer 192.168.1.2:5902
VNC viewer version 3.3.7 - built Mar 8 2007 21:56:52
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.8 (viewer 3.3)
Password:
VNC authentication succeeded
Desktop name "nimda-server:2 (root)"
Connected to VNC server, using protocol version 3.3
VNC server default format:
16 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
Using default colormap and visual, TrueColor, depth 24.
Got 256 exact BGR233 colours out of 256
Using BGR233 pixel format:
8 bits per pixel.
True colour: max red 7 green 7 blue 3, shift red 0 green 3 blue 6
Using shared memory PutImage
Throughput 10000 kbit/s - changing from 8bit
Using viewer's native pixel format:
32 bits per pixel.
Least significant byte first in each pixel.
True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Throughput 11944 kbit/s - changing to Hextile
lns
February 1st, 2008, 04:29 PM
I would recommend you follow my instructions - not sure if you can "start over" but I have set up many installs exactly like I have in my instructions and it works great (you don't even have to replace inetd with xinetd)...
http://ubuntuforums.org/showthread.php?t=569451
HTH,
Jordan
Well, I've read through this whole thread and I can't seem to solve the problem I'm having... I have attached a screen shot showing what my VNC- Viewer screen pulls up when I try to log in....
...
xxbill420xx
February 1st, 2008, 04:31 PM
Wow, thank you very much for your prompt response!
I am trying your instructions now and will report back with the results.
Shoot, already noticed a problem... I don't have a monitor so I can't access the menus where you have
1 ) Enable XDMCP
- System->Administration->Login Screen Setup
- Tab Remote -> Style = "Same as local"
- Bottom button XDMCP (still in Remote) --> You can disable "Honor Indirect Requests" if you'd like.
I would recommend you follow my instructions - not sure if you can "start over" but I have set up many installs exactly like I have in my instructions and it works great (you don't even have to replace inetd with xinetd)...
http://ubuntuforums.org/showthread.php?t=569451
HTH,
Jordan
Footer
February 1st, 2008, 04:35 PM
Could your problem be as simple as this:
http://www.realvnc.com/support/faq.html#grey
Specifically:
"Why do I just get a grey desktop in my Unix VNC Server?"
Granted, this is Linux vs. UNIX but there isn't THAT much of a difference!
Good luck!
lns
February 1st, 2008, 04:37 PM
I'm not sure where the settings are, but with most/all things Linux, GUI tools are merely front-ends for back-end configuration files. Not sure if the the XDMCP stuff is stored in GCONF or in /etc/gdm/gdm.conf, but just poke around, you're sure to find it somewhere.
Good luck! I highly recommend using my method as I have tested it a lot and haven't run into any issues (yet..knock on wood) ;)
Wow, thank you very much for your prompt response!
I am trying your instructions now and will report back with the results.
Shoot, already noticed a problem... I don't have a monitor so I can't access the menus where you have
1 ) Enable XDMCP
- System->Administration->Login Screen Setup
- Tab Remote -> Style = "Same as local"
- Bottom button XDMCP (still in Remote) --> You can disable "Honor Indirect Requests" if you'd like.
Skip Da Shu
February 1st, 2008, 09:30 PM
Can someone tell me if Realvnc should work ok with Gutsy Ubuntu? I have followed this thread and set up the standard Realvnc and I cannot get it work. xinetd is working fine, netstat has all the right stuff, go to connect (locally with vncviewer) and 10061, connection refused or reset.
Set vncpasswd etc, still no joy. I do notice there is no Xvnc process in the ps -ef report, but assume I would only see that if I had a stable connection?
Have set up Realvnc fine on Kubuntu (originally Feisty upgraded to Gutsy), without xinetd, just manual start ie; running vncserver command. Have x11vnc working fine on Xubuntu (Feisty) box.
Is there any / much difference between standard Realvnc and vnc4server? Should I just deinstall Realvnc and reinstall vnc4server?
Any other ideas on how I can trouble shoot the set up?
Any help much appreciated - Chris NZ
I don't know how relevant this is but when I was setting up x11vnc for remote, resumable sessions I found that some display drivers would not work. While I no longer have the exact error message from the log it was something about the serial id, I think of the framebuffer. It seems, guesswork now, that some of the display drivers were addressing a different framebuffer or accessing it differently. This was resolved by running dpkg-reconfigure xserver.org specifying the VESA driver, instead of the hardware specific driver the install had used and selecting the kernel framebuffer option. I have several machines now running headless under Xubuntu (Gutsy) and x11vnc. I've used a couple different viewers to get to the 'remote' machines w/o problems.
webwolf_3000
February 10th, 2008, 06:37 PM
:popcorn:
overall good guide, only problem I realy have - and probably cannot figure out, when I connect the viewer - I just get a grey chequered screen with a black X cursor ( this is true on the local machine and the remote machine )
Any idea where Im going wrong here ?
chelrob
February 24th, 2008, 08:56 PM
After working on this all weekend I finally got it up and running using this guide: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
There were two differences though.
1 . My gdm.conf was not in the specified location. It was located here /etc/xdg/xubuntu/gdm/gdm.conf
2. I did have to reboot before the Remote Greeter started working. Stopping and restarting the services didn't work for me.
http://www.invisionweb.net/VNC.jpg
I can remote to the Ubuntu box with VNC from any windows Vista or XP Pro PC on my home netwrok.
Skip Da Shu
February 24th, 2008, 09:23 PM
1 . My gdm.conf was not in the specified location. It was located here /etc/xdg/xubuntu/gdm/gdm.conf
That's strange... my Xubuntu, Gutsy, 64bit install put these two here:
/etc/gdm/gdm.conf
/etc/gdm/gdm/conf-custom
They both needed the "killinitclient" under [daemon] tweaked before i got x11vnc working.
chelrob
February 24th, 2008, 09:31 PM
The guide I followed had me looking here for gdm.conf. But it was not found there on my system.
/etc/X11/gdm/gdm.conf
I also had this one too. But making changes to this file had no impact.
/etc/gdm/gdm.conf
Only tweaking this file made a difference.
/etc/xdg/xubuntu/gdm/gdm.conf
BB34
February 26th, 2008, 08:39 PM
Hi guys sorry to bother but whats the command to uninstall this VNC setup(Page 1).
Thanks,
chelrob
February 27th, 2008, 01:48 AM
Well to uninstall the vnc server and xinetd packages you would type:
sudo apt-get remove vnc4server xinetd
The other thing you would do is delete the file you created:
sudo rm /etc/xinetd.d/Xvnc
Just follow the procedure in reverse order from step 4 down to step 1.
Check her for instructions on how I got it to work: http://ubuntuforums.org/showpost.php?p=4398393&postcount=390
BB34
February 27th, 2008, 01:15 PM
Hey Thanks Alot Man I Sucessfully Remove the VNCviewer.
I will be checking your guide and see if it will work for me.For Now My brain is alittle bit fried since my last failed attempts and also im new to linux.
I Appreciate Your Help.
Adrian Lopez
chelrob
February 28th, 2008, 02:56 AM
You're welcome. Glad I could help. Btw, it's not my guide, just a guide I followed that worked for me.
Take care.
BartInTN
February 28th, 2008, 05:51 PM
Good how-to... but needs to be updated. I'm running Gutsy 7.10 and vnc4server 4.1.1.
XDMCP can be enabled under the Login Window Prefs, Remote tab
And the Xvnc files should have this instead:
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
chelrob
February 28th, 2008, 05:54 PM
@BartInTN
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
That's what worked for me. This guide has the updates you mentioned: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/ :)
prioret
February 29th, 2008, 06:43 PM
HELP!!
I've been messing with this for a while, and gave it serveral tries.
I'm running 7.10 and followed all the directions. I'm also running vnc4server, so the X bugs are fixed.
When I connect to my system, I get the VNC password prompt, enter it, and the session is closed with this error:
VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 17:17:04
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Fri Feb 29 17:42:20 2008
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Fri Feb 29 17:42:25 2008
main: End of stream
Any ideas? im pulling my hair out.
Tom
chelrob
March 4th, 2008, 02:02 PM
HELP!!
I've been messing with this for a while, and gave it serveral tries.
I'm running 7.10 and followed all the directions. I'm also running vnc4server, so the X bugs are fixed.
When I connect to my system, I get the VNC password prompt, enter it, and the session is closed with this error:
VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 17:17:04
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Fri Feb 29 17:42:20 2008
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Fri Feb 29 17:42:25 2008
main: End of stream
Any ideas? im pulling my hair out.
Tom
The guide at the start of this thread does not work for Ubuntu 7.10.
Try this guide: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
It worked for me.
Read here for my comments on following that guide: http://ubuntuforums.org/showpost.php?p=4398393&postcount=390
chelrob
March 6th, 2008, 01:57 AM
Does anyone know how to start a second VNC session that also goes to the remote greeter instead of using my home/username/.vnc/xstartup preference? Can I modify gdm.conf or xstartup to envoke another remote greeter when I VNC to <server IP>:2?
Currently my xstarup starts gnome desktop when I VNC to <server IP>:2.
Thanks!
Linuxnz
March 8th, 2008, 05:33 PM
Hey guys just trying to get basic vnc4server going at the mo before auto start.
Had RealVNC loaded but could not get this to work properly. Everything worked ok except the keyboard characters were wrong. so deinstalled and install vnc4server.
No mostly working, but get vnc client screen with xterm window only wiht a command line prompt in top left hand corner of screen. Cannot see graphical desktop. If I exit xterm by typing "exit" at command line I get a screen with check boxes saying "Accept clipboard from viewers" "Send clipboard to viewers" and "Send primary selection to viewers".
I guess I am not starting the correct gdm for some reason. Log file as below. Not sure if errors are serious as I have not moved /installed fonts etc
Any ideas where to check?
Thanks
Log file output shows minor font errors;
chris@maxii:~/.vnc$ cat maxii:2.log
Xvnc Free Edition 4.1.1
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70000000, The X.Org Foundation
Sun Mar 9 10:02:29 2008
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
/home/chris/.vnc/xstartup: 12: twm: not found
Sun Mar 9 10:02:38 2008
Connections: accepted: 192.168.1.21::1250
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)
Sun Mar 9 10:02:41 2008
VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565
VNCSConnST: Client pixel format depth 8 (8bpp) rgb max 3,3,3 shift 4,2,0
Sun Mar 9 10:03:09 2008
Connections: closed: 192.168.1.21::1250 (Clean disconnection)
SMsgWriter: framebuffer updates 2
SMsgWriter: ZRLE rects 3, bytes 591
SMsgWriter: raw bytes equivalent 786980, compression ratio 1331.607445
chelrob
March 11th, 2008, 05:59 PM
Sounds like you need to edit your /home/username/.vnc/xstartup file to launch a graphical desktop.
Just google xstarup and gnome or xstarup and KDE to find examples of how to edit xstartup.
Here's a my xstartup:
#!/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/.Xresources
#xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &
#xfce4-session &
#startkde &
I have examples there for Gnome, KDE, and Xfce4.
Linuxnz
March 17th, 2008, 03:53 PM
Yep, that did it alright. All fixed.
Thanks Chelrob.
Much appreciated.
Ubuntu forums as always such a great community.
:)
keninem
March 17th, 2008, 06:38 PM
Hi all..been reading this thread and have gotten pretty far..I am running Ubuntu 7.10 desktop, and am having the following problem:
I don't have the gdm.conf file at ALL where it references in the guide..the ONLY place I have it is /etc/gdm/gdm.conf and I have modified that to be correct, but since it isn't working, I have to wonder if that's the reason..what, if anything, do I need to install to get the full path that is in the guide?
When I manually run the Xvnc command, I can VNC remotely, and get the passwd prompt..when I enter that, I get the pixelated screen with the grey "X" as the mouse curser, nothing else..
When I try and let xinetd take care of it, I get "Connection reset by Peer" for the first attempt(with no passwd prompt)
and if I try to reconnect, I get "Connection refused"
Any help with this would be greatly appreciated..I've read so many guides my head is spinning!
chelrob
March 18th, 2008, 12:37 AM
Yep, that did it alright. All fixed.
Thanks Chelrob.
Much appreciated.
Ubuntu forums as always such a great community.
:)
You're welcome :)
chelrob
March 18th, 2008, 12:39 AM
@kenimen
Are you following this guide: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
Check out my comments here: http://ubuntuforums.org/showpost.php?p=4398393&postcount=390
Try this command to find all gdm.conf files on your system...
sudo find / -name 'gdm.conf'
keninem
March 18th, 2008, 07:05 AM
@kenimen
Are you following this guide: http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
Check out my comments here: http://ubuntuforums.org/showpost.php?p=4398393&postcount=390
Try this command to find all gdm.conf files on your system...
sudo find / -name 'gdm.conf'
Yes, I followed both of those actually..and the path for gdm.conf that you and the website are talking about doesn't exist on my machine..
:confused:
keninem
March 18th, 2008, 09:41 PM
is anyone else running into this issue, or am I the lucky one?:(
chelrob
March 18th, 2008, 09:52 PM
What OS is the client PC running?
Are you just opening the VNC client and typing <server IP> :1?
Example:
172.16.1.102:1
keninem
March 18th, 2008, 10:35 PM
What OS is the client PC running?
Are you just opening the VNC client and typing <server IP> :1?
Example:
172.16.1.102:1
I have tried it from the local ubuntu box and from the remote Vista box..
and yes, that's what I'm doing..tried :1 and :2
chelrob
March 18th, 2008, 11:21 PM
To use :2 you first have to ssh to the server and start another vnc session before you start the vnc client.
vncserver :2
Then run the client. If you don't get a graphical desktop check out my xstartup file a few posts back.
When you're done you have to kill the session after you close vnc client.
vncserver -kill :2
keninem
March 20th, 2008, 04:55 PM
I set my xstartup to look like that and am still having the same problem.. :(
chelrob
March 20th, 2008, 06:17 PM
Try backing out all the chagnges from the tutorials, delete any files it had you create, and just install the VNC server. See if you can connect after that and see the graphical desktop.
keninem
March 20th, 2008, 08:32 PM
Thanks, that actually worked! I have no idea what caused it to stop/start working though unfortunately..
Now what is the easiest way to get this to start on boot? Can anyone clear that up? I tried adding it in /etc/rc.local but it didn't start properly..
chelrob
March 20th, 2008, 11:48 PM
You're welcome.
anemptygun
March 21st, 2008, 10:13 PM
Is this still the most efficient way to set up VNC? I am on 8.04 beta and I am trying to set up a vnc server. Anyone have an opinion on this?
Tu13erhead
March 22nd, 2008, 01:28 PM
Is this still the most efficient way to set up VNC? I am on 8.04 beta and I am trying to set up a vnc server. Anyone have an opinion on this?
+1. I'd like to know this as well.
Thanks!
kindofabuzz
March 30th, 2008, 05:18 AM
I'm not gonna read this whole thread to see if someone posted this fix but here's how i got mine running:
in /etc/xinetd.d/Xvnc, the part where it mentions fonts should be:
/usr/share/fonts/X11/misc and not /usr/share/X11/fonts/misc
at least in gutsy it is
chelrob
March 30th, 2008, 10:58 PM
Is this still the most efficient way to set up VNC? I am on 8.04 beta and I am trying to set up a vnc server. Anyone have an opinion on this?
Go back about 4-5 pages and you will find the answer to your question. Look for my first post in this thread.
kindofabuzz
March 31st, 2008, 01:18 AM
+1. I'd like to know this as well.
Thanks!
yes, just do exactly what the very first post says, but change
/usr/share/X11/fonts/mic to /usr/share/fonts/X11/misc in Xvnc
Virtual_Ron
March 31st, 2008, 03:07 PM
Hi,
I'd like to run vnc4server manually (without xinetd). I just run "vnc4server" from the command line and it works fine. But, it defaults to port 5901. Anyone know how I can change that port number?
Thanks,
Ron
Virtual_Ron
April 1st, 2008, 10:48 AM
thngs that go "bump" in the night
wareagle
April 1st, 2008, 11:33 AM
I set this up and it doesn't let me connect to a display if another host is connected to the same display.
I have "disable multiple logins for a single user" unchecked in my "Login Window" options.
This is mainly a problem because if I am connected and the connection dies, I am unable to resume the session I was on.
anemptygun
April 1st, 2008, 10:51 PM
Go back about 4-5 pages and you will find the answer to your question. Look for my first post in this thread.
thx
Gujs
April 2nd, 2008, 05:10 AM
Hello,
I have instaled Ubuntu 8.04 beta and I have a lot of problems with Xvnc on separate display :1. My xinetd config for Xvnc:
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 1280x1024 -depth 16 -fp /usr/share/fonts/X11/misc PasswordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
Gnome is always changing theme from Clearlooks to Human and back. I think that my gnome settings daemon is crashing all the time. How can I disable to load it at all, or even better fix this problem. Where can I get some logs from daemon, that I would easier find the problem!
Thanks
popie
April 2nd, 2008, 03:40 PM
@Gujs:
Not sure if this will help, as I'm still on 7.10, but VNC server is working fine. My server_args line in the Xvnc file is slightly different from yours:
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
Gujs
April 3rd, 2008, 01:57 AM
Sorry for not reporting that. I had these options in the server_args and I removed them with hope that it will work better, but it is actually the same thing.
Before I had also Ubuntu 7.10 and it worked great, but on 8.04 beta it doesn't work any more!
FoolsRun
April 14th, 2008, 10:12 AM
Hi,
I have a fresh Hardy install and I've followed this guide exactly (and tried a number of tweaks elsewhere in the thread) and I continue to get the "gray screen with X cursor" issue.
Clearly VNC is working, but it's either not launching GDM/gnome-session, or not talking to it somehow.
Could it be relevant that I run my Hardy server headless without a user logged in to GNOME? Since Xvnc is looking for ~/.vnc/xstartup and I'm not logged in to GNOME, how would it know which home directory to get xstartup from? Is there a default location for xstartup (or can I redirect it?) for when Xvnc is starting before login?
BurakkuChi
April 25th, 2008, 05:58 AM
Hello,
I have instaled Ubuntu 8.04 beta and I have a lot of problems with Xvnc on separate display :1. My xinetd config for Xvnc:
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 1280x1024 -depth 16 -fp /usr/share/fonts/X11/misc PasswordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
Gnome is always changing theme from Clearlooks to Human and back. I think that my gnome settings daemon is crashing all the time. How can I disable to load it at all, or even better fix this problem. Where can I get some logs from daemon, that I would easier find the problem!
Thanks
Gujs, apparently gnome-settings-daemon is having an issue with the keyboard plugin.
Run gconf-editor and go to apps->gnome_settings_daemon->plugins->keyboard. Then uncheck "active."
There's currently a bug report out for this at https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245
concite
April 27th, 2008, 07:58 PM
OK - I had the same problem. Upgraded from Gutsy to Hardy, and VNC went haywire.
Following advice:
Run gconf-editor and go to apps->gnome_settings_daemon->plugins->keyboard. Then uncheck "active."
Fixed the major problem. Now, I still have the problem that VNC is REALLY slow. REALLY REALLY slow. When I was using Gutsy, it was great.
Any thoughts? Only change was to upgrade Ubuntu.
concite
April 27th, 2008, 09:24 PM
OK - a little more research. If I use the built in VNC server (port 5900) I can use VNC, and speed is acceptabe, but not good. This also requires that I log in to the box locally first. I am trying to create a headless machine, so that defeats the purpose.
I read somewhere that vnc4server was "broke" for Hardy and they suggested I use tightvncserver. Installed that, ran it, get a grey screen with a terminal. No Gnome session.
I could use help to either:
1) fix VNC4server so it is not so slow
or
2) help setting up tightvncserver si that I get a gnome session.
Thanks again.
hernejj
April 29th, 2008, 04:37 PM
OK - I had the same problem. Upgraded from Gutsy to Hardy, and VNC went haywire.
Following advice:
Run gconf-editor and go to apps->gnome_settings_daemon->plugins->keyboard. Then uncheck "active."
Fixed the major problem. Now, I still have the problem that VNC is REALLY slow. REALLY REALLY slow. When I was using Gutsy, it was great.
Any thoughts? Only change was to upgrade Ubuntu.
I have the EXACT same problem. I had Xvnc working perfectly under Gutsy... I could watch video in a vnc session and the framerate was 25-35 fps. Now that I've done a fresh install of Hardy Xvnc is really slow :-/ So slow that Scrolling in Nautilus is painful!!
Can anyone suggest a solution to this? I think, in the meantime, I may try tightvnc or something else... will post if I discover anything new.
hernejj
April 29th, 2008, 05:08 PM
OK new info... both Xvnc and xtightvncserver exhibit the same odd slowness in Nautilus and Firefox. In both applications scrolling within a VNC session is extremely slow and unresponsive. Gnome menus are also slow to appear and slow to populate, window resizing is slow. However, I find that I can play DVD ripped video files at close to perfect frame rates just like when I had Gutsy installed.... The slowness was not a problem in Gutsy.
I'm at a loss on this one. :confused:
Skip Da Shu
April 29th, 2008, 07:56 PM
OK new info... both Xvnc and xtightvncserver exhibit the same odd slowness in Nautilus and Firefox. In both applications scrolling within a VNC session is extremely slow and unresponsive. Gnome menus are also slow to appear and slow to populate, window resizing is slow. However, I find that I can play DVD ripped video files at close to perfect frame rates just like when I had Gutsy installed.... The slowness was not a problem in Gutsy.
I'm at a loss on this one. :confused:
I'm using X11vnc... different port on each remote machine (59xx) and haven't noticed any slow down (yet) with v8.04 of Xubuntu.
concite
April 30th, 2008, 03:27 PM
More information.....
vnc4server will not work at all if I remove the -extension XFIXES argument
With XFIXES, I can log into the box remotely, multi-user works, but it is still too painfully slow to use
X11vnc works, but I have to log into the physical box first, and there is no multi user support
tightvncserver - still can't get anything but a grey screen and terminal
vino (the default server software) works on display 0. Again, I have to log into the physical box first, and there is no multiuser support.
*****
Is is possible to roll back to Gutsy Gibbon? Everything was working fine, I just upgraded "because it was there"
Skip Da Shu
April 30th, 2008, 03:39 PM
More information.....
X11vnc works, but I have to log into the physical box first, and there is no multi user support
I don't have to physically log into machine first here, using X11vnc server... don't know about multi user and I certainly didn't try to set it up for that.
If any interest I can post my config file entries for X11vnc.
However I am running Xubuntu not Ubuntu.
Skip
PS: I DO have the 'slower than molasses in winter' problem when I vnc into the x11vnc server on my wife's Ubuntu v8.04, 64bit desktop.
hernejj
April 30th, 2008, 06:34 PM
New info again :) !!
A little back ground first. I have my main user account, we'll call him userfoo. I also have a second account called userbar. I log userfoo in at my computer and use that as my main desktop account. I want to be able to bring up a vnc session and log in userbar when I need that account.
The slowness I have been referring to is NOT there for userbar if I log him in at my normal gdm login window. It is only present when I log him in via the gdm that gets laucnhed for the vnc 'd display.
I suspect that this slowness in VNC my sessions (and probably yours too concite) is coming from something in the Gnome session... Very likely gnome-settings-daemon..
if you edit your ~/.vnc/xstartup file (make sure it is executable) and have it JUST start an xterm and then from that xterm you launch nautilus and gnome-panel then everything works perfectly!! No slowdowns... ultra fast. As is SHOULD be! As it was in Gutsy :)
I believe that gnome-settings-daemon is causing the slowness because one time I logged userbar in via vnc and gnome-settings-daemon failed to start and everything was fast, as it is supposed to be.
So... if anyone knows how to further debug this... or how to completely stop the loading of gnome-settings-daemon PLEASE TELL!! kill -9 doesn't even work.. it just keeps coming back to life. In the meantime I'll keep playing with it and post what I find.
concite
April 30th, 2008, 09:33 PM
Skip da Shu - it would help if you post your config files for X11vnc. I can live without multiuser, but I would like to avoid having to log in to the physical machine.
Hernejj - I think you are on to something with the Gnome settings demon. I originally had a message that it kept resetting until I turned off "active" on the keyboard. Let me know if you get any further.
bubba
April 30th, 2008, 09:43 PM
New info again :) !!
...
So... if anyone knows how to further debug this... or how to completely stop the loading of gnome-settings-daemon PLEASE TELL!! kill -9 doesn't even work.. it just keeps coming back to life. In the meantime I'll keep playing with it and post what I find.
There is a bug here: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245
If you are having issues, you need to let folks know about it so they will fix it.
Cerin
May 7th, 2008, 12:58 PM
So here's the complete list of steps that are required to set the VNC server that any user can login into and start a session...
These instructions didn't work at all for me. When testing locally with vncviewer, I get that "Refuse/Allow" prompt.
Skip Da Shu
May 7th, 2008, 01:26 PM
Skip da Shu - it would help if you post your config files for X11vnc. I can live without multiuser, but I would like to avoid having to log in to the physical machine.
Hernejj - I think you are on to something with the Gnome settings demon. I originally had a message that it kept resetting until I turned off "active" on the keyboard. Let me know if you get any further.
I will post 'em up here (or post a link), later today or tonight. The same setup worked on the Ubuntu desktop also.
The one Ubuntu v8.04 machine is very very slow via VNC. It was OK pre-upgrade. I will try local login first and see if either account on it behaves any differently.
And I agree.. on to something because my Xubuntu v8.04 machines don't show this extreme sluggishness under any situation.
yeehawjared
May 7th, 2008, 04:58 PM
Skip Da Shu, could you possibly write a new, quick how-to for people who just installed a fresh copy of hardy heron xubuntu 8.04?
I wouldn't go into great detail - just what packages you need, and what files need to be modified. The original post hasn't been edited since February 20th, 2006 and 45 pages is a lot to read :)
I'm going to do a fresh xubuntu install tonight, if I get it working (maybe with your help) I can create a new thread / guide.
Skip Da Shu
May 7th, 2008, 07:06 PM
Hi,
I'd like to run vnc4server manually (without xinetd). I just run "vnc4server" from the command line and it works fine. But, it defaults to port 5901. Anyone know how I can change that port number?
Thanks,
Ron
Not with that server, but a workaround if using (at least) RealVNC viewer is to enter a ":1" after the remote machines name or ip in the viewer. It'll add 5900 to that to come up with the port number to go to. On other viewers you may have to add ":5901" after the host name / ip.
This works on both the Win and Linux version of RealVNC's viewer.
Skip
Skip Da Shu
May 7th, 2008, 08:47 PM
Skip Da Shu, could you possibly write a new, quick how-to for people who just installed a fresh copy of hardy heron xubuntu 8.04?
I wouldn't go into great detail - just what packages you need, and what files need to be modified. The original post hasn't been edited since February 20th, 2006 and 45 pages is a lot to read :)
I'm going to do a fresh xubuntu install tonight, if I get it working (maybe with your help) I can create a new thread / guide.
I had already started... not quite a "fresh install" because I added too much history and too much detail for that... Should have 1st cut done shortly.
PS: Toooo late, must sleep, finish tomorrow.
PPS:Still proof reading but here's 'My Ubuntu/Xubuntu X11vnc setup (http://www.skipsjunk.net/how-to/xubuntu04.html)' or 'The idiot's guide to X11vnc'... we can work that out later.
PPPS: At least one of the links in that html write up is wrong. Should have them fixed in a couple hours.
PPPPS: Also slightly simplified and posted to DC team forum on Guru Mountain (http://guru-mountain.com/dcteam/forums/viewtopic.php?t=100).
Skip Da Shu
May 9th, 2008, 10:56 PM
There is a bug here: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245
If you are having issues, you need to let folks know about it so they will fix it.
Thanx for the link to the bug report... I need to incorporate that link into my x11vnc setup for idiots 'how-to'.
Also added link to my prior post... will be a couple more hours before I can set up a forum thread for questions on it. This thread is too busy / popular to be mixing my x11vnc junk into it. I'll add a link to a thread into the HTML write up also.
DexterLB
May 14th, 2008, 06:41 AM
good
but can I use port 5431 or 5996 instead of 5901
P. S. when I do "vncviewer localhost:1" it says "connection reset by peer". Is that bad?
Skip Da Shu
May 14th, 2008, 06:48 PM
good
but can I use port 5431 or 5996 instead of 5901
P. S. when I do "vncviewer localhost:1" it says "connection reset by peer". Is that bad?
If you're talking about the x11vnc setup... Think you can if those ports aren't reserved for something else, I've used 5800 and 5900 thru around 5950 at various times for various reasons.
If you're talking about the vnc4server setup this thread is REALLY about... I dunno. I'm gonna drop adding further confusion here with my little x11vnc stuff. I'll follow the x11vnc thread over HERE (http://guru-mountain.com/dcteam/forums/viewtopic.php?t=100) if there's something about it somebody wants me to try to answer.
I'll try the localhost : x thing later tonight when I can hook up a monitor to one of the "remote" machines.
bhe
May 18th, 2008, 06:26 PM
Everything installs fine in my VPC, but when I try to connect from a terminal, I get the following:
VNC Viewer Free Edition ...
Copyright ...
See http://...
Mon May 19 ...
CConn: Connected to host localhost port 5901
And that's it, nothing happens, I don't get a login window.
I tried connecting from a different host (win xp) and the same thing happens, it connects, but no login window.
Does anyone know how I can solve this?
tmaleshafske
May 19th, 2008, 12:39 AM
I have ubuntu Hardy 8.04 and am having issues with getting this working. First off. I couldn't find "Enable XDMCP" in the login screen setup menu. The other place is in the gdm.config where you can enable it correct?
Also your location for fonts is incorrect at least for hardy it should be /usr/share/fonts/X11/misc
2. I cannot get connected. It shows me the password screen and then it drops as soon as I put the password in. I can see the process via netstat.
this is the output of the log file
May 18 23:37:43 male001 xinetd[17740]: warning: can't get client address: Transport endpoint is not connected
tmaleshafske@male001:/etc/xinetd.d$
Here is a copy of my /etc/xinetd.d/Xvnc
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
port = 5901
}
Some assistance please. I am missing something but I don't know what it is. Let me know if you need any other outputs. Also I don't have anything located /usr/share/X11/fonts/misc which I know is one of my main problems. which package installs those. all i have is a /usr/share/X11/locale which appears to include font sets.
Thanks ahead of time for the help
Skip Da Shu
May 19th, 2008, 11:53 AM
2. I cannot get connected. It shows me the password screen and then it drops as soon as I put the password in.
One swag you might try:
/etc/gdm/gdm.conf-custom
[daemon]
#
# Added KillInitClients, changed to =false - SRG
#
KillInitClients=false
[security]
samosamo
May 19th, 2008, 07:48 PM
This tutorial is great, I never had GDM showing for VNC. I think I like it. Now, after closing VNC and reconnecting, why don't I get the login screen again?
If I close my VNC session and then walk away from the comp, someone else can open it up without it asking for a password. I looked through gdm.conf and "man Xvnc" but I couldn't find anything to help me.
here is my config (modified)
service Xvnc
{
type = UNLISTED
disable = no
socket_type = stream
protocol = tcp
wait = yes
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd :1 -query localhost -geometry 1280x768 -depth 16 -cc 3 -once -SecurityTypes=none -extension XFIXES -DisconnectClients=0 -NeverShared
port = 5901
}
trdc
May 21st, 2008, 12:40 AM
If I close my VNC session and then walk away from the comp, someone else can open it up without it asking for a password
That is exactly what it is meant to do:
It is also persistent, meanning that even if you disconnect the VNC client your X session will not end (unless you explicitly log out) and you can reconnect to the same session again.
chelrob
May 21st, 2008, 05:26 PM
You have to log out from Ubuntu first if you want a log in acreen next time you use VNC... otherwise your session stays open, hence resumable sessions.
birgernator
June 18th, 2008, 11:03 AM
I have followed all the instructions here using a xubuntu 8.04 machine and am in much the same place as Tmaleshafske in post 450. the server seems to be listening on port 5901 but every time i try to connect to localhost i get a:
Wed Jun 18 10:38:27 2008
main: End of stream
:confused:
browsing through var/log/auth.log I found:
Jun 18 10:04:05 VPNsrv02 gdm[5697]: PAM unable to dlopen(/lib/security/pam_gnome_keyring.so)
Jun 18 10:04:05 VPNsrv02 gdm[5697]: PAM [error: /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory]
Jun 18 10:04:05 VPNsrv02 gdm[5697]: PAM adding faulty module: /lib/security/pam_gnome_keyring.so
Jun 18 10:04:05 VPNsrv02 gdm[5697]: pam_nologin(gdm:auth): cannot determine username
a quick search led me to this (http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/2008-January/041787.html) thread. so I apt-get install libpam-gnome-keyring. now the error does not appear in the log and instead of nothing happening after entering my pass word when i try vncviewer localhost:1, i get a winodow with black and white checkers and a watch for about 5 seconds. then ends with the same end of stream error in the terminal.
can anybody provide some insight into a 8.04 install?
birgernator
June 18th, 2008, 11:08 AM
inside of the Auth log i am still getting
"pam_nologin(gdm:auth): cannot determine username" each time I try to login. and when the login screen pops up, the username box is greyed out. is this a setting I need to change?
chelrob
June 18th, 2008, 09:20 PM
This tutorial was written two yeas ago for Ubuntu Edgy.
popie
June 20th, 2008, 07:54 PM
Here are the instructions I use, and they work in v8.04.
VNC Server w/Resumable Sessions on Ubuntu
Works in Ubuntu 7.04, 7.10, 8.04, and Mint 4 (Daryna)
Make these changes while logged into gnome:
Go to System -> Administration -> Login Window (General tab) and uncheck "Disable multiple logins for a single user."
Now go to the Remote tab. Change Style: to "Same as Local"
Still on the Remote tab, click "Configure XDMCP," then uncheck "Honor indirect requests."
Enable Universe repositories in Synaptic. (this wasn't necessary in Ubuntu 8.04)
The remaining changes can be made while SSH'd into the system, or in a terminal window:
Edit /etc/gdm/gdm.conf-custom
sudo nano /etc/gdm/gdm.conf-custom
add the following two lines to the existing [security] and [xdmcp] sections:
[security]
DisallowTCP=false
[xdmcp]
Enable=true
Install packages:
sudo apt-get install vnc4server xinetd
Set the VNC password
sudo vncpasswd /root/.vncpasswd
Create a new file Xvnc to add the vnc service to xinetd:
sudo nano /etc/xinetd.d/Xvnc
Paste these contents into the file:
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
}
Reboot
That's it. I've used these exact instructions on three Ubuntu 8.04 installs without a hitch, as well as 7.04, 7.10, and Mint 4. Good luck.
pickarooney
June 23rd, 2008, 05:11 AM
Just so I'm clear on this, is there a way to set up VNC on Kubuntu so that the remote user has the option of logging in using their own session and logging into the existing session to take control of the PC?
I could do with being able to use both options.
mikeduffy13
June 25th, 2008, 12:42 PM
vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
Why do I keep getting this when I try to change the password??
I can download that library as it says it doesn΄t exist...
chelrob
June 25th, 2008, 10:03 PM
vncpasswd: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
Why do I keep getting this when I try to change the password??
I can download that library as it says it doesn΄t exist...
Search your computer for .vncpasswd
Maybe it's not in /root
mikeduffy13
June 26th, 2008, 11:42 AM
I don't get any results when searching for .vncpasswd.
If I search for just vncpasswd I get:
user@machine:~$ locate vncpasswd
/etc/alternatives/vncpasswd.1.gz
/etc/alternatives/vncpasswd
/home/rnccadmin/Desktop/vnc-4_1_2-x86_linux/vncpasswd
/home/rnccadmin/Desktop/vnc-4_1_2-x86_linux/vncpasswd.man
/usr/bin/vncpasswd
/usr/bin/realvncpasswd
/usr/bin/realvncpasswd.real
/usr/local/bin/vncpasswd
/usr/share/man/man1/vncpasswd.1.gz
/usr/share/man/man1/realvncpasswd.real.1.gz
/usr/share/man/man1/realvncpasswd.1.gz
/var/lib/dpkg/alternatives/vncpasswd
If I just try and start the Xvnc I get the same library error message...
chelrob
June 26th, 2008, 01:22 PM
Maybe try creating .vncpasswd in root?
mikeduffy13
June 26th, 2008, 01:33 PM
Even if I create .vncpasswd in /root, still when I issue the command
:~$sudo vncpasswd /root/.vncpasswd I get the same library error...
chelrob
June 26th, 2008, 11:53 PM
Perhaps their's a problem with your C compiler's tool chain?
Are you able to install binaries with .configureand make?
mikeduffy13
June 27th, 2008, 11:04 AM
When I first installed unbuntu I could...I haven't tried lately. Where can I find a .bin file to install for a test? sourceforge?
...sorry, i'm still new to linux...
chelrob
June 27th, 2008, 04:45 PM
Sorry, I meant source not binaries.
I found this in the Ubuntu forums... you can try to build and install nano from source:
If you have gcc installed you can download nano's source
(http://www.nano-editor.org/)
Then type:
tar -xzf file-name
cd new-directory
../configure
make
make install
mikeduffy13
June 30th, 2008, 04:47 PM
I already have nano installed, but ./configure seems to work ok. When I try to do makefile I get errors like listed below:
nano.h:263: error: expected specifier-qualifier-list before bool
nano.h:294: error: expected specifier-qualifier-list before bool
nano.h:325: error: expected specifier-qualifier-list before bool
In file included from browser.c:24:
proto.h:32: error: expected =, ,, ;, asm or __attribute__ before jump_buf_main
proto.h:44: error: expected =, ,, ;, asm or __attribute__ before * token
proto.h:45: error: expected =, ,, ;, asm or __attribute__ before * token
proto.h:46: error: expected =, ,, ;, asm or __attribute__ before * token
proto.h:149: error: expected declaration specifiers or ... before bool
proto.h:149: error: expected declaration specifiers or ... before bool
proto.h:151: error: expected =, ,, ;, asm or __attribute__ before browser_select_filename
proto.h:153: error: expected =, ,, ;, asm or __attribute__ before findnextfile
chelrob
June 30th, 2008, 10:41 PM
Does make finish? If it doesn't try installing another program from source.
If you continue to get errors it could be a problem with your compiler's toolchain.
acambre
July 2nd, 2008, 12:05 AM
Here are the instructions I use, and they work in v8.04.
VNC Server w/Resumable Sessions on Ubuntu
Works in Ubuntu 7.04, 7.10, 8.04, and Mint 4 (Daryna)
Make these changes while logged into gnome:
Go to System -> Administration -> Login Window (General tab) and uncheck "Disable multiple logins for a single user."
Now go to the Remote tab. Change Style: to "Same as Local"
Still on the Remote tab, click "Configure XDMCP," then uncheck "Honor indirect requests."
Enable Universe repositories in Synaptic. (this wasn't necessary in Ubuntu 8.04)
Supposed I only have SSH access and cannot get to the console. How would I do the above?
I checked the conf files in /etc/gdm, and none of the options appear to directly correlate to what's mentioned above.
jamesrfla
July 2nd, 2008, 12:00 PM
popie I am confused when we have to add the following two lines to the existing [security] and [xdmcp] sections. I put in the new lines but how do I save it and exit?
popie
July 2nd, 2008, 02:49 PM
popie I am confused when we have to add the following two lines to the existing [security] and [xdmcp] sections. I put in the new lines but how do I save it and exit?
If you're using the nano editor, as I used in the example, press CTRL-X to exit, then press "Y" to save, then press ENTER to save using the original file name.
jamesrfla
July 2nd, 2008, 05:36 PM
Okay I tried that and did everything else and when I try connect I still get my desktop and not a new sesion. I had remote desktop enabled before so could that be the problem?
popie
July 2nd, 2008, 07:01 PM
You should see the login screen when you connect. Be sure to connect to yourpc:1, not yourpc:0
Not sure if having the built-in remote control still enabled matters or not, but you can try disabling it if you still see your local session.
avallach
July 3rd, 2008, 01:58 AM
I've followed these instructions and got it working on my Xubuntu (6.06) system, however...
As the HOWTO says right at the beginning, this is designed to connect you on a different display (:1) than the local console (:0). I'd like to connect to the console session and control it remotely, which has been default behavior in all of the Ubuntu versions I've enabled it on. Even if I type in ipaddress:0 when I connect, I get a greeter screen and when I log in, it's a new session and not the local. I also get a warning saying I'm already logged in. Help?
jamesrfla
July 3rd, 2008, 09:55 AM
I went ahead and tried localhost:1 and it worked. Before I was putting in my ip address. Thanks for the help!!:)
mikeduffy13
July 8th, 2008, 04:08 PM
Does make finish? If it doesn't try installing another program from source.
If you continue to get errors it could be a problem with your compiler's toolchain.
I configured, and successfully completed make on another program...so now where does that leave me?
mikeduffy13
July 9th, 2008, 04:12 PM
ok i got the library installed via rpm from www.rpmfind.net. Used alien to install in Ubuntu and now I don't get the error anymore.
NOW - how do I actually get this vncserver to work correctly??? hrmmm
dansued
July 10th, 2008, 01:55 PM
When I try to make a connection with tightVNC viewer, the first window that pops up has this to say,
Connecting to 10.0.0.3:1...
Status: Connection Established.
However, seconds later another window pops up with this error message,
ReadExact: Socket error while reading.
What does this mean?
mikeduffy13
July 10th, 2008, 02:03 PM
are you behind a firewall? do you have the right port specified?
usually socket errors occur when ports don't match up or are being blocked.
dansued
July 10th, 2008, 02:07 PM
are you behind a firewall? do you have the right port specified?
usually socket errors occur when ports don't match up or are being blocked.
both computers are behind the same router, so the firewall settings shouldn't matter right?
my Xvnc conf is this,
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/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
port = 5901
}
whether I connect by using :1 or :5901, I get the same socket error.
jamesrfla
July 10th, 2008, 04:26 PM
Should be ip address:1. example 192.168.1.9:1
popie
July 10th, 2008, 10:03 PM
both computers are behind the same router, so the firewall settings shouldn't matter right?
my Xvnc conf is this,
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/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
port = 5901
}
whether I connect by using :1 or :5901, I get the same socket error.
Check your fonts path. Unless you're using an old, old version of Ubuntu, it needs fixing. I also don't see the XFIXES statement... See http://ubuntuforums.org/showpost.php?p=5229232&postcount=458
dansued
July 11th, 2008, 02:31 PM
Check your fonts path. Unless you're using an old, old version of Ubuntu, it needs fixing. I also don't see the XFIXES statement... See http://ubuntuforums.org/showpost.php?p=5229232&postcount=458
am I able to make these changes in the console? I only have ssh access to this box.
Make these changes while logged into gnome:
Go to System -> Administration -> Login Window (General tab) and uncheck "Disable multiple logins for a single user."
Now go to the Remote tab. Change Style: to "Same as Local"
Still on the Remote tab, click "Configure XDMCP," then uncheck "Honor indirect requests."
popie
July 11th, 2008, 04:34 PM
am I able to make these changes in the console? I only have ssh access to this box.
I don't know of a way to make the gnome changes at the console, so that could be a problem. But I'm not a super expert at this. I have always had access to make the gnome changes.
You can make changes to the Xvnc file at the command line.
jcr1
July 18th, 2008, 05:45 AM
Hi, Lovely HOWTO thanks...got it working...mostly.
I seem to run into a similar problem quite often.
I logged in yesterday (over the internet) and got the gdm login screen, logged in, great! full control on display:1. I could log out (using the button for logging out inthe remote window) and log back in later. or I could lock the screen and close the vncviewer.
But sometimes (well quite often) something seems to get upset and I can't get the viewer to open up again. I try the viewer, get prompted for a vnc password, but then get an error:
The connection closed unexpectedly.
And nothing I do now seems to let me get back...
So I tried the following:
jonrserv@jcrserver2:~$ vnc4server :1
A VNC server is already running as :1
jonrserv@jcrserver2:~$ sudo /etc/init.d/xinetd stop
[sudo] password for jonrserv:
* Stopping internet superserver xinetd [ OK ]
jonrserv@jcrserver2:~$ sudo killall Xvnc
Xvnc: no process killed
jonrserv@jcrserver2:~$ sudo /etc/init.d/xinetd start
* Starting internet superserver xinetd [ OK ]
thinking, this would kill the vnc session, starting afresh and I could log in...but it makes no difference. The only way I have solved this is by rebooting my server, but obviously this is not a nice option.
Question is basically, why is it doing it and how do I rectify it when it happens? How do I kill it off so its like the first time I am trying to log in?
Hope you can help!
xmrkite
July 18th, 2008, 05:59 PM
Hello, after following the instructions to get vnc going in the beginning of this post, I was able to get it going....at least, mostly.
When i log in, all i see is a background of black and white tiny criss cross lines. I can't right click the desktop, and there is no taskbar or Apps menu of any sort.
What am I missing here?
-Thanks
-Steve
popie
July 18th, 2008, 06:21 PM
Hello, after following the instructions to get vnc going in the beginning of this post, I was able to get it going....at least, mostly.
When i log in, all i see is a background of black and white tiny criss cross lines. I can't right click the desktop, and there is no taskbar or Apps menu of any sort.
What am I missing here?
-Thanks
-Steve
This is a common problem, but it usually is because part of the install process wasn't done properly. Please review the following post and make sure you've done everything in it exactly as described. :)
http://ubuntuforums.org/showpost.php?p=5229232&postcount=458
xmrkite
July 18th, 2008, 06:36 PM
Hello, i did exactly as instructed in your post, then rebooted, but it's still exactly the same. What else could it be?
-Thanks for any assistance
-Steve
xmrkite
July 18th, 2008, 06:39 PM
Also, i'm using xubuntu 8.04
-Thanks again
popie
July 18th, 2008, 06:49 PM
Hello, i did exactly as instructed in your post, then rebooted, but it's still exactly the same. What else could it be?
Not sure... I haven't tried this process with Xubuntu, maybe there's something different needed w/that version.
Did you manage to find all the remote settings listed at the top ("while logged into gnome")? Were there counterparts in xubuntu? Beyond that you might have to do some more searching related to xubuntu and vnc. I bet that's the issue.
xmrkite
July 18th, 2008, 06:58 PM
I did find some other info on xubuntu and vnc, but everything i've tried just gives me the same thing i have now.
I'm wondering if there is a way to reset things and try fresh, without reinstalling, cause i have a lot of stuff setup on this computer.
popie
July 18th, 2008, 07:02 PM
I did find some other info on xubuntu and vnc, but everything i've tried just gives me the same thing i have now.
I'm wondering if there is a way to reset things and try fresh, without reinstalling, cause i have a lot of stuff setup on this computer.
Did you verify that the fonts directory is correct for your system? Its in one of the lines in the Xvnc file.
It changed a few versions back, and maybe its still the old path in xubuntu...
The current: /usr/share/fonts/X11/misc USED to be: /usr/share/X11/fonts/misc
Just a guess, but make sure this path is valid for your system.
xmrkite
July 18th, 2008, 07:24 PM
I'm not sure exactly where i set the fonts path...any ideas?
popie
July 18th, 2008, 07:40 PM
I'm not sure exactly where i set the fonts path...any ideas?
Its in the Xvnc file. /etc/xinetd.d/Xvnc
xmrkite
July 18th, 2008, 07:45 PM
tons of fonts in the /usr/share/fonts/X11/misc folder that the file calls. Must be something else then i guess.
ttroy50
July 30th, 2008, 05:27 AM
I've set this up and can logon and view my desktop in Ubuntu 8.04, however whenever I start my first application (e.g. Firefox) after remote logon I get the following error
"There was an error starting the GNOME settings Daemon.
Some things such as themes, sounds, or backgrounds may not work correctly.
The setting Daemon restarted too many times"
This causes me to lose the Human theme and revert to the default GNOME theme.
I previously had this problem when I upgraded from Ubuntu 6 to 8 and then assumed that it was caused by the upgrade, but I've now reinstalled and it's still happening.
Everything works fine if I login directly to the PC. The issue only happens when I use vnc.
Does anyone know why this would happen?
p_schott
July 30th, 2008, 05:35 AM
Seems to be a bug :
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/239342
A workaround is proposed here :
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245
ttroy50
July 30th, 2008, 05:55 AM
Seems to be a bug :
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/239342
A workaround is proposed here :
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245
Thanks that seems to have done it. The workaround was to disable the keyboards plugin under /apps/gnome_settings_daemon/plugins/keyboard in gconf-editor
dasmith
August 5th, 2008, 01:53 AM
Been following the forum on this as I set multiple session for VNC on previous Ubuntu distro's as well as Fedora and have gotten them to work. I am receiving this error:
root@Zues:/home/david# vncviewer localhost:1
VNC Viewer Free Edition 4.1.1 for X - built Apr 16 2008 13:23:14
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Aug 5 00:44:53 2008
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Tue Aug 5 00:44:58 2008
main: No password configured for VNC Auth
root@Zues:/home/david# sudo vncpasswd /root/.vncpasswd
Password:
Verify:
root@Zues:/home/david# vncviewer localhost:1
VNC Viewer Free Edition 4.1.1 for X - built Apr 16 2008 13:23:14
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Tue Aug 5 00:45:30 2008
CConn: connected to host localhost port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Tue Aug 5 00:45:34 2008
main: No password configured for VNC Auth
root@Zues:/home/david#
Any ideas as I can log into localhost:0 just fine. Actually wanting 5901 to be for a buddy of mine to log into his own desktop. I am using Ubuntu 8.04 desktop
Thanks for any assistance.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.