Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Paulo on March 21, 2013, 01:44:57 AM

Title: Do the popup and popask utilities have any commandline options?
Post by: Paulo on March 21, 2013, 01:44:57 AM
Hi

Can anyone tell me if the popup and popask utilities (in /tmp/tcloop/Xprogs/usr/local/bin) have any options available, like switching off beep?

Thanks.
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: curaga on March 21, 2013, 01:52:50 AM
No, they don't.

They are a part of the TC FLTK utils, so their source is available at http://git.tinycorelinux.net/index.cgi?url=fltk_projects
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: Paulo on March 21, 2013, 02:02:09 AM
Thanks curaga.
That is a pity, as the beep very quickly gets very annoying.
I am surprised that the developer/s never included a -nobeep or similar switch.
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: curaga on March 21, 2013, 02:27:40 AM
You can disable all beeps by blacklisting the pc speaker module.

In some older versions, it wasn't even included since we preferred no beeps at all, but some users requested it.
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: tinypoodle on March 21, 2013, 02:40:33 AM
Linux without beep? God forbid, but if you must, short from blacklisting the module (systemwide) as mentioned, check the b (bell) options of 'xset' for X apps.
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: Paulo on March 21, 2013, 03:06:36 AM
 ;D Thanks tinypoodle

Code: [Select]
xset b off
xset b 0 0 0
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: tinypoodle on March 21, 2013, 03:51:10 AM
Now if you really wanted only very specific apps not to beep, you could probably write a wrapper script for each, which would use xset to turn bell off, then call the app and turn bell on again after app exits.
Placing the script into .local/bin under same name as app would let it preceed in path. 
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: Paulo on March 21, 2013, 04:42:02 AM
A good idea tinypoodle, but I'm having trouble reinstating beep for some reason.
I suspect it's a HID problem, Human Interface Dunce.  ;)
Title: Re: Do the popup and popask utilities have any commandline options?
Post by: Paulo on March 21, 2013, 08:28:32 AM
OK got it now.

Code: [Select]
#!/bin/sh

xset b 0 0 0
popup "Some Text To Display"
xset b on

Or for some fun:

Code: [Select]
#!/bin/sh
alias beep='echo -en "\007"'
xset b 50 40 1000
beep
sleep 1
xset b 50 80 1000
beep
sleep 1
xset b 50 160 1000
beep
sleep 1
xset b 50 320 1000
beep
sleep 1
xset b 50 640 1000
beep
sleep 1
xset b 50 1280 1000
beep
sleep 1
xset b 50 2560 1000
beep
sleep 1
xset b 50 5120 1000
beep
sleep 1
xset 50 400 100

Those with a musical inclination could change it to play "chip tunes" and bug everyone at the office  :)
There is a beep app available with more options, but I couldn't get it to compile.