Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
I want to run a Script after being inactive for 15 Minutes. I found out about the logoff profile trick and I did google for this. But I have no ...
  1. #1
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422

    Script after inactive for 10 Minutes..

    I want to run a Script after being inactive for 15 Minutes.
    I found out about the logoff profile trick and I did google for this.
    But I have no idea how to do this..?
    I want to logoff after 15 minutes but I want to close everything on a Clear way.
    Since well If I use Timeout from Profile my system stops working (since it closes Harsh )
    So well does anyone have an idea for this?

    So.

    After 54000 Seconds Inactive
    sh ~/.logoff


    How can this be done the easy way?
    New Users, please read this..
    Google first, then ask..

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I don't think I have an answer for your problem, but what do you mean by "close everything on a clear way", and what do you mean by "closes harsh"?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    heh well I knew id get a Question about this.

    I run a PC that cant be logged of in the normal way.
    The user is always logged in.
    But It has to kill the vnc server

    I can give you more information if you'd like but then we'd need to do that using somekind of 'Private' talk since I can show the system to you. But I have to reveal a password then
    New Users, please read this..
    Google first, then ask..

  4. #4
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    The nice thing about these public forums is that if I help you with something, then other people can benefit from that help. I can't count the number of interesting, useful things I've picked up from this forum.

    The other interesting thing is that if we keep it public, you'll have to do the investigative work yourself. This leaves me more free time, so I can do yardwork. Not everyone likes to do yardwork, but I do. Besides, the weeds in my garden are getting out of control, even though it's winter.

    Besides, I don't know anything about VPN's except that I know what the words "virtual", "private", and "network" mean.

    So it's best that we do this via public dialog. Perhaps you can tell us, then, what you mean by "close everything on a clear way", and what you mean by "closes harsh". :)
    --
    Bill

    Old age and treachery will overcome youth and skill.

  5. #5
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Heh sorry I didnt mean it like that I wanted you to fix my problem
    I love Public Forums I learn a lot from just reading Topic from other people.
    But I thought you might wanted to see the system I did build I didnt say(or ment) anything about giving you root access so you can fix it.
    For a person to logoff he has to run the following script:
    Code:
    vncserver -kill :1
    And not really log the user off. (does that make sence?)

    Anyhow, that is all not really important for this topic.
    I am just looking for a way to close it if the VNC session is unused for x minutes that he closes vnc:1

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  6. #6
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Again, I know nothing about VPN's. So I googled this:
    Code:
    VPN inactivity
    and what I found (among other things) was a great number of announcements that one VPN or another would kill the connection upon inactivity of some arbitrary length of time.

    So there must be some easy way to configure this. I imagine that way is documented for the VPN software you're using. I went to wikipedia and found this list of VPN software. Is the VPN software you're using on that list? What is it called? Can you get documentation for it?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  7. #7
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Its not a VPN?
    heh lots of people read VPN instead of VNC.
    Well I did google that aswell (VNC inactivity)
    And well I also want to log something when a Session is Timed out so its not that easy.
    So I have to run a script on the users Desktop that has when the user doesnt do something the last 15 Minutes he has to Log something and he has to close the VNCServers Display 1.

    heh thanks anyhow

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  8. #8
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Sorry. My mistake.

    But my original line of questioning applies, with an additional detail.

    First, I went to to the wikipedia article on VNC. And that leads to these questions:

    Do you want to do this logging on the client side or the server side?

    What software are you using on whatever side you wish to do the logging?

    Is there documentation about inactivity for that software?

    I know these questions won't completely finish the job, but they're the first questions to ask.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  9. #9
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Heh well I want logging on the server side so thats rather easy.
    Just:
    Code:
    echo "Whatever I want to Log" >> /var/log.log
    I want to log my own msg / Variables..
    The VNC has a inactivaty function. But I cant use that since you dont log then AND its a Security Risk (Since you can time out when somebody hijacked your Session already and you will never know. If your PC shows a moving cursor you see its been Hijacked )

    Anyhow, I did read the wikipedia page aswell.

    I also did read the MAn pages.
    But I think that VNC is a side note on this problem. Since I want to do a script when the desktop is inactive for x seconds.
    So if the Session is a VNC session or a Normal XFCE session shouldnt really matter.

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  10. #10
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    So if the Session is a VNC session or a Normal XFCE session shouldnt really matter.
    If it turns out that the solution needs to be implemented twice, once for VNC and once for XFCE, then it might matter indeed.

    I'm beginning to think that this whole question might be more trouble to you than it's worth to you, but let me ask you this question:

    What do you mean by "inactivity"? If your cat (not this kind jumps up to your keyboard and nudges your mouse (not this kind) a tiny bit and that causes the cursor to move, does that count as activity? Just like with a screensaver?

    If it does, you just might want to look inside some source code of screensavers to see how they do this. If not, what counts as activity for you?
    --
    Bill

    Old age and treachery will overcome youth and skill.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...