help with systemctl Ubuntu 22.04

Phil Marsh microcraftx at gmail.com
Thu Sep 28 20:25:32 UTC 2023


Hi,
I am trying to start vncserver as a service on bootup.
my /etc/systemd/system/vncserver.service file:
[Unit]
Description=VNC server

[Service]
ExecStart=/opt/TurboVNC/bin/vncserver
User=viking
Group=viking

[Install]
WantedBy=multi-user.target

#############
$ /opt/TurboVNC/bin/vncserver
starts the vnc server just fine from user viking
but when the above service is enabled
# systemctl enable vncserver.service
# systemctl daemon-reload
# systemctl start vncserver
# Sep 28 14:18:29 thor systemd[1]: Started VNC server.
░░ Subject: A start job for unit vncserver.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit vncserver.service has finished successfully.
░░
░░ The job identifier is 6848.
Sep 28 14:18:30 thor vncserver[17308]: Desktop 'TurboVNC: thor:1 (viking)'
started on display thor:1
Sep 28 14:18:30 thor vncserver[17308]: Starting applications specified in
/opt/TurboVNC/bin/xstartup.turbovnc
Sep 28 14:18:30 thor vncserver[17308]: Log file is
/home/viking/.vnc/thor:1.log
Sep 28 14:18:30 thor systemd[1]: vncserver.service: Deactivated
successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit vncserver.service has successfully entered the 'dead' state.
#########

root at thor:/opt/userscripts# ps aux | grep vnc
root       11410  0.0  0.0  13224  4928 pts/1    S+   13:38   0:00 nano
vncserver.service
root       17357  0.0  0.0  11756  2112 pts/3    S+   14:22   0:00 grep
--color=auto vnc
####
no VNC server is running but:

viking at thor:~/.vnc$ cat thor:1.log
TurboVNC Server (Xvnc) 64-bit v3.0.2 (build 20221128)
Copyright (C) 1999-2022 The VirtualGL Project and many others (see
README.txt)
Visit http://www.TurboVNC.org for more information on TurboVNC

28/09/2023 14:22:45 Enabled security type 'tlsvnc'
28/09/2023 14:22:45 Enabled security type 'tlsotp'
28/09/2023 14:22:45 Enabled security type 'tlsplain'
28/09/2023 14:22:45 Enabled security type 'x509vnc'
28/09/2023 14:22:45 Enabled security type 'x509otp'
28/09/2023 14:22:45 Enabled security type 'x509plain'
28/09/2023 14:22:45 Enabled security type 'vnc'
28/09/2023 14:22:45 Enabled security type 'otp'
28/09/2023 14:22:45 Enabled security type 'unixlogin'
28/09/2023 14:22:45 Enabled security type 'plain'
28/09/2023 14:22:45 Desktop name 'TurboVNC: thor:1 (viking)' (thor:1)
28/09/2023 14:22:45 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
28/09/2023 14:22:45 Listening for VNC connections on TCP port 5901
28/09/2023 14:22:45   Interface 0.0.0.0
28/09/2023 14:22:45 Framebuffer: BGRX 8/8/8/8
28/09/2023 14:22:45 New desktop size: 1240 x 900
28/09/2023 14:22:45 New screen layout:
28/09/2023 14:22:45   0x00000040 (output 0x00000040): 1240x900+0+0
28/09/2023 14:22:45 Maximum clipboard transfer size: 1048576 bytes
28/09/2023 14:22:45 VNC extension running!

###################################

but it's not running.
Very confusing error messages.
Any ideas how to get vncserver (TurboVNC) running via a service?
Thanks,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nclug.org/pipermail/nclug/attachments/20230928/0e1707cd/attachment.htm>


More information about the NCLUG mailing list