SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2011-07-09 11:06:09

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: Looking for a more friendly shutdown...

johnraff wrote:

...but won't all the apps that are smart enough to display that asterisk already be putting up a "save data?" box when wmctrl tells them to close?

Sure.... it would just have been easy for this script if we only had to make a list of the applications with an asterisk. No need for the 'IGNORE' stuff etc.

Tuna


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

Be excellent to each other!

#27 2011-07-12 03:18:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Looking for a more friendly shutdown...

^ah, yes that's a good point.

But, aren't there any windows without asterisks in the title that we would still like to close? (edit: Sorry, I forgot Libreoffice had already been mentioned.)

(The script as it is now is working fine for me btw)

Last edited by johnraff (2011-07-12 04:30:13)


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

#28 2011-07-12 03:56:42

Dev
Member
Registered: 2011-07-08
Posts: 27

Re: Looking for a more friendly shutdown...

johnraff wrote:

^ah, yes that's a good point.

But, aren't there any windows without asterisks in the title that we would still like to close?

(The script as it is now is working fine for me btw)

I'm not that experienced with Linux to know how to check that, as for if the applications that put an asterisk in the title are smart enough to warn you, there is one stubborn application that I really love and it's called Blender.

Offline

#29 2011-07-12 15:08:39

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: Looking for a more friendly shutdown...

johnraff wrote:

(The script as it is now is working fine for me btw)

For me as well !


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#30 2012-02-14 21:50:12

arelim
Member
From: Hungary with love
Registered: 2012-02-09
Posts: 11

Re: Looking for a more friendly shutdown...

guys, i have a small problem with the script. well, not with the script, but with the execution of the script. i've saved the sh file as ~/.bin/safeshutdown.sh and added the following lines to rc.xml, but to no avail.

    <keybind key="XF86PowerOff">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Shutdown Now</name>
        </startupnotify>
        <command>safeshutdown</command>
      </action>
    </keybind>

when i press the power button, all i got is an error message about permissions and denials.
am i doing something wrong?


ɐɹǝןıɯ ןıʞǝs ɔɹnuɔɥqɐuɓ

Offline

#31 2012-02-14 22:09:49

lain
#! Junkie
Registered: 2011-11-03
Posts: 313

Re: Looking for a more friendly shutdown...

@arelim

<keybind key="XF86PowerOff">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Shutdown Now</name>
        </startupnotify>
        <command>safeshutdown.sh</command>
      </action>
    </keybind>

You forgot the '.sh' also you should not forget to set the script executable.

chmod +x ~/.bin/safeshutdown.sh

Edit:
If that does not help replace

<command>safeshutdown.sh</command>

with

<command>/home/*yourname*/.bin/safeshutdown.sh</command>

Last edited by lain (2012-02-14 22:16:02)


#! Chrome Extension
Uh... I'm supposed to share my deep insights here, right?

Offline

#32 2012-02-15 13:22:42

arelim
Member
From: Hungary with love
Registered: 2012-02-09
Posts: 11

Re: Looking for a more friendly shutdown...

lain wrote:

@arelim

<keybind key="XF86PowerOff">
      <action name="Execute">
        <startupnotify>
          <enabled>true</enabled>
          <name>Shutdown Now</name>
        </startupnotify>
        <command>safeshutdown.sh</command>
      </action>
    </keybind>

You forgot the '.sh' also you should not forget to set the script executable.

chmod +x ~/.bin/safeshutdown.sh

Edit:
If that does not help replace

<command>safeshutdown.sh</command>

with

<command>/home/*yourname*/.bin/safeshutdown.sh</command>

added the .sh, added the executable attribute, after that replaced the script name with full path, but still nothing.
on a good side, the error message disappeared. smile


ɐɹǝןıɯ ןıʞǝs ɔɹnuɔɥqɐuɓ

Offline

#33 2012-02-15 14:18:37

lain
#! Junkie
Registered: 2011-11-03
Posts: 313

Re: Looking for a more friendly shutdown...

Hmm... are you sure that your script is in ~/.bin and not ~/bin?

I don't use openbox, but you could try this:

<command>sh /home/*yourname*/.bin/safeshutdown.sh</command>

If that does not work you should check your script for errors. (Have you tried executing it from a terminal?)


#! Chrome Extension
Uh... I'm supposed to share my deep insights here, right?

Offline

#34 2012-02-15 22:17:47

arelim
Member
From: Hungary with love
Registered: 2012-02-09
Posts: 11

Re: Looking for a more friendly shutdown...

lain wrote:

Hmm... are you sure that your script is in ~/.bin and not ~/bin?

I don't use openbox, but you could try this:

<command>sh /home/*yourname*/.bin/safeshutdown.sh</command>

If that does not work you should check your script for errors. (Have you tried executing it from a terminal?)

the script is in .bin. the problem was with this wonky little keyboard (using an eeepc900) and my faltering ability to touch-type with my huge hands. i put an extra f letter in it, and it bonked up the script.
it works now, thanks!


ɐɹǝןıɯ ןıʞǝs ɔɹnuɔɥqɐuɓ

Offline

#35 2015-11-02 08:30:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Looking for a more friendly shutdown...

Continued on BunsenLabs forum.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
#! forum moderator    BunsenLabs

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo