If I understand you correctly, an easier solution would be to have something like this in .bash_profile directly
bash itself will then be replaced by ./start_application - therefore when ./start_application terminates, you'll be logged out and returned to the prompt.
If I understand you correctly, an easier solution would be to have something like this in .bash_profile directly
bash itself will then be replaced by ./start_application - therefore when ./start_application terminates, you'll be logged out and returned to the prompt.
Cheers
ZB
Thanks for the responses!
I've tried using logout in my script, but it doesn't do anything. I've tried using exit and that doesn't work either.
I've also tried starting the app within .bash_profile - as the last line and that won't work either!
I was able to kill the session by doing this within my script:
This will work and kill the session thus logging the user out and returning them to the login screen, but only if you're already logged in and run this from the command line.
However
This doesn't work if the user logs in from the log in screen. The script does indeed take place - files are moved, the application is started, and files are replaced. But, it doesn't end the session - the normal log in procedure takes place i.e. the desktop is setup etc...
i am having the same problem in regards to exiting UNIX via a menu using the ksh. I want the menu option to log the user out, however the logout command has to be run from the command prompt and wont work from within the script. If u find an answer, I too am in need of it.
what is the difference between desktop session and console session in solaris
as i am wondering we use option -text for the former and -nowin for the later (1 Reply)
Besides 'who am i' and 'tty' what commands could be used to determine if a session is interactive as compared to a web process or cron process. Any command should work with the common unix variants. (3 Replies)
Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
hi,
im executing one script i,e sh test.sh
i want to log out the sessing after script execution.
and i do't want to user command like this.
sh test.sh ; exit
can i exit the session with the use of script
pl help (1 Reply)
I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Hi,
Apologies if anyone has read my recent post on the same subject in the Linux forum, just thought actually the solution might more likely come from scripting.
Essentially, I am trying to restrict access to directories based on the user's name AND their location on a session-by-session... (3 Replies)
Hi there.
How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly.
sqlplus << EOF
user1@db1/pass1
BEGIN
PACKAGE1.perform_updates($1,$2,$3);
END;
EOF
Thanks in advance,
Abrahao. (2 Replies)