Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh and disconnecting from the shell
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Mon Sep 12, 2005 1:13 pm    Post subject: ssh and disconnecting from the shell Reply with quote

http://lists.debian.org/debian-user/2005/09/msg00072.html
I read these posts and it seems there were 4 different answers on this.
I use ssh into my mythbox and when I start something I want it to keep running after I close ssh and shut off the remote machine.
what is the opinion here as to which way is best? nohup?
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
bakreule
Apprentice
Apprentice


Joined: 27 Aug 2003
Posts: 233
Location: Paris, France

PostPosted: Mon Sep 12, 2005 1:23 pm    Post subject: Reply with quote

nohup is good if you just want it to run, but don't care about the output. If you care about the output, like during an emerge, use 'screen'. Screen lets you start a process, detach from it, leave, come back and reattach it, while keeping the command running.

Here's a tutorial I found on google:
http://librenix.com/?inode=4202
_________________
Buses stop at a bus station.
Trains stop at a train station.
On my desk there's a workstation.....
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Mon Sep 12, 2005 1:26 pm    Post subject: Reply with quote

I use screen for these sorts of things, but you can use nohup if you prefer.
_________________
My blog
nvtuner software - enhance your AGP Geforce 6800 or 6200!
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Mon Sep 12, 2005 1:31 pm    Post subject: Reply with quote

hey thanks, I appreciate the thoughtful replies.

This is what makes gentoo beter then the rest.


PS it is not the make.conf -mOMFG-fast flag.........
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
!db!
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 172
Location: A frozen, barren wasteland

PostPosted: Fri Dec 02, 2005 4:47 pm    Post subject: Reply with quote

I'm just learning to run background jobs. The tips and tricks one finds when googling 'nice' aren't that clear (and it some cases contradictory). To get things straight for me, would
Code:
nohup nice my_job > log_file &
be equivalent to
Code:
nohup nice -10 my_job > log_file &
I'm trying to settle whether the minus sign is a minus or a dash (as with an option). If I wanted to set the lowest priority, would I
Code:
nohup nice -19 my_job > log_file &
Thanks!
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Fri Dec 02, 2005 4:56 pm    Post subject: Reply with quote

I have been using 'screen' and I have found it to be what I needed.
I am supprised that 'screen' isn't the defacto standard for this. since there doesn't seem to be anything it you can't make it do.
I think the other choices work for certain situations but I can't see where they do something screen can't

nice -n 19

a negative nice number is a higher priority
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
!db!
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 172
Location: A frozen, barren wasteland

PostPosted: Fri Dec 02, 2005 5:00 pm    Post subject: Reply with quote

badgers wrote:

nice -n 19

a negative nice number is a higher priority

Thanks ... being pedantic,
Code:
nice -n 19
is equivalent to
Code:
nice -19
Back to top
View user's profile Send private message
badgers
l33t
l33t


Joined: 04 Sep 2003
Posts: 680
Location: Madison, WI

PostPosted: Fri Dec 02, 2005 5:17 pm    Post subject: Reply with quote

nice -n 19
is the lowest priority.

nice -n -19

is the highest priority(you must be root to set a negative number)

PS you asked
I'm trying to settle whether the minus sign is a minus or a dash (as with an option).

it is a minus sign but on the keyboard it is the same key...
_________________
Abit KD7-S
Athlon XP2500+
166mHz FSB
512 Meg PC3200 Ram running at 166mHz
LiteOn DVD dual Layer burner(hdc)

2.6.17 Suspend2 kernel with no scsi support
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Karlsruhe, Germany

PostPosted: Thu Jan 19, 2006 6:07 pm    Post subject: Reply with quote

Moved from Networking & Security to Duplicate Threads in favour of SSH: keep login active/Login to a previously started session.
_________________
KDE
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum