I am refining a bash/yad script which runs when an event reminder is triggered in KOrganizer. (yad is a drop-in replacement for zenity. It is being actively developed and has many more features and options.)

When a "normal" KOrganizer reminder is triggered - especially a recurring one, you get a lot of information that is less than useful.

This is a very simple script, but it makes a big difference. It pops up an information box on top of the reminder that can have whatever you want in it to clearly describe the event.

I'm having trouble getting it to work again. (It worked fine around a year ago when I last used it.)

I have isolated the problem to the way KOrganizer passes arguments to the script. Passing HAPPY_BIRTHDAY works.

Modifying the script to accept multiple arguments and passing it HAPPY BIRTHDAY works.

But, what I want to pass it is something like

"<span color=\"#FFD700\">\t\t\t\tHAPPY BIRTHDAY\!\n\n\t\t\t\t\tTo ME\!</span>" 

which works from the command line, but I have no idea how to do it from KOrganizer.

The script works fine from the command line.

## custom_reminder
## Copyleft 01/26/2013 - JPmicrosystems
## Creates a pop up reminder for use with
## korganizer

## Usage: custom_reminder "reminder text"
##   reminder text can contain some special characters like \n"
##   Theoretically, it can also conatain some markup tags
##   Got simple span to work in bash, but not insde korganizer yet

if [ -z "${1}" ]

kstart --ontop -- yad --title "Personal Event Calendar" --info --text="${MSG}" --width=300 --height=100

The script is installed using edit existing reminder. Select What: Run application/script and enter the script name "custom_reminder" in Application/Script and the text in Arguments:.

Any ideas would be appreciated.

  • Have you tried simpler setups: starting without kstart; replacing yad with zenity? Am asking because your script works fine under GNOME and zenity. – Deer Hunter Jan 27 '13 at 6:02
  • @DeerHunter Yes. Tried all that (some since posting the original question). The problem is getting the arguments to the script. That's why I just rewrote the question when I figured that much out. Thanks for trying the script! – Joe Jan 27 '13 at 6:09

My tests with the argument passing in korganizer shows that it just removes all double quotes, ".

Your line:

"<span color=\"#FFD700\">\t\t\t\tHAPPY BIRTHDAY\!\n\n\t\t\t\t\tTo ME\!</span>"


<span color=\#FFD700\>\t\t\t\tHAPPY BIRTHDAY\!\n\n\t\t\t\t\tTo ME\!</span>

A workaround this limitation is to use single quotes and replace them with double in the script.

MSG=$(echo "$1" | sed "s/'/\"/g")

NB I have not tried it with yad.

  • I'll try that as soon as I can get back to it in a day or two. Since there's really nothing shell-like left to be done, Just leaving it in single quotes would probably be fine - unless my text has some embedded ones. – Joe Jan 29 '13 at 2:04
  • I'm still working on it. I couldn't get it to work. – Joe Feb 14 '13 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.