0

I have a Pi 3B set up as a workstation.

Naturally I want xscreensaver to kick in at some point then lock it some time later. That all works fine.

However, I also use xrdp with Windows Remote Desktop to monitor a live gnuplot graph from a PC at the same time. (I purposely avoided using vnc which could attach to the console) With xrdp I believe it creates an entirely separate virtual console.

The problem is that the screensaver is activating during the RDP session. (Both are logged in as user pi)

So far I have tried disabling it in the RDP session and found that it also disabled it on the console.

Question is in the title:
Can I stop console xscreensaver from affecting remote connections?

SDsolar
  • 2,208
  • 8
  • 24
  • 42
  • https://stackoverflow.com/questions/44470965/how-can-you-watch-gnuplot-realtime-data-plots-as-a-live-graph-with-automatic-up/44471008#44471008 – SDsolar Jun 15 '17 at 02:36

1 Answers1

0

The short answer is no to using RDP for this, and YES there is a better way.

If you use ssh sessions, even with X11 enabled, you will find that they are not affected by the screensaver.

This is described in more depth in the Q&A's at:

How can I set up my G-Mouse USB GPS for use with Raspbian?

Can I achieve multiple independent sessions into a Raspbian Pi3?

When you use ssh like this to connect you will get a terminal window that is not capable of launching leafpad or gnuplot plots or any other graphical output:

ssh PRIME

but if you need graphical output you can use it like this:

ssh -Y PRIME

and you will still get the same terminal window but it will be capable of launching graphical programs from the command line such as

gnuplot
load "plot1

Voila, no worries about the console screensaver!

That is the answer.


Background on why the ssh command worked so easily:

OpenSSH-server is loaded on both systems:

sudo aptitude install openssh-server

On the MASTER system I ran these commands, ONCE:

cd
ssh-keygen       

Press enter to the 4 prompts

ssh-copy-id -i .ssh/id_rsa.pub PRIME

Enter your password for PRIME

It will then prompt you to try ssh to make sure it worked

What it doesn't tell you is that you can have an X11 connection by using

ssh -Y PRIME

This can also be done in Windows with the PuTTY PSSH program.

First, I put C:\windows\Program Files (x86)/putty in my path using environment variables in the system configuration, advanced screen.

pssh pi@PRIME

will do the same as ssh does in Linux.

For X-11 sessions it takes a little configuration.

How to make Putty do the equivalent of “ssh -X”?

EXCERPT:

@baraboom's answer: You can enable X11 Forwarding in Putty's configuration. In the menu on the left, find the Connection tree. In SSH, expand it and you will see Tunnels window. Click "Enable X11 forwarding". It is setting the default to X display at "localhost:0".

I havn't tested this with the screensaver, but included it for completeness.

SDsolar
  • 2,208
  • 8
  • 24
  • 42
  • btw, on Windows, it is a lot more intuitive when you copy the PuTTY pssh.exe program to ssh.exe. Reduces the necessity to think about which platform you are using when you reach into another. I had to laugh the first time I realized I had just done it from a Windows machine without a thought. – SDsolar Jul 18 '17 at 00:35