2

I want to gain VNC access to a tigervnc server. Both laptops runs with ArchLinux sddm KDE xorg (not wayland) and it took me a day to get the server running and an Dolphin is opening - just nothing else. my xstartup file contains the following:

    #!/bin/sh
    # Run a generic session
    if [ -z "$MODE" ]
    then
            xsetroot -solid grey & #has impact on the background
            export XKB_DEFAULT_RULES=base #no impact
            export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb #no impact
            kstart5 plasmashell & #no impact
            konsole & #is opening
            firefox & #is opening
            xrandr --dpi 144 & #see no difference
            dbus-launch startplasma-x11 #this is what moves the needle rn :)

    fi

I start the server with vncserver :1 -depth 24 -geometry 1920x1080 and I access the server with the remmina client, the google vnc viewer and KRDC with ip:port and the vnc transmission has a pretty good look and reaction time is nice. Just I can't right-click on the desktop and there is no task bar/the plasma panel is missing.

I can start applications with the terminal like firefox e. g. just not the plasma panel somehow. The logout screen works fine too and I can logout and login with pure perfect graphics and animations.

enter image description here


So my question is: How do I get the plasma Panel + Desktop shown on the vnc server or how can I connect to the original desktop on tty1?

(If I access the server laptop directly it works fine, the panel shows up and it runs smooth. I also got a gnome vnc server up and running in seconds - just I fell in love with KDE and it actually runs much smoother/faster/reactive than gnome via vnc)

    [jack@nasa .vnc]$ cat nasa:1.log
    16/12/19 02:43:40 Xvnc version TightVNC-1.3.10
    16/12/19 02:43:40 Copyright (C) 2000-2009 TightVNC Group
    16/12/19 02:43:40 Copyright (C) 1999 AT&T Laboratories Cambridge
    16/12/19 02:43:40 All Rights Reserved.
    16/12/19 02:43:40 See http://www.tightvnc.com/ for information on TightVNC
    16/12/19 02:43:40 Desktop name 'X' (nasa:1)
    16/12/19 02:43:40 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
    16/12/19 02:43:40 Listening for VNC connections on TCP port 5901
    16/12/19 02:43:40 Listening for HTTP connections on TCP port 5801
    16/12/19 02:43:40   URL http://nasa:5801
    RandR extension missing
    qt.qpa.xcb: XKeyboard extension not present on the X server
    QApplication: invalid style override passed, ignoring it.
        Available styles: Breeze, qt5ct-style, Oxygen, Windows, Fusion
    Omitting both --window and --windowclass arguments is not recommended
    qt.qpa.xcb: XKeyboard extension not present on the X server
    qt.qpa.xcb: XKeyboard extension not present on the X server
    dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.systemd1 was not provided by any .service files
    QApplication: invalid style override passed, ignoring it.
        Available styles: Breeze, qt5ct-style, Oxygen, Windows, Fusion
    kdeinit5: preparing to launch '/usr/lib/kf5/klauncher'
    kdeinit5: Launched KLauncher, pid = 36797, result = 0
    kdeinit5: opened connection to :1
    kdeinit5: preparing to launch 'libkdeinit5_kded5'
    kdeinit5: Launched KDED, pid = 36814 result = 0
    kdeinit5: preparing to launch 'libkdeinit5_kcminit_startup'
    kdeinit5: Launched 'kcminit_startup', pid = 36816 result = 0
    kdeinit5: Got SETENV 'GTK_RC_FILES=/etc/gtk/gtkrc:/home/jack/.gtkrc:/home/jack/.config/gtkrc' from launcher.
    kdeinit5: Got SETENV 'GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/jack/.gtkrc-2.0:/home/jack/.config/gtkrc-2.0' from launcher.
    Xlib:  extension "XInputExtension" missing on display ":1".
    kdeinit5: Got SETENV 'XCURSOR_THEME=breeze_cursors' from launcher.
    kdeinit5: Got EXEC_NEW '/usr/bin/kaccess' from launcher.
    kdeinit5: preparing to launch '/usr/bin/kaccess'
    kdeinit5: PID 36816 terminated.
    kdeinit5: Got EXEC_NEW '/usr/lib/kf5/kconf_update' from launcher.
    kdeinit5: preparing to launch '/usr/lib/kf5/kconf_update'
    kdeinit5: PID 36867 terminated.
    kdeinit5: PID 36839 terminated.
    kdeinit5: Got SETENV 'SESSION_MANAGER=local/nasa:@/tmp/.ICE-unix/36864,unix/nasa:/tmp/.ICE-unix/36864' from launcher.
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/xembedsniproxy.desktop" ("/usr/bin/xembedsniproxy")
    Xlib:  extension "XInputExtension" missing on display ":1".
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/polkit-kde-authentication-agent-1.desktop" ("/usr/lib/polkit-kde-authentication-agent-1")
    Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":1".
    Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":1".
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/org.kde.plasmashell.desktop" ("/usr/bin/plasmashell")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/pam_kwallet_init.desktop" ("/usr/lib/pam_kwallet_init")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/pulseaudio.desktop" ("/usr/bin/start-pulseaudio-x11")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/restore_kmix_volumes.desktop" ("/usr/bin/kmixctrl", "--restore")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop" ("/usr/lib/kdeconnectd")
    grep: .desktop: No such file or directory
    /usr/bin/start-pulseaudio-x11: line 27: [: : integer expression expected
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/org.kde.discover.notifier.desktop" ("/usr/lib/DiscoverNotifier")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/gmenudbusmenuproxy.desktop" ("/usr/bin/gmenudbusmenuproxy")
    [ERROR audio_thread_priority::rt_linux] setrlimit64: 1
    kdeinit5: Got EXEC_NEW '/usr/lib/DiscoverNotifier' from launcher.
    kdeinit5: preparing to launch '/usr/lib/DiscoverNotifier'

    16/12/19 02:43:45 Got connection from client 192.168.1.9
    16/12/19 02:43:45 Using protocol version 3.8
    16/12/19 02:43:45 Full-control authentication passed by 192.168.1.9
    16/12/19 02:43:45 Pixel format for client 192.168.1.9:
    16/12/19 02:43:45   32 bpp, depth 24, little endian
    16/12/19 02:43:45   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
    16/12/19 02:43:45   no translation needed
    16/12/19 02:43:45 Using hextile encoding for client 192.168.1.9
    16/12/19 02:43:45 Enabling X-style cursor updates for client 192.168.1.9
    16/12/19 02:43:45 Enabling cursor position updates for client 192.168.1.9
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -131072
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -223
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -131071
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -131070
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -131069
    16/12/19 02:43:45 rfbProcessClientNormalMessage: ignoring unknown encoding -309
    kdeinit5: Got EXEC_NEW '/usr/bin/kmix' from launcher.
    kdeinit5: preparing to launch '/usr/bin/kmix'
    kdeinit5: PID 36966 terminated.
    The X11 connection broke: Unsupported extension used (code 2)
    XIO:  fatal IO error 2 (No such file or directory) on X server ":1"
          after 305 requests (282 known processed) with 0 events remaining.
    kdeinit5: Got EXEC_NEW '/usr/bin/korgac' from launcher.
    kdeinit5: preparing to launch '/usr/bin/korgac'
    XIO:  fatal IO error 2 (No such file or directory) on X server ":1"
          after 417 requests (417 known processed) with 0 events remaining.
    kdeinit5: Got EXEC_NEW '/usr/bin/dolphin' from launcher.
    kdeinit5: preparing to launch '/usr/bin/dolphin'
    XIO:  fatal IO error 0 (Success) on X server ":1"
          after 404 requests (376 known processed) with 0 events remaining.
    XIO:  fatal IO error 0 (Success) on X server ":1"
          after 336 requests (325 known processed) with 0 events remaining.
    kdeinit5: PID 36987 terminated.
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/powerdevil.desktop" ("/usr/lib/org_kde_powerdevil")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/gnome-shell-overrides-migration.desktop" ("/usr/lib/gnome-shell-overrides-migration.sh")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/light-locker.desktop" ("/usr/bin/light-locker")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/geoclue-demo-agent.desktop" ("/usr/lib/geoclue-2.0/demos/agent")
    org.kde.plasma.session: Starting autostart service  "/home/jack/.config/autostart/ignore-lid-switch-tweak.desktop" ("/usr/lib/gnome-tweak-tool-lid-inhibitor")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/org.kde.korgac.desktop" ("/usr/bin/korgac")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/tracker-miner-rss.desktop" ("/usr/lib/tracker-miner-rss")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/tracker-store.desktop" ("/usr/bin/gdbus", "call", "-e", "-d", "org.freedesktop.DBus", "-o", "/org/freedesktop/DBus", "-m", "org.freedesktop.DBus.StartServiceByName", "org.freedesktop.Tracker1", "0")

    ** (light-locker:37055): ERROR **: 02:43:47.104: Environment variable XDG_SESSION_PATH not set. Is LightDM running?
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/tracker-extract.desktop" ("/usr/lib/tracker-extract")
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/tracker-miner-fs.desktop" ("/usr/lib/tracker-miner-fs")
    Xlib:  extension "XInputExtension" missing on display ":1".
    Xlib:  extension "XInputExtension" missing on display ":1".
    XIO:  fatal IO error 0 (Success) on X server ":1"
          after 304 requests (293 known processed) with 0 events remaining.
    org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/kmix_autostart.desktop" ("/usr/bin/kmix", "--keepvisibility")
    (uint32 1,)
    Traceback (most recent call last):
      File "/usr/lib/gnome-tweak-tool-lid-inhibitor", line 17, in on_activate
        var, fdlist = bus.call_with_unix_fd_list_sync('org.freedesktop.login1',
    gi.repository.GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied (9)
    KCrash: Attempting to start /usr/bin/kdeinit5 from kdeinit
    kdeinit5: Got EXEC_NEW '/usr/bin/kdeinit5' from wrapper.
    kdeinit5: preparing to launch '/usr/bin/kdeinit5'
    KCrash: crashing... crashRecursionCounter = 2
    KCrash: Application Name = kdeinit5 path = /usr/bin pid = 36814
    KCrash: Arguments: /usr/bin/kdeinit5 
    KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
    kdeinit5: Got EXEC_NEW '/usr/lib/drkonqi' from wrapper.
    kdeinit5: preparing to launch '/usr/lib/drkonqi'
    kdeinit5: Shutting down running client.
    kdeinit5: Got termination request (PID 36787).
    kdeinit5: Closed sockets, but not exiting until all children terminate.
    klauncher: Exiting on signal 15
    kdeinit5: PID 36797 terminated.
    KCrash: Attempting to start /usr/lib/org_kde_powerdevil from kdeinit
    Warning: connect() failed: : No such file or directory
    KCrash: Attempting to start /usr/lib/org_kde_powerdevil directly
    KCrash: crashing... crashRecursionCounter = 2
    KCrash: Application Name = org_kde_powerdevil path = /usr/lib pid = 37050
    KCrash: Arguments: /usr/lib/org_kde_powerdevil 
    KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
    Warning: connect() failed: : No such file or directory
    KCrash: Attempting to start /usr/lib/drkonqi directly
    Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":1".
    kdeinit5: preparing to launch '/usr/lib/kf5/klauncher'
    kdeinit5: Launched KLauncher, pid = 37221, result = 0
    XIO:  fatal IO error 0 (Success) on X server ":1"
          after 337 requests (326 known processed) with 0 events remaining.
    kdeinit5: preparing to launch '/usr/lib/kf5/klauncher'
    kdeinit5: Launched KLauncher, pid = 37234, result = 0
    Xlib:  extension "MIT-SCREEN-SAVER" missing on display ":1".
    kdeinit5: opened connection to :1
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/tags.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/tags.so'
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/trash.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/trash.so'
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/file.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/file.so'
    kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/thumbnail.so' from launcher.
    kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/thumbnail.so'
    kdeinit5: Communication error with launcher. Exiting!
    kdeinit5: PID 37187 terminated.
    KCrash: crashing... crashRecursionCounter = 2
    KCrash: Application Name = drkonqi path = /usr/lib pid = 37189
    KCrash: Arguments: /usr/lib/drkonqi --appname kdeinit5 --kdeinit --apppath /usr/bin --signal 11 --pid 36814 --startupid 0 --restarted 
    KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
    Warning: connect() failed: : Connection refused
    KCrash: Attempting to start /usr/lib/drkonqi directly
    kdeinit5: PID 36814 terminated.
    KCrash: crashing... crashRecursionCounter = 2
    KCrash: Application Name = drkonqi path = /usr/lib pid = 37213
    KCrash: Arguments: /usr/lib/drkonqi --appname org_kde_powerdevil --apppath /usr/lib --signal 6 --pid 37050 --appversion 2.0.0 --programname KDE Power Management System --bugaddress [email protected] --startupid 0 --restarted 
    KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
    Warning: connect() failed: : Connection refused
    KCrash: Attempting to start /usr/lib/drkonqi directly
    Unable to start Dr. Konqi
    Re-raising signal for core dump handling.
    Unable to start Dr. Konqi
    Re-raising signal for core dump handling.
    kdeinit5: PID 37189 terminated.
    16/12/19 02:44:56 KbdAddEvent: unknown KeySym 0xff61 - allocating KeyCode 89

    (tracker-miner-fs:37115): Tracker-CRITICAL **: 02:45:24.859: Could not remove files in volumes: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

    (tracker-miner-fs:37115): Tracker-CRITICAL **: 02:45:24.859: Could not remove files in volumes: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

    (tracker-miner-fs:37115): Tracker-CRITICAL **: 02:45:24.859: Could not initialize currently active mount points: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
    kdeinit5: PID 37256 terminated.
    kdeinit5: PID 37263 terminated.
    kdeinit5: PID 37270 terminated.
    kdeinit5: PID 37262 terminated.
    kdeinit5: PID 37272 terminated.
    16/12/19 02:53:56 Client 192.168.1.9 gone
    16/12/19 02:53:56 Statistics:
    16/12/19 02:53:56   key events received 12, pointer events 935
    16/12/19 02:53:56   framebuffer updates 318, rectangles 834, bytes 13818357
    16/12/19 02:53:56     cursor shape updates 74, bytes 9740
    16/12/19 02:53:56     cursor position updates 1, bytes 12
    16/12/19 02:53:56     copyRect rectangles 39, bytes 624
    16/12/19 02:53:56     hextile rectangles 720, bytes 13807981
    16/12/19 02:53:56   raw bytes equivalent 318610964, compression ratio 23.074406

1 Answer 1

4

So I found 2 solutions for me - if anyone stumble over the same question.

  1. with Tigervnc or Tightvnc

  2. with x11vnc

The difference between both is that 1. starts its own x11 server and 2. connects to the existing desktop. With 1. I can setup any screen resolution that I want and start as many as the hardware can handle - didn't red about any limitations.

1. in the ~/.vnc folder appears a xstartup file after the first start of tigervnc that has to contain the following content in order to start a kde plasma x11 session:

    #!/bin/sh
    # Run a generic session
    if [ -z "$MODE" ]
    then
            xsetroot -solid grey &   #set the background picture
            export XKB_DEFAULT_RULES=base & #both should be needed for keyboard signals
            export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb & 


    #       export $(dbus-launch) &
    #       exec startplasma-x11&
    #       kstart5 plasmashell &
            konsole & #starts konsole (kde terminal)
            firefox & #starts firefox
            ksysguard & #starts the kde system monitor
    #       xrandr --dpi 144 & # 
            kstart5 plasmashell & #adds a task bar to the windows
            dbus-launch startplasma-x11  #starts the actual window + Dolphin

    #       /opt/kde/bin/startkde &   
    fi

All the out commented Options (and many more are tryouts with a bad or not result at all)

vncserver :1 -depth 24 -geometry 1920x1080 starts the server in FullHD and vncserver -kill :1 kills it (1 stands for sessions and increment the more you run the command before) I can connect to it with remmina gui client with ip and port - f.e. 192.168.1.4:5901 (standard port, you find your server ip with ip addr)

There is still no task bar and still no background desktop options available - but it works and I can move and resize windows and start new windows with the terminal - If you find a solution for that - am happy to hear bout it :)


2. Is pretty easy/fast, just installing x11vnc (sudo pacman -S x11vnc) and starting it on the server with x11vnc -many -display :0

Than connecting with remmina client and the ip (no port) (f.e. 192.168.1.4)- boom done - picture of the original monitor. (in my case just hd resolution - but with desktop and taskpanel)

If I skip the command -many, the session is just available for one connection and ends after I disconnect the vnc client and has to restarted every time i want to connect. With many it stays. Starting the x11vnc automatically after a reboot is done with the following:

I have lost some hours on this. I think it is not a good idea to start x11vnc as root. This [email protected] - on Arch Linux this folder is at /usr/lib/systemd/system/ - just create a file with [email protected] and include the following content.

    [Unit]
    Description=VNC Server for X11
    Requires=display-manager.service
    After=display-manager.service

    [Service]
    Type=forking
    ExecStart=/usr/bin/x11vnc -rfbauth /home/user/.vnc/passwd -ncache 2 -forever -shared -bg -display :0
    Restart=on-failure
    RestartSec=10
    User=%I

    [Install]
    WantedBy=multi-user.target

can be started once with

systemctl start [email protected]

where you can change "user" to your user and it can be started after boot automatically with

systemctl enable [email protected]

and it will never fail (maybe the lines about restart can be omitted).

Yeah - thats it :)

EDIT: I tested it on many arch linux servers now and for stability reasons one should use the git version (yay -S x11vnc-git instead of yay -S x11vnc) because by compiling it on the specific computer the compiler optimizes it perfectly for the installed system. Not necessary in most cases but for some hardware it is necessary.

Also the -ncache 2 flag speeds up/safes up bandwidth to the vnc server by just sending the difference to the previous picture but is optional and works fine without it if bandwidth doesn't matter.

2
  • I tried the Tigervnc option and works quite well. I am not sure what you meant about taskbar and desktop background, because I can see them. I'm on Ubuntu 21.4 Commented May 30, 2021 at 15:05
  • @IgorStoppa Nice, thanks for your feedback - would be great if it is fixed. Will try it out at times and correct the answer accordingly.
    – Ingo Mi
    Commented May 31, 2021 at 21:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .