Trash for Ice

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#31 Post by dvw86 »

papaschtroumpf wrote: Then the answer is no.
Or if the app has access to /root then it's a security risk (probably mean a user could see and erase root's trash files, no good).
Since you always run as root in Puppy I don't really see it as an issue, but you could easily change where the hidden trash file resides. For instance /usr/X11R6 or you could have a trash file for every user in their home account..

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#32 Post by dvw86 »

Well "Trash" seams to be fairly well received. (down loaded 19 times so far) I am working on the next upgrade. I gave it the ability to move multiple items to the trash simultaneously. Now I would like it to test and see if anything is using the sound card and skip playing the trash sound file if the sound card is already in use. Does any one know how to see if another application is using the sound card? Otherwise I will just have to test for all popular sound apps individually, which I would rather not do. Thanks

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

How to detect if an app is already using the audio

#33 Post by dvw86 »

I figured it out. Here is the code that I will be using to test if the sound file will cause problems.

Code: Select all

# See if /dev/dsp is in use. If it is then do not play the sound file.
		fuser /dev/dsp
		if [ $? -eq 0 ];then #=0 if found.
			exit
			else
 			play.tcl $APPDIR/systemmsg.wav
		fi
		exit

Post Reply