Re: trying to run tightvnc as a systemd service on Debian/Bookworm
Gary Dale <[email protected]> Sun, 11 Sep 2022 11:25:56 -0400
| Newsgroups | gmane.network.tight-vnc.general |
|---|---|
| Message-ID | <[email protected]> |
While I agree that systemd isn't perfect, there doesn't seem to be a lot of point in fighting it. While System V Init worked, it had some significant problems too. The current hybrid startup (using systemd to run init scripts) isn't going to be around forever. I'm not at the point of trying to use XFCE instead of KDE. I'd just like to be able to get it running first. I'm using sddm, not gdm. I'm pretty sure the tightvncserver allocates the next available port automatically unless you specify something else. In my case, that would be port 5901. Indeed, I can run the vncserver command multiple times and it ups the port number by 1 for each new instance. On 2022-09-10 23:45, Michael D. Setzer II wrote: > Don't know the stuff they are trying to do with systemd?? > Took something that worked fine, and trying to replace it with > something that has issues. > I start my vncserver with rc.local in /etc/rc.d/rc.local > runuser -l msetzerii -c 'vncserver :79 -geometry 1600x845' > And it creates this process that works perfectly. > msetzer+ 1389 1 0 09:37 ? 00:00:07 /usr/bin/Xvnc :79 > -auth /home/msetzerii/.Xauthority -desktop setzco.dyndns.org:79 > (msetzerii) -fp catalogue:/etc/X11/fontpath.d -geometry 1600x845 -pn > -rfbauth /home/msetzerii/.vnc/passwd -rfbport 5979 > ~/.vnc/xstartup has > #!/bin/sh > # Uncomment the following two lines for normal desktop: > unset SESSION_MANAGER > unset DBUS_SESSION_BUS_ADDRESS > exec /bin/sh /etc/xdg/xfce4/xinitrc # X11/xinit/xinitrc > [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup > [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources > xsetroot -solid grey > #vncconfig -iconic & > xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & > startxfce4 & > #twm & > Didn't see your info specifying a port to use for the vnc? > I tried to do the systemd stuff, but never was able to get it to work. > Have 5 machines in home that have vnc running on various ports on > each, and have no isses with anything between them. Do use xfce > instead of gnome options, since it didn't work with a local login and > a vnc long at same time. tried various options for the gnome, but no > luck. Old method has worked since Redhat 9 for me, and current > machines running fc35 and one with fc36.. > Well, Good Luck, Maybe someone else has had better luck, or knows the > secrets. > On 10 Sep 2022 at 21:53, Gary Dale wrote: > Date sent: Sat, 10 Sep 2022 21:53:19 -0400 > To: [email protected] > From: Gary Dale <[email protected]> > Subject: trying to run tightvnc as a systemd service on Debian/Bookworm > > Here's my vncserver.service file: > > > > [Unit] > > Description=Start TightVNC server at startup > > After=syslog.target network.target > > > > [Service] > > Type=forking > > User=garydale > > Group=garydale > > WorkingDirectory=/home/garydale > > > > PIDFile=/home/garydale/.vnc/%H:%i.pid > > ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 > > ExecStart=/usr/bin/vncserver -depth 24 -geometry 1024x768 :%i > > ExecStop=/usr/bin/vncserver -kill :%i > > > > [Install] > > WantedBy=multi-user.target > > > > > > When I try to start the service I get this: > > > > # systemctl start vncserver > > Job for vncserver.service failed because the control process exited with > > error code. > > See "systemctl status vncserver.service" and "journalctl -xeu > > vncserver.service" for details. > > > > # systemctl status vncserver.service > > × vncserver.service - Start TightVNC server at startup > > Loaded: loaded (/etc/systemd/system/vncserver.service; enabled; > > preset: enabled) > > Active: failed (Result: exit-code) since Sat 2022-09-10 21:44:28 > > EDT; 29s ago > > Process: 9180 ExecStartPre=/usr/bin/vncserver -kill : > /dev/null > > 2>&1 (code=exited, status=255/EXCEPTION) > > Process: 9184 ExecStart=/usr/bin/vncserver -depth 24 -geometry > > 1024x768 : (code=exited, status=255/EXCEPTION) > > CPU: 37ms > > > > Sep 10 21:44:28 transponder vncserver[9184]: -httpport number > > Sep 10 21:44:28 transponder vncserver[9184]: -basehttpport number > > Sep 10 21:44:28 transponder vncserver[9184]: -alwaysshared > > Sep 10 21:44:28 transponder vncserver[9184]: -nevershared > > Sep 10 21:44:28 transponder vncserver[9184]: -pixelformat rgb<NNN> > > Sep 10 21:44:28 transponder vncserver[9184]: -pixelformat bgr<NNN> > > Sep 10 21:44:28 transponder vncserver[9184]: See vncserver and Xtightvnc > > manual pages for more information. > > Sep 10 21:44:28 transponder systemd[1]: vncserver.service: Control > > process exited, code=exited, status=255/EXCEPTION > > Sep 10 21:44:28 transponder systemd[1]: vncserver.service: Failed with > > result 'exit-code'. > > Sep 10 21:44:28 transponder systemd[1]: Failed to start Start TightVNC > > server at startup. > > > > # journalctl -xeu vncserver.service > > Sep 10 21:44:28 transponder vncserver[9184]: -httpport number > > Sep 10 21:44:28 transponder vncserver[9184]: -basehttpport number > > Sep 10 21:44:28 transponder vncserver[9184]: -alwaysshared > > Sep 10 21:44:28 transponder vncserver[9184]: -nevershared > > Sep 10 21:44:28 transponder vncserver[9184]: -pixelformat rgb<NNN> > > Sep 10 21:44:28 transponder vncserver[9184]: -pixelformat bgr<NNN> > > Sep 10 21:44:28 transponder vncserver[9184]: See vncserver and Xtightvnc > > manual pages for more information. > > Sep 10 21:44:28 transponder systemd[1]: vncserver.service: Control > > process exited, code=exited, status=255/EXCEPTION > > ░░ Subject: Unit process exited > > ░░ Defined-By: systemd > > ░░ Support: https://www.debian.org/support > > ░░ > > ░░ An ExecStart= process belonging to unit vncserver.service has exited. > > ░░ > > ░░ The process' exit code is 'exited' and its exit status is 255. > > Sep 10 21:44:28 transponder systemd[1]: vncserver.service: Failed with > > result 'exit-code'. > > ░░ Subject: Unit failed > > ░░ Defined-By: systemd > > ░░ Support: https://www.debian.org/support > > ░░ > > ░░ The unit vncserver.service has entered the 'failed' state with result > > 'exit-code'. > > Sep 10 21:44:28 transponder systemd[1]: Failed to start Start TightVNC > > server at startup. > > ░░ Subject: A start job for unit vncserver.service has failed > > ░░ Defined-By: systemd > > ░░ Support: https://www.debian.org/support > > ░░ > > ░░ A start job for unit vncserver.service has finished with a failure. > > ░░ > > ░░ The job identifier is 11431 and the job result is failed. > > lines 64-92/92 (END) > > > > > > However: > > $ vncserver > > Couldn't start Xtightvnc; trying default font path. > > Please set correct fontPath in the vncserver script. > > > > New 'X' desktop is transponder:1 > > > > Starting applications specified in /home/garydale/.vnc/xstartup > > Log file is /home/garydale/.vnc/transponder:1.log > > > > garydale@transponder:~$ ps aux | grep vnc > > garydale 9959 0.0 0.0 9932 7276 pts/3 S 21:49 0:00 > > Xtightvnc :1 -desktop X -auth /home/garydale/.Xauthority -geometry > > 1024x768 -depth 24 -rfbwait 120000 -rfbauth /home/garydale/.vnc/passwd > > -rfbport 5901 -co /etc/X11/rgb > > garydale 9981 0.0 0.0 11412 2168 pts/3 S+ 21:50 0:00 grep vnc > > > > > > I'm trying to figure out what I'm doing wrong that is preventing it from > > starting as a systemd service. Any ideas? > > > > Thanks. > > > > > > > > ___________________________________________________________ > > TightVNC mailing list, [email protected] > > To change your subscription or to UNSUBSCRIBE, please visit > > https://lists.sourceforge.net/lists/listinfo/vnc-tight-list > +------------------------------------------------------------+ > Michael D. Setzer II - Computer Science Instructor (Retired) > mailto:[email protected] > mailto:[email protected] > Guam - Where America's Day Begins > G4L Disk Imaging Project maintainer > http://sourceforge.net/projects/g4l/ > +------------------------------------------------------------+ ___________________________________________________________ TightVNC mailing list, [email protected] To change your subscription or to UNSUBSCRIBE, please visit https://lists.sourceforge.net/lists/listinfo/vnc-tight-list