SliTaz SliTaz Forum

You are not logged in.

#1 2013-01-14 22:17:21

Darjeeling
Member
Registered: 2012-02-06
Posts: 210

Screenshot delay

I have written a short script to delay the screenshot function of mtPaint ...

#!/bin/sh

#

sleep 1

echo -e \\7

sleep 1

echo -e \\7

sleep 1

echo -e \\7

sleep 1

echo -e \\7

sleep 1

echo -e \\7

sleep 1

mtpaint -s

The script works well and beeps cheerfully when I run it in xTerm, in Sakura or from the console. When I run it from the menu, mtPaint starts after the delay but there's no beep. When I set the "Terminal" parameter in the .desktop file to "true" it will beep but this also brings up the terminal, which is not what I want. The same happens when the script is executed like this: Exec=xterm -e screenshot. Does anyone know how I can have the delayed screenshot including the beeps but without a visible terminal?

Offline

#2 2013-01-16 12:40:32

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: Screenshot delay

Hmm... How about busybox?

beep

beep -f FREQ -l LEN -d DELAY -r COUNT -n

Options:

        -f      Frequency in Hz

        -l      Length in ms

        -d      Delay in ms

        -r      Repetitions

        -n      Start new tone

Offline

#3 2013-01-16 21:00:19

Darjeeling
Member
Registered: 2012-02-06
Posts: 210

Re: Screenshot delay

Thanks for your reply, devl547. I'm still using SliTaz 3.0 and there's no beep function in BusyBox (v1.12.0). I found an "advanced pc-speaker beeper" in the SliTaz 3.0 repository but, strangely, this only works when it is run as root. When I run it as user I get this ...

tux@slitaz:~$ beep

Could not open /dev/console for writing.

open: Permission denied

... accompanied by a beep! Great! Currently I'm trying to figure out how I can produce a harmless error beep without using a dedicated beep program that doesn't work. Any idea?

But the whole thing is just cosmetic and not at all important. I only thought that a countdown would add a little drama to a delayed screenshot ...

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]