HOWTO: Remote Desktop with VNC in Ubuntu Edgy/Feisty
Updated, 4 May 2007: Warren helpfully pointed out in the comments a possible fix for the problem with the latest vnc4server. It worked for me in Edgy, and I hope it works with these instructions for Feisty Fawn also.
See below for info about the -extension XFIXES option, and for another necessary setting in 7.04/Feisty if you want to use multiple logins for a single user. Also see the related entry for this bug at Launchpad.net.
Last year I set up VNC Server in Fedora Core 5 (see below), and the instructions I followed had the added bonus of giving me resumable sessions, so that the remote session continues between client sessions. There is a long thread about setting up the same scenario in Ubuntu:
http://ubuntuforums.org/ showthread.php?t=122402
The discussion started as a howto on January 27, 2006 and it is ongoing as of a week ago. (And then today since I plan to point to this post from there.) It has carried on through a few versions of Ubuntu and had most of what I needed to get VNC working on GNOME in Ubuntu 6.10 (Edgy Eft), although it took the better part of a morning to piece together. Thanks to Tichondrius who posted the original instructions that I’ve built on below, and all of the posters who contributed further ideas and solutions.
I’ll try to present a coherent narrative of the install, but in reality I went back and forth, trying lots of different things, and probably did things that in the end weren’t necessary. I’ll mention some of the gotchas as I go and recap some others at the end. There are also a few errors and nags remaining that don’t seem to cause any larger problems that make me want to investigate right now.
There was much discussion in the big thread about issues specific to the AMD64. I completely spaced out on the fact that my system76 machine came with an AMD64 until after I had gotten things working. So I mostly ignored all that advice, probably to my detriment.
My understanding of this is very sketchy. Just following along and not really understanding what I’m doing. I know there are security concerns with opening some of this up. Please don’t take my word as final, and as always: caveat emptor.
Lights, Camera, Action
1. Enable Remote Access (XDMCP)
- System » Administration » Login Window

- Tab Remote » Style: Same as Local

- Button Configure XDMCP… –> Uncheck (disable) “Honor indirect requests”

Edit /etc/X11/gdm/gdm.conf
sudo vi /etc/X11/gdm/gdm.conf (or gksudo gedit ... if you prefer)
(While writing this, I notice that the file has a warning that it may be overwritten on upgrade and recommends using another .conf file. Should really look in to that…)
- Find the [xdmcp] section in the file, set:
Enable=True(One place suggested rebooting after editing.) -
Find:
# 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/gdmloginAnd uncomment the RemoteGreeter line
Again, it sounds like there are security concerns here. The config file even says in that [xdmcp] section: “Distributions: Ship with this off. It is never a safe thing to leave out on the net.” My machines aren’t directly exposed to the Internet, so I’m ok with this for now. (Although I want to understand better what the risks are and how I can minimize them.)
Update, 4 May 2007: I’m not running Feisty 7.04 yet, but I booted up the Live CD to confirm that there is a new “General” tab in the Login Window Preferences dialog where you can enable multiple logins for a single user. (It’s phrased as a negative: “Disable multiple logins for a single user”. It’s checked by default so you’ll uncheck it if you want multiple logins; e.g. if you want to be logged in remotely and locally.) The Remote tab and XDMCP options in Feisty look a lot like Edgy’s, so I hope my instructions are still good in 7.04.
A note about software repositories and freedom
Next, the the instructions say:
“Note: Before doing the next step, you need to make sure the extra repositories (e.g. universe) are enabled:
http://easylinux.info/wiki/Ubuntu#How_to_add_extra_repositories”
I was impatient the first time setting this up and didn’t really figure out what this meant. I felt like I was thrown in to the middle of something a lot more complicated than the VNC setup task at hand. I wanted to know what this stuff was, but not at that moment. There is a *lot* of stuff at that link, and it’s not at all clear what you’re expected to do in relation to the howto. This vague directive filled me with unease.
I think I understand better now. I knew that by installing stuff with apt-get, the software had to be retrieved from somewhere, but it was all mysterious and like magic to me. Now I see that Ubuntu has a way of categorizing different repositories, shown in the screenshot below.
I think the author of the howto was just pointing to the link as a shorthand reference that something needed to be enabled in order to get the required software. He was trying to explain VNC, after all, and not the world of Ubuntu software repositories. But it was disorienting and troublesome at the time.
And now that I have a glimmer of what these repositories are about — this universe and multiverse and whatnot, I object to how they’re presented in that link, and this other link I followed later, for a GUI alternative:
http://easylinux.info/wiki/Ubuntu#How_to_apt-get_the_easy_way_.28Synaptic.29
There’s no discussion of software freedom at these links (at least not that I saw in my brief review of them) — just the directive for you to enable access to all available repositories. I’d like to see a comment to the effect that you might not want to enable access to repositories that offer copyright encumbered and/or proprietary software. It seems this is one result of a culture where convenience is valued over principles.
To see where these repositories are configured in the GUI, take a look at System » Administration » Synaptic Package Manager, and then Settings » Repositories. You might see something like this:

I discovered my system76 Ubuntu machine came with all five checkboxes enabled, so it hadn’t mattered that I didn’t understand this when I got VNC working; I already had the universe enabled. I didn’t like that multiverse and the proprietary device drivers were enabled, and I turned those off.
I have mixed feelings on device drivers and get caught in the convenience trap myself. I believe hardware drivers should be free-as-in-free-speech also, but I’m willing to use some proprietary drivers to run current hardware. In the future I will try more and more to only use hardware that is supported by free drivers.
2. Install Required packages
sudo apt-get install vnc4server xinetd
Update, 4 May 2007: Previously there were problems with the latest vnc4server that required use of the downgraded vnc4server/edgy in the install above. I kept skipping the GUI software updater’s “Important security update” from version 4.1.1+xorg1.0.2-0ubuntu1 to 4.1.1+xorg1.0.2-0ubuntu1.6.10.1 because it would break VNC as described later in this post. Warren shared a workaround/fix for this problem that we’ll cover in step 4 below.
I was finally driven to learn more about the universe and multiverse when I tried this step on my laptop. There I had installed 6.10 Edgy myself and by default the universe and multiverse were not enabled. I was getting the error: “E: Couldn’t find package vnc4server.”, which was odd and disheartening when it had worked so seemlessly before. Google brought me right back to the big Ubuntu Forums thread where I now found a post from 2 Feb 2006 more relevant.
Here’s where GUIs can be nice for learning. The one link had described turning this stuff on, but it wasn’t until I finally looked at the GUI config screen that understanding started creeping in to my brain.
It helped having this problem and finding the solution — it can be so much better to struggle with something for a while to get new ideas embedded in your thick skull. I do enjoy learning this stuff and tinkering; it’s just that time isn’t as good of a friend as it was when I was younger.
I ignored the AMD64 note because I was oblivious to my own AMD64ness while working on this.
3. Set the VNC Password
sudo vncpasswd /root/.vncpasswd
4. Add VNC Service to xinetd
sudo vi /etc/xinetd.d/Xvnc (probably creates a new file)
Add 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/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd -extension XFIXES
port = 5901
}
You can tweak these settings, obviously. For example, you might want a bigger resolution of 1152×864 or 1280×960. The original instructions had the font path as /usr/share/X11/fonts/misc. That must have changed somewhere along the way. (Thanks to MBaran for pointing out that one.)
Update, 4 May 2007: -extension XFIXES is the new setting that seems to work with the latest vnc4server. I don’t know what it is or what it’s for. Doesn’t appear in the man page. How do people find this stuff? All I know is that it’s nice when they come to me with the fix. :-)
5. Restart xinetd
sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo /etc/init.d/xinetd start
Try it!
From the machine that we just installed VNC server on, try:
vncviewer localhost:1
If all went well (ha!), you should be prompted for the VNC password, and then see the GDM login screen where you can enter your Ubuntu username and password and start a new X session. Then you can move on to trying a VNC client from another GNU/Linux machine or Windows, specifying something like this for your server: 192.168.1.100::5901.
Broken eggs from whence came the omelette
I had lots of errors while doing this. One problem was that it wasn’t until much later that I found out how to enable XDMCP in the gdm.conf file.
When I first tried vncviewer localhost:1, I got:
scarpent@prometheus:~$ vncviewer localhost:1
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.
ReadFromRFBServer: rdr::SystemException: read: Connection reset by peer (104)
Is xinetd listening?
I picked up some troubleshooting techniques from the thread. After restarting xinetd in step 5, you can check that xinetd is listening on port 5901 by doing:
sudo netstat -tap | grep xinetd
You should see something like:
tcp 0 0 *:5901 *:* LISTEN 10932/xinetd
I didn’t get that. I rebooted the machine and then saw something similar. (Just a different process id than 10932.)
But I was still getting connection reset by peer.
What’s going on under the covers?
There is a log to check:
grep xinetd /var/log/syslog
From which I got lots of stuff, including:
ubuntu xinetd[4829]: warning: can't get client address: Transport endpoint is not connected
ubuntu xinetd[4830]: warning: can't get client address: Transport endpoint is not connected
ubuntu xinetd[4268]: Deactivating service Xvnc due to excessive incoming connections. Restarting in 10 seconds.
ubuntu xinetd[4268]: Activating service Xvnc
Is Xvnc running?
And:
ps -ef | grep Xvnc
Which told me I didn’t have Xvnc running. The thread has a way to manually start Xvnc on yet another port (5902), but I never did get that working (although it generated clues). With:
Manual attempts and clues
sudo Xvnc :2 -query localhost -geometry 1280x960 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
(warning: wrong font path), and then with:
vncviewer localhost:2
I got:
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
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/share/X11/fonts/misc, removing from list!
Fatal server error:
could not open default font 'fixed'
Which was hinting at the font problem that a later post explained, so really:
sudo Xvnc :2 -query localhost -geometry 1280x960 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd
After finding that, I restarted the xinetd stuff again but still couldn’t find Xvnc with grep, so I tried the manual method again, this time getting:
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.
vncviewer localhost:1 now prompts for password but then ReadFromRFBServer: rdr::EndOfStream
vncviewer localhost:2 vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server
What’s this XDMCP stuff?
I finally got around to the XDMCP enabling in gdm.conf, rebooted, and still no Xvnc with grep, and still with the end of stream when trying to launch the local viewer. I tried with the Windows vncviewer and got a password prompt, but then connection closed.
(NOTE! Update, 4 May 2007: This next part about vnc4server/edgy should be taken care of by the instructions above, so that hopefully you won’t need the older version of vnc4server. I’m leaving it in here in the hope it still may be useful as a reference/clue/hint for other searchers.)
More poking around and restarting and trying the same things with the unrealistic hope of a different result, and then this, which I probably had seen more than once earlier:
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
That rang a bell, with all the discussion of the problems with the latest vnc4server. I had downgraded and upgraded several times, and now I tried downgrading again:
sudo apt-get install vnc4server/edgy
And… at last! Using the local vncviewer worked!
(But remember, using the -extension XFIXES setting should make using the /edgy version unnecessary. And it’s possible the downgraded version doesn’t work correctly on Feisty in any case.)
Open Issues
Logging in from :0 and :1 at the same time
If I’m logged in to the computer locally (display :0), and then I try connecting remotely with a VNC client (display :1), I get a warning that I’m already logged in, with the options to “Log in anyway” or “Abort login.”

This may not be a problem. I think Fedora does something similar. But then there is a crash in Ubuntu. This only happens in the situation of logging in to both local display :0 and remote display :1 at the same time. “Bug Buddy” points the finger at Evolution (apparently): Backtrace was generated from '/usr/libexec/evolution-alarm-notify'.

I’m not currently using Evolution, and I don’t notice any ill effects from this.
Can’t start instances of Firefox in two different sessions
Trying to start Firefox results in a message box: “Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.”
Going back to the local logon, Firefox is still working fine. I wonder if this has to do with the Firefox profile? I think later I’ll try starting with a different profile to see if that works around the problem.
Keyboard Settings
If I log on to the local machine and then log out and then in again via VNC, or vice versa, I get a message about the X system keyboard being different from GNOME keyboard settings.
Expected was model "pc105", layout "us" and option "lv3 lv3:ralt_switch", but the following settings were found: model "generic", layout "us" and no options.

Don’t know what that means. Doesn’t seem to matter which I pick. I suppose I can just tell it not to warn me anymore. I’d like to know what this is about but it goes on the long list of things that can wait for later.
Shared VNC Password
Finally, it appears that with this method you have a single VNC password, and can only have one user connect at a time. The original HOWTO says:
Note about security: This setup allows any user to start an X-session remotely by logging in using his regular password (after starting the VNC connection using the VNC password), so if the user disconnects without logging out, any other user which knows the VNC password can connect afterwards and resume the same session that the first user started. So if you do not want to log out before disconnecting, it’s advisable to at least lock your VNC X-session screen. Also note that while a remote user is connected thru VNC, no other connection will be accepted. An idle VNC client will be disconnected after one hour, but this can be changed by using the “-IdleTimeout” option in the server_args line in /etc/xinetd.d/Xvnc. For example, you can add “-IdleTimeout 300″ to change it to 5 minutes.
The method I used in Fedora will allow multiple users, each with their own port and session. I’m guessing something similar could be done here. Since I’m the only one connecting remotely on my network, I’m not going to worry about it right now.
What about that Fedora install?
The Fedora install is fading in to the past and I won’t be posting a HOWTO for it, but here are two pages that I think gave me just about everything I needed:
Last Call
Phew! This turned out to be a long post. I hope it helps at least one person. If that person is you and you want to show your appreciation, please consider throwing a few coins in my tip jar by buying something through one of my Amazon affiliate links. :-)
Comments
-
Thanks a lot! It finally worked, I had almost given up when I found you and made my life shine again.
Posted by anaspeople on 17 February 2007 at 12:19 pm
-
[…] Read more […]
-
This is an excellent HowTo which finally got my VNC Problem fixed!
Thanks A Lot!
Posted by wizZzard on 19 February 2007 at 9:49 am
-
Hi! I have the same problem as you. Every line in the guide has been the same as I have. But when I try to reinstall vnc4server/edgy I get a message saying that I already have that version installed. I am able to start the server manually on port 2 and when that runs I can connect with tightvnc. However I’m unable to get it to work automatically after the system is booted.
Posted by Andreas on 27 February 2007 at 5:21 pm
-
You are the man!!! great tutorial, pointing out All possible cases.
Posted by Nassos on 28 February 2007 at 6:20 pm
-
To get multiple instance of Firefox (or any other Mozilla application) running simultaneously you need to set the environment variable MOZ_NO_REMOTE=1 before starting Firefox.
To do this just use:
export MOZ_NO_REMOTE=1Posted by Bob Peers on 5 March 2007 at 2:27 pm
-
I sure could use some help getting to the goal line. I think I’ve followed the tips and instructions here (thanks for the detail).
My last hurdle was the SecurityPolicy file which was in some obsure place in v6.10 Desktop. I copied it to the right place and using the manual method, I can connect to myserver:2, authenticate with the vnc password, and I get a window.
BUT the window is just grey with the x cursor. I get no login prompt.
Any ideas where I should look?
Posted by Robert T on 5 March 2007 at 10:27 pm
-
Does your method allow user1 at machine1 to login to the Ubuntu server at machine0 at the same time as user2 at machine2 and show them their own different independent desktops and different running applications?
If not (and the vncuser will always see whatever is onscreen), I think all I did on 6.06 LTS was install a vncserver (and setup a vncuser), possibly also sshd, and maybe graphically set allow remote logins. I ran machine0 headless and have the screensaver lock at the lowest time (1 minute I think).
I would like to get the setup in my 1st paragraph (and hopefully secure). Can anyone show how?
Posted by Instruct Me on 6 March 2007 at 1:07 pm
-
Hmmm. Does Edgy not do this?
I just reinstalled 6.06 and all I had to do was graphically:
System | Preferences | Remote Desktop
Check both Allow other users to view and control
Uncheck Ask for confirmation
Supply a Password.I used realvnc viewer from a remote machine and I’m in.
No XDMCP setup.
No Allow remote logins setup.But I still want a multi-user remote login with separate views.
Is it possible?
Posted by Instruct Me on 6 March 2007 at 1:24 pm
-
man i have a little prob… 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?
Posted by Nassos on 12 March 2007 at 1:22 pm
-
Thanks for the write-up.
I didn’t have any of the troubles you discuss here (I just used the “Remote Desktop” option in the control panel.)BUT, I did come here and find what I was looking for - “configure different screen resolution for vnc ubuntu”
and the clue you gave when editing the /etc/xinetd.d/Xvnc
file manually. I can now set my remote sessions to have a slightly smaller resolution that the default monitor sessions and hence the window on my PC desktop just fits inside my workspace with taskbar so I don’t get trivial scrollbars all the time.So my PC is set at 1024×768, and the VNC portal now loads as -geometry 1000×700 and is maximised without being fullscreen.
… I knew it would be easy somewhere. Thankee for pointing in the right direction.Posted by Dan on 13 March 2007 at 10:41 pm
-
thanks a lot dude! finally it resolve my issues with this damned VNC server!
your post has saved many hours of my time!
:-)cheers,
enricoPosted by enrico on 14 March 2007 at 9:13 am
-
I had hours of fun trying to get this work, with all sorts of strange errors. Finalyy I got it down to “cannot open display” - which turned out to be the resolution I had specified (1024 * 768) wasn’t in the xserver.conf file. Just in case anyone else has the same problem: I changed it to 800 * 600 (which is supported and is what I normally use for vnc anway) and it all works just fine.
Posted by Ian Johnston on 22 March 2007 at 2:32 pm
-
[…] GDM + VNC + Ubuntu Edgy […]
-
Nassos, how did you make vnc avaialble for multiple user via diff sessions?
Posted by Mu on 18 April 2007 at 11:53 am
-
Thanks, man, worked like a charm.
Posted by Radu on 23 April 2007 at 6:02 am
-
[…] Searching around, I find people having other problems with 7.04 and other builds of vnc, and someone who is seeing the same weird dialog box I am (but of course, his keyboard works fine). Nothing conclusive on the ‘net from a lot of searching and poking around. […]
-
There is a much easier way to do this!
Prerequisites: Have ssh installed and running. Have one or more user accounts, ideally with different passwords. Have VNC, RealVNC or TightVNC installed. Make sure that you can start the VNC server manually from a terminal by typing “vncserver” (with or without args, like depth, resolution, etc.) You know it is running when it tells you VNC is starting. The first time any given user starts the VNC server it will ask for a password; note that you can use a different password to log into VNC than the user’s Ubuntu password. To kill a running VNC server, type “vncserver -kill [:(port number, if used - see below]
a) log into your box with ssh. I presume you can enable ssh and have it listen on a port. If you have Webmin installed you can configure ssh to listen on something other than the default port of 22, which seems to help with dronebots that are constantly trying to probe for ssh servers.
b) once you have a remote terminal, just issue the command ‘vncserver [:port]’ - If you want Joe to log in at :2, then his command would be ‘vncserver :2′ - you can append args like ‘depth 24′ or ‘resolution 1024×768′
You can have multiple vnc servers running simultaneously - so if Alice logs into the box she could run ‘vncserver :3′
Of course your firewall needs to either open or map the appropriate ports.
c) to connect from a client machine, start the vncviewer - I do it from the Run Application gnome applet. A typical command would be ‘vncviewer myremote.machine.com:2′ - and then I would have access to Joe’s VNC server above.
Note that this method does NOT let you share the screen with a local user; that is, you can’t say to Joe, “watch this, I am moving the mouse now,” since he is looking at X session 0 and you are looking at X session 2.
However, it does let you run multiple simultaneous (Alice and Joe) copies of Firefox. Linux is inherently multiuser; Ubuntu lets you easily run three or four VNC remote sessions simultaneously.
(If you must share the desktop with Joe in realtime, you’ll need to use the builtin ‘Vino’ version of vncserver, accessible from the Remote Desktop menu item on the Administration menu.)
Good Luck!
Posted by Mallard on 30 April 2007 at 1:01 pm
-
Scott,
There is a way around the Edgy/Feisty vnc4server problem: add -extension XFIXES to the server_args in step 4.
Feisty now defaults to not allowing multiple logins for the same user, so you might find yourself not being able to login. To change this, go to Applications -> Settings -> Login Window. There is a checkbox under the General tab. This is all for Xubuntu, BTW.
Regards
Warren
Posted by Warren on 4 May 2007 at 4:13 am
-
I have a wireless internet connection for my laptop, my computer running Feisty is connected directly to the wireless router. When I try using
vncviewer mydesktop:1on the client side, I get a “Couldn’t convert “mydesktop” into host address” or something similar. Is the command wrong or should I have specified something?Thanks,
AnonymosPosted by Anonymos on 4 May 2007 at 10:18 pm
-
I can confirm that your instructions work start to finish with 7.04. Installed Feisty a few days ago and was fortunate enough to stumble upon your blog when I went looking for how to get VNC set up. I’ve got 2 simultaneous sessions going right now. Thanks!
One question for the audience: The local machine is a mythbox connected to a SD TV - resolution set at 800×600. When I do want to try and see the local user’s desktop using my windows VNC client and Remote Desktop, I get a scrambled screen … unless I switch the local resolution to 1280×1024. Any ideas on how to fix this?
Posted by scram on 6 May 2007 at 1:03 am
-
Oh yeah, one last tweak for Feisty (and maybe others)-
My xorg.conf default resolution depth is 24, so I found I got much better performance when I set “-depth 24″ in the Xvnc file.Posted by scram on 7 May 2007 at 11:00 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”
Posted by Schwieb on 8 May 2007 at 11:36 am
-
Hi Scott,
I want to offer my sincere thanks for an excellent guide. I’m also happy that you’ve changed it to be “how to do it” separately from “what you did to get it to work”. Your latest fix in the XVnc file worked perfectly.
You have saved me a lot of frustration. I have agonised over the VNC issue since I first installed Ubuntu (a few months ago).
The Ubuntu experience has been a mixed one for me, but your page has definitely been one of the highlights :)
Regards
Walter
Posted by Walter on 11 May 2007 at 3:40 pm
-
Hi many thanks from France
Posted by Ephraste on 9 June 2007 at 3:06 am
-
works perfectly with Feisty 7.04 !
Many thanks againPosted by Ephraste on 9 June 2007 at 3:22 am
-
The solution worked for me for the VNC. Thanks! However after a restart the local desktop disappeared through the remote one still works ! Any tips ?
Posted by sachin on 19 June 2007 at 4:31 am
-
Great. Been wanting to try VNC for awhile, This was a great help. Many Thanks
Posted by No_Biscuit on 26 June 2007 at 8:22 am
-
i followed your instructions and tested with the following command / output / screenshot:
$ vncviewer localhost:1
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 “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
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
ShmCleanup calledhttp://img295.imageshack.us/img295/861/screenshotpm4.png
Obviously, not a sign on screen..I ran the same command, but with :0 and it logged into my current session with an infinite regression feedback loop…nothing serious, just hard to escape from like a house of mirrors. Anyway, not sure what went wrong with :1 and why it only shows a grey X screen with no login…
Posted by Ben on 26 June 2007 at 7:09 pm
-
Thanks Scott. I seemed to have got it to work. I had forgotten the setting ‘Enable=True’, then I rebooted and it worked on :1
Here’s a link to my gdm.conf file, just in case you think I missed something. Also, I believe I need to make these edits in /etc/gdm/gdm.conf-custom in order for them not to be overwritten.
One question though: isn’t this all very insecure? I’ve heard that anyone could intercept and read the data stream and that it’s better to encrypt by tunneling through SSH and port forwarding. I’m looking into that now, since I don’t want anyone snooping on my remote sessions.
Posted by Ben on 27 June 2007 at 11:13 am
-
Followed your tutorial and it works perfectly!
Thanks a lot!
Posted by Pascal on 6 July 2007 at 9:28 am
-
Dude, you’re all over google and you rock! Saved me, thanks!
Posted by Bryan on 11 July 2007 at 10:16 pm
-
Thank you Scott!!!
After close to 3 days of following FAQs and HOWTOs I was about to give up and go to some other solution - and I am technical! The fact that you did a current piece on a hot topic relating to a very popular up-and-coming product (distribution). I feel better knowing I wasn’t the only one fighting those feisty ;-) little bugs. Seriously, it’s not that feisty should be faulted in the least. The teams working on all the *Ubuntu’s (I’m working with Edubuntu for kids) are fantastic and have done a wonderful job. Being a developer for more than 10 years I can appreciate the work that goes into this. The big difference with these folks is that they are not only working with changing requirements, but since they are integrators of code across the globe that literally changes constantly. My hat is off to them.
Thanks for putting together this great piece.I am working on scripting this process for automated installation on computers donated to special-needs kids. Your effort will help each and every one of them. Oh - no, the kids won’t need VNC but I most certainly will to help them out!
Posted by Joe Jacobson on 12 July 2007 at 7:02 pm
-
Great information! Very helpful, Thank you very much!
robert
Posted by robert on 10 August 2007 at 3:32 pm
-
In CentOS, I am able to remote control same user session login at the console. In Ubuntu, the remote and local sessions are always different despite using the same user account. I am wondering if there is a way to do the same like in CentOS…
Posted by Roysten on 13 August 2007 at 10:12 am
-
Thank you very much for your time posting this!!
I wish it came up higher in Google, or that I was more patient and distilled a few posts before wasting my time. Your post worked first time on Ubuntu Feisty on an AMD64 X2.
To use the modern parlance, you rock!
Cheers,
Erik.
Posted by Erik Blood@xe on 22 August 2007 at 4:04 am
-
Hey Scott, were you able to see all the programs started at the local console?
In my case, when I vnc from windows to the ubuntu session, I get a completely new screen without seeing any of the programs I have started at the console login…
Posted by Roysten on 25 August 2007 at 11:44 pm
-
Ah, now I know I have missed the obvious. It has been stated in the Remote Desktop dialog to specify “:0″ in vncviewer.
Thanks much for your pointers. It is now working perfectly for me.
Posted by Roysten on 27 August 2007 at 8:41 am
-
[…] Agora, para facilitar ainda mais nossa vida, podemos fazer Remoting Desktop pelo VNC, e sua instalação é bem simples, conforme este tutorial que segui para o Ubuntu: […]
-
Thanks for posting. My VNC now works. Without your post I would still be wandering in the wilderness. Thanks again!!
Posted by Don Peterson on 12 September 2007 at 12:26 pm
-
I always thought multiverse was required for using the system. I didn’t know you could turn it off.
Posted by l.e. on 15 September 2007 at 8:30 am
-
Sorry, I meant restricted, not multiverse.
Posted by l.e. on 15 September 2007 at 8:30 am
-
[…] HOWTO: Remote Desktop with VNC in Ubuntu Edgy/Feisty This one works! (tags: linux ubuntu vnc remote) […]
-
Great help. Many Thanks from Brazil, without your post no VNC working for me.
Posted by Marcelo Marques on 26 September 2007 at 7:38 am
-
hi guys,im new to linux and i have one question.I’ve enabled the remote desktop in ubuntu but when i log on from my windows PC i can view the ubuntu’s desktop only and not control it.
I’d like some help please.Sorry for my bad English.
Posted by alex on 30 September 2007 at 12:21 pm
-
the problem is that i can connect and view my linux desktop through vncviewer on my windows pc but when i move the mouse cursor on my files i cant click them or anything…i can only view the ubuntu desktop through vnc in windows. The strange thing is that IF FOR EXAMPLE i click a file that i have on ubuntu desktop FROM THE VNCVIEWER IN THE WINDOWS I DO NOT SEE anything happening but when i check the computer that runs ubuntu i can see in the screen that the file has opened on my desktop.
Generally the mouse clicking i do in vncviewer in windows when i log on to my ubuntu’s desktop interracts with the linux pc only. i have to run to my linux pc to see what i’ve clicked,opened, etc..
i hope that helped you a bit.
Again sorry for my bad English.
Thanks in advance.Posted by alex on 30 September 2007 at 6:45 pm
-
hm….i solved it finally..the problem was that i had the 3d desktop interface enabled..
thanks anywayPosted by alex on 1 October 2007 at 4:36 am
-
[…] My first and primary goal was to get VNC (remote desktop) loaded on it. As easy as VNC is to install and get ready, I thought it would be equally so with Linux. I originally had a lot of trouble actually getting VNC server to start (library issues galore), but then I ran unto this number: setting up VNC server with resumable sessions (also see this howto), but here is the kicker: they don’t interfere with any user of the actual machine. It basically creates another instance of the desktop for the remote user to login to (so the physical and remote user don’t interact with the same desktop). Pretty suave. […]
Posted by UBANDARIA on 16 October 2007 at 9:48 pm
-
In reply to comment 30: You shouldn’t have to manually log in using SSH if you use the -via switch. Additionally, the potential complexity here is a great candidate for automation. I use the following script to power a menu item (configured via alacarte):
#!/bin/bash status=0 function start { vncviewer -fullscreen -xrm "*passwordDialog:true" -via scott-desktop.mss scott-desktop.mss:$1 status=$? } for i in `seq 0 10`; do start $i [[ $status -eq 0 ]] && break doneAs you can see, it’s establishing an SSH connection, then connecting to it. It also searches for the first available display. That’s so if I’m logged onto the server already, my client will connect to the existing session (provided that vino-server is running).
Now, I’m trying to figure out how to start a VNC server on :0 in GDM, so that I can log in on the server from a VNC session on the client.
Posted by Scott Severance on 25 October 2007 at 10:54 am
-
First of all using version 6.06 Ubuntu.
I do not have a System -> Preferences -> Remote Desktop.Secondly, I get a client session but it is all gray, no X11 login screen.
Posted by Mike on 5 November 2007 at 1:21 pm
-
I’ve configured vnc to be run as a X module, so no Xvnc process is created at all. I use it to allow the screen to be seen even without loggin in.
I’m wondering if there is any way that I can see who is connected viewing the desktop, so I can monitor them and even disconnect them.
Do you know how can I do this?
Posted by Wesley on 31 December 2007 at 2:11 pm
-
So, I followed your tutorial exactly (on 7.10) and got exactly your problems. I got up to:
“After finding that, I restarted the xinetd stuff again but still couldn’t find Xvnc with grep, so I tried the manual method again, this time getting:vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
FreeFontPath: FPE “/usr/share/fonts/X11/misc” refcount is 2, should be 1; fixing.vncviewer localhost:1 now prompts for password but then ReadFromRFBServer: rdr::EndOfStream
vncviewer localhost:2 vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server”And now I’m stuck. I’m running vnc4server so none of your fixes are working. Any advice?
Posted by Tom on 29 February 2008 at 4:36 pm
-
Thanks for this tutorial! I got it to work, now I can acces my desktop ubuntu via my macbook pro! Now if I can figure out a way to control my desktop from outside my network, I will be very happy!
Posted by Skuli on 6 March 2008 at 3:59 pm
-
Hello! I love this HowTo! I have been trying to get my Remote Desktop/VNC working for a long time. I haven’t yet…but I am closer. When I run the command vncviewer localhost:1 to test, I get the login window from vncviewer. Then it starts an X11 session but I do not have a login scree :( it is just X sitting there. But I have hope now that I will be able to get it up and running soon. Thanks!
Posted by JayJay on 12 March 2008 at 10:27 pm
-
Hi.
I’m trying to control the local session remotely, for support purposes. IE, take control of the desktop.
I followed your instructions, which gave me a session, but not the local screen.
Can these settings be tweaked to do what I need, or am I hunting a different animal.
Cheers
Posted by guinness on 24 April 2008 at 5:06 am
-
Have you had any luck with Hardy Heron? I followed your tutorial for Gutsy Gibbon, and got everything working.
Did the upgrade, and everything fell apart. Still could connect, but Gnome went haywire, and everything is extremely slow.Any thoughts would be appreciated.
Posted by Michael on 29 April 2008 at 8:43 pm
-
I went through all of the config files again. I cannot find any changes (I redid your tutorial just in case).
If you get a chance to try out VNC on your 8.04 I would appreciate it - I sometimes wonder if it is just me.
Posted by Michael on 30 April 2008 at 2:43 pm
-
THANK YOU.
I just installed 8.04 but am going on vacation soon so I wanted to be able to work on this machine while I was away. Remote Desktop was being terribly slow and it’s not what I wanted anyway. It’s a shame this is so difficult to do … OpenSUSE makes it really easy. Anyhow, it works now, so thanks!
Posted by Justin on 11 May 2008 at 7:31 pm
-
Cool stuph. Works now! thnx!
Posted by Tomhier on 15 May 2008 at 2:04 pm
-
Thanks for the guide! I have my setup as a VM and disabled GDM from loading on startup to save system resources. After getting this to work, if I stopped GDM (sudo /etc/init.d/gdm stop) to return to terminal then attempted to login with VNC, I got the gray window with just an “X” cursor. After restarting GDM (sudo /etc/init.d/gdm start) I was able to see the window like normal. I used sysv-rc-conf to disable it in the first place so I used it to reload it now on bootup again so VNC will continue working.
Posted by MW on 11 June 2008 at 2:46 pm
-
Scott,
Thank you for posting such a useful blog about setting up vnc.
I spent hours in the past on different os’s getting this to work.
Having the responses below also helped…especially the tip about restarting gdm if you see a gray screen.
Cheers!
- Lex
Posted by Lex Sheehan on 24 June 2008 at 2:44 pm
-
Still very relevant today (25 Aug 2008). Very helpful and successful on Ubuntu Hardy (Gnome).
Many thanks for your most excellent assistance. :-)
Posted by JZ on 25 August 2008 at 9:25 am
You can follow any responses to this entry through the
comments feed.

bookmark with del.icio.us
Richard Stallman:


