Answer the question
In order to leave comments, you need to log in
Tightvnc: how to connect to a user session in Linux Mint Cinnamon?
Actually, subject. On my computer I am logging in as user user. How to connect from a remote machine via a VNC client to an existing session of the user user, and not create a new one when connecting? When I connect after entering the password, for some reason a new session is created on behalf of the root user.
Answer the question
In order to leave comments, you need to log in
Because the VNC server must be started after the user login in his session (in autorun).
Something like this?
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=username
PAMName=login
PIDFile=/home/username/.vnc/%H:%i.pid
ExecStartPre= -/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question