help with systemctl Ubuntu 22.04

Phil Marsh microcraftx at gmail.com
Sat Sep 30 18:34:30 UTC 2023


Thanks Brian, Stephen, Bob,
By incorporating Brian's changes to the vncserver.service file:
[Unit]
Description=VNC server

[Service]
#Type=forking
User=viking
Group=viking
ExecStart=/opt/TurboVNC/bin/vncserver -fg
Environment=DISPLAY=:1
#Restart=on-failure

[Install]
WantedBy=multi-user.target


VNC does start. Unfortunately, I get what look like a Gnome3 display from
thor:
[image: image.png]

A look at the status:
root at thor:/etc/systemd/system# systemctl status vncserver
● vncserver.service - VNC server
     Loaded: loaded (/etc/systemd/system/vncserver.service; enabled; vendor
preset: enabled)
     Active: active (running) since Sat 2023-09-30 12:20:18 MDT; 4s ago
   Main PID: 11243 (perl)
      Tasks: 351 (limit: 618829)
     Memory: 475.0M
        CPU: 9.998s
     CGroup: /system.slice/vncserver.service
             ├─11243 perl /opt/TurboVNC/bin/vncserver -fg
             ├─11251 /opt/TurboVNC/bin/Xvnc :1 -desktop "TurboVNC: thor:1
(viking)" -auth /home/viking/.Xauthority -geometry 1240x900 -depth 24
-rfbwait 120000 -rfbauth /home/viking/.vnc/passwd -x509cert /home/viking/.v>
             ├─11255 sh -c "/opt/TurboVNC/bin/xstartup.turbovnc >>
'/home/viking/.vnc/thor:1.log' 2>&1"
             ├─11256 /usr/libexec/gnome-session-binary --session=ubuntu
             ├─11260 /usr/bin/dbus-launch --sh-syntax --exit-with-session
             ├─11261 /usr/bin/dbus-daemon --syslog --fork --print-pid 5
--print-address 7 --session
             ├─11363 /usr/bin/ssh-agent /usr/bin/im-launch env
GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
             ├─11381 /usr/libexec/at-spi-bus-launcher
             ├─11386 /usr/bin/dbus-daemon
--config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork
--print-address 11 --address=unix:path=/home/viking/.cache/at-spi/bus_1
             ├─11527 /usr/bin/gnome-keyring-daemon --start --components=ssh
             ├─11538 /usr/bin/gnome-shell
             ├─11611 /usr/libexec/gvfsd
             ├─11616 /usr/libexec/gvfsd-fuse /home/viking/.cache/gvfs -f
             ├─11634 /usr/libexec/xdg-permission-store
             ├─11638 /usr/libexec/gnome-shell-calendar-server
             ├─11646 /usr/libexec/evolution-source-registry
             ├─11654 /usr/libexec/goa-daemon
             ├─11658 /usr/libexec/evolution-calendar-factory
             ├─11667 /usr/libexec/goa-identity-service
             ├─11678 /usr/libexec/dconf-service
             ├─11686 /usr/libexec/evolution-addressbook-factory
             ├─11695 /usr/libexec/gvfs-udisks2-volume-monitor
             ├─11709 /usr/libexec/gvfs-afc-volume-monitor
             ├─11715 /usr/libexec/gvfs-mtp-volume-monitor
             ├─11720 /usr/libexec/gvfs-gphoto2-volume-monitor
             ├─11725 /usr/libexec/gvfs-goa-volume-monitor
             ├─11732 /usr/bin/gjs
/usr/share/gnome-shell/org.gnome.Shell.Notifications
             ├─11734 /usr/libexec/at-spi2-registryd --use-gnome-session
             ├─11757 ibus-daemon --panel disable --xim
             ├─11760 /usr/libexec/gsd-wacom
             ├─11761 /usr/libexec/gsd-media-keys
             ├─11764 /usr/libexec/gsd-rfkill
             ├─11771 /usr/libexec/ibus-memconf
             ├─11773 /usr/libexec/ibus-extension-gtk3
             ├─11777 /usr/libexec/ibus-x11 --kill-daemon
             ├─11779 /usr/libexec/ibus-portal
             ├─11791 /usr/libexec/gsd-a11y-settings
             ├─11794 /usr/libexec/gsd-xsettings
             ├─11796 /usr/libexec/gsd-power
             ├─11801 /usr/libexec/gsd-screensaver-proxy
             ├─11805 /usr/libexec/gsd-color
             ├─11808 /usr/libexec/gsd-print-notifications
             ├─11811 /usr/libexec/gsd-sharing
             ├─11813 /usr/libexec/gsd-datetime
             ├─11823 /usr/libexec/gsd-smartcard
             ├─11826 /usr/libexec/gsd-housekeeping
             ├─11829 /usr/libexec/gsd-sound
             ├─11833 /usr/libexec/gsd-usb-protection
             ├─11838 /usr/libexec/gsd-keyboard
             ├─11841 /usr/libexec/gsd-wwan
             ├─11889 /usr/bin/gjs
/usr/share/gnome-shell/org.gnome.ScreenSaver
             ├─11911 /usr/bin/python3 /usr/bin/blueman-applet
             ├─11913 /usr/libexec/tracker-miner-fs-3
             ├─11919
/usr/libexec/evolution-data-server/evolution-alarm-notify
             ├─11921 /usr/libexec/gsd-disk-utility-notify
             ├─11927
/usr/lib/x86_64-linux-gnu/indicator-messages/indicator-messages-service
             ├─11934 /usr/bin/gnome-software --gapplication-service
             ├─11955 /usr/libexec/gsd-printer
             ├─11959 /usr/libexec/ibus-engine-simple
             ├─12030 /usr/libexec/tracker-extract-3 ""
             └─12042 /usr/lib/bluetooth/obexd

Sep 30 12:20:21 thor gnome-software[11934]: not handling error no-security
for action refresh: Failed to obtain authentication.
Sep 30 12:20:21 thor blueman.desktop[11911]: blueman-applet 12.20.21
WARNING  PluginManager:147 __load_plugin: Not loading PPPSupport because
its conflict has higher priority
Sep 30 12:20:21 thor dbus-daemon[11261]: [session uid=1000 pid=11259]
Activating service name='org.bluez.obex' requested by ':1.74' (uid=1000
pid=11911 comm="/usr/bin/python3 /usr/bin/blueman-applet "
label="unconfined")
Sep 30 12:20:21 thor obexd[12042]: OBEX daemon 5.64
Sep 30 12:20:21 thor dbus-daemon[11261]: [session uid=1000 pid=11259]
Successfully activated service 'org.bluez.obex'
Sep 30 12:20:21 thor dbus-daemon[11261]: [session uid=1000 pid=11259]
Successfully activated service 'org.freedesktop.Tracker3.Miner.Extract'
Sep 30 12:20:21 thor gnome-software[11934]: Only 0 apps for recent list,
hiding
Sep 30 12:20:21 thor gnome-shell[11538]: GNOME Shell started at Sat Sep 30
2023 12:20:20 GMT-0600 (MDT)
Sep 30 12:20:21 thor gnome-shell[11538]: Registering session with GDM
Sep 30 12:20:21 thor gnome-shell[11538]: Error registering session with
GDM: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gnome.DisplayManager was not provided by any .service files
#################################################################

It looks like a few warnings but if I start the vnc server from a terminal
window on thor:
viking at thor:~$ vncserver

Desktop 'TurboVNC: thor:1 (viking)' started on display thor:1

Starting applications specified in /opt/TurboVNC/bin/xstartup.turbovnc
Log file is /home/viking/.vnc/thor:1.log

and I open up the vnc window on a remote machine I get:
viking at Sibyl:~$ vncviewer thor:1
[image: image.png]
Which is an xfce desktop which is the one I want.
Thanks,
Phil


On Fri, Sep 29, 2023 at 9:35 AM Brian <brian at nclug.ml.lazyturtle.org> wrote:

> Try making vncserver start in the foreground so that systemd can keep
> track of it:
>
> - ExecStart=/opt/TurboVNC/bin/vncserver
> + ExecStart=/opt/TurboVNC/bin/vncserver -fg
>
> I haven't tried it, but I think it's in the right direction.
>
> Brian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nclug.org/pipermail/nclug/attachments/20230930/4f9e0070/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 162833 bytes
Desc: not available
URL: <https://lists.nclug.org/pipermail/nclug/attachments/20230930/4f9e0070/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 174136 bytes
Desc: not available
URL: <https://lists.nclug.org/pipermail/nclug/attachments/20230930/4f9e0070/attachment-0003.png>


More information about the NCLUG mailing list