X11VNC

Please forgive me if I missed an article actually showing a solution to x11vnc being broken in openSUSE 11.4, I did use the search tool and it brought up zero results.

Does anyone know:
A) Why it doesn’t just work after being installed like it did in previous versions?
B) What steps must be taken in order to restore functionality in openSUSE 11.4?

Any help is appreciated.
Yes, I have heard of NX, and have no interest in setting it up as x11vnc takes (when it works) all of about 5 seconds to start and then connect to the :0 display.

Maybe because it is not broken, and works much the same as it has for several years. Are you having problems with the server, client, or both? What exactly have you done, and what (did not) happen?

You need the following packages installed:
tightvnc
x11vnc
xorg-x11-Xvnc
xinetd

Check that the appropriate sections in the configuration file – “/etc/xinetd.d/vnc” are enabled (“disable = no”).

In YaST:
Enable “Remote Administration (VNC)” and check the firewall ports are open.
Enable the “xinetd” daemon in “System Services (Run Level)”

If you can connect to the server, but see a grey X screen with no GUI login; there is probably a conflict with IPv6 configuration:
Comment out the " ::1 localhost ipv6-localhost ipv6-loopback" line in “/etc/hosts”.

On Thu, 15 Sep 2011 01:16:02 +0000, spyda256 wrote:

> A) Why it doesn’t just work after being installed like it did in
> previous versions?

X server authentication apparently changed.

> B) What steps must be taken in order to restore functionality in
> openSUSE 11.4?

I have found that to connect to display :0, I have to run it as root and
supply the -auth parameter (do a ‘ps ax | grep -i xorg’ and pull the auth
parameter from there). The file itself is not world readable, though
there might be a group setting you can set to read it.

The other alternative is to enable vino-server on the desktop - that’s
what I do now to get to :0 on my systems. Then I tunnel the connection
over ssh so it’s secured.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Does vino-server work for KDE?

On Thu, 15 Sep 2011 14:26:02 +0000, cmcgrath5035 wrote:

> Does vino-server work for KDE?

Honestly don’t know, but don’t see why it wouldn’t - it runs underneath
the DM (ie, it interfaces with Xorg), so it should work fine.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Jim,
I use krfb for remote support to KDE desktops. The local user has to approve/invite the remote connection. Does vino permit the remote site to connect to the local desktop uninvited as per VNC on MS Windows? That is what I understood from your post, but not from The GNOME Journal: Remote Desktop Administration Using Vino


ray

On Thu, 15 Sep 2011 17:56:03 +0000, eng-int wrote:

> Does vino permit the remote site to
> connect to the local desktop uninvited as per VNC on MS Windows?

There is a configuration option to allow this, yes.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Awesome, I’m glad we started a discussion on the topic, and I apologize for my ignorance, last time I had checked x11vnc was broke and they hadn’t posted a fix anywhere. I am VERY grateful for your feedback!

Thanks again!

In searching for a solution to a problem with VNC yesterday, I saw posted in Index of /repositories/X11:/RemoteDesktop/openSUSE_11.4 two new rpms for x11vnc:

http://software.opensuse.org/search/download?base=openSUSE%3A11.4&file=X11%3A%2FRemoteDesktop%2FopenSUSE_11.4%2Fx86_64%2Fx11vnc-0.9.12-3.1.x86_64.rpm&query=x11vnc
and
http://software.opensuse.org/search/download?base=openSUSE%3A11.4&file=X11%3A%2FRemoteDesktop%2FopenSUSE_11.4%2Fx86_64%2Fx11vnc-frontend-0.9.12-3.1.x86_64.rpm&query=x11vnc

I installed these in my 11.4(x86_64)/KDE4.7.1 system and they seem to work for standard user(no need for root) out of the box.

I spent a few hours over the past few evenings getting this working on my home server running openSUSE 11.3. I did

I had a heck of a time getting XAUTH working since I was running this server completely headless and so was not logged into gdm at all. After a few hours of wasting time and trying to google it… I went down and hooked up a monitor and logged in like some bank teller from 1980’s. :frowning:

So… here is the x11vnc command-line options that worked for me.

x11vnc -nopw -noxdamage -ncache 10 -ncache_cr -geometry 1280x720 -solid blue -auth /var/run/gdm/auth-for-gdm-oJ4HRi/:0.Xauthority -display :0

To find the correct auth parameters, you will want to ls the directory to get the secret-squirrel text in the directory or perform “ps auxw | grep Xorg”.

I use x11vnc all the time with my mother’s PC. She is running openSUSE-11.3 in Canada. I am running openSUSE-11.4 in Germany. But the method I employ works on all (or a mix) of openSUSE-11.4 and 12.1 PCs.

To take over my mother’s desktop in Canada, I open two terminals on my desktop here in Germany.

In the first terminal I type:


ssh -t -L 5900:localhost:5900 mothercpu@mothercpu.accessmyhome.net 'x11vnc -localhost -nolookup -nopw -display :0'

where mothercpu.accessmyhome.net is mapped at dyndns to an IP address, and my mother’s router constantly updates her IP address to dyndns. I have my mother’s router setup to route any port #22 connection attempts to her PC. … Thus that command reaches her PC and I get prompted for a password which I enter. With correct password it then starts x11vnc on my mother’s PC, and pipes it back to my PC via ssh. However it does not display it (yet).

In the second terminal I type (in order to display her desktop):


vncviewer -encodings "tight copyrect hextile" localhost:0

yaloki (who is on the openSUSE board) taught me this technique many years ago … (and I think he is still a bit amused that I still find it essential for helping my 85+ year old mother on her openSUSE GNU/Linux PC).

On 2011-12-29 07:56, oldcpu wrote:

> In the first terminal I type:
>
> Code:
> --------------------
>
> ssh -t -L 5900:localhost:5900 mothercpu@mothercpu.accessmyhome.net ‘x11vnc -localhost -nolookup -nopw -display :0’
>
> --------------------

I’m attempting this using as “remote” a vmplayer session running 12.1 as
guest, from my 11.4 host. I noticed that “/etc/xinetd.d/vnc” doesn’t list
port 5900, it starts at 1901. Anyway, I try and I get:


ssh -t -L 5900:localhost:5900 cer@192.168.74.131 'x11vnc -localhost \
-nolookup -nopw -display :0'
Received disconnect from 192.168.74.131: 2: Too many authentication
failures for cer

This error I know, I have to change SSH_AUTH_SOCK. I don’t know why I
always have that error with my ssh sessions on this computer.


cer@Telcontar:~> SSH_AUTH_SOCK="" ssh -t -L 5900:localhost:5900 \
cer@192.168.74.131 'x11vnc -localhost -nolookup -nopw -display :0'
Password:
Password:
bash: x11vnc: command not found
Connection to 192.168.74.131 closed.

Ok, one package missing. I install it and try again:


cer@Telcontar:~> SSH_AUTH_SOCK="" ssh -t -L 5900:localhost:5900 \
cer@192.168.74.131 'x11vnc -localhost -nolookup -nopw -display :0'
Password:
29/12/2011 10:28:17 x11vnc version: 0.9.12 lastmod: 2010-09-09  pid: 23780
No protocol specified
29/12/2011 10:28:17 XOpenDisplay(":0") failed.
29/12/2011 10:28:17 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified

29/12/2011 10:28:17 ***************************************
29/12/2011 10:28:17 *** XOpenDisplay failed (:0)

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

gdm:     -auth /var/gdm/:0.Xauth
-auth /var/lib/gdm/:0.Xauth
kdm:     -auth /var/lib/kdm/A:0-crWk72
-auth /var/run/xauth/A:0-crWk72
xdm:     -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
dtlogin: -auth /var/dt/A:0-UgaaXa

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.

See also: http://www.karlrunge.com/x11vnc/faq.html
Connection to 192.168.74.131 closed.

I have tried adding “-auth /home/cer/.Xauthority”, “-auth guess” and
“-findauth”. All close the connection.

Ideas?

> yaloki (who is on the openSUSE board) taught me this technique many
> years ago … (and I think he is still a bit amused that I still find
> it essential for helping my 85+ year old mother on her openSUSE
> GNU/Linux PC).

I’m also interested in knowing why people use VNC instead of XDCMP which is
native to linux X client/server implementation. It occurs to me that
because it is not encrypted, but surely there must be tricks to tunnel it
through ssh.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I often use ssh -X to forward X11. But on the remote side you require an X11-server, and their aren’t that many fully functional free X11-servers for non-UNIX PC’s. On MS-Windows I normally install cygwin with its X11 implementation. But cygwin’s quite a big install and lacks a GUI wizard to setup X11 sessions, so you have to be happy with the command line. There is Xming - but I think the last time I used it on MS-Windows I encountered some performance issues - plus the public domain version is an old version.

I guess what I’m saying is that, for the non-UNIX folk, it’s often easier to install something like VNC or NoMachines’s NX. Note this often does involve XDCMP/kdm/xdm for logins.

I ran two X11 KDE desktop users off the same Linux box for several years - we felt safer doing all internet related activities from Linux (no browsing/email from the MS side) - plus it was far easier to manage/backup/etc. The second user was on MS-Windows and I progressed them from VNC, to Xming, to NX to try and keep up with performance issues as browsers/etc became increasingly more sophisticated. We did use XDCMP and kdm for logins - it worked very well (except that it’s not a commonly used feature so new releases would often have some bug preventing remote kdm logins).

Over time sound/video has became more and more important, and I never found a satisfactory solution for remote serving sound independently to multiple users. In the end, I solved the sound issue by abandoning this approach - we now have separate PC’s running full installs of OpenSUSE (with vbox for legacy Windows apps).

On 2011-12-29 13:06, mchnz wrote:
>
> I often use ssh -X to forward X11. But on the remote side you require
> an X11-server, and their aren’t that many fully functional free
> X11-servers for non-UNIX PC’s. On MS-Windows I normally install cygwin
> with its X11 implementation. But cygwin’s quite a big install and lacks
> a GUI wizard to setup X11 sessions, so you have to be happy with the
> command line. There is Xming - but I think the last time I used it on
> MS-Windows I encountered some performance issues - plus the public
> domain version is an old version.

The other day I saw “a friend using MobaXterm” in Windows. Apparently it is
a terminal, but it also has the capability to start X graphics applications
directly. It includes all necessary parts.

> I guess what I’m saying is that, for the non-UNIX folk, it’s often
> easier to install something like VNC or NoMachines’s NX. Note this
> often does involve XDCMP/kdm/xdm for logins.

That’s understandable. But for Linux to Linux, it is different.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I took a look at MobaXterm - The complete toolbox for remote computing - looks quite useful - thanks for pointing it out.

I agree Linux to Linux is different. I don’t use XDCMP much for UNIX/UNIX because I’m command line oriented and would normally start with ssh/slogin, possibly with the -X X11 forwarding option. For internal purposes I’m quite happy just to set the DISPLAY environment variable and use xhost +. For both of these approaches I’m normally already in a KDE session, I don’t really need a second XDCMP/kdm/xdm initiated remote session, I just need to launch clients and have them use my existing X11-server.

I suspect most UNIX/Linux users who might use remote X11 are likely to be comfortable with the command line and happy with a similar approach. There is no powerful driver compelling these people to adopt/create/popularise cleaner GUI orient approaches. On the other hand, people used to a GUI desktop, people coming from MS-Windows, lack the background knowledge of what’s possible with remote X, so they’re not much of a driving force for progress either. To some degree remote X doesn’t quite fit the established non-UNIX client-server practices, so perhaps this also holds back a wider uptake of it’s possibilities. It does seem that remote X is an underused resource.

On 2011-12-29 23:56, mchnz wrote:

> …
> perhaps this also holds back a wider uptake of it’s possibilities. It
> does seem that remote X is an underused resource.

Yep to all :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)