2

I have ubuntu desktop running on a remote pc. As an administartor, I can ssh to that pc from my local computer. From my ssh session, I want to open a gnome terminal that appears in the remote desktop so that supervisor in front-of the remote screen can see the result of the script i'm running.

PS: Ubuntu/Debian

UPDATES :

After hours of reseach, this is what I ended up doing in my ssh session:

export DISPLAY='192.168.100.100' (IP of the remote client)

export XAUTHORITY=/home/spv/.Xauthority (spv is user account openned in client side)

/usr/bin/gnome-terminal -- bash -c 'cd /PRJs/nemesis; npm start; exec bash'

And it's working now.

0

1 Answer 1

-1
  1. SSH into the remote pc
  2. type: gnome-terminal (this will open a new terminal in the remote pc)
  3. type you command and redirect to /dev/pts/0 (eg: echo hello > /dev/pts/0)
2
  • @vidarlo To be fair, gnome-terminal in particular doesn't rely on DISPLAY and XAUTHORITY of the shell that executes it, because its "server" service is started via dbus and in turn systemd. The "server" relies the env vars imported (upon startx or equivalent) to the systemd user manager, and the "client" apparently locates and/or communicate with its server through dbus as well. (Not really sure about the wayland case.)
    – Tom Yan
    Commented Oct 27 at 19:17
  • @TomYan Oh, interesting! Then I learnt something new today! Comment retracted.
    – vidarlo
    Commented Oct 27 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .