Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just discovered that zenity support html tags

zenity --error --text "hello <b>world</b>"

but how to make it work with "entry" type ?

zenity --entry --text "hello <b>world</b>"

it's printing tags instead of interpreting them

share|improve this question
up vote 9 down vote accepted

zenity and the entry option does not support the "pango" markup options.

error, info, question, warning are the only options that support these markups.

If you examine the man page for zenity - those options can have the pango markups turned on or off.

FYI this link gives you the markups supported:

The only suggestion I can make is to make this request upstream to the zenity developers

share|improve this answer
thanks for this clear answer – adrenochrome Jan 29 '12 at 15:51

This is fixeable by changing the file entry.c line 101 as: gtk_label_set_text_with_mnemonic to gtk_label_set_markup, what I don't know is why is for what purpose is set to mnemonic by default.

share|improve this answer
zenity --text-info --html

can also support pango markup (as well as more advanced html). This works when zenity is compiled with webkit, and it is in all current Ubuntu versions (but it is missing after a recent update in the developing version 'Wily').

share|improve this answer

You can do this with yad, which you can install from the Software Centre. The following line does what the OP wants:

yad --title "Customised title here" --entry --text " Are you <b>really</b> sure you want to add an entry?" --width=300 --center --button="gtk-cancel:252" --button="gtk-ok:0"

Terminal screenshot

To make this usable we need to get any data that was inputted and check which button was pressed. This does it:

`data=$(yad --title "Customised title here" --entry --text " Are you <b>really</b> sure you want to add an entry?" --width=300 --center --button="gtk-cancel:252" --button="gtk-ok:0");rc=$?; [[ $rc = 252 ]] && data="";echo $data`

For help on yad type yad --help-all or man yad but I found practical examples are easier to adapt. There are some here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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