[zenity] string is not displayed


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 1 Week Ago
[zenity] string is not displayed

I am trying to display a string in zenity:
Code:
chars="\, /, <, >, ?, |, &, $"
echo $chars
\, /, <, >, ?, |, &, $

Now when I execute:
Code:
zenity --forms --text="Chars not allowed: $chars" --add-entry="File Name"

Instead of getting Chars not allowed: \, <, >, ?, |, &, $ I am getting Forms Dialog

What do I do wrong? Also, why is the following work?
Code:
zenity --forms --text="Enter File Name" --add-entry="Chars not allowed: $chars"

# 2  
Old 6 Days Ago
In the end, I was able to solve this issue by showing an image, if one or more not allowed chars, were inserted.


not_allowed_chars.png - Google Drive

Code:
yad --image="$MD5SUM_ICONS/not_allowed_chars.png" --title="" --text  "\nOne or more special chars detected...\n\n\t\tProcess aborted." --no-escape --no-buttons --center --fixed

# 3  
Old 6 Days Ago
You will need to use markup language for this, and escape backslashes multiple times.
Something like this should work :
Code:
chars="\\\\ , /, &lt;, &gt;, ?, |, &amp;, $"
zenity --forms --text="Chars not allowed: $chars" --add-entry="File Name"

Hope that helps
Regards
Peasant
This User Gave Thanks to Peasant For This Post:
soichiro (6 Days Ago)
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Bash Menu using zenity allen11 Shell Programming and Scripting 2 10-08-2018 03:47 PM
[bash] Zenity loop (raspbian) flammeur Shell Programming and Scripting 13 10-04-2016 12:16 PM
Issue with zenity list on ftp defila Shell Programming and Scripting 2 08-19-2013 11:23 AM
Zenity, While, and Conditions timbrammer91091 Shell Programming and Scripting 2 10-25-2012 11:57 AM
Zenity help stumpyuk Shell Programming and Scripting 2 11-01-2011 01:16 PM
Zenity function roozis Linux 3 03-17-2011 04:32 PM
using an array with zenity tornow UNIX for Dummies Questions & Answers 2 03-07-2011 11:12 PM
Highlight the string displayed milink Shell Programming and Scripting 1 10-21-2010 04:16 AM
file zenity uri_crack Shell Programming and Scripting 1 06-22-2010 12:57 AM
Zenity - return value from specified column Vayshan Shell Programming and Scripting 3 11-19-2009 01:01 PM
Zenity and IF/ELSE cond'. dplate07 Shell Programming and Scripting 2 07-11-2009 02:59 PM
Zenity Menu aspire Shell Programming and Scripting 4 07-08-2009 03:20 PM
zenity --question help ruben.rodrigues UNIX for Dummies Questions & Answers 3 03-25-2009 03:36 AM
Zenity ruben.rodrigues Shell Programming and Scripting 2 03-03-2009 07:33 AM