Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-25-2015, 10:25 AM
|
#1
|
LQ Newbie
Registered: Apr 2015
Posts: 20
Rep:
|
zenity with pango? Am I missing software package?
System: Ubuntu 14. Downloaded April 2015
People have posted about using pango in a zenity command. Something like this should work: zenity --info --text '<span color="green"></span>'"Hi mom" but no color change occurs in the zenity box.
Do I need another package to make it work?
Last edited by honest_abe; 04-27-2015 at 04:07 PM.
Reason: Typo
|
|
|
04-27-2015, 07:43 PM
|
#2
|
Member
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 305
Rep:
|
I think you need to check your quotes. Maybe try putting quotes around the entire 'text' argument.
Code:
zenity --info --text "<span color=\"green\">Hi mom</span>"
This works for me but I'm using zenity version 2.32.
|
|
1 members found this post helpful.
|
04-28-2015, 10:31 AM
|
#3
|
LQ Newbie
Registered: Apr 2015
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by ordealbyfire83
I think you need to check your quotes. Maybe try putting quotes around the entire 'text' argument.
Code:
zenity --info --text "<span color=\"green\">Hi mom</span>"
This works for me but I'm using zenity version 2.32.
|
Thanks for your reply. I tried it exactly as you wrote but no luck. I have a minimal system so only openbox and X. That's what made me think I might need another package.
The manner of writing it with single quotes around the whole span section was copied from someone in a posting somewhere who was telling another poster how to do it.
No error from zenity. No green either.
|
|
|
04-29-2015, 04:54 PM
|
#4
|
Member
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 305
Rep:
|
You could try using an older version of zenity. You would probably need to compile a gtk2 version of zenity (like 2.32) against gtk2 and go from there. The new versions are built for GTK3 and of course inherit everything that comes along with that. Many features in GTK3 are getting removed.
Here you can get an idea of the build dependencies. You should be able to use all of the build dependencies from your current distro.
Also note that I moved the </span> to after Hi mom. The color needs to "span" the text or else the instruction to change color ends before your text gets parsed.
|
|
|
04-30-2015, 05:05 PM
|
#5
|
LQ Newbie
Registered: Apr 2015
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by ordealbyfire83
Also note that I moved the </span> to after Hi mom. The color needs to "span" the text or else the instruction to change color ends before your text gets parsed.
|
The span at the end fixed the --info option and, in fact, allowed my real zenity command (zenity --list --radiolist) to also output what is in --text in large green font. However, the --column does not allow a span nor does the data lines.
|
|
|
05-03-2015, 10:31 PM
|
#6
|
Member
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 305
Rep:
|
I'm not too sure that's going to work. First of all, I presume you have something like
Code:
zenity --list --title "Window Title" --text "Some text here." --radiolist --column "Select" --column "Item" FALSE "1" FALSE "2" FALSE "3" FALSE "4"
According to this thread it only looks like a handful of options support markup with (radio)lists' entries not being among them.
There is a fork of zenity called yad that supposedly has some improvements. Unfortunately I haven't had the time to look into it yet.
|
|
|
05-04-2015, 07:50 AM
|
#7
|
LQ Newbie
Registered: Apr 2015
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by ordealbyfire83
I'm not too sure that's going to work. First of all, I presume you have something like
Code:
zenity --list --title "Window Title" --text "Some text here." --radiolist --column "Select" --column "Item" FALSE "1" FALSE "2" FALSE "3" FALSE "4"
According to this thread it only looks like a handful of options support markup with (radio)lists' entries not being among them.
There is a fork of zenity called yad that supposedly has some improvements. Unfortunately I haven't had the time to look into it yet.
|
I started using yad and abandoned zenity. It works far far better and I would encourage abandoning zenity for new projects. However, like zenity, it has insufficient examples and so it is difficult to figure out how to accomplish tasks. It seems that most of the examples are repeats of the same thing.
Thanks for all replies.
|
|
|
All times are GMT -5. The time now is 12:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|