On Tuesday 22 July 2003 20:44, David selby wrote: > Joerg Johannes wrote: > >Hi everybody. > > > >I have written a short perl script which reads the battery status of > > my laptop out of /proc/acpi/battery/BAT1/state, to be able to see > > how much time I have left until I have to shutdown or running to > > the nect power jack. I know there exists a kde applet which does > > this job, but I use plain IceWM, so I have to do it myself. My idea > > is: I have this script running as a daemon, and if battery capacity > > goes below a certain threshold, a window (Perl/TK or /GTK) should > > pop up and say: "Boy, you better run now..." > >Now my problem is: Usually only I have the right to display a new > > window on my screen, not any daemon user, no normal user and and > > certainly not root. Any pointers how to do that? > >I have already thought about beeping. I installed the "beep" > > program, but the problem is: I hear it only when I don't set my > > mixer to "mute" (which I do rather often... . > > > >Thanks > >joerg > > This isn't exactly an answer but it may give you an idea. I wrote a > bash script to remind me of events, no matter what the user or the > windowmanager, I use fluxbox and KDE > > It runs via daily cron, setup with crontab per user.A bit of a pain > to setup each user, but a one off. As such it runs with the > appropreate users authority. I then used > > xmessage --display=:0 -fn 9x15 -center -buttons OK,Print,Delete > -default OK -bg $_xmsgcol -file - > > to display the message, xmessage allows fonts, colours and keys to be > defined and detected as well. > > I have no idea if this is any use with perl !
It is! I can simply execute it with system(); I think I put the script in my users' X startup files, it won't be of any use otherways... Thanks joerg -- Gib GATES keine Chance! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]