I'm on Machine A and am SSHing into a headless remote host Machine B. (Ubuntu 14.10 Server.) I have several scripts that I wish to run. However, they will occupy my session window. These scripts are not interactive but instead monitor the activity of different devices across my network. Instead of running multiple simultaneous SSH sessions I would like the each script that I invoke to open a new window on Machine A. The script does not assemble a GUI to use which leads me to believe that I couldn't just use X11-Forwarding and call it via $ /path/to/script/foo.sh &.

Is this possible to do?


two solutions. First, before starting your script, run 'DISPLAY=:0.0' . Hope I got this right. Can't look it up right now. Second solution. Open a screen terminal from the local host and when you tunnel in, then connect to the screen session. Hope that helps

  • Whew this is late. Ok, I tried the DISPLAY=.0.0 command but that disabled my X-forwarding. I had to change it back to DISPLAY=10.0. I don't quite understand the second part of 'connect to the screen session.' Is this some screen -x foo command? – Kamikaze Rusher Aug 5 '15 at 22:35

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.