LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-30-2013, 03:37 AM   #1
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174
SSH: Bring up running process on remote machine


I have a ubuntu machine running a minecraft-server in a terminal for my daughter and her friends. I can ssh in over the lan from my slackware laptop (with X forwarding) and see it with ps:

$ ps -e | grep terminal
6705 ? 00:00:00 gnome-terminal

I can't seem to find out how I bring it up on the laptop so I can administer the server. I guess I could ssh in and open a terminal on ubuntu and start the server remotely from the laptop, then I would already have it, but quite often it's already running so I need to grab it.
 
Old 10-30-2013, 07:22 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
AFAIk there's no way to move an X program between DISPLAYs. You could connect via VNC. Or start minecraft in screen or tmux in the first place, then you can reattach to it from anywhere.
 
1 members found this post helpful.
Old 10-30-2013, 08:53 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You probably want to use screen. It's too late for that process, but any new one you start can be started in screen, giving you the ability to attach and detach from it whenever you want from whatever machine you want.
 
1 members found this post helpful.
Old 10-30-2013, 09:26 AM   #4
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Original Poster
Rep: Reputation: 174Reputation: 174
Ok, thanks to you both, screen it is then.
 
Old 10-30-2013, 03:38 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
If you want to share the actual console display so you can view the open terminal window on it, you can use vnc with x11vnc on the remote machine.
 
1 members found this post helpful.
Old 10-30-2013, 06:17 PM   #6
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Original Poster
Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by Doug G View Post
If you want to share the actual console display so you can view the open terminal window on it, you can use vnc with x11vnc on the remote machine.
Thanks, I'll read up on it.
 
Old 11-04-2013, 04:02 AM   #7
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Original Poster
Rep: Reputation: 174Reputation: 174
Just to qualify how I solved this using screen to grab a process running on 'Server' from 'Laptop':

Starting on Laptop:
xterm # open your terminal, I use xterm
ssh Server # ssh in to Server from Laptop
screen # start screen
command # issue some command, process starts running
Ctrl-a d # detach screen
exit # break ssh connection to Server
...some time later...
xterm # open your terminal, I use xterm
ssh Server # ssh in to Server from Laptop
screen -ls # list running screen sessions
# producing:
30376.foo.Server # 30376 for example only, could be any number
screen -r 30376.foo.Server # reattach to screen session

Hope this helps someone.
 
  


Reply



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
Running a program on a remote Windows machine via SSH leamassiot Linux - General 5 02-22-2012 08:49 AM
how do i bring up a running process? szandor Linux - General 2 02-28-2007 04:14 AM
running shell command on remote machine with ssh qrshat Solaris / OpenSolaris 3 08-17-2006 07:32 AM
running X applications on remote machine when logged in via ssh servnov Linux - General 1 08-15-2005 08:53 PM
ssh to initiate process on remote machine jdarren Linux - Networking 3 03-23-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:25 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