[fpc-pascal] sysutils.beep doesn't beep under Linux?

Graeme Geldenhuys graeme at mastermaths.co.za
Fri Nov 20 13:48:28 CET 2009


Michael Van Canneyt wrote:
> 
> No, the application can (for instance almost all daemons do) close
> stdout. Programs that use ncurses will also be messed-up.

Ah, ok.


> For CGI programs, stdout is also reserved for the HTML output. 
> Imagine someone else's code doing a beep, and it ends up in your HTML

I can't say I have ever seen a HTML page that beeps, but then again you
never know. ;-)


> If you'll remember, tiOPF had some very common (but nasty)
> windows-only constructs like showing message boxes deeply buried in
> core functionality. Works fine. Till I come along and want to run the
> thing on Linux. Bummer...

Please let me know if this is still the case, so those + translations
can be resolved. It took me considerable time to fix tiOPF Core to run
on a headless Linux box. So if any strange "gui" message boxes appear in
tiOPF Core, I would be very surprised. Hard-coded English text is a
different issue.


> By that rationale: no beep() on linux.

Funny you say that. When I started working on fpGUI's DocView (help
viewer) and viewed various OS/2 INF files, I couldn't get the damn
program to stop beeping at me! It took me a good two weeks before I
found the problem - it was #7 characters used in the IBM INF documents!

So I can honestly say my Linux system CAN beep. ;-)

Possible alternatives:
Maybe under Linux the system.beep() can make a sound if stdout is
available, otherwise write the word "beep" to the console (like the old
silent movies did on screen), or flash the Scroll Lock keyboard light. :-)

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list