Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old June 30th, 2005   #1
Devi0s
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 14
Re: HOWTO: Setting up a VNC to GDM connection

I actually ended up using x11vnc to do it. Here's how:

First of all, disable Desktop Sharing with Vino under System -> Preferences -> Remote Desktop.

Use synaptic to install x11vnc.

Once x11vnc is installed, you will need to create a password file that x11vnc will use. Do this:

Code:
sudo x11vnc -storepassword yourpasswordhere /etc/x11vnc.pass
Now, we need to configure GDM to run x11vnc when it loads:

Code:
sudo nano -w /etc/X11/gdm/Init/Default
Add this line to the file:

Code:
/usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -o /tmp/x11vnc.log -forever -bg -rfbport 5900
Now, we need to make a change to another file:

Code:
sudo nano -w /etc/X11/gdm/gdm.conf
In the [Debug] section, find the line:

Code:
#KillInitClients=true
And change it to

Code:
KillInitClients=false
Restart gdm (you can just reboot), and you are good to go.
Devi0s is offline   Reply With Quote
Old June 30th, 2005   #2
intangible
Ubuntu Extra Shot
 
intangible's Avatar
 
Join Date: Nov 2004
Location: Las Vegas
Beans: 329
Ubuntu 6.06
Send a message via ICQ to intangible Send a message via AIM to intangible Send a message via MSN to intangible Send a message via Yahoo to intangible
Re: HOWTO: Setting up a VNC to GDM connection

That looks like the newest x11vnc from Breezy, the one from Hoary doesn't have the same options.
__________________
Computer science has as much to do with computers as astronomy has to do with telescopes.
- Edsger Wybe Dijkstra


Intangible's Desktop
intangible is offline   Reply With Quote
Old November 21st, 2007   #3
Skip Da Shu
Gee! These Aren't Roasted!
 
Skip Da Shu's Avatar
 
Join Date: Nov 2007
Location: República de Tejas,Centro
Beans: 200
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Setting up a VNC to GDM connection

Quote:
Originally Posted by Devi0s View Post
First of all, disable Desktop Sharing with Vino under System -> Preferences -> Remote Desktop.
I don't have this on Xubuntu Gutsy. Not sure what the substitute is.

Quote:
Use synaptic to install x11vnc.
Did sudo apt-get and got it installed a couple weeks ago.

Quote:
Once x11vnc is installed, you will need to create a password file that x11vnc will use. Do this:

Code:
sudo x11vnc -storepassword yourpasswordhere /etc/x11vnc.pass
I had also already done this in an earlier attempt but I actually didn't specify the file so it's up under /home/skip but x11vnc can find it.

The following works when executed from a terminal command line and I can use RealVNC viewer to get to my already logged on Xubuntu desktop on 5908 from a winXP machine.
Code:
sudo x11vnc -forever -usepw -rfbport 5908 -allow 192.168.xxx. -sb 30 -o /var/log/vnclog
Quote:
Now, we need to configure GDM to run x11vnc when it loads:

Code:
sudo nano -w /etc/X11/gdm/Init/Default
This is where the trouble starts!
In Xubuntu Gutsy this path doesn't exist. After way too many days I did find /etc/gdm/Init/Default. This is what the top of it looks like:

Code:
#!/bin/sh
# Stolen from the debian kdm setup, aren't I sneaky
# Plus a lot of fun stuff added
#  -George

PATH=/usr/bin:$PATH
OLD_IFS=$IFS

gdmwhich () {
  COMMAND="$1"
  OUTPUT=
  IFS=:
  for dir in $PATH
  do
    if test -x "$dir/$COMMAND" ; then
      if test "x$OUTPUT" = "x" ; then
        OUTPUT="$dir/$COMMAND"
      fi
    fi
  done
  IFS=$OLD_IFS 
  echo "$OUTPUT"
}

sysresources=/etc/X11/Xresources

# merge in defaults
if [ -f "$sysresources" ]; then
    xrdb -merge "$sysresources"
And it goes on for another 50 or so lines of nested if statements. So...
  1. Is this the right file?
  2. Does the x11vnc line get inserted right before the 'exit 0' command? (I hope)

Quote:
Add this line to the file: ...
I'll add my x11vnc line (above) if I'm in the right file and ya'll agree it's OK as is except for replacing "sudo" with the path to x11vnc.

Quote:
Now, we need to make a change to another file:

Code:
sudo nano -w /etc/X11/gdm/gdm.conf
In the [Debug] section, find the line:

Code:
#KillInitClients=true
And change it to

Code:
KillInitClients=false
What I have is a /etc/gdm/dgm.conf. I have uncommented it and set it to false.

Quote:
Restart gdm (you can just reboot), and you are good to go.
Pending above.

Ya'll have NO idea how much getting this to work means to me. This is my LAST major obstacle to replacing winXP on 8 other headless machines with Xubuntu. Thanx so much for any help, Skip

PS: In case you haven't figured it out yet... I'm a complete noob to Linux. So anything that's not DOS look alike or can't be done with sudo gedit you'll probably have to give me the command.
__________________
- da shu @ the BOINC farm, SkipsJunk, Guru Mountain, Crunchers
- BoincDV is on-line! Click HERE

Last edited by Skip Da Shu; November 22nd, 2007 at 02:31 AM.. Reason: 1st add PS:, 2nd updated x11vnc -o file path
Skip Da Shu is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:43 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry