[SOLVED] Cannot use x11vnc with Slackware64 current
SlackwareThis Forum is for the discussion of Slackware Linux.
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 am doing my annual upgrade and have installed the 12/21/2023 version of Slackware64 current, along with some packages from Ponce's SlackBuild repository and others that I have obtained directly. One of the SlackBuild packages that I install early in the process is x11vnc. This allows me to continue installing additional packages without having to be at my desk. Up to this installation, I've never had trouble with x11vnc. I modified /etc/ssh_config so that ForwardX11 yes is turned on, /etc/sshd_config so that it has
Code:
Match User XXXX
X11Forwarding yes
X11UseLocalhost yes
where XXXX is my userid, and restarted the ssh daemon. I'm able to forward X11 windows to a client machine if I log in via
XOpenDisplay (":0") failed.
Trying again with XAUTHLOCALHOSTNAME=localhost ...
Authorization required, but no authorization protocol specified
This is the same command amd ssh structure that I was successfully using prior to the upgrade. Has something changed that I'm not aware of? I have a .Xauthority file on my client and host, so I'm not sure what the error message is referring to. Any help is appreciated.
@BrunoLafleur, thank you for the suggestion. I tried it but it did not work. The only change was that the error now says
[CODE]
XOpenDisplay(""localhost:10.0"") failed
[\CODE]
Any other ideas?
@lostintime, I double checked what I've been doing. I'm using -noxdamage. Thanks for catching that, but it doesn't apply to my problem. Any other ideas?
Have you tried using tigervnc that Slackware provides in /extra?
I find it very straightforward if SSH with passwordless keys is already in place.
The -via option to vncviewer automatically uses a SSH tuunel.
If the client does not have X running, I log in via SSH and type 'at now +1 minutes<ENTER>startx<ENTER><CRTL-D>', then logout. Just need to wait for X to start on the client before attempting to connect.
I'm using -noxdamage. Thanks for catching that, but it doesn't apply to my problem. Any other ideas?
You shared you were performing an "annual upgrade." Not explicitly mentioned is what version of Slackware or distro is being used on the local and remote systems.
You shared, "This is the same command and ssh structure that I was successfully using prior to the upgrade." What release was being used previously? For example, are both the local and remote system running Current? There have been several SSH changes. For example, with newer versions of SSH, direct support of some host key algorithms have been dropped. Connecting to remote older systems might require using SSH options such as HostkeyAlgorithms and PubkeyAcceptedKeyTypes.
You already verified basic SSH is functional. If this is a local network not traversing the internet (reduced security), I would verify basic VNC is functional without SSH overhead. Perhaps in two steps SSH into the system and manually launch x11vnc. Then connect with the VNC client. The idea is to verify VNC is functional without SSH. Something like:
In the home LAN I use krdc and sometimes remmina on the client side.
On a tangent with respect to maintaining remote systems, I use SSH or SSHFS and key pairs. No VNC.
Sometimes I use VNC in the home LAN, but not for normal maintenance. Just SSH. Everything in the house is 1 Gbps, but even then I find working through VNC a tad frustrating because of nominal latency.
In the home LAN I enable SSH X forwarding, but I limit myself to tools like GUI text editors. For example, I would not try launching LibreOffice using SSH X forwarding.
Also in the home LAN, my normal user accounts autostart x11vnc. That way all I need is to launch the VNC client. But usually a home LAN has lax security and I need not bother with tunneling the VNC session. In the home LAN I run servers and headless VMs with no desktop environment and only use SSH.
Another tangential thought is perhaps rather than edit the system SSH config files, use $HOME/.ssh/config to configure the connections of various remote systems. In my little home LAN I have more than 30 different configurations. The user config file reduces connections to a simple command. For example, all I need type is ssh remotebox and everything is configured as needed for that specific system.
Probably not directly helping, but I hope something helps.
Comments:
'-SecurityTypes None' turns off other security schemes as traffic is encrypted in a SSH tunnel.
'localhost' connects to port 5900 on the host where vncviewer is run.
'-via <gateway>' sets up SSH local forwarding of port 5900 to port 5900 on the gateway host by default.
PS - Just tested without problems after upgrading to the latest tigervnc-1.12.0
while logged on to my server (what I'm calling mycomputerURL), the log made it look like the session was set up, but I wasn't sure how to direct TigerVNC to connect from my laptop. The connection was working though, as when I used TigerVNC to connect while on the server I got a connection, which then caused a loop on the display which I finally broke by closing TigerVNC. So, I then tried
from my laptop. The .x11vnc log had a Warning about using DISPLAY localhost:10.0. I didn't see an option in the TigerVNC GUI on my laptop that let me specify the display port, so I didn't go forward. Finally, I tried
from my laptop. Since I accidentally ran the -display command together, it again attempted to use DISPLAY localhost:10.0. Finally, when I corrected the display value by entering -display :0, the log reported that the attempt to connect failed
Code:
Authorization required, but no authorization protocol specified
XOpenDisplay(:"0") failed
I would be interested in trying the SSH options HostkeyAlgorithms and PubkeyAcceptedKeyTypes that you mentioned, but I'm not familiar with them. Would these go in ssh_config or sshd_config?
I did not have x0vncserver running on my remote host (never had to use this before), so I logged in, changed to root and started x0vncserver using the supplied command. Initially, all that I saw was
Code:
Mon Jan 29 15:57:02 2024
Geometry: Desktop geometry is set to 3840x1080+0+0
Mon Jan 29 15:57:03 2024
XDesktop: Using evdev codemap
XDesktop:
XDesktop: XTest extension present - version 2.2
Main: Listening for VNC connections on local interface(s), port 5900
I opened up a local terminal and tried to connect using
This lead to the following output in the root terminal
Code:
Mon Jan 29 15:57:45 2024
Connections: accepted: [::1]::34010
Mon Jan 29 15:57:46 2024
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type None(1)
XDesktop: Enabling 8 buttons of X pointer device
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:57:57 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
XDesktop: Allocated basic Xlib image
Mon Jan 29 15:58:08 2024
VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888
Mon Jan 29 15:58:44 2024
Geometry: Desktop geometry is set to 3840x1080+0+0
Mon Jan 29 15:58:45 2024
Geometry: Desktop geometry is set to 3840x1080+0+0
Geometry: Desktop geometry is set to 1600x900+0+0
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:58:48 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:58:49 2024
ComparingUpdateTracker: 12.4416 Mpixels in / 3.10558 Mpixels out
ComparingUpdateTracker: (1:4.00621 ratio)
Geometry: Desktop geometry is set to 1600x900+0+0
Mon Jan 29 15:58:52 2024
Geometry: Desktop geometry is set to 1600x900+0+0
Geometry: Desktop geometry is set to 1024x768+0+0
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:58:54 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Geometry: Desktop geometry is set to 1024x768+0+0
root@mycomputerURL:~#
Mon Jan 29 15:58:56 2024
Geometry: Desktop geometry is set to 1024x768+0+0
Geometry: Desktop geometry is set to 800x600+0+0
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:58:57 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:58:58 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Geometry: Desktop geometry is set to 800x600+0+0
root@mycomputerURL:~#
Mon Jan 29 15:59:00 2024
Geometry: Desktop geometry is set to 800x600+0+0
Geometry: Desktop geometry is set to 640x480+0+0
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Mon Jan 29 15:59:01 2024
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
Image: XShmAttach() failed
Image: Failed to create SHM image, falling back to Xlib image
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Geometry: Desktop geometry is set to 640x480+0+0
Mon Jan 29 16:01:41 2024
VNCSConnST: closing [::1]::34010: Clean disconnection
EncodeManager: Framebuffer updates: 304
EncodeManager: Tight:
EncodeManager: Solid: 73 rects, 498.885 kpixels
EncodeManager: 1.14062 KiB (1:1709.26 ratio)
EncodeManager: Bitmap RLE: 81 rects, 7.688 kpixels
EncodeManager: 2.42383 KiB (1:12.7816 ratio)
EncodeManager: Indexed RLE: 520 rects, 318.177 kpixels
EncodeManager: 122.912 KiB (1:10.1615 ratio)
EncodeManager: Tight (JPEG):
EncodeManager: Full Colour: 502 rects, 3.08598 Mpixels
EncodeManager: 1.89953 MiB (1:6.20039 ratio)
EncodeManager: Total: 1.176 krects, 3.91073 Mpixels
EncodeManager: 2.02304 MiB (1:7.38083 ratio)
After about 10 seconds, I had a window open that appeared to be the vnc session, but the screen was black and I couldn't navigate around it. Then the screen started to duplicate itself and continually downscale my resolution until I finally opened up a non-KDM session and killed the vncviewer session. This stopped the cascading vnc connection, but I had to restart my computer to get the video settings back to normal. So, I would say this was a partial success at best. I'm willing to pursue this line further, but I will eventually also like to know why I'm having to hop through these extra hoops that I never used before.
The messages you are seeing seem to be related to this tigervnc issue.
You need to be starting the x0vncserver from within the GUI X session on the target host. I do this by adding the x0vncserver command to the GUI autostart.
As you (hopefully) know, if you have the cursor hovering over the wallpaper and start typing, a small window opens at the top of the screen to allow a command to be inputted into the GUI X session. I ran the x0vncserver command in that and then tried the vncviewer command while at work. The good news is that it worked and I saw my desktop on my server at home. The bad news is that I only saw one of the screens. I'm sure there is a way to see both screens (by scrolling back and forth in the viewer), but I didn't see anything on this when I did a quick look at the man page. Once I can get this fixed then all I will need to do is set things up to automatically start up x0vncserver when I log in to my kde session. As always, I'll keep folks informed!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.