1

I'm following this guide to setup VNC server in my Ubuntu arm64 machine (specifically, armbian 64-bit). There's one problem I found with it so far.

When I start the VNC server using vncserver :1 -localhost no command, it didn't work and crashed after I tried to access the session from a VNC client.

But, when I tried with LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver :1 -localhost no command I found here, it's started to work.

Now I want to manage this as system service using systemctl command. So, I have this unit file:

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

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

PIDFile=/home/zulh/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart="LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 /usr/bin/vncserver -depth 24 -geometry 1280x800 -localhost no :%i"
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Now when I ran...

$ sudo systemctl daemon-reload
$ sudo systemctl enable [email protected]
$ vncserver -kill :1
$ sudo systemctl start vncserver@1

...I got this:

$ sudo systemctl status vncserver@1
● [email protected] - Start TightVNC server at startup
     Loaded: bad-setting (Reason: Unit [email protected] has a bad unit file setting.)
     Active: failed (Result: timeout) since Sat 2022-04-16 17:34:44 +08; 3min 42s ago

Apr 16 17:33:13 armbian gnome-session[18628]: gnome-session-binary[18628]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Apr 16 17:33:13 armbian gnome-session-binary[18628]: WARNING: App 'org.gnome.Shell.desktop' respawning too quickly
Apr 16 17:33:13 armbian gnome-session-binary[18628]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Apr 16 17:34:41 armbian systemd[1]: [email protected]: start operation timed out. Terminating.
Apr 16 17:34:44 armbian systemd[1]: [email protected]: Failed with result 'timeout'.
Apr 16 17:34:44 armbian systemd[1]: Failed to start Start TightVNC server at startup.
Apr 16 17:34:49 armbian systemd[1]: /etc/systemd/system/[email protected]:13: Neither a valid executable name nor an absolute path: LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.s>
Apr 16 17:34:49 armbian systemd[1]: [email protected]: Unit configuration has fatal error, unit will not be started.
Apr 16 17:38:00 armbian systemd[1]: /etc/systemd/system/[email protected]:13: Neither a valid executable name nor an absolute path: LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.s>
Apr 16 17:38:00 armbian systemd[1]: [email protected]: Unit configuration has fatal error, unit will not be started.

What should I do to fix this?

0 Answers0