Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 3 machines on which I am using vncviewer & vncserver to remotely use them.
On my server, there is only a root account. No problem there, VNC works every time (crossing fingers...), but on my laptop and my htpc, its a different story.
On my htpc, it worked so far (for the last 8 months) but recently I noticed whenever I rebooted, there were a chance (50%) that vnc wouldnt work. Basically once I login using vncviewer, I get a blank desktop (grayish) with only a X shaped cursor. I investigated a bit and I believe it has something to do with session managers. Normally, I use XFCE 4.4 on this machine (stock from Slack 13.1 X64).
On my laptop, vncviewer never worked. Same problem: blank desktop with X cursor. See attached screenshot. I also investigated on this machine and my files look like:
/etc/rc.d/rc.vncservers.conf:
Code:
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/vnc/sshvnc.html>.
VNCSERVERS="1:lpallard"
24/07/11 09:10:00 Xvnc version TightVNC-1.3.10
24/07/11 09:10:00 Copyright (C) 2000-2009 TightVNC Group
24/07/11 09:10:00 Copyright (C) 1999 AT&T Laboratories Cambridge
24/07/11 09:10:00 All Rights Reserved.
24/07/11 09:10:00 See http://www.tightvnc.com/ for information on TightVNC
24/07/11 09:10:00 Desktop name 'X' (laptop:1)
24/07/11 09:10:00 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/07/11 09:10:00 Listening for VNC connections on TCP port 5901
24/07/11 09:10:00 Listening for HTTP connections on TCP port 5801
24/07/11 09:10:00 URL http://laptop:5801
xrdb: "Xft.hinting" on line 9 overrides entry on line 6
xrdb: "Xft.hintstyle" on line 11 overrides entry on line 7
Xlib: extension "RANDR" missing on display ":1".
** ERROR **: Another session manager is already running
aborting...
/etc/X11/xinit/xinitrc: line 131: 7441 Aborted $xfcesm
24/07/11 09:10:28 Got connection from client 192.168.0.106
24/07/11 09:10:28 Using protocol version 3.8
24/07/11 09:10:28 Enabling TightVNC protocol extensions
24/07/11 09:10:31 Full-control authentication passed by 192.168.0.106
24/07/11 09:10:31 Pixel format for client 192.168.0.106:
24/07/11 09:10:31 32 bpp, depth 24, little endian
24/07/11 09:10:31 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
24/07/11 09:10:31 no translation needed
24/07/11 09:10:31 Using raw encoding for client 192.168.0.106
24/07/11 09:10:31 Using compression level 1 for client 192.168.0.106
24/07/11 09:10:31 Using image quality level 6 for client 192.168.0.106
24/07/11 09:10:31 Enabling X-style cursor updates for client 192.168.0.106
24/07/11 09:10:31 Enabling cursor position updates for client 192.168.0.106
24/07/11 09:10:31 Enabling LastRect protocol extension for client 192.168.0.106
24/07/11 09:10:31 KbdAddEvent: unknown KeySym 0xff8d - allocating KeyCode 89
24/07/11 09:10:33 Client 192.168.0.106 gone
24/07/11 09:10:33 Statistics:
24/07/11 09:10:33 key events received 1, pointer events 37
24/07/11 09:10:33 framebuffer updates 1, rectangles 3, bytes 3145834
24/07/11 09:10:33 cursor shape updates 1, bytes 82
24/07/11 09:10:33 cursor position updates 1, bytes 12
24/07/11 09:10:33 raw rectangles 1, bytes 3145740
24/07/11 09:10:33 raw bytes equivalent 3145740, compression ratio 1.000000
So I believe the bold lines of the log are describing the problem but I have no clue what they are... Anybody can help? I tried commenting out the lines in the xstartup script, no luck. I tried desktop :2, same thing...
I have 3 machines on which I am using vncviewer & vncserver to remotely use them.
On my server, there is only a root account. No problem there, VNC works every time (crossing fingers...), but on my laptop and my htpc, its a different story.
On my htpc, it worked so far (for the last 8 months) but recently I noticed whenever I rebooted, there were a chance (50%) that vnc wouldnt work. Basically once I login using vncviewer, I get a blank desktop (grayish) with only a X shaped cursor. I investigated a bit and I believe it has something to do with session managers. Normally, I use XFCE 4.4 on this machine (stock from Slack 13.1 X64).
On my laptop, vncviewer never worked. Same problem: blank desktop with X cursor. See attached screenshot. I also investigated on this machine and my files look like:
/etc/rc.d/rc.vncservers.conf:
Code:
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/vnc/sshvnc.html>.
VNCSERVERS="1:lpallard"
24/07/11 09:10:00 Xvnc version TightVNC-1.3.10
24/07/11 09:10:00 Copyright (C) 2000-2009 TightVNC Group
24/07/11 09:10:00 Copyright (C) 1999 AT&T Laboratories Cambridge
24/07/11 09:10:00 All Rights Reserved.
24/07/11 09:10:00 See http://www.tightvnc.com/ for information on TightVNC
24/07/11 09:10:00 Desktop name 'X' (laptop:1)
24/07/11 09:10:00 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/07/11 09:10:00 Listening for VNC connections on TCP port 5901
24/07/11 09:10:00 Listening for HTTP connections on TCP port 5801
24/07/11 09:10:00 URL http://laptop:5801
xrdb: "Xft.hinting" on line 9 overrides entry on line 6
xrdb: "Xft.hintstyle" on line 11 overrides entry on line 7
Xlib: extension "RANDR" missing on display ":1".
** ERROR **: Another session manager is already running
aborting...
/etc/X11/xinit/xinitrc: line 131: 7441 Aborted $xfcesm
24/07/11 09:10:28 Got connection from client 192.168.0.106
24/07/11 09:10:28 Using protocol version 3.8
24/07/11 09:10:28 Enabling TightVNC protocol extensions
24/07/11 09:10:31 Full-control authentication passed by 192.168.0.106
24/07/11 09:10:31 Pixel format for client 192.168.0.106:
24/07/11 09:10:31 32 bpp, depth 24, little endian
24/07/11 09:10:31 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
24/07/11 09:10:31 no translation needed
24/07/11 09:10:31 Using raw encoding for client 192.168.0.106
24/07/11 09:10:31 Using compression level 1 for client 192.168.0.106
24/07/11 09:10:31 Using image quality level 6 for client 192.168.0.106
24/07/11 09:10:31 Enabling X-style cursor updates for client 192.168.0.106
24/07/11 09:10:31 Enabling cursor position updates for client 192.168.0.106
24/07/11 09:10:31 Enabling LastRect protocol extension for client 192.168.0.106
24/07/11 09:10:31 KbdAddEvent: unknown KeySym 0xff8d - allocating KeyCode 89
24/07/11 09:10:33 Client 192.168.0.106 gone
24/07/11 09:10:33 Statistics:
24/07/11 09:10:33 key events received 1, pointer events 37
24/07/11 09:10:33 framebuffer updates 1, rectangles 3, bytes 3145834
24/07/11 09:10:33 cursor shape updates 1, bytes 82
24/07/11 09:10:33 cursor position updates 1, bytes 12
24/07/11 09:10:33 raw rectangles 1, bytes 3145740
24/07/11 09:10:33 raw bytes equivalent 3145740, compression ratio 1.000000
So I believe the bold lines of the log are describing the problem but I have no clue what they are... Anybody can help? I tried commenting out the lines in the xstartup script, no luck. I tried desktop :2, same thing...
I use x11vnc all the time on many machines. That works fine for me.
To answer your question it would help if you included the code from the files mentioned
[B]xrdb: "Xft.hinting" on line 9 overrides entry on line 6
xrdb: "Xft.hintstyle" on line 11 overrides entry on line 7
and
/etc/X11/xinit/xinitrc: line 131:
If you can't get it to work try x11vnc instead of vnc. And if that doesn't work take a look at freenx. It is a different way of doing remote administration.
I am a bit confused by these VNC servers/viewers... If I understand correctly, Slack ships with a simple VNC server right? So I can use any kind of viewers to connect to the server right?
If its true then I also assume that using the vncviewer command I am therefore using a low-end simple viewer. Again, if its true, then I'd like to upgrade to a more performant/flexible protocol and use SSH encryption for improved security.
I looked at the x11vnc and looks interesting. If I decide to use this do I need to change the vncserver on the remote machine so x11vnc and the server can communicate together? In other words, are they all kinda compatible?
OK I managed to get x11vnc running locally on my laptop. Using ssvnc I can view the desktop x11vnc created, but I still cant figure out how to get the damn thing running on a remote machine.
Its a nightmare trying to make X sessions work with x11vnc. So to use this case as an example, once it works I will try the same on the other machines.
I installed x11vnc and libvncservers. I normally have the machine running with the user logged in (its a htpc machine in my living room so the thing is on 24/7 with the user logged in). I never (or almost) log as root as I use ssh for admin.
I want to be able to access the user's desktop using x11vnc.
*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.
Some tips and guidelines:
** An X server (the one you wish to view) must be running before x11vnc is
started: x11vnc does not start the X server. (however, see the -create
option if that is what you really want).
** You must use -display <disp>, -OR- set and export your $DISPLAY
environment variable to refer to the display of the desired X server.
- Usually the display is simply ":0" (in fact x11vnc uses this if you forget
to specify it), but in some multi-user situations it could be ":1", ":2",
or even ":137". Ask your administrator or a guru if you are having
difficulty determining what your X DISPLAY is.
** Next, you need to have sufficient permissions (Xauthority)
to connect to the X DISPLAY. Here are some Tips:
- Often, you just need to run x11vnc as the user logged into the X session.
So make sure to be that user when you type x11vnc.
- Being root is usually not enough because the incorrect MIT-MAGIC-COOKIE
file may be accessed. The cookie file contains the secret key that
allows x11vnc to connect to the desired X DISPLAY.
- You can explicitly indicate which MIT-MAGIC-COOKIE file should be used
by the -auth option, e.g.:
x11vnc -auth /home/someuser/.Xauthority -display :0
x11vnc -auth /tmp/.gdmzndVlR -display :0
you must have read permission for the auth file.
See also '-auth guess' and '-findauth' discussed below.
** If NO ONE is logged into an X session yet, but there is a greeter login
program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
to find and use the raw display manager MIT-MAGIC-COOKIE file.
Some examples for various display managers:
Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.
Starting with x11vnc 0.9.9 you can have it try to guess by using:
-auth guess
(see also the x11vnc -findauth option.)
Only root will have read permission for the file, and so x11vnc must be run
as root (or copy it). The random characters in the filenames will of course
change and the directory the cookie file resides in is system dependent.
Interesting coincidence that I come over here while looking over for some other problem.
I run x11vnc on my home machine and I connect to it using x11vnc using ssl. Now if no one is logged in to the system yet, you need to point xauth file of the DM you are using (IN my case, SLiM). SLiM puts its xauth file in /var/run/slim.auth so I need to use -auth /var/run/slim.auth flag to x11vnc. However it does not end there. /var/run/slim.auth is 600 as it should be so you have to run x11vnc as root. I used sudo for that successfully but your milage may vary.
Laptop ---> x11vnc + ssl + ssvnc ---> htpc (works flawlessly). I have x11vnc start automatically at user login, and I have auto login so in the end x11vnc starts automatically.
Now for my home server, I currently use TightVNC as normally, I dont start X automatically. This is a headless server, no monitor, no KB, no mouse. With tightVNC I can use the remote desktop without starting X server. If I was to use x11vnc, would I need to start a X server at boot time? I believe so but if you can confirm I would appreciate.
You will need X at remote machine but at local machine I don't know. You will need something to give you something graphical.
Follow this setup here:
Laptop at home, Xvfb -> x11vnc -> work machine (xp pro) -> ssvnc.
I start Xvfb at :1 to not to interfere with actual X running at :0. I connect to my machine via ssh and then start Xvfb inside a screen. After than I start x1vnc in another screen and wala I got full access to my system. At this setup, all programs started as normal user as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.