LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2018, 10:08 AM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,838

Rep: Reputation: 140Reputation: 140
Can I hide local screens when using VNC viewer?


I have an interesting problem. One of the "features" of VNC is the ability for the remote view and the local user to see and manipulate the screen concurrently. However, I have a user who is a lawyer and he reported to me that when he was composing a letter remotely, a person that happened to be in his office at work could see the letter and watch him type. For privacy reasons, this doesn't make him happy.

The VNC server is x11vnc. This server has options for not letting the local user use the mouse (-grabptr) or keyboard (-grabkbd), but no VNC server I know of has the option to turn off the display.

Is there some such program that can be run to put physical screens in 'standby' or power-saving mode which can only be turned on by the physical keyboard? A KDE screen-save solution won't work because that cancels with any KDE input, local or remote.
 
Old 03-21-2018, 04:13 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,948

Rep: Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279
I don't think so, vnc mirrors the local display (and keyboard and mouse), so everything should work the same way locally and remotely.
What you can do is: unplug the display for example.
Another option would be to use a fake X11 display which will not use the local screen at all, therefore nothing will be displayed. But in that case you cannot switch it on.
 
Old 03-21-2018, 04:37 AM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,585

Rep: Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351Reputation: 2351
Similalrly to the above -- you could run something like tightvnc to create an "invisible" X session and connect to that.
 
Old 03-29-2018, 11:40 PM   #4
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,838

Original Poster
Rep: Reputation: 140Reputation: 140
What about a mechanical solution? How about a power strip controlled by a USB? I could turn the strip on and off based on the user logging in or out of the VNC Server. Does such a thing exist?
 
Old 04-05-2018, 08:08 AM   #5
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
Quote:
Originally Posted by mfoley View Post
I have an interesting problem. One of the "features" of VNC is the ability for the remote view and the local user to see and manipulate the screen concurrently. However, I have a user who is a lawyer and he reported to me that when he was composing a letter remotely, a person that happened to be in his office at work could see the letter and watch him type. For privacy reasons, this doesn't make him happy.

The VNC server is x11vnc. This server has options for not letting the local user use the mouse (-grabptr) or keyboard (-grabkbd), but no VNC server I know of has the option to turn off the display.

Is there some such program that can be run to put physical screens in 'standby' or power-saving mode which can only be turned on by the physical keyboard? A KDE screen-save solution won't work because that cancels with any KDE input, local or remote.
VNC works best as a localised solution. Namely if you are around the workspace and want to interconnect many peripherals together. If you are remote then compose your work locally and then transfer the data via ssh. It's odd that you're working and transmitting your work over a line. But not just that, VNC also tends to be very finicky and unstable. x11vnc which is already quite a stripped down service tends to topple over more easily and more frequently that anyone would hope for.
 
Old 04-06-2018, 06:24 PM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,838

Original Poster
Rep: Reputation: 140Reputation: 140
Quote:
Originally Posted by linuxbawks View Post
VNC works best as a localised solution. Namely if you are around the workspace and want to interconnect many peripherals together. If you are remote then compose your work locally and then transfer the data via ssh.
Thanks for your input. I'm not totally in agreement with the "VNC works best as a localised solution." In fact, I've never really had occasion to use VNC as a mechanism for connecting many local peripherals. My need is to reproduce the ability for office staff to work from home on Linux via VNC like they could with Remote Desktop on Windows. These are "normal" users, not techy, so they aren't familiar with ssh transfer, nor are their workstation user accounts authorized for ssh. Furthermore, they generally have office-only programs (QuickBooks) and database access they can only get to from their office workstations.
Quote:
It's odd that you're working and transmitting your work over a line. But not just that, VNC also tends to be very finicky and unstable. x11vnc which is already quite a stripped down service tends to topple over more easily and more frequently that anyone would hope for.
Well, again, my experience is a bit different. The line is secured with stunnel. I've actually never experienced VNC toppling over during a session (Windows client: Real VNC, Linux client TigerVNC). x11vnc is the only one I've found that will run at boot-time and let a remote client connect to any local account. There were other advantages I've to x11vnc I've posted elsewhere on LQ, one of which is http://www.linuxquestions.org/questi...7/#post5437756. The main drawback with x11vnc is that author Karl Runge seems to have disappeared off the planet, so this package my be a dead-end for future maintenance.

Quote:
Originally Posted by mfoley View Post
What about a mechanical solution? How about a power strip controlled by a USB? I could turn the strip on and off based on the user logging in or out of the VNC Server. Does such a thing exist?
I've made some progress on this approach. There is a usb controlled power strip: http://www.pwrusb.com/powerUSB-basic.html. I've written to the manufacturer to see if there is a command-line usable api.

Last edited by mfoley; 04-06-2018 at 06:27 PM.
 
Old 04-06-2018, 07:54 PM   #7
linuxbawks
Member
 
Registered: Apr 2013
Distribution: Snuckware
Posts: 240

Rep: Reputation: 17
I use x11vnc. Its the only server I care to use because of its simplicity.
If you let a remote client connect to any local account then this is bound to be insecure.

I recommend to make a provision on your host systems in the event x11vnc crashes to restart itself.

Code:
#! /bin/sh

while true; do
    # Log stderror to a file 
    /usr/bin/x11vnc 2> /var/log/x11vnc.log
done

exit 0
 
Old 04-07-2018, 09:25 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,838

Original Poster
Rep: Reputation: 140Reputation: 140
Quote:
Originally Posted by linuxbawks View Post
I use x11vnc. Its the only server I care to use because of its simplicity.
If you let a remote client connect to any local account then this is bound to be insecure.
Possibly, but I'm trying to mimic Remote Desktop. I've taken precautions. Only Active Directory users can log in. If a hacker gets past the stunnel password, the AD will give a limited number of tries before locking out the workstation and blocking the offending IP. All such attempts are immediately emailed to me and, if I'm not paying enough attention to my email, an "OOGA" alarm horn sounds to get my attention.
Quote:
I recommend to make a provision on your host systems in the event x11vnc crashes to restart itself.
I believe I'm doing that with x11vnc itself using -loop -repeat -forever. If it ever totally crashes and won't restart itself, that would be a different, more serious problem. So far, in 2 years of using x11vnc server it's never crashed in such a fatal way.
 
Old 02-22-2021, 10:35 AM   #9
satankush
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
possible solution

You can log into your remote server with ssh and run this while loop

Code:
while true; do
    xset -display :0 dpms force off
    sleep 1
    done
and then connect via vnc.
This should keep your remote server's monitor off while you use vnc.
Afterwards you can just kill the loop.
 
Old 02-22-2021, 12:59 PM   #10
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,838

Original Poster
Rep: Reputation: 140Reputation: 140
Interesting suggestion. I'll give that a try.
 
Old 02-23-2021, 07:44 AM   #11
satankush
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
You might want to remove the line with sleep, this might not really work well with screens that acquire signal pretty fast; might cause them to flicker, but works fine on my desktop monitor which takes about 2-3 seconds to get a signal from my gpu
 
  


Reply

Tags
blank, remote desktop, screen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vnc server launched via ssh = gray screen. Local terminal vnc = ok link626 Linux - Newbie 1 09-15-2015 03:57 PM
VNC viewer showing black screen. unable to connect VNC server remotely on the server? cyberdome Linux - Server 1 08-01-2014 09:21 AM
VNC Viewer jessica_lilly Linux - Software 2 03-02-2008 05:24 PM
VNC connection to SUSE Linux 10 from a Windows XP VNC Viewer determin2excel Linux - Software 13 10-03-2007 10:38 AM
vnc viewer how to ? ashintoms Linux - Networking 2 07-25-2007 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration