Captive login and runlevel 5



One login on my house server (FC4 / Gnome) is a captive login. By that I mean that the last two lines in .bash_profile are:

km amanda
exit

where km is a menu program that runs in a Linux console or an xterm terminal window. It works as expected from a console login at run level 3 or from a remote ssh login at run level 5. However, any attempt to login to that user from the console at run level 5 logs out again almost immediately with a message about an unexpectedly short login and a warning that this could be due to a system or configuration problem.

How can I adapt .bash_profile to work cleanly at both run level 3 and run level 5?

At a guess substituting

gnome-terminal --command="km amanda"

for "km amanda" should work at run level 5, but what's the best way to detect that run level != 5 or that the login is via ssh and just issue "km amanda" ?

--
martin@ | Martin Gregorie
gregorie. |
org | Zappa fan & glider pilot
.



Relevant Pages

  • Re: logging console login
    ... What i want in common with Linux and Solaris is console logins to ... least network logins can be bared from root login and force people to login as themselves and switch user, but root login at the console is ... Solaris and Linux log this event without any further configuration, but with HP and AIX for that matter they dont at the moment. ...
    (comp.sys.hp.hpux)
  • Re: 5.0.7 machine locks up!
    ... > 1 login is through the Digi Terminal Server ... > had one console on tty02 in an existing shell where I could type ... This could very well be a disk hang. ... Link scodb into the kernel, break into the kernel debugger when the ...
    (comp.unix.sco.misc)
  • Re: OPA0 Console connection
    ... will start a login upon unsolicited input, ... to be expected behaviour, yes, assuming that the console serial ... console serial line connection, and you should see failed logins ... depending on what's initiating the chatter on the line. ...
    (comp.os.vms)
  • Re: Novices questions
    ... accessing the system from the serial console is initially much easier. ... Pressing return should get you the>>> prompt. ... When you login on the GUI login screen, press the "OPTIONS" button, and in the session type, you choose "failsafe" instead of "New desktop" or "DecWindows" This *MAY* bypass the licencing issue. ...
    (comp.os.vms)
  • Re: [opensuse] Console login before x login
    ... Console login before x login ... (Ctrl-Alt-Fx), before login by KDM, ... has the wait action flag, and comes before the lines that start the console gettys: ...
    (SuSE)