1

I have set up my new raspberry pi just fine and I can ssh in with no problems.

Simultaneously, I have hooked up a monitor via an HDMI cable.

But when I SSH in, I can't see my commands on the HDMI monitor, only the computer I am SSH'ing from. I would love to type in commands and see them reflected on the HDMI monitor.

Thanks!

  • 1
    This is by design. The login shell you see on the local monitor is not connected to the login via ssh. You have to consider that there could be multiple logins via ssh at any time - from different users (which should be diplayed on the local display?), from different places (they might not even see the display physically connected to the RPi by HDMI). Long story short: there is no way for the ssh shell to know automatically that you want to see it on the local display too. – Ghanima Sep 29 '14 at 12:01
2

XBMC

Using your phone or tablet

If you have an iOS or Android device you can download an app to control XBMC. I personally like Yatse over the official app on Android.

Using a web browser

To enable the remote control navigate to System → Settings → Services → Webserver and enable Allow control of XBMC via HTTP Make note of the port it enables, the username and password. You should then be able to enter the Ipaddress and port number (separated by a colon) of the XBMC (i.e. 192.168.1,120:8080) into a browser window of another computer.

more details can be found here.

Using SSH or to control XBMC from the command line

You can use xbmc-send. This may not be installed, but can be installed with this command

sudo apt-get install xbmc-eventclients-xbmc-send

A list of the supported functions can be found here

For Raspbian

That is how SSH is designed to work, but after a little searching and testing the following does what you want.

After SSHing into the remote machine type the following in the terminal:

export DISPLAY=:0

Then launch the program you want to display on the remote monitor, for example

midori "www.google.com"

or

lxterminal

more details available here.

Note the instructions above for Raspbian will likely work on Arch as well though I have not tested it.

  • I guess you'll have to explain that a little further. Say if xmbc is running and you login by ssh, do the export display=:0 and run a program, you'll just get Error: can't open display. – Ghanima Sep 29 '14 at 6:48
  • @Ghanima I have updated my answer to include XBMC. – Steve Robillard Sep 29 '14 at 9:37
  • Concerning my answer: while it offers no "solution" to the task addressed in the question it still provides information as to "why" it behaves the way it does. Whether this is "useful" information or not is obviously debatable. Concerning my comment about XBMC: It was not meant to be a new question, merely stating that your answer (pre-edit) would lead to that result. Kind regards, G. – Ghanima Sep 29 '14 at 15:47
  • @Ghanima feel free to add the explanation as a comment to the question. – Steve Robillard Sep 29 '14 at 17:05
  • I couldn't get this to work. I type: - export DISPLAY=:0 - lxterminal Gtk-WARNING **: cannot open display: :0 Whatever export DISPLAY=: combination I do, I have never gotten the monitor to mirror what I do via SSH. Please help! – Barisser Sep 30 '14 at 5:17
0

This is by design. The login shell you see on the local monitor is not connected to the login via ssh. You have to consider that there could be multiple logins via ssh at any time - from different users (which should be diplayed on the local display?), from different places (they might not even see the display physically connected to the RPi by HDMI). Long story short: there is no way for the ssh shell to know automatically that you want to see it on the local display too. Workarounds are already given by Steve Robillards answer.

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.