Registered Member
|
Hello
I am a beginner with linux and KDE as well. My goal: Write a script used with kalarm so that when the qeue of vlc is empty the computer will automatically shutdown. Thanks that, once the few episode of how I met your mother I am watching come to an end, I won't need to get up from my bed and manually shutdown the machine (Therefore i use the Time from now features of kalarm) Currently i have written this script
But as you know better than I do you need to run shutdown with sudo. Hence my question: What is the tip to get it work? Is there a way to write a script where I write sudo shutdown then my root password (I mean any trick with echo or this or that, or anytrick that you know) Shall I rather run kalarm with
In this case how do I change it? don't forget than I am a complete beginner Any help is welcome |
Manager
|
if you set the playlist option "play and exit" then the command vlc && shutdown -h now should work (found here http://wiki.videolan.org/How_to_shut_down_computer) try google'ing http://www.google.com/search?client=ope ... 5&bih=1021
|
Registered Member
|
Hi
first thanks for your help so I wrote a script ("bye") like this in kate
the thing is since here shutdown is not called with superuser mode it doesn't work (i.e error message here under)
I can't lauch the whole "bye" script with sudo before since apparently vlc ist not allowed to be run as superuser Is there really no way to get it with Kalarm? |
Manager
|
Set up sudoers so that you can run shutdown without a password using the command
see http://ubuntuforums.org/showthread.php?t=1132821 for explanation of sudo |
Registered users: Bing [Bot], Evergrowing, Google [Bot], ourcraft