View Full Version : How do I make a popup message
tejas
20th March 2005, 04:07 PM
I am using KDE 3, and I would like to make a window popup in KDE with reminders, or other simple messages.
I assume the simplest way to do this would be to use the 'at' command. However, if I use
at now + 15 minutes
at> echo Message
at> <EOT>
then the output is delivered as a message to /var/mail/spool, and I am not informed of the message until the next time I log into Konsole.
Is there some kind of program I could call from Konsole [KDE terminal], that would bring up the message in a popup window.
dorian
20th March 2005, 05:19 PM
Hello,
how about importing the mail in you email-client and activate a Panel application watching for new email? (You could even use filters to copy these mails to your main IMAP account...)
Suppose you use Kmail (http://kmail.kde.org/) just import the local mail as a mailbox and ther you should see the messages as they appear in kmail. Next point is the helper applet for KDE: right click the kde-panel and add the Helper-application "KLassie" (http://klassie.sourceforge.net/), if it is available. This application seems to be able to do this for you, but as i haven't KDE installed in my Fedora here i can not verify which applet comes with the fedora installation.
Dorian
crackers
20th March 2005, 06:36 PM
KAlarm, which is "built into" KDE already has this functionality.
The reason you're not "seeing" anything is because, as you've noticed, the echo command only prints to the standard output (terminal). If you really want to do something like your post, use this command instead of echo:
kdialog --msgbox "Your message here"
You can type kdialog --help in a terminal and see all the things you can do with that nifty little program.
foolish
20th March 2005, 06:36 PM
You can actually script graphical messages using jacascript in KDE. But if you want something to pop up reminders, no need to write this yourself, as there are lot's of software that can do this for you, like KNotify. I think it's part of the kdeutils package.
greatscot
21st March 2005, 03:39 AM
Open a terminal window and type:
kdialog --title "This is the title" --yesno "This is the message body."
Type:
kdialog --help
for lots of good information on this.
tejas
21st March 2005, 01:00 PM
Yup, thanks a lot. kdialog seems to work pretty good. Never again shall I forget to walk the dog [or have a shower for that matter!]. Anyway, thanks a ton
greatscot
21st March 2005, 01:09 PM
You're welcome, glad it worked for you :)
tejas
22nd March 2005, 04:05 AM
Ouch, I tought this was working properly, but it isn't.
I only tried out kdialog by typing it in at the terminal.
However, if I use it with the 'at' command, I get the following message delived to /var/spool/mail
Subject: Output from your job 11
To: tejas@localhost.localdomain
kdialog: cannot connect to X server
What should I do instead?
crackers
22nd March 2005, 04:42 AM
That's because the "at" command is actually executed via cron, which does not have access to the "X" session as it's running in a completely different shell. Very similar to the problem with echo - there's simply not anything the cron session to display to.
If you're using KDE, I'd still really suggest KAlarm... now that you've learned something new, that is. :D
allensco
22nd March 2005, 07:25 AM
How about KNotes? Pretty nice. You can have a "post-it note" on your desktop with whatever message on it you wish.
Popup
22nd March 2005, 09:22 AM
kdialog: cannot connect to X serverWell, if you're not too security-conscious you could always do an 'xhost +' from your KDE session. But watch out - that will enable anyone to snoop on your console. (Although if you're using default gdm settings, only people who're logged on to your machine, as by default gdm ignores X over TCP.)
Does anyone know if there's a utility similar to kdialog, that doesn't require KDE?
(I'd like to have a pop-up from a sun, that doesn't run KDE, but has basic X utilities.)
crackers
23rd March 2005, 03:42 AM
There's gdialog for GTK, but there's also dialog, but it's console-/terminal-based (ncurses, I think). There used to be an xdialog, I think, but I don't seem to have any actual references for it.
Popup
23rd March 2005, 09:43 AM
There's gdialog for GTK, but there's also dialog, but it's console-/terminal-based (ncurses, I think). There used to be an xdialog, I think, but I don't seem to have any actual references for it.
Thank you! Xdialog was exactly what I was looking for. It works independent of KDE although it's not installed by default on the sun I want to run it on. (I suppose I could always run it remotely on my machine though.)
ghaefb
23rd March 2005, 09:53 AM
In GNOME you can use 'zenity' command for this.
Like: zenity --info --text="This is a popup message"
tejas
23rd March 2005, 08:36 PM
It looks like the solution to this problem was actually really simple.
If Kdialog couldn't find KDE, let KDE find Kdialog.
I created a file 'remind' in my ~/bin, with the following code
#!/bin/sh
#
# Program To Popup Messages after time $1;
# -Tejas
#
sleep $1;
kdialog --msgbox "$2";
Then to call it, go to run command in KMenu and then type in
remind 10s "Message".
Don't forget the time is called by sleep, so the m, h, d also works.
This runs in the background without bringing up a terminal.
I'm ecstatic because this is the first problem I managed to solve on this forum [1'm still a newbie]. Add Me Repution [no I'm kidding, but If I changed your life forever, then go ahead]
Looks like the right solution is always the most obvious
tejas
23rd March 2005, 08:37 PM
Popup, did you try xmessage? It seems to be nearly identical to kdialog
Powered by vBulletin® Version 4.2.5 Copyright © 2018 vBulletin Solutions Inc. All rights reserved.