LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   how can i modify shutdown option in main menu ? (https://www.linuxquestions.org/questions/linux-desktop-74/how-can-i-modify-shutdown-option-in-main-menu-654773/)

viapillai 07-10-2008 01:48 AM

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.

phantom_cyph 07-10-2008 07:45 PM

Not sure how to do that, but if you open a terminal and type "w", it will tell you what users are logged in.

ehawk 07-10-2008 07:56 PM

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.

phantom_cyph 07-10-2008 07:58 PM

Quote:

Originally Posted by ehawk (Post 3210623)
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.

viapillai 07-11-2008 04:11 AM

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


All times are GMT -5. The time now is 04:58 AM.