Linux practical joke

Discussion in 'Linux / Unix Discussion' started by ffreeloader, Oct 31, 2005.

  1. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    The bash shell as quite a few built-in variables. One of those is TMOUT. It sets just what it sounds like--the length of time a bash shell will wait for input before it times out and exits.

    What a great practical joke. If you type TMOUT=30 and hit enter the bash shell will appear to crash if someone doesn't type anything in during that 30 seconds. If someone does it will reset each time a key is hit. Once it does time out and shuts down it resets the variable to an indefinite time again.

    This however, can be changed by using the following command: echo TMOUT=10 >> .bashrc . This will edit the .bashrc file that is responsible for setting the shell parameters that are used when you open a bash shell from a gui. What will now happen the next time a bash shell is opened until the file is edited that every time there is a length of time that exceeds 10 seconds with no input the bash shell will close.

    Can't you just see one of your buddies trying to figure out why his bash shell keeps "crashing" on him all the time? All you need to do to change this is then open the .bashrc file in any text editor and delete the "TMOUT=whatever you set it to" line. The bash shell will then resume it's normal functionality the next time it is opened....

    Dang I'm ornery some days.... :twisted:
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1
  2. Boycie
    Honorary Member

    Boycie Senior Beer Tester

    6,281
    85
    174
    sounds like a good way of getting a pay rise to me :tongue

    Joking aside, that is what i love about Linux. I mean, you can never really play with Windows to that degree....
     
    Certifications: MCSA 2003, MCDST, A+, N+, CTT+, MCT
  3. ffreeloader

    ffreeloader Terabyte Poster

    3,661
    106
    167
    Now, now. I never said this was something to do at work. :)

    There are some practical jokes that you can do with the command prompt too. In a class one time the guy next to me was always kind of jerking me around so I basically aliased all his most common DOS commands to make them print out all kinds of strange messages using DOSKEY. It was fun to sit there and watch that knothead try to figure out why "dir" didn't print out a directory but would insult him instead.....
     
    Certifications: MCSE, MCDBA, CCNA, A+
    WIP: LPIC 1

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.