LinuxQuestions.org
Review your favorite Linux distribution.
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: 285

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
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
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: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229
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
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 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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration