Page 1 of 1
Nethack on login?
Posted: Thu May 25, 2006 7:00 pm
by midnightlightning
Probably more of a generic Linux question than gaming, but it applies in this case: I've got nethack installed on my Gentoo box, and want to set it up so for a particular user, nethack starts on login (via telnet or ssh) and if nethack closes, the telnet/ssh session closes. How would I go about doing that?
Re: Nethack on login?
Posted: Thu May 25, 2006 7:08 pm
by zxiiro
midnightlightning wrote:Probably more of a generic Linux question than gaming, but it applies in this case: I've got nethack installed on my Gentoo box, and want to set it up so for a particular user, nethack starts on login (via telnet or ssh) and if nethack closes, the telnet/ssh session closes. How would I go about doing that?
for that user in the .bashrc file (or whatever shell your using)
just a quick test I did don't know if it'll work for your nethack
Posted: Thu May 25, 2006 7:10 pm
by NeddySeagoon
midnightlightning,
When you create that user, set the shell to the path to the nethack binary instead of to /bin/bash.
You may need to add it to /etc/shells as a permissible login shell too.
You could also make the users .bash_profile run nethack but I think that gives you a shell when nethack exits.
Posted: Thu May 25, 2006 7:40 pm
by PaveQ
I think setting the login shell to the nethack is better than executing from bash. No bash gets started so theres no way to circumvent anything.
But are you aware that nethack does have known security problem in gentoo?
Posted: Thu May 25, 2006 8:32 pm
by midnightlightning
PaveQ wrote:I think setting the login shell to the nethack is better than executing from bash. No bash gets started so theres no way to circumvent anything.
But are you aware that nethack does have known security problem in gentoo?
Yes, I've seen that, and for right now I'm not opening up the box to the world (only on my local network), so I think I'll be fine; plus it's not a mission-critical box to have up.
Thanks for the tips with the shell setting!
Posted: Thu May 25, 2006 9:38 pm
by zxiiro
Wow I wasn't aware you could set the shell to be non-shell programs. Interesting to know.
Posted: Fri May 26, 2006 2:54 am
by kcbanner
Me neither...but then again, why not
Good to know
Posted: Fri May 26, 2006 8:02 am
by ChristyMcJesus
zxiiro wrote:Wow I wasn't aware you could set the shell to be non-shell programs. Interesting to know.
I've heard of people setting their login shell to emacs.