Remote Access - none seem to work in 15.0

Teamviewer 13 works but I cannot get either x11vnc or Xvnc to work - netstat show port 5901 listening but no vncclient can connect

I tried the remote administration in yast and that failed too. Port 5900 and 5901 are open in my iptables

my vnc file from 42.3 in /etc/xinetd.d which had no problems does not work in 15.0 = any ideas how to get that to work - teamviewer local is not my preferred remote control

cat vnc

default: off

description: This serves out a VNC connection

of Display 0:0 with password

service vnc
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /tmp/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -rfbport 5900
type = UNLISTED
port = 5900
disable = no
}

When I attempt to connect I get “Connection Failed - End of Stream”

LLR9:/etc/xinetd.d # netstat -an | grep 5900
tcp 0 0 192.168.20.109:5900 192.168.20.101:60760 TIME_WAIT
tcp6 0 0 :::5900

I see xinetd listening and the connection time_wait

I note from reading the openSUSE Leap 15 Reference Guide…

10.5.1.1 Converting xinetd Services to systemd

  Since the release of openSUSE Leap 15, the xinetd      infrastructure has been removed. This section outlines how to convert      existing custom xinetd service files to systemd      sockets.     
  For each xinetd service file, you need at least      two systemd unit files: the socket file (*.socket)      and an associated service file (*.service). The      socket file tells systemd which socket to create, and the service file      tells systemd which executable to start.     

So, I think you should read that section of the guide first and create the required systemd .socket and .service units.

Ok - I removed the /etc/xinetd.d/vnc and created these 2 files in /usr/lib/systemd/system with no change in outcome.

What changed to the display access as it seems to not connect to display :0. - I really need to get this going as I have a bunch (14 on 3 machines) of Virtualbox openSUSE machines and I use x11vnc to get into them.

I also included the x1vnc.log file from the failure and the 42.3 system.

I assume that the file in entry 1 becomes this:

=================================================

cat vnc.service

[Unit]
Description=vnc

[Service]
ExecStart= /usr/bin/x11vnc -inetd -o /tmp/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -rfbport 5900
User=root
StandardInput=socket

cat vnc.socket

[Socket]
ListenStream=0.0.0.0:5900
Accept=false

[Install]
WantedBy=sockets.target

=================================================
Log entry that fails in 15.0 (comments removed)

#cat /tmp/x11vnc.log
29/07/2018 21:34:36 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 9313
No protocol specified
No protocol specified
29/07/2018 21:34:36 XOpenDisplay(":0") failed.
29/07/2018 21:34:36 Trying again with XAUTHLOCALHOSTNAME=localhost …
No protocol specified
No protocol specified

29/07/2018 21:34:36 ***************************************
29/07/2018 21:34:36 *** 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:

====================================================
Log entry from 42.3

#cat /tmp/x11vnc.log
29/07/2018 13:30:18 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 30769
29/07/2018 13:30:18 Using X display :0
29/07/2018 13:30:18 rootwin: 0x281 reswin: 0x3e00001 dpy: 0x1dbc670
29/07/2018 13:30:18 Default visual ID: 0x21
29/07/2018 13:30:18 Read initial data from X display into framebuffer.
29/07/2018 13:30:18 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5600
29/07/2018 13:30:18
29/07/2018 13:30:18 X display :0 is 32bpp depth=24 true color
29/07/2018 13:30:18
29/07/2018 13:30:18 initialize_screen: -inetd mode: F_GETFL(stdin): 0x2
29/07/2018 13:30:18 initialize_screen: -inetd mode: F_GETFL(stdout): 0x2
29/07/2018 13:30:18 initialize_screen: -inetd mode and stdio is O_RDWR
29/07/2018 13:30:18
29/07/2018 13:30:18 Xinerama is present and active (e.g. multi-head).
29/07/2018 13:30:18 Xinerama: number of sub-screens: 1
29/07/2018 13:30:18 Xinerama: no blackouts needed (only one sub-screen)
29/07/2018 13:30:18
29/07/2018 13:30:18 fb read rate: 715 MB/sec
29/07/2018 13:30:18 fast read: reset -wait ms to: 10
29/07/2018 13:30:18 fast read: reset -defer ms to: 10
29/07/2018 13:30:18 The X server says there are 10 mouse buttons.
29/07/2018 13:30:18 screen setup finished.

Backing up a bit,
You need to read the LEAP documentation
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html

Only after you understand what is in the above, then if you want to set up xinetd, then one step in that process is the link deano provided.

Everything about vnc has radically changed from 42.3 to TW and 15,
One of the primary changes is that by default xinetd is no longer implemented by default.
If you read the docs, this means that there is no long-running vnc server server waiting for incoming connections, instead a vnc socket service is instantiated when a client attempts first connection.

The documentation goes on to say that if you still prefer to set up an xinetd server to listen constantly for incoming client connections, you can do so but you’ll have to set that up from scratch. If you find the openSUSE documentation lacking for setting up xinetd, I can look up the info I’ve researched… just ask… But first make the decision whether you want to continue down that road or try to make the default xvnc setup work which is what is described in the documentation reference I pointed you to above.

Aside from the above,
I see in another Forum thread that you should try setting your Display Manager to kdm if lightdm doesn’t work (sddm won’t work, you’ll need to change that).

TSU

Your remote system isn’t running with Wayland perhaps? (You may need to configure the appropriate Xorg session first.)

I followed the documentation - the VNC document is for another display session :1 - I want the main display :0 all the documentation is for a new display - not what I want.

I have been using VNC since it was invented at AT&T ( I am retired AT&T UNIX ) - all this systemd stuff seems to complicate Linux.

I just want to remote access display :0 - why does 15. break that?

Needs to be tested,
Based on the Notes to Wayland on LEAP 15,
I strongly suspect that this should not be an issue anymore.
The xorg xserver requirement probably is eliminated because xvnc is now a socket-based service, not using a server.

Then again, if the User wants to configure xinetd, then the xorg xserver would undoubtedly be required, still.

TSU

To use display :0,
I’m pretty sure you need to set up Persistent VNC connections for the shared feature (You’re sharing with the locally logged in interactive display).

Try those instructions but specifying :0.

https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html#sec.vnc.persistent

TSU

FYI

The ArchWiki TigerVNC describes a third method setting up vnc server using x0vncserver and the instructions expressly specify setting up diskpay :0 so you can follow those instructions exactly.

https://wiki.archlinux.org/index.php/TigerVNC#Running_vncserver_to_directly_control_the_local_display

You can also deploy X11vncserver using the ArchWiki instructions exactly which also specifies using display :0

https://wiki.archlinux.org/index.php/X11vnc

So,
Both these guides can be followed exactly as written to set up display :0

Just don’t start the xvnc service(s) to avoid contention.

TSU

this is what I am using - no kdm in list nor is mdm available in 15.0

LLR9:~ # update-alternatives --config default-displaymanager
There are 4 choices for the alternative default-displaymanager (providing /usr/lib/X11/displaymanagers/default-displaymanager).

Selection Path Priority Status

  • 0 /usr/lib/X11/displaymanagers/gdm 25 auto mode
    1 /usr/lib/X11/displaymanagers/console 5 manual mode
    2 /usr/lib/X11/displaymanagers/gdm 25 manual mode
    3 /usr/lib/X11/displaymanagers/lightdm 15 manual mode
    4 /usr/lib/X11/displaymanagers/xdm 10 manual mode

Press <enter> to keep the current choice
[li], or type selection number: [/li]LLR9:~ #

Thank you for that post

It had the answer the -auth changed for gdm and you have to have the id of the logged on user in the new -auth

-auth /run/user/1000/gdm/Xauthority where 1000 is the id in /etc/passwd for the user

now I just have to figure out what app is hold port 5900 as the x11vnc showed it in use and assigned 5901 which worked fine.

Won’t be in the list if it’s not installed.
Install the DM first.

TSU