You are not logged in.

#1 2011-02-10 23:54:09

colbert
Member
Registered: 2007-12-16
Posts: 809

x11vnc not working

I had made a thread a long time ago here:  https://bbs.archlinux.org/viewtopic.php?id=52538  however I reinstalled since some times and haven't used VNC in a while, and now can't get it to start...

What I am doing is ssh'ing into a screen session to my server:

ssh -tv -Y -L 5900:127.0.0.1:5900 -p 2020 myuser@192.168.1.100 screen -r

(typically this is in a urxvt window always open)

Now I'm starting x11vnc in there and getting error as per this: http://pastebin.com/bFac1XMJ

Appreciate any help, thanks!

edit: Well I restarted my server to run X at boot and now I get this using display = :10.0:

debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 40938
debug1: channel 2: new [x11]
debug1: confirm x11
10/02/2011 19:55:09 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 2084
10/02/2011 19:55:09 Using X display :10.0
10/02/2011 19:55:09 rootwin: 0x15a reswin: 0x2200001 dpy: 0x9594530
10/02/2011 19:55:09 
10/02/2011 19:55:09 ------------------ USEFUL INFORMATION ------------------
10/02/2011 19:55:09 X DAMAGE available on display, using it for polling hints.
10/02/2011 19:55:09   To disable this behavior use: '-noxdamage'
10/02/2011 19:55:09 
10/02/2011 19:55:09   Most compositing window managers like 'compiz' or 'beryl'
10/02/2011 19:55:09   cause X DAMAGE to fail, and so you may not see any screen
10/02/2011 19:55:09   updates via VNC.  Either disable 'compiz' (recommended) or
10/02/2011 19:55:09   supply the x11vnc '-noxdamage' command line option.
10/02/2011 19:55:09 
10/02/2011 19:55:09 Wireframing: -wireframe mode is in effect for window moves.
10/02/2011 19:55:09   If this yields undesired behavior (poor response, painting
10/02/2011 19:55:09   errors, etc) it may be disabled:
10/02/2011 19:55:09    - use '-nowf' to disable wireframing completely.
10/02/2011 19:55:09    - use '-nowcr' to disable the Copy Rectangle after the
10/02/2011 19:55:09      moved window is released in the new position.
10/02/2011 19:55:09   Also see the -help entry for tuning parameters.
10/02/2011 19:55:09   You can press 3 Alt_L's (Left "Alt" key) in a row to 
10/02/2011 19:55:09   repaint the screen, also see the -fixscreen option for
10/02/2011 19:55:09   periodic repaints.
10/02/2011 19:55:09 
10/02/2011 19:55:09 XFIXES available on display, resetting cursor mode
10/02/2011 19:55:09   to: '-cursor most'.
10/02/2011 19:55:09   to disable this behavior use: '-cursor arrow'
10/02/2011 19:55:09   or '-noxfixes'.
10/02/2011 19:55:09 using XFIXES for cursor drawing.
10/02/2011 19:55:09 GrabServer control via XTEST.
debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 40939
debug1: channel 3: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 40940
debug1: channel 4: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 6 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 40941
debug1: channel 5: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 7 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 40942
debug1: channel 6: new [x11]
debug1: confirm x11

Last edited by colbert (2011-02-11 00:56:14)

Offline

#2 2011-02-13 16:48:43

krunge
Member
Registered: 2009-12-05
Posts: 10

Re: x11vnc not working

For your second problem the DISPLAY of :10 certainly looks like that of the SSH X11 redirection (-Y). So you are pointing x11vnc BACK TO the X display you are sitting at instead of the X display on 192.168.1.100!  You obviously don't want that!!

The physical X display on 192.168.1.100 is most likely :0 so you should always force this by adding "-display :0" to the x11vnc cmdline.

But when you do that you are probably back to your first problem,  (*** XOpenDisplay failed)  In situations like these I always ask is there even an X server running on 192.168.1.100?  x11vnc does NOT start the X server, there must be one running already before you start x11vnc (usually there is only one X server per machine and it has X display :0)

I usually check if there is an X server running by this command: "ps wwaux | grep X".  Do you see one running on your 192.168.1.100 machine?  If you still have problems, 1) paste in the full x11vnc cmdline you used and 2) paste in the full x11vnc output.

Offline

#3 2011-02-14 00:45:20

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: x11vnc not working

Thanks krunge! I think I am indeed having an issue with X server not starting or starting improperly, I hope you (or anyone passing by of course) can help.

I am using the Start X At Boot from the wiki (the inittab method) and here is my /etc/inittab:

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)       Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
#c1:2345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologinbobby2 38400 tty1 linux
c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/opt/kde/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null
#x:5:respawn:/usr/X11R6/bin/xdm -nodaemon
#x:5:once:/bin/su bobby2 -l -c "/bin/bash --login -c startx > /dev/null 2>&1"
x:5:once:/bin/su -l -c '/usr/bin/startx </dev/null' bobby2

# End of file

Here is my ~/.xinitrc:

ââ> cat .xinitrc 
#!/bin/sh
#
# ~~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
# exec ion
# exec wmaker
# exec startkde
# exec icewm
# exec blackbox
# exec gnome-session
exec ck-launch-session startfluxbox
# exec startxfce4
# exec openbox
# exec startlxde

And here is my ~/.bash_profile:

ââ> cat .bash_profile 
. $HOME/.bashrc

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/1 ]]; then
  startx
  logout
fi

Thanks for any help!

Offline

#4 2011-02-14 03:03:13

krunge
Member
Registered: 2009-12-05
Posts: 10

Re: x11vnc not working

Do the Xorg log files  /var/log/Xorg.0.log and /var/log/Xorg.0.log.old get created?  You can use the timestamp (ls -l) on these files to see when the X server was started.  If they are fresh, examine them for errors starting the X server.

BTW, does the machine have a monitor attached? Sometimes Xorg won't start because it doesn't know what video modes the monitor supports.

Offline

Board footer

Powered by FluxBB