Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH tunnelling into arch box

I have a raspberry pi running arch linux connected to the TV and want to run commands on that screen by SSH'ing from my Ubuntu machine elsewhere.

I have tried running the command SSH -Y root@ and starting xclock as a test. However I get the following error:

No protocol specified Error: Can't open display: :0

I then tried running "export DISPLAY=:0" on the arch machine, but this doesn't solve the issue.

I have X running fine and can see it on the TV and I have edited the file /etc/ssh/ssh_config to allow X11 forwarding.

Anyone know what I am doing wrong?

Many thanks

like image 385
Jon Avatar asked May 30 '12 19:05

Jon


1 Answers

The ArchLinux wiki has some good instructions on setting things up. I struggled for a while until I found them, but for me the key was to set up SSH forwarding within sshd_config (most distros seem to enable this by default, but Arch doesn't).

Once you've enabled X forwarding in SSHD, I also found it helpful to install the dummy video driver for Xorg ("pacman -S xf86-video-dummy"), which gets rid of irritating errors about missing the RANDR extension. This might not be necessary if you already have it running a real X server locally on the Pi - personally, I'm running mine completely headless.

I've found that I don't have to worry about setting up the DISPLAY variable, or xhost, when running with 'ssh -X' from an iMac. I'd expect Ubuntu to behave the same.

like image 94
Fanjita Avatar answered Sep 24 '22 06:09

Fanjita