hebetude
September 2nd, 2007, 01:05 PM
OS: Feisty Fawn 7.04
Kernel: 2.6.20-16-server
x11vnc: x11vnc: 0.8.2 lastmod: 2006-07-12
Client: Vista running TightVNC
DM: XDM/xfce4
I currently have a headless machine that I want to control with VNC. It does correctly export the X display through x11vnc once I login locally, but being headless I must carry a monitor/mouse to it everytime I need to reboot.
How can I get a persistent X session under x11vnc to start before/at the login screen, so that I can VNC in start X and have it stay running forever. I am currently running xfce4, so my display manager is XDM or XDMCP (I don't know guides seem to mix these two up). What do I need to setup so I can access the machine while it is not logged in.
From what I understand I can run it with xinetd.d (not working) or setup XDMCP (not working?).
Here are the numerous guides I have read (linked for your convenience) all written for gdm/kdm of course with little clues to how this is done with xdm/xfce4:
HOWTO: Share desktops with x11vnc instead of built-in Remote Deskto (http://ubuntuforums.org/showthread.php?t=45565)
x11vnc over SSH on Ubuntu (http://z.cs.utexas.edu/users/habals/blog/index.php/linux/22)
HOWTO x11vnc (http://gentoo-wiki.com/HOWTO_Use_VNC_to_connect_to_existing_X_Sessions)
x11vnc: a VNC for real X display (http://www.karlrunge.com/x11vnc/)
Some code I have installed (and am removing and retrying again):
Xsetup:
xhost +localhost
killall x11vnc &>/dev/null
x11vnc -rfbauth ~/.vnc/passwd -rfbport 5900 -shared -forever -nowf -norc -notruecolor -scale 4/5 -scale_cursor 1 -desktop dumassx2 -bg
Xsession:
killall x11vnc &>/dev/null
x11vnc -rfbauth ~/.vnc/passwd -rfbport 5900 -shared -forever -nowf -norc -notruecolor -scale 4/5 -scale_cursor 1 -desktop dumassx2 -bg
/etc/X11/xdm/xdm-config (changes) commented displaymanger.requestport for some reason
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
! DisplayManager.requestPort: 0
/etc/X11/xdm/Xaccess uncommented this line so X was insecure? let anybody login
* #any host can get a login window
/etc/xinetd.d/x11vncservice
# default: off
# description:
service x11vncservice
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -q -display :0 -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
disable = no
}
The above directory /var/lib/xdm/authdir/authfiles exists, but that file doesnt. I pulled this from a gentoo description for the location of the xdm MIT-MAGIC-COOKIE
$ startx &
$ xauth: creating new authority file /home/drew/.serverauth.5208
X: user not authorized to run the X server, aborting.
giving up.
xinit: Connection refused (errno 111): unable to connect to X server
xinit: No such process (errno 3): Server error.
Couldnt get a file descriptor referring to the console
$ X -query :0
X: user not authorized to run the X server, aborting.
Kernel: 2.6.20-16-server
x11vnc: x11vnc: 0.8.2 lastmod: 2006-07-12
Client: Vista running TightVNC
DM: XDM/xfce4
I currently have a headless machine that I want to control with VNC. It does correctly export the X display through x11vnc once I login locally, but being headless I must carry a monitor/mouse to it everytime I need to reboot.
How can I get a persistent X session under x11vnc to start before/at the login screen, so that I can VNC in start X and have it stay running forever. I am currently running xfce4, so my display manager is XDM or XDMCP (I don't know guides seem to mix these two up). What do I need to setup so I can access the machine while it is not logged in.
From what I understand I can run it with xinetd.d (not working) or setup XDMCP (not working?).
Here are the numerous guides I have read (linked for your convenience) all written for gdm/kdm of course with little clues to how this is done with xdm/xfce4:
HOWTO: Share desktops with x11vnc instead of built-in Remote Deskto (http://ubuntuforums.org/showthread.php?t=45565)
x11vnc over SSH on Ubuntu (http://z.cs.utexas.edu/users/habals/blog/index.php/linux/22)
HOWTO x11vnc (http://gentoo-wiki.com/HOWTO_Use_VNC_to_connect_to_existing_X_Sessions)
x11vnc: a VNC for real X display (http://www.karlrunge.com/x11vnc/)
Some code I have installed (and am removing and retrying again):
Xsetup:
xhost +localhost
killall x11vnc &>/dev/null
x11vnc -rfbauth ~/.vnc/passwd -rfbport 5900 -shared -forever -nowf -norc -notruecolor -scale 4/5 -scale_cursor 1 -desktop dumassx2 -bg
Xsession:
killall x11vnc &>/dev/null
x11vnc -rfbauth ~/.vnc/passwd -rfbport 5900 -shared -forever -nowf -norc -notruecolor -scale 4/5 -scale_cursor 1 -desktop dumassx2 -bg
/etc/X11/xdm/xdm-config (changes) commented displaymanger.requestport for some reason
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
! DisplayManager.requestPort: 0
/etc/X11/xdm/Xaccess uncommented this line so X was insecure? let anybody login
* #any host can get a login window
/etc/xinetd.d/x11vncservice
# default: off
# description:
service x11vncservice
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -q -display :0 -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
disable = no
}
The above directory /var/lib/xdm/authdir/authfiles exists, but that file doesnt. I pulled this from a gentoo description for the location of the xdm MIT-MAGIC-COOKIE
$ startx &
$ xauth: creating new authority file /home/drew/.serverauth.5208
X: user not authorized to run the X server, aborting.
giving up.
xinit: Connection refused (errno 111): unable to connect to X server
xinit: No such process (errno 3): Server error.
Couldnt get a file descriptor referring to the console
$ X -query :0
X: user not authorized to run the X server, aborting.