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?


1 Answer 1


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:


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

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:


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”?


@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.

  • 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, 2017 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.