LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-23-2012, 09:44 PM   #1
fatalerror0x00
Member
 
Registered: Oct 2012
Location: Holden, ME, USA
Distribution: SlackWare64 14.00
Posts: 185

Rep: Reputation: 0
ssh sending commands to actual terminal


So i need to know how to send a command to like run a program on my computer over ssh. Now heres where I run into a problem. When you do it normally it opens in your session of ssh. soon as your done with your ssh connection the program dies. I need a way to run this program without it dying unless I specifically tell it to die or it crashes. Thank you!
 
Old 10-23-2012, 10:03 PM   #2
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
I understand that the program screen is supposed to be excellent for keeping a terminal session open after the communications have been disconnected. You can come back later and "re-enter" the terminal session.

I haven't used it myself however.
 
Old 10-23-2012, 10:58 PM   #3
fatalerror0x00
Member
 
Registered: Oct 2012
Location: Holden, ME, USA
Distribution: SlackWare64 14.00
Posts: 185

Original Poster
Rep: Reputation: 0
Screen

I had just played around with that minutes before I just checked this thread and I seem to be running into the issue of moving away from the screen in my ssh session so I still can't do anything else either in my session unless I want to run another session but isn't screen supposed to be the solution to that issue? lol
Also another issue is I can get screen to come up on my linux machine to see what i can over ssh now but trying to figure out how to get away from that screen and back to my tty1. I think I saw a guide earlier with this information all in it or even maybe if i'd try alt + f1 or something I'll try those. So currently now I need to figure out how to move away from the screen after I launch a program with it so that i can continue to do other stuff other then that the ssh side of this issue will be resolved.
 
Old 10-23-2012, 11:01 PM   #4
fatalerror0x00
Member
 
Registered: Oct 2012
Location: Holden, ME, USA
Distribution: SlackWare64 14.00
Posts: 185

Original Poster
Rep: Reputation: 0
Also when on my desktop (assuming this first part) If i'm not in my gui I don't enjoy the size of the terminal so if I was in x i'm assuming it would look better. Second part is alt +f1 didn't get me out alt f2 did but i guess that solves that on the desktop side this issue was my own stupidity :P. Now I need to figure out how to make it look better on the desktop side any ideas? Also I still need to figure out how to move away from screen in my ssh window. Thank you
 
Old 10-23-2012, 11:30 PM   #5
fatalerror0x00
Member
 
Registered: Oct 2012
Location: Holden, ME, USA
Distribution: SlackWare64 14.00
Posts: 185

Original Poster
Rep: Reputation: 0
Got it now I figured out screen enough that I think I'm all set for a while Thanks
 
Old 10-23-2012, 11:53 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
You can also do that with nohup ("no hangup")

nohup scriptname &

The script will continue to run after you logout.

See man nohup for details.
 
Old 10-23-2012, 11:59 PM   #7
fatalerror0x00
Member
 
Registered: Oct 2012
Location: Holden, ME, USA
Distribution: SlackWare64 14.00
Posts: 185

Original Poster
Rep: Reputation: 0
Okay i'll look into tthat now I do have one question now about screen how can i send a command to it without it displaying everything i typed (like I did the screen -X -S (NAMEOFSESSION) stop (stop is a command to stop a file my script runs) but if i remember correctly the entire thing i typed in was outputted instead of just stop so my server didn't recognize the command. How could I fix this? Thanks
 
  


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
[SOLVED] Prevent certain groups/users from running commands, but give them an ssh terminal piman Linux - Server 3 03-09-2012 01:07 PM
serial port (ttyS1) - Sending commands via terminal... HELP!!! Nalorin Linux - Networking 2 08-21-2005 10:22 PM
ssh -X to an actual open terminal lobo78 Linux - Networking 1 03-11-2004 12:55 PM
Digiboard accel4r sending modem commands to terminal lansman Linux - Newbie 0 04-06-2003 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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