LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 07-10-2008, 01:48 AM   #1
viapillai
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
how can i modify shutdown option in main menu ?


hi
i want to modify main menu shutdown option so that it shows
the list of users logged in when theshutdown option is clicked.
pls tell me where can i find the script that displays the dialog box that prompts the user to choose shutdown, restart or cancel.
 
Old 07-10-2008, 07:45 PM   #2
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: My HDD...
Distribution: WinXP for designing, Linux for life.
Posts: 2,329
Blog Entries: 1

Rep: Reputation: 47
Not sure how to do that, but if you open a terminal and type "w", it will tell you what users are logged in.
 
Old 07-10-2008, 07:56 PM   #3
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
You could write a shell script which executes the following commands:

w
poweroff

You would have to change the permissions or run the script as root, I guess, to execute the poweroff command.
 
Old 07-10-2008, 07:58 PM   #4
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: My HDD...
Distribution: WinXP for designing, Linux for life.
Posts: 2,329
Blog Entries: 1

Rep: Reputation: 47
Quote:
Originally Posted by ehawk View Post
You could write a shell script which executes the following commands:

w
poweroff

You would have to change the permissions or run the script as root, I guess, to execute the poweroff command.
Don't forget "sleep", otherwise it will execute "w" in a thousandth of a second and then shutdown, you'd never be able to read it.
 
Old 07-11-2008, 04:11 AM   #5
viapillai
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Original Poster
Rep: Reputation: 0
i have the script that displays a dialog box that shows the users logged in.
what i want to know is how to link this script to shutdown option in main menu
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change GNOME main menu icon(Applications menu) deepclutch Linux - Software 7 06-25-2007 01:31 PM
gnome main menu behaviour (menu follows mouse) metalloid Linux - Software 2 06-29-2006 01:58 AM
KDE shutdown menu lacks 'reboot' option leupi Linux - Software 4 03-02-2006 02:12 PM
why no one care about how to modify main menu dustinwu Fedora 4 01-23-2004 08:46 PM
shutdown hangs if initiated from Gnome menu halt option jkmin Linux - Newbie 2 02-10-2003 11:32 AM


All times are GMT -5. The time now is 01:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration