Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-18-2014, 01:09 PM   #1
Registered: Jun 2008
Posts: 232

Rep: Reputation: 6
open a window on 2 displays...

is there a way to open a window on a computer (let's call it "client") and have it running (and controllable) on another machine ("server").

here is my actual crontab command:
export DISPLAY=:0 && gnome-terminal -x bash -c 'ssh -t server "; exit"'
but it will be stopped if the client is shut down, and i can't control the script on server (no window appears on server's desktop)...

i'd like to have gnome-terminal opened and controllable on both client and server, and to keep it alive if client shuts down...

any hint?
Old 06-18-2014, 01:47 PM   #2
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,610
Blog Entries: 12

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
That terminal is only running on one machine. Based on what you've written, it's running on the client as a remote terminal to the server. So yes, if the client shuts down or detaches from the server network, this shuts down. The only way I know of to do this is to take remote control over one machine, have the server side of the remote control not lock it's screen during remote control, and then you have the client typing commands which are executed by the server. Someone can sit at the server and view or intervene; providing the remote control session settings allow this. If the client shuts down or disconnects, the remote control session is merely closed, leaving the open windows and such at the server, still open.
Old 06-18-2014, 10:44 PM   #3
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,240

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
sg like this:

1. crontab:  ssh server command >/tmp/remote_program_local.log 2>&1
2. terminal: tail -f /tmp/remote_program_local.log
Old 06-19-2014, 05:30 AM   #4
Registered: Aug 2008
Distribution: Slackware
Posts: 463

Rep: Reputation: 192Reputation: 192
You can use screen, tmux or dtach for that. It will allow you to run a command on server and then whenever you log in bring up the running command.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window Maker on Ubuntu with dual displays orhank Linux - Desktop 6 02-20-2016 06:04 AM
Programmatically creating X11 window to span multiple displays wealthychef Red Hat 2 02-07-2014 02:07 PM
[SOLVED] Firefox - can't open second window/dupe a tab to a new window. Used to work. GrapefruiTgirl Linux - Desktop 4 06-24-2009 08:27 PM
Dual Head, Twin view, separate X window - things you can do with multi displays MonsterMaxx Linux - Newbie 24 10-18-2008 01:04 AM
How to get the x displays currently open? 95se Linux - General 3 09-11-2004 11:11 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration