LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 06-18-2014, 01:09 PM   #1
masavini
Member
 
Registered: Jun 2008
Posts: 177

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


hi,
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:
Code:
export DISPLAY=:0 && gnome-terminal -x bash -c 'ssh -t server "script.sh; 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?
thanks!
 
Old 06-18-2014, 01:47 PM   #2
rtmistler
Senior Member
 
Registered: Mar 2011
Location: Milford, MA. USA
Distribution: MontaVista, Ubuntu, MINT
Posts: 1,067
Blog Entries: 7

Rep: Reputation: 464Reputation: 464Reputation: 464Reputation: 464Reputation: 464
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
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,680

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
sg like this:

Code:
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
mina86
Member
 
Registered: Aug 2008
Distribution: Slackware
Posts: 357

Rep: Reputation: 148Reputation: 148
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.
  


Reply


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
Programmatically creating X11 window to span multiple displays wealthychef Red Hat 2 02-07-2014 02:07 PM
Window Maker on Ubuntu with dual displays orhank Linux - Desktop 5 01-08-2013 07:54 AM
[SOLVED] Firefox 2.0.0.20 - 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


All times are GMT -5. The time now is 10:53 AM.

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