![]() Registered Member ![]()
|
Often I will start a long command running, and then realize that it's time to leave for the day before it is finished. It seems like a nice feature would be "file -> Run command when done" where you could tell konsole to run something like "shutdown -h now" whenever the current command finished and returned to the shell prompt. Does anyone know of a way to do that (after the command has started, ie. not after the fact, like command1; shutdown;)? Or does it seem like a reasonable feature request?
Thanks, Dave |
![]() Registered Member ![]()
|
Go to "System Settings", "Advanced" and try Autostart option.
I'm not used it but there is a combo in Script File with 3 options: "Startup", "Pre-KDE startup" and "Shutdown". |
![]() Registered Member ![]()
|
hm, I'm using gnome so I don't see this "autostart" - I'm assuming it's a KDE thing. Either way, that doesn't sound like what I'm looking for - I would imagine it would have to be a function of the terminal emulator, not the windowing system?
|
![]() Administrator ![]()
|
What kind of commands is it? Maybe you could use the "Monitor for silence" feature (you can set it to run a custom script in Settings -> Configure Notifications.
I'm not sure it's possible for Konsole to know when a command has finished. |
![]() Registered Member ![]()
|
why don't you just to something like this:
yourcommand && shutdown -h now ? or write a "control script", like while [ 1 ] do sleep 1000 ps -aux | grep "your program name" if [ $? --eq 1 ];then shutdown -h now fi done you could give "your program name" with a parameter to this script it's not the perfect solution, but at least it works like this |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]