I'm messing around w/ cron and wanted to try to create a popup requester. Something that would open a window with a message in it. I thought knotify might be the answer but the only info (docs) I find for it make it sound alot more complex than what I'm looking for. I see that kcontrolcenter lets you do something similar as a system notification (sound and multimedia), but I don't know how this is making it happen. I'd appreciate your suggestions, thanks -- dh Don't shop at GoogleGear.com!
On Sat, 22 Feb 2003 13:35:01 -0800
David Herman
I'm messing around w/ cron and wanted to try to create a popup requester. Something that would open a window with a message in it. I thought knotify might be the answer but the only info (docs) I find for it make it sound alot more complex than what I'm looking for.
I see that kcontrolcenter lets you do something similar as a system notification (sound and multimedia), but I don't know how this is making it happen.
I'd appreciate your suggestions, thanks
You could make a Tk notification box. There are alot of variations, here is an example. #!/usr/bin/perl # test prg for notifiction window use Tk; use strict; my $mw_bdw = 2; #mainwindow border width ### Create a Mainwindow ### my $main = new MainWindow(-borderwidth=>$mw_bdw, -relief=>'ridge', -bg => "#0000FF"); $main->geometry("150x100+0+0"); # displaying at top left on any resolution $main->overrideredirect(1); # Remove window decorations ### create a text widget ### my $imstr = "THIS IS A TEST NOTIFICTION LONG ENOUGH TO WRAP"; my $TEXT = $main->Text( -foreground=> 'white', -background=> '#0000FF', -wrap => 'word', -height => 7, -width => 50)->pack; $TEXT->insert('end', "$imstr", ); $main-> after(5000, \&exitprg); # autoclose in 5000 milisecs #comment out above line for message to stay until you kill it #with right-mouse-click MainLoop; # for continuous display of window #### FUNCTIONS #### sub exitprg { print STDERR "CALLED EXIT\n"; $main-> destroy; # to kill the window and exit from prog } __END__ -- use Perl; #powerful programmable prestidigitation
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 22 February 2003 05:35 pm, David Herman wrote:
I'm messing around w/ cron and wanted to try to create a popup requester. Something that would open a window with a message in it. I thought knotify might be the answer but the only info (docs) I find for it make it sound alot more complex than what I'm looking for.
I see that kcontrolcenter lets you do something similar as a system notification (sound and multimedia), but I don't know how this is making it happen.
echo "Your message here" | write <username> Kwrited will pop up a window with the message. Make sure that the user has "mesg y" set in their profile. - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+Wmdq+FOexA3koIgRAgBYAJ45Hmu7yh0zs1VZTcY7JtWH+szvugCgomHJ pzDvxDJKsIc/wasnVZjy4lg= =eD/K -----END PGP SIGNATURE-----
On Monday 24 February 2003 10:41 am, James Oakley wrote:
On Saturday 22 February 2003 05:35 pm, David Herman wrote:
I'm messing around w/ cron and wanted to try to create a popup requester. ------------snip------------- echo "Your message here" | write <username>
Kwrited will pop up a window with the message.
Make sure that the user has "mesg y" set in their profile.
Thanks for your reply James, unfortunately I'm still having problems ;-( I tried putting mesg y in my .profile, I logout then back in then try echo "Your message here" | write dh1 nothing happens. If itype mesg y into a shell and then try echo "Your message here" | write <username> a new shell window is opened, with the desired output Unless there is a shell already open, then the output is directed there. My problem then seems to be that the "mesg y" command is not being read from my .profile, (and I don't fully know how to do this...) and how to get a new shell opened in every case by the write command. I'd actually prefer a non interactive window as found in kcontrolcenter --> System Notifications --> (more options) show a message... Thanks again for your help -- dh Don't shop at GoogleGear.com!
participants (3)
-
David Herman
-
James Oakley
-
zentara