Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to work on a computer remotely, but some of what I want to do involves calling GUI programs. I want them to open on the physical display of the remote laptop.

Essentially my question is how can I ssh into machine and open firefox or nautilus.

Whenever I try commands I get

server@hyrule:~$ gnome-terminal
Failed to parse arguments: Cannot open display:
server@hyrule:~$ firefox
Error: no display specified
server@hyrule:~$ nautilus
Could not parse arguments: Cannot open display:
server@hyrule:~$

I just want the session to be treated like its local.

share|improve this question
    
I got it working with the 2 commands below. I make those into a bash file and made a cronjob, that won't work. Is there a reason for this? –  wlraider70 Dec 3 '13 at 23:00

2 Answers 2

up vote 1 down vote accepted

I do this daily by running

export DISPLAY=:0.0

before invoking the program itself. Note that if you're logged in as a different user locally vs. remotely, you may need to use xhost to allow the remote user permission to do this.

share|improve this answer
1  
I just run export DISPLAY=:0 (or prepend a command with DISPLAY=:0). I've never needed the .0 on the end. –  Oli Nov 26 '13 at 10:01

If you are in an Ubuntu desktop session open a terminal then start ssh with the -X option (x11 tunneling), ssh will forwards all the graphics informations to your X server and your mouse/keyboard events to the remote application.

ssh -X use@servername 
$ firefox 
... 

If you are on windows, install Xming (a free X11 server) then connect with putty (a free ssh client) with X11 tunneling option enabled (browse into the options tree).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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