+1. I’d be interested in knowing the solution to this issue. I’ve hit this problem as well. vncserver “works” when run as root but when run by a user the vnc client always shows a blank/black screen.
Did you “Allow Remote Administration With Session Management” or “Allow Remote Administration Without Session Management”?
Why do you want an ordinary user to be able to start and stop a system service?
What client software are you using t connect to the sever?
You have posted a quantity of “CODE” with no indication of where it has come from. We expect to see the command line included, not just random output.
Switching to XDM || KDM -solves problem… thx man.
btw. i’m quite sure -i was able to start connection as regular user when I did start x’es as that particular user
is it d-bus / auth || XDMCP-SDDM issue ?
/I’ve been out (bored) being admin of own systems, in *nix case: before systemd :)/
where the X is replaced by whatever Display Number the vncserver spawned? Then, in another window, you are connecting with:
vncviewer
localhost:**X**
to get a desktop through a secure SSH tunnel?
Please note that something seems to have changed in 15.0 and TW, where you might have to spawn TWO instances of the user with vncserver, because for some reason TigerVNC no longer will connect to the first instance, but will connect to the second instance with a higher Display Number.
I am planning to investigate that further in the near future, but this is how I have managed a work-around.
I’ve been trying to setup VNC too on leap 15 had the same problem with a black screen though I could move the mouse etc through the VNC client of the remote machine. I did some reading and the problem is due to VNC not working with KDE5/SDDM desktop manager, a solution/workaround is to change the desktop manager by either having one already installed or installing one such as lightdm and issuing the following command to change it: -
Once you have changed the manager you need to reboot and this should resolve the black screen issue.
I am having other issues though and I am not sure if you will get these unless you are using VNC prior to logon which is what I am trying to setup and have manged to do this using /etc/X11/xorg.conf.d/10-libvnc.conf which works fine, I can connect I can see the login screen and everything appears to work fine until I actually try and login to KDE plasma then strange things start to happen, it loads and VNC appears to remain connected and then all I can see is the desktop background I can still move the mouse on the remote machine and sometimes menu’s etc will appear but the full desktop does not display correctly with the desktop icons and bars missing through VNC, this occurs if I use KDE or GNOME. VNC appears to be working though because if I chose ICEWin or a different lightweight desktop environment then everything works ok. It’s almost as if the server stops sending graphical updates to the client and I’m not sure what is stopping this, the /etc/X11/xorg.conf.d/10-libvnc.conf uses XVnc which I believe is TigerVNC.
Was wondering if anybody had a solution getting this working with kde plasma/gnome as there doesn’t appear to be much info on the net about this?
My problem is similar, but this didn’t fix it. I have a vanilla LEAP15.0 laptop which I can easily access remotely (from a users laptop LEAP 15.0) with tigerVNC. My server, a Dell r610, has the blank display (on the users laptop) in the tigerVNC viewer. I tried starting vncserver as root on the server, and I did indeed get a normal tigerVNC screen, but if I start vncserver as a user, it’s a blank screen in tigerVNC. I installed and changed default to KDM - blank screen; then I tried XDM and also get a blank screen. This may be a different problem? kdeinit5 seems to die…
Here’s the logfile (which is much shorter than the logfile on the functioning laptop vncserver)
Xvnc TigerVNC 1.8.0 - built ??? ?? ???? ??:??:??
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11906000, The X.Org Foundation
Tue Jan 15 19:11:55 2019
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
kcm_input: Using X11 backend
startkde: Starting up...
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments
kdeinit5: Communication error with launcher. Exiting!
kdeinit5_wrapper: Warning: connect(/run/user/1000/kdeinit5__1) failed: : Connection refused
Qt: Session management error: networkIdsList argument is NULL
Configuring Lock Action
ksmserver: "/run/user/1000/KSMserver"
ksmserver: KSMServer: SetAProc_loc: conn 0 , prot= local , file= @/tmp/.ICE-unix/2621
ksmserver: KSMServer: SetAProc_loc: conn 1 , prot= unix , file= /tmp/.ICE-unix/2621
ksmserver: KSMServer::restoreSession "saved at previous logout"
startkde: Shutting down...
kdeinit5_wrapper: Warning: connect(/run/user/1000/kdeinit5__1) failed: : Connection refused
Error: Can not contact kdeinit5!
startkde: Done.
Qt: Session management error: Could not open network socket
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 5.0, 128 bits)
OpenGL version string: 3.0 Mesa 18.0.2
OpenGL shading language version string: 1.30
Driver: LLVMpipe
GPU class: Unknown
OpenGL version: 3.0
GLSL version: 1.30
Mesa version: 18.0.2
X server version: 1.19.6
Linux kernel version: 4.12.14
Requires strict binding: yes
GLSL shaders: yes
Texture NPOT support: yes
Virtual Machine: no
kf5.kcoreaddons.desktopparser: Property type "Url" is not a known QVariant type. Found while parsing property definition for "X-KWin-Video-Url" in "/usr/share/kservicetypes5/kwineffect.desktop"
Tue Jan 15 19:12:10 2019
Connections: accepted: 198.162.1.138::59274
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VeNCrypt(19)
SVeNCrypt: Client requests security type TLSVnc (258)
Tue Jan 15 19:12:14 2019
VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888
VNCSConnST: Client pixel format depth 24 (32bpp) little-endian rgb888
Tue Jan 15 19:12:19 2019
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:-nan ratio)
Tue Jan 15 19:12:30 2019
Connections: closed: 198.162.1.138::59274 (Clean disconnection)
EncodeManager: Framebuffer updates: 4
EncodeManager: Tight:
EncodeManager: Solid: 6 rects, 2.53809 Mpixels
EncodeManager: 96 B (1:105755 ratio)
EncodeManager: Total: 6 rects, 2.53809 Mpixels
EncodeManager: 96 B (1:105755 ratio)
ComparingUpdateTracker: 2.53809 Mpixels in / 482.615 kpixels out
ComparingUpdateTracker: (1:5.25904 ratio)
Since this is all in one room, I haven’t tried an SSH tunnel.
None of these fixes worked with LEAP 15. The fix for me was to revert to LEAP 42.3 - so this may be a problem with LEAP 15.
It turns out my laptop (which I could successfully use tigerVNC with) was LEAP 42.3.
So I installed LEAP 42.3 on my server and now I can tigerVNC successfully to to the server also.
When I updated from LEAP 42.3 to 15, I got the same issue. I fixed it by changing the configuration file
.vnc/xstartup
as shown below.
if -x "$client" ]; then
# exec "$client"
dbus-launch --exit-with-session "$client"
fi
if -f "$client" ]; then
# exec sh "$client"
dbus-launch --exit-with-session sh "$client"
fi
Also using Tumbleweed, Feb 21. Also not working correctly.
This is a bit ridiculous, I’d understand if I manually installed VNC server and it wasn’t immediately compatible with the default window manager, but why the hell would you have an administrative option to enable remote administration (via vnc server) without mention incompatible with default WM, and also say that it is opening the port in the firewall (viewing firewall showed port was not opened for either networking device’s default zone…)?
It’s stupid choices like this that make me wonder if I made a mistake and installed a dying distro. It seems most things I’ve attempted to do so far have been an uphill battle, which is ruining the impression I’ve had of SUSE for years before openSUSE even existed.
I used the one from ubuntu adjusted for XFCE, change the environment startxfce4 and other xfce according your needs to startkde / kde or whatever you want, copy this code into .vnc/xstartup and then you will have your desktop:
!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
userclientrc=$HOME/.xinitrc
sysclientrc=/etc/X11/xinit/xinitrc
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
if -f "$userclientrc" ]; then
client="$userclientrc"
elif -f "$sysclientrc" ]; then
client="$sysclientrc"
fi
if -x "$client" ]; then
exec "$client"
fi
if -f "$client" ]; then
exec sh "$client"
fi
-r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
if -x /usr/bin/xfce-session ]; then
/usr/bin/xfce-session &
else
echo "No window manager found. You should install a window manager to get properly working VNC session."
fi