User mode start of vncserver

127 views
Skip to first unread message

rolfl

unread,
Jan 29, 2021, 10:35:46 AM1/29/21
to TigerVNC User Discussion/Support
With the removal of vncserver command and vncsession requiring root it seems it is not possible for users to create their own sessions.

Some time we need to have users start a new vncserver instance so they can have someone help with debug while they keep using their main vncserver instance.

How can  users start their own vncserver instances with the new systemd/vncsession methods?
 
For now I have copied vncserver from an old version of tigervnc which seems to work for now, but is the correct way to have user manage their own vncservers?

We are using standalone install of cross compatible build on RH7

Pierre Ossman

unread,
Feb 1, 2021, 6:43:09 AM2/1/21
to rolfl, TigerVNC User Discussion/Support
On 29/01/2021 16:35, rolfl wrote:
> With the removal of vncserver command and vncsession requiring root it
> seems it is not possible for users to create their own sessions.
>
> Some time we need to have users start a new vncserver instance so they can
> have someone help with debug while they keep using their main vncserver
> instance.
>
> How can users start their own vncserver instances with the new
> systemd/vncsession methods?
>
> For now I have copied vncserver from an old version of tigervnc which seems
> to work for now, but is the correct way to have user manage their own
> vncservers?
>

I'm afraid we don't have a supported way to do that right now. If the
old script works for you, then feel free to continue using it. However
it was too unreliable for us to keep as the official way of starting things.

Also note that multiple sessions as the same user is getting more and
more unreliable as applications and desktop environments are shifting
towards starting things indirectly via systemd. So I would recommend
moving away from that model.

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Michael D. Setzer II

unread,
Feb 1, 2021, 9:29:05 AM2/1/21
to TigerVNC User Discussion/Support, rolfl
On 29 Jan 2021 at 7:35, rolfl wrote:

Date sent:      Fri, 29 Jan 2021 07:35:45 -0800 (PST)
From:             rolfl <rolf.la...@gmail.com>
To:                 TigerVNC User Discussion/Support <tigervn...@googlegroups.com>
Subject:         [tigervnc-users] User mode start of vncserver

>
> With the removal of vncserver command and vncsession requiring root it seems it is
> not possible for users to create their own sessions.
>
> Some time we need to have users start a new vncserver instance so they can have
> someone help with debug while they keep using their main vncserver instance.
>
> How can users start their own vncserver instances with the new
> systemd/vncsession methods?
>
> For now I have copied vncserver from an old version of tigervnc which seems to
> work for now, but is the correct way to have user manage their own vncservers?
>

I disabled the upgrade of vncserver on most machines, so it is still running the older version just fine, but when upgrade to fc33 that will probable go away.

I have it run the vncserver from cron at startup, which is done by root, so had it using the runas command to start it for the users automatically. Now with the vncsessions, it is the opposite, one has to have root run command and include the users name (so it is doing a reverse runas).

Have this notebook running the newer vncserver, but don't have it setup to use the systemd to start session, since it would let me login locally if systemd starts it??

Ran the command and results are this (few things changed to x's).

root       vncsession msetzerii :xx
root       [vncsession] <defunct>

msetzer+   xinit /etc/X11/xinit/Xsession startxfce4 -- /usr/bin/Xvnc :xx -geometry 1270x900 -auth /run/user/1000/gdm/Xauthority -desktop xxxxxx.dyndns.org:xx (msetzerii) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/msetzerii/.vnc/passwd -rfbport 59xx -rfbwait 30000

msetzer+   /usr/bin/Xvnc :xx -geometry 1270x900 -auth /run/user/1000/gdm/Xauthority -desktop xxxxxx.dyndns.org:xx (msetzerii) -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/msetzerii/.vnc/passwd -rfbport 59xx -rfbwait 30000

Run the vncsession as root with userid and port
Don't have a clue why it then creates the [vncsession] with defunct status?? Tried all the kill commands and nothing will remove it???

It then has the xinit and Xvnc lines that are running a the regular user level, which could be run directly be a user script I would think? Note: I do use the xfce setup rather than gnome. Know that running a gnome local and gnome vnc session with same user did cause issues, but never had a problem with local gnome and  vnc xfce or with local xfce and vnc xfce..

So, think they are trying to fix a gnome issue rather than a vnc issue here??

Could see what kind of commands it creates with other desktops. Think it would be just different startxfce4 option.

Don't like having <defunct> things in ps -ef, but don't know why it creates it, or why it doesn't go away. Seems sloppy.. but perhaps there is some reason..
Good Luck.


> We are using standalone install of cross compatible build on RH7
> --
> You received this message because you are subscribed to the Google Groups
> "TigerVNC User Discussion/Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit
> f199ban%40googlegroups.com .

  

Pierre Ossman

unread,
Feb 2, 2021, 10:39:53 AM2/2/21
to Michael D. Setzer II, TigerVNC User Discussion/Support, rolfl
On 01/02/2021 15:28, 'Michael D. Setzer II' via TigerVNC User
Discussion/Support wrote:
>
> Run the vncsession as root with userid and port
> Don't have a clue why it then creates the [vncsession]
> with defunct status?? Tried all the kill commands and
> nothing will remove it???
>

That's a bug and has been fixed. So that stray zombie will be gone in
the next version. It should be harmless though.
Reply all
Reply to author
Forward
0 new messages