Re: [AMMRL] tigervnc-server on AlmaLinux9

From: Frank Holger Foersterling <holger_at_uwm.edu>
Date: Mon, 4 Dec 2023 16:31:04 -0600

Youlin,

my setup below will run x11vnc as root with access to the login screen,
so users can leave a sample in the SampleCase and start an overnight or
weekend run from home. All my instruments are in an internal network, so
users need to be logged in through VPN.

To install x11vnc: dnf install x11vnc
xinetd is no longer available in AlmaLinux 9, so the end goal should be
to use systemd socket activation, but I ran into snags with that.
dnf install xinetd --releasever=8

In /etc/services:
for port 5900:
x11vnc    5900/tcp    #X11-VNC Server
comment out other entries for that port

create file /etc/xinetd.d/vnc-server and add:
service x11vnc
{
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -xkb -repeat -auth guess -localhost -o /var/log/x11vnc.log -once -noxdamage -display :0
}

The -inetd option will pass output to an existing listening port rather creating a socket
The -localhost option requires a ssh tunneled connection or access through the xrdp server
-auth guess tried to automatically find the authority file for the X server, you can also
specify a path (specific to gdm, lightdm or whatever you are using) -once will stop the
server when the user disconnects.

If you want user specific VNC passwords, there are options in x11vnc to
set and use them. This setup gives everybody that has ssh access to the
spectrometer access to the currently running desktop, you need to decide
whether you want that.
systemctl enable xinetd
systemctl start xinetd

I use TurboVNC to connect through ssh tunneling.
For use Windows remote desktop client that is available on every Windows
computer:
dnf install xrdp

In /etc/xrdp/xrdp.ini, add in the session type session:
[X11vnc]
lib=libvnc.so
username k
password k
ip7.0.0.1
portY00

comment out any predefined sessions if you don't plan on using them
systemctl enable xrdp
systemctl start xrdp

I wrote these is from memory, I do not give guarantees regarding typos
or omissions.

Holger


On 12/4/2023 2:04 PM, Xia, Youlin via groups.io wrote:
>
> Hello, Holger,
>
> Could you please give more detailed steps for the installations of
> x11vnc and xinetd?
>
> Many thanks,
>
> Youlin
>
> *From:* main_at_ammrl.groups.io <main_at_ammrl.groups.io> *On Behalf Of
> *Frank Holger Foersterling via groups.io
> *Sent:* Monday, December 04, 2023 12:52 PM
> *To:* main_at_ammrl.groups.io
> *Subject:* Re: [AMMRL] tigervnc-server on AlmaLinux9
>
>
> I just tested x11vnc on a spare computer with AlmaLinux 9.3 and it
> works fine. My setup still uses xinetd for on demand startup, which
> installed using the --releasever=8 option as it is removed from the
> 9.3 relese, and I will eventually need to figure out socket activation
> in systemd. I configured xrdp to use the x11vnc server so Windows
> users can use the existing RemoteDesktop client to connect.
>
> This is the setup that I am currently using on our CentOS 7 spectrometer.
>
> I used TeamViewer and Anydesk for a while, but as mentioned by others,
> after a while my usage was flagged as commercial after a while.
>
> Holger
>
> On 11/27/2023 4:50 PM, Zhang, Weixing via groups.io wrote:
>
> Dear AMMRL,
>
> We use tigervnc-server on our CentOS7 computers all the time.
>
> Since Bruker has switched to Alma9 for new installation, I tested
> tigervnc-server on a computer with Alma9.3.
>
> The tigervnc-server allowed client to connect, but it immediately
> disconnected the client after connection.
>
> Any hints of the problem is appreciated.
>
> Best regards,
>
> Weixing Zhang, Ph.D.
> Research Operations Manager
> Biomolecular NMR Spectroscopy Center
> Department of Structural Biology
> St. Jude Children’s Research Hospital
> 262 Danny Thomas Place, MS 311
> Memphis, TN 38105
> Phone: 901-595-3169
>
> ---------------------------------------------------------------------
>
>
>
> -- Frank H. Foersterling Instrumentation Specialist CHM B-10
> Department of Chemistry University of Wisconsin-Milwaukee
> 414-229-5896(Lab) 414-229-5035 (Teams) holger_at_uwm.edu
>
>


--
Frank H. Foersterling
Instrumentation Specialist
CHM B-10
Department of Chemistry
University of Wisconsin-Milwaukee
414-229-5896(Lab) 414-229-5035 (Teams)
holger_at_uwm.edu


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#829): https://urldefense.com/v3/__https://ammrl.groups.=
io/g/main/message/829__;!!PvDODwlR4mBZyAb0!TmATBlMV_2iTIvs0DLEytS-YtJuaBFBt=
zZ8jZCO5rRbifmF0Ahsg2lmiXYv4YIvJSxhDPoUo0ZhLBek$
Mute This Topic: https://urldefense.com/v3/__https://groups.io/mt/102976222=
/7559972__;!!PvDODwlR4mBZyAb0!TmATBlMV_2iTIvs0DLEytS-YtJuaBFBtzZ8jZCO5rRbif=
mF0Ahsg2lmiXYv4YIvJSxhDPoUoGGA4Yfw$
Group Owner: main+owner_at_ammrl.groups.io
-=-=-=-=-=-=-=-=-=-=-=-




Received on Mon Dec 04 2023 - 14:31:12 MST

This archive was generated by hypermail 2.4.0 : Mon Jan 01 2024 - 19:06:37 MST