0

I'm trying to run X server through SSH terminal (PuTTY) without root privileges but I'm getting error 'X: user not authorized to run the X server, aborting.'

My '/etc/X11/Xwrapper.config' is set to: allowed_users=console

What else needs to be set?

(Raspberry Pi 3 B with 8" screen attached and Raspbian 4.1)

2

On the Pi run:

sudo dpkg-reconfigure x11-common

Set 'Users allowed to start the X server:' to 'Anybody'

Now you should be able to run startx.

1
  • 1
    That's right but it's a workaround that I'm using right now. Yet it's unsafe. Could you please explain why setting to 'console' does not work here while using PuTTY? In my understanding 'console' here means pseudo-terminal which SSH seesion spawns. Am I missing something here? – alwi Mar 18 '16 at 7:45
-1

you can't run X on ssh. Just don't do it.

if you wan to get your desktop remotely use vnc with installing tightvnc on the raspi and a vnc viewer on your computer

3
  • I don't need a remote desktop. In fact I don't need any desktop. Eventually all will be controlled from service/daemon script on raspi. But while developing, I need to start X server and apps that utilize it through SSH. These applications should be displayed on the screen physically attached to RPi (use that local X server, no x11 forwarding). It is just more convinient for me to work on PC and invoke commands that start/stop applications on RPi remotely. And it works fine when I run 'sudo startx' through SSH but doesn't want to work when I'm running just 'startx'. – alwi Mar 17 '16 at 8:53
  • Wrong - you can run X over ssh. I'm typing this on my PC but I have a XTerm session that is sshed into my headless RPi so I can check some details on that system and I have some coding editing going on in some mousepad GUI editor windows running on the RPi but displaying on my Linux Desktop PC. Try running ssh with the -Y option so that the X session is tunnelled over the ssh link. – SlySven Mar 18 '16 at 19:10
  • Now I am not saying this is totally secure but as the ssh man page on the RPi says of that option (which I have copy/pasted to the PC):" -Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls." - Oh, you are using Putty on a 'Doze machine - *oops*, my bad. – SlySven Mar 18 '16 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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