logout script - Unix

This is a discussion on logout script - Unix ; in my center, i can lock screen only for 1 hour and if i found to not- in-desk and comp. is lock-screen, i m in trouble. so, can anyone help me writing a script that will autometically log me out ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: logout script

  1. logout script

    in my center, i can lock screen only for 1 hour and if i found to not-
    in-desk and comp. is lock-screen, i m in trouble.
    so, can anyone help me writing a script that will autometically log me
    out if the screen is locke for 1 hr?

  2. Re: logout script

    On Tue, 16 Sep 2008 03:45:26 -0700, rudra wrote:

    > in my center, i can lock screen only for 1 hour and if i found to not-
    > in-desk and comp. is lock-screen, i m in trouble. so, can anyone help me
    > writing a script that will autometically log me out if the screen is
    > locke for 1 hr?


    in a terminal run

    sleep 3599; foo

    where foo is the command used by your display manager to logout.

    A quick google search revealed that for me this would be:

    gnome-session-save --kill

    but YMMV

  3. Re: logout script


    > A quick google search revealed that for me this would be:
    >
    > gnome-session-save --kill
    >

    thats right!! but it always prompt you for option(logout/reboot/cancel
    etc.)
    is there any way to force logout without any prompt option??

  4. Re: logout script

    On Tue, 16 Sep 2008 05:49:11 -0700, rudra wrote:

    >> A quick google search revealed that for me this would be:
    >>
    >> gnome-session-save --kill
    >>

    > thats right!! but it always prompt you for option(logout/reboot/cancel
    > etc.)
    > is there any way to force logout without any prompt option??


    Maybe --silent
    I haven't tried it, but I will when I log off..
    From the gnome-session-save manpage:

    The --silent argument will perform the requested action without
    confirmation from the user.

    sf

+ Reply to Thread