New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Lion: When users locks computer script...simple but don't know where to put it.

Post Reply New Thread Subscribe

Thread Tools

Member Since: Nov 18, 2009
Posts: 10
jwillis0720 is on a distinguished road

jwillis0720 is offline

Lion offers a fast user switching command if you go to users > login items > enable fast user switching > full name

Essentially you can lock your computer by clicking on your name in the toolbar and locking clicking "login screen"

I was wondering if it was possible to run a script to kill a certain process (just 1) when you went to the login screen. I found this file but I'm not sure its the right one.


If I write a simple shell script like this to it, can I kill the file?
> sudo defaults write /Library/Preferences/ ps -ax | grep Application | awk '{system ( "kill "$1 )}'

Perhaps I'm not writing a shell script the right way to a file?

I also found a LogoutHook ran when the computers logouts on

sudo defaults write Logouthook /usr/bin/script but is this initiated at switch user time?

thanks for your help,
QUOTE Thanks

Post Reply New Thread Subscribe

« OS Lion: Distorted Text in Finder windows | Upgrading to Snow Leopard »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Shortcut or simple script help needed martinielsen OS X - Operating System 6 07-24-2012 07:18 PM
Script for adding users i_eat_short_ppl OS X - Operating System 0 06-04-2009 06:01 PM
sharing photos and music among users on the same computer jsdean01 Switcher Hangout 4 01-27-2008 03:49 PM
Just How Secure Are the 'Reset Safari' & 'Erase Free Space' Facility? scoot OS X - Operating System 3 05-30-2007 05:28 PM
Intel Mac users with Windows, Where did you put your windows key sticker? mynameis Schweb's Lounge 10 05-20-2006 08:06 PM

All times are GMT -4. The time now is 10:57 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?