SEARCH

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

You are not logged in.

#26 2014-06-25 22:54:52

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: [Solved] CB-Exit script

Eagleshadow wrote:

Are you proposing that I try this in the script?
os.system("aplay -D plughw -q /home/william/Soundfiles/tada.wav")

Eagleshadow

Yes smile  If it doesn't work, just take it out again.


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

Help fund CrunchBang, donate to the project!

#27 2014-06-26 06:00:55

Eagleshadow
#! Member
Registered: 2014-06-02
Posts: 59

Re: [Solved] CB-Exit script

Tested in terminal this is what happened. Did not break script no harm done.

william@crunchbang:~$ sudo aplay-D plughw -q /home/william/Soundfiles/tada.wav
[sudo] password for william:
sudo: aplay-D: command not found
william@crunchbang:~$

Also
Inserted in script:
def logout_action(self,btn):
                self.disable_buttons()
                self.status.set_label("Exiting Openbox, please standby...")
                os.system("aplay -D plughw -q /home/william/Soundfiles/tada.wav")
                os.system("openbox --exit")

No wav on power off. tongue

Offline

#28 2014-06-26 14:23:13

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

Re: [Solved] CB-Exit script

In your terminal command you missed a space between aplay and -D. Try it without the -q option to see any error messages.

In the logout script - hmm anyway no sound.
Can you call the logout script from a terminal to see if there are any error messages related to aplay?
Maybe temporarily remove the os.system("openbox --exit") line so it stays open.


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

Offline

#29 2014-06-27 02:46:47

Eagleshadow
#! Member
Registered: 2014-06-02
Posts: 59

Re: [Solved] CB-Exit script

Retried the aplay with the space and it worked. It seems that either argument will play the wave. It somehow relates to the os.system("xxxxxxxxxxxx") not executing the command within the ("xxxxxxxxxx").

8o  mad

Offline

#30 2014-07-03 05:26:21

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

Re: [Solved] CB-Exit script

Try this:
make a copy of the cb-exit script, put it somewhere convenient, and make sure it's executable.
Now edit it and remove the line
os.system("openbox --exit")
so that it won't shut down your system.

Now run this new test script from a terminal.
Try editing the line
               os.system("aplay -D plughw -q /home/william/Soundfiles/tada.wav")
trying various commands to see if anything works.
Error messages in the terminal you called it from might give you a hint.


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