Go Back   Ubuntu Forums > Support & Resources > HOWTOs, Tips & Tricks
Forum Home Gallery Guidelines Register Today's Posts

HOWTOs, Tips & Tricks The place to find General, KDE, and Gnome Customization Tips & Tricks.

ReplyReply
Thread Tools Search this Thread Display Modes
  #11  
Old June 13th, 2006
johnthejack johnthejack is offline
5 Cups of Ubuntu
 
Join Date: Jun 2006
Beans: 23
Default Re: HOWTO: Set up VNC server with resumable sessions

Ok sorry, stumbled on this thread after a search. Just seen I have to ask question somewhere else.
Reply With Quote
  #12  
Old June 15th, 2006
3rdparty 3rdparty is offline
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 1
Default Re: HOWTO: Set up VNC server with resumable sessions

whatever updates were just released got this working again for me (it was working in breezy, but broke in dapper), automatically!
Reply With Quote
  #13  
Old June 16th, 2006
Cirrocco's Avatar
Cirrocco Cirrocco is offline
5 Cups of Ubuntu
 
Join Date: Jan 2006
Location: New Brunswick, Canada
Beans: 71
Ubuntu 6.06 User
Default Re: HOWTO: Set up VNC server with resumable sessions

I hope your right.

I'm downloading them now - new kernel, bunch of gnome2 stuff, etc...

I am just sick of using the built in "remote desktop" vnc server. It's slow and choppy and smells of alderberries.
__________________
...( Think )
Reply With Quote
  #14  
Old 4 Weeks Ago
MystaMax MystaMax is offline
5 Cups of Ubuntu
 
Join Date: Dec 2005
Location: Atlanta, GA USA
Beans: 28
Send a message via AIM to MystaMax Send a message via Yahoo to MystaMax
Default Re: HOWTO: Set up VNC server with resumable sessions

should this work w/ xubuntu?
Reply With Quote
  #15  
Old 4 Weeks Ago
MystaMax MystaMax is offline
5 Cups of Ubuntu
 
Join Date: Dec 2005
Location: Atlanta, GA USA
Beans: 28
Send a message via AIM to MystaMax Send a message via Yahoo to MystaMax
Default Re: HOWTO: Set up VNC server with resumable sessions

nevermind, I got it working. I had to also restart my server, and adjust my Xvnc file to reflect what sirspiddy suggested. Other than that, it was a pretty painless process. Thanks for the guide!
Reply With Quote
  #16  
Old 4 Weeks Ago
cofin cofin is offline
First Cup of Ubuntu
 
Join Date: Jul 2005
Beans: 1
Default Re: HOWTO: Set up VNC server with resumable sessions

This procedure worked flawlessly in Xubuntu for me.
Reply With Quote
  #17  
Old 4 Weeks Ago
dhalexos dhalexos is offline
First Cup of Ubuntu
 
Join Date: Jun 2006
Beans: 2
Default Re: HOWTO: Set up VNC server with resumable sessions

I'm a new linux user en i chose ubuntu 6.06. It's a clean install.

Now I tried this howto and I always have dependencies problems when i try to install vnc4server.

The following packages have unmet dependencies.
vnc4server: Depends: xserver-common but it is not installable
E: Broken packages

What did I wrong?

thx
Reply With Quote
  #18  
Old 4 Weeks Ago
p_alexander p_alexander is offline
First Cup of Ubuntu
 
Join Date: Apr 2006
Location: Chicago, IL, USA
Beans: 5
Ubuntu 6.06 User
Default Re: HOWTO: Set up VNC server with resumable sessions

L4mp copied an older version of this HOWTO from the Breezy thread. The one below is updated with extra info for AMD64 users especially and it allows normal copy/paste with all the line breaks in the right spots. But his leaves out a critical step. If L4mp could update that would be great and I'll remove this.

Oh yeah, my VNC broke with the grey screen after some updates today, including a kernel upgrade. Looking into it and will update when I fix.

--------------------------------------------------

I added a bunch of stuff that I had to do in order to make this work on my amd64 box. This box was originally installed under 5.10 and upgraded to 6.06. Everything pretty much out of the box. YMMV.

Oh yeah, this also made Vino work as well, not sure why. Perhaps the xdmcp stuff. So, vino is on display 0, vnc4 on display 1.

This is copied from L4mp's post above with my changes added to the amd64 section.

PS - Ignore the "HTML" comment in the "HTML Code" boxes. I couldn't get regular code boxes to include line breaks. Noob at work.

1. Enable XDMCP

Code:
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

Note: I had to also change another part of the gdm.conf file. Also, a restart was required so gdm could read the new configuration.

Look for the following piece of text in /etc/gdm/gdm.conf
HTML Code:
[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

Note: Before doing the next step, you need to make sure the extra repositories (e.g. universe) are enabled:
http://easylinux.info/wiki/Ubuntu_da...a_repositories

2. Install required packages (vncserver and xinetd)

Code:
Code:
sudo apt-get install vnc4server xinetd
i386 users can skip to step 3, AMD64 users continue to 2a.

2a. Note to AMD64 users: The current version of vnc4server in the repositories has a bug, so you need to download and install the fixed vnc4 packages as shown below:

Code:
HTML Code:
wget http://qt1.iq.usp.br/download/vnc4server_4.0-7.3_amd64.deb wget http://qt1.iq.usp.br/download/xvnc4viewer_4.0-7.3_amd64.deb sudo dpkg -i vnc4server_4.0-7.3_amd64.deb sudo dpkg -i xvnc4viewer_4.0-7.3_amd64.deb
Some people may have unmet depencies in these packages and will need to install additional packages.

Code:
HTML Code:
sudo apt-get install gcc-3.3-base sudo apt-get install libstdc++5
There is one dependent package that cannot be installed as it has been deprecated in the new 6.06. Therefore, we have to force the vnc4server packages to install.

Code:
HTML Code:
sudo dpkg -i --force-all vnc4server_4.0-7.3_amd64.deb sudo dpkg -i --force-all xvnc4server_4.0-7.3_amd64.deb
I am loathe to force package installs BUT it seems to work in this case. An updated, working AMD64 vnc4server package would be preferable.

3. Set the VNC passwd

Code:
Code:
sudo vncpasswd /root/.vncpasswd

4. Add vnc service to xinetd:

Code:
Code:
sudo gedit /etc/xinetd.d/Xvnc
Enter this into the new file:

Code:
HTML Code:
service Xvnc { type = UNLISTED disable = no socket_type = stream protocol = tcp wait = yes user = root server = /usr/bin/Xvnc server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd port = 5901 }

5. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)

Code:
HTML Code:
sudo /etc/init.d/xinetd stop sudo killall Xvnc sudo /etc/init.d/xinetd start

6. That's it! To test that this is working first try to connect from the same machine (the machine we just set up the VNC server on):

Code:
Code:
vncviewer localhost:1

You should be prompted for the VNC password, and then see the GDM login screen where you can login and start a new X session. If that works, you can now go ahead and try to connect from remote machine using your favorite VNC client (remember to first close the local vncviewer we started above). Remember to use the VNC server machine's domain name or IP address, followed by :1 (e.g. 192.168.0.100:1). If connecting locally as shown above works, but connecting remotely fails, then this means you have a problem with a firewall which is blocking some ports. See the notes below about how to deal with that.

Note about ports: The VNC server set up as shown uses TCP port 5901. If you are using firewall software (e.g. firestarter) on that machine, you need to allow incoming connections on this port. If you are using a router which assigns your machine a private address (e.g. 192.168.0.100) which is not accessible from the internet, then you need to forward TCP port 5901 from the router to this machine.

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.
Reply With Quote
  #19  
Old 4 Weeks Ago
dhalexos dhalexos is offline
First Cup of Ubuntu
 
Join Date: Jun 2006
Beans: 2
Default Re: HOWTO: Set up VNC server with resumable sessions

I tried to do the folowing step but i still got the dependencies probleme.
I have a i386 system.

Quote:
Originally Posted by p_alexander
1. Enable XDMCP

Note: I had to also change another part of the gdm.conf file. Also, a restart was required so gdm could read the new configuration.

Look for the following piece of text in /etc/gdm/gdm.conf
HTML Code:
[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

I hope somebody can help me.
Reply With Quote
  #20  
Old 4 Weeks Ago
halitech's Avatar
halitech halitech is offline
A Carafe of Ubuntu
 
Join Date: Feb 2006
Location: East Coast Canuck
Beans: 138
Ubuntu 6.06 User
Send a message via MSN to halitech
Default Re: HOWTO: Set up VNC server with resumable sessions

I got this working fine on 1 system but I'm having trouble with a second system. the other system is running xubuntu on an AMD 350 with 64 meg of ram and a 2gig drive. I'm sure most of you can see where this is going already but I have an added twist. The serial port (yes, it's an old socket 7 board with no ps/2 mouse port) is either dead or the mouse I am using is dead. so, as I have no mouse, I can not use the option of going system-prefs-etc to enable the log ins and I also don't have the room to install gnome so I can't edit the gdm/gdm.conf file to allow them either. I do have xfce installed but without a mouse, kinda at a standstill. I can log in with ssh and I even tried webmin which doesn't seem to give me the option to set what I think I need to change either. I know there has to be a way to do this rfom the CLI but I'll be a smurf if I can figure it out some one please help me out
__________________
I reject your reality and substitute my own - Adam Savage
"Linux is just like an indian tent: no Gates, no Windows and an Apache inside..."
Registered Linux User #347519
Reply With Quote
ReplyReply



Forum Jump


All times are GMT -4. The time now is 11:05 PM.


Official Ubuntu Forums Powered by vBulletin Version 3.6.0 Release Candidate 2. Copyright ©2000 - 2006, Jelsoft Enterprises Ltd. - Tangerine Ubuntu Theme
Ubuntu Logo, Ubuntu and Canonical are trademarks of Canonical Ltd

Warning: include(../../../google.php): Failed to open stream: No such file or directory in /web/westerfunk/archives/technology/Ubuntu - VNC Resumable Sessions 2/index.php on line 2756

Warning: include(): Failed opening '../../../google.php' for inclusion (include_path='.:/usr/share/php') in /web/westerfunk/archives/technology/Ubuntu - VNC Resumable Sessions 2/index.php on line 2756