Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

tigervncserver

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
WolfG
Posts: 31
Joined: 2015-10-12 11:06
Has thanked: 2 times

tigervncserver

#1 Post by WolfG »

Greetings,

I have installed tigervnc-standalone-server on debian 11 (bullseye)
and want to run vnc automatically when connecting a client on port 5901.

Starting manually with vncserver :1 -localhost no works as expected.

Is there an example for doing this with xinetd?
have done this on other linuxes with xinetd and Xvnc.

Is there an example for doing this with xinetd on debian and tigervnc?

Thanks for hints

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: tigervncserver

#2 Post by reinob »

If you don't mind using systemd socket activation (which more or less does what inetd/xinetd do), you can check here: https://wiki.archlinux.org/title/TigerV ... d_sessions and see if that does what you want.

(maybe you'd also need to ask yourself why you need it to be on-demand.. in case you're overcomplicating things unnecessarily by not simply running vncserver all the time)

WolfG
Posts: 31
Joined: 2015-10-12 11:06
Has thanked: 2 times

Re: tigervncserver

#3 Post by WolfG »

Yes, you are right, actually I dont mind if its not on-demand.

However vncserver exits after the client disconnects and requires manually restart.

I start it with

Code: Select all

vncserver -localhost no -autokill no

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: tigervncserver

#4 Post by Aki »

Hello,

You wrote:
WolfG wrote: 2021-09-07 16:21 However vncserver exits after the client disconnects and requires manually restart.
That's quite unusual and it's not reported as bug for the package.

The systemd service file for tigervnc-standalone-server is [1] (in the source package):

Code: Select all

# The tigervncserver service unit film
#
# Quick HowTo:
# 1. Add a user mapping to /etc/tigervnc/vncserver.users.
# 2. Adjust the global or user configuration. See the
#    tigervncsession(8) manpage for details. (OPTIONAL)
# 3. Run `systemctl enable tigervncserver@:<display>.service`
# 4. Run `systemctl start tigervncserver@:<display>.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB's port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use "nolisten=tcp" to prevent X connections to your VNC server via TCP.
#
# Use "localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.


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

[Service]
Type=forking
ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/tigervncsession-start %i
PIDFile=/run/tigervncsession-%i.pid
SELinuxContext=system_u:system_r:vnc_session_t:s0

[Install]
WantedBy=multi-user.target
Therefore, it's a service of type "forking" and it should start a child process when started.

Then you have said that you manually restare the service with the executable called vncserver:
WolfG wrote: 2021-09-07 16:21 I start it with

Code: Select all

vncserver -localhost no -autokill no
In the tigervnc-standalone-server package [2], it seems there's no "vncserver" executable:

Code: Select all

File list of package "tigervnc-standalone-server" in bullseye of architecture amd64
/etc/X11/Xtigervnc-session
/etc/tigervnc/vncserver.users
/lib/systemd/system/tigervncserver@.service
/usr/bin/Xtigervnc
/usr/bin/tigervncserver
/usr/libexec/tigervncsession-start
/usr/sbin/tigervncsession
/usr/share/doc/tigervnc-standalone-server/changelog.Debian.gz
/usr/share/doc/tigervnc-standalone-server/copyright
/usr/share/man/man1/Xtigervnc.1.gz
/usr/share/man/man1/tigervncserver.1.gz
/usr/share/man/man8/tigervncsession.8.gz
Hence, it could be supposed your are not using the "tigervnc-standalone-server" debian package, but a different package or binary that perhaps does not come from Debian; a search for "vncserver" executable seems not to find an exact match:

Code: Select all

$ apt-file search "/vncserver"
numix-icon-theme-circle: /usr/share/icons/Numix-Circle/48/apps/vncserver.svg
python3-pyvirtualdisplay: /usr/lib/python3/dist-packages/pyvirtualdisplay/examples/vncserver.py
tigervnc-common: /etc/tigervnc/vncserver-config-defaults
tigervnc-common: /etc/tigervnc/vncserver-config-mandatory
tigervnc-common: /usr/share/man/man5/vncserver-config-defaults.5x.gz
tigervnc-common: /usr/share/man/man5/vncserver-config-mandatory.5x.gz
tigervnc-standalone-server: /etc/tigervnc/vncserver.users
Therefore, it seems that there's something wrong in your installation.

[1] https://sources.debian.org/src/tigervnc ... ervice.in/
[2] https://packages.debian.org/bullseye/am ... r/filelist
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

WolfG
Posts: 31
Joined: 2015-10-12 11:06
Has thanked: 2 times

Re: tigervncserver

#5 Post by WolfG »

Hi,
I checked the issue:

Code: Select all

root@debian:~# which vncserver
/usr/bin/vncserver
root@debian:~# file /usr/bin/vncserver
/usr/bin/vncserver: symbolic link to /etc/alternatives/vncserver
root@debian:~# file /etc/alternatives/vncserver
/etc/alternatives/vncserver: symbolic link to /usr/bin/tigervncserver
root@debian:~#
It appears being ok.

Nevertheless, I'll remove all vnc stuff, reinstall and try again.

Thanks for your time.

Post Reply