I encountered following issue:

https://forums.opensuse.org/showthread.php/472989-VNC-problems-Suse11-4-kde4

 [dbus-launch vncserver] works

 

So changed to following:

/etc/systemd/system/vncserver@.service (don't use /usr/bin/runuser , because it already changed to the user when service start)

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
WorkingDirectory=/home/vnc
User=vnc
Group=vnc

# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver %i
PIDFile=/home/vnc/.vnc/%H%i.pid
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target

 

my xstartup: (don't forget chmod +x)

#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#vncconfig -iconic &
#dbus-launch --exit-with-session gnome-session &

dbus-launch --exit-with-session startkde &

 

reference:

https://www.golinuxcloud.com/step-by-step-guide-to-configure-tigervnc/

相关文章:

  • 2021-12-03
  • 2021-11-30
  • 2021-08-16
  • 2021-10-09
  • 2021-08-01
  • 2021-12-15
  • 2022-12-23
  • 2021-12-01
猜你喜欢
  • 2021-08-23
  • 2021-07-14
  • 2021-06-08
  • 2021-09-18
  • 2021-06-16
  • 2021-07-08
  • 2021-12-03
相关资源
相似解决方案