Treat ssh terminal like it is local?

5,763

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:
5,763

Related videos on Youtube

wlraider70
Author by

wlraider70

Hey Hey

Updated on September 18, 2022

Comments

  • wlraider70
    wlraider70 about 1 year

    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.

    • wlraider70
      wlraider70 almost 10 years
      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?
  • Oli
    Oli almost 10 years
    I just run export DISPLAY=:0 (or prepend a command with DISPLAY=:0). I've never needed the .0 on the end.