Author Topic: How to Get VNC Working when the Screen is Locked  (Read 105 times)

Offline triwave

  • Newly Subscribed
  • *
  • Posts: 2
  • Karma: 0
  • New To PeppermintOS
    • View Profile
  • Peppermint version(s): 10
How to Get VNC Working when the Screen is Locked
« on: October 15, 2020, 10:45:47 am »

Long time Ubuntu / Mint user here ... but adopted Peppermint a good year and a half ago now - just love it!

Something I have not figured out and need for my setup now is VNC access on a Peppermint server.

The server is running 24/7 and locks screen when I am away. When I try to log in remotely I just get a black screen with a cursor dot.

There are several VNC server solutions - I've been partial to x11vnc so I just keep a session open and I have everything right in front of me whether I sit in front of the PC or I SSH into it from another PC.  I don't have a connectivity or VPN issue - I SSH in no problem and manually start x11vnc

If the server is not locked and I start x11vnc everything works fine - if it's locked I just get a black screen.

I have seen so many VNC issues on Linux in general it's an ongoing user friendliness problem ... but it's dependent on display manager as well so most of the ubuntu help and such isn't as relevant.

Anybody know what the issue is with Peppermint and how I can set it up to log in remotely when the screen is locked?

New Info:
If I reboot or terminate the logged in user I can get the login screen 1 time using:
Code: [Select]
sudo x11vnc -auth /var/run/lightdm/root/:0 --display :0
This allows me to see the login screen, enter user credentials and then have a normal looking session. If the screen locks however it doesn't work again.

Code: [Select]
ps wwwwaux | grep auth
root     12739  0.8  1.0 917372 85884 tty7     Ssl+ 17:00   0:06 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root     13295  0.5  0.3 827676 30328 tty8     Ssl+ 17:12   0:00 /usr/lib/xorg/Xorg -core :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch

So I see auth with :1 now so I tried that instead and it brings up the login window.

Code: [Select]
sudo x11vnc -auth /var/run/lightdm/root/:1 --display :1
Problem solved right? No, as soon as I log in the session terminates. Then I start vnc with -auth and the original /root/:0 and I'm back at my session. I can access vnc multiple times this way as long as the screen doesn't lock.

So I can sort of log in but  it's a pain to log in once to enter credentials and then a different way to access the session.  There must be an easier way ... what can I do (that preserves screen lock) , I need to log in/out several times a day and need screen locked when not in use by myself.

« Last Edit: October 15, 2020, 05:26:34 pm by triwave »