How can I change Zenity dialog icon?
up vote
2
down vote
favorite
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog
zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap
From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png is 64*64 screen resolution image).
The default icon in the dialog box for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '. It's this icon I want to change.
I am using Linux mint 19.
zenity
New contributor
add a comment |
up vote
2
down vote
favorite
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog
zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap
From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png is 64*64 screen resolution image).
The default icon in the dialog box for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '. It's this icon I want to change.
I am using Linux mint 19.
zenity
New contributor
1
According to the man page (man zenity
) there is no--icon-name
option. Have you tried--window-icon=/home/64.png
like shown in the examples?
– roaima
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
What OS are you using? I really don't see an--icon-name
in my version on Debian Linux.
– roaima
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog
zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap
From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png is 64*64 screen resolution image).
The default icon in the dialog box for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '. It's this icon I want to change.
I am using Linux mint 19.
zenity
New contributor
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog
zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap
From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png is 64*64 screen resolution image).
The default icon in the dialog box for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '. It's this icon I want to change.
I am using Linux mint 19.
zenity
zenity
New contributor
New contributor
edited yesterday
roaima
42.4k551116
42.4k551116
New contributor
asked 2 days ago
AlphaCoder
441
441
New contributor
New contributor
1
According to the man page (man zenity
) there is no--icon-name
option. Have you tried--window-icon=/home/64.png
like shown in the examples?
– roaima
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
What OS are you using? I really don't see an--icon-name
in my version on Debian Linux.
– roaima
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago
add a comment |
1
According to the man page (man zenity
) there is no--icon-name
option. Have you tried--window-icon=/home/64.png
like shown in the examples?
– roaima
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
What OS are you using? I really don't see an--icon-name
in my version on Debian Linux.
– roaima
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago
1
1
According to the man page (
man zenity
) there is no --icon-name
option. Have you tried --window-icon=/home/64.png
like shown in the examples?– roaima
2 days ago
According to the man page (
man zenity
) there is no --icon-name
option. Have you tried --window-icon=/home/64.png
like shown in the examples?– roaima
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
What OS are you using? I really don't see an
--icon-name
in my version on Debian Linux.– roaima
2 days ago
What OS are you using? I really don't see an
--icon-name
in my version on Debian Linux.– roaima
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
1st, --window-icon
is the icon that is displayed in the title bar of the window, not the icon within the dialog box, which is placed to the left of the text you specify.
2nd, the latter icon can be set with --icon-name
, which is an undocumented feature that does not appear in the man page.
However, a path is not allowed here, rather just one of the predefined names "error", "info", "question", "warning", and probably "password".
On Debian, these names are translated to icon file paths, for example "info" to /usr/share/icons/gnome/xx/status/dialog-information.png
, where "xx" is the icon resolution that is calculated to be appropriate for being displayed in the dialog depending on the screen resolution, for instance "48x48".
If you set --icon-name
to something invalid, then no icon is displayed at all.
If you omit --icon-name
, then a hardcoded icon in zenity is used.
So, if you want to display a different icon for instance in the "information dialog", you would have to specify --icon-name=info
and replace the existing icon e.g. /usr/share/icons/gnome/48x48/status/dialog-information.png
with one of your liking, which can have a resolution different from 48x48.
Update:
Speaking of the gnome/
subdirectory: This corresponds to the icon theme I had selected in my appearance settings. Had I selected "Adwaita" for instance, then the subdirectory would be Adwaita/
.
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
1st, --window-icon
is the icon that is displayed in the title bar of the window, not the icon within the dialog box, which is placed to the left of the text you specify.
2nd, the latter icon can be set with --icon-name
, which is an undocumented feature that does not appear in the man page.
However, a path is not allowed here, rather just one of the predefined names "error", "info", "question", "warning", and probably "password".
On Debian, these names are translated to icon file paths, for example "info" to /usr/share/icons/gnome/xx/status/dialog-information.png
, where "xx" is the icon resolution that is calculated to be appropriate for being displayed in the dialog depending on the screen resolution, for instance "48x48".
If you set --icon-name
to something invalid, then no icon is displayed at all.
If you omit --icon-name
, then a hardcoded icon in zenity is used.
So, if you want to display a different icon for instance in the "information dialog", you would have to specify --icon-name=info
and replace the existing icon e.g. /usr/share/icons/gnome/48x48/status/dialog-information.png
with one of your liking, which can have a resolution different from 48x48.
Update:
Speaking of the gnome/
subdirectory: This corresponds to the icon theme I had selected in my appearance settings. Had I selected "Adwaita" for instance, then the subdirectory would be Adwaita/
.
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
|
show 2 more comments
up vote
2
down vote
1st, --window-icon
is the icon that is displayed in the title bar of the window, not the icon within the dialog box, which is placed to the left of the text you specify.
2nd, the latter icon can be set with --icon-name
, which is an undocumented feature that does not appear in the man page.
However, a path is not allowed here, rather just one of the predefined names "error", "info", "question", "warning", and probably "password".
On Debian, these names are translated to icon file paths, for example "info" to /usr/share/icons/gnome/xx/status/dialog-information.png
, where "xx" is the icon resolution that is calculated to be appropriate for being displayed in the dialog depending on the screen resolution, for instance "48x48".
If you set --icon-name
to something invalid, then no icon is displayed at all.
If you omit --icon-name
, then a hardcoded icon in zenity is used.
So, if you want to display a different icon for instance in the "information dialog", you would have to specify --icon-name=info
and replace the existing icon e.g. /usr/share/icons/gnome/48x48/status/dialog-information.png
with one of your liking, which can have a resolution different from 48x48.
Update:
Speaking of the gnome/
subdirectory: This corresponds to the icon theme I had selected in my appearance settings. Had I selected "Adwaita" for instance, then the subdirectory would be Adwaita/
.
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
|
show 2 more comments
up vote
2
down vote
up vote
2
down vote
1st, --window-icon
is the icon that is displayed in the title bar of the window, not the icon within the dialog box, which is placed to the left of the text you specify.
2nd, the latter icon can be set with --icon-name
, which is an undocumented feature that does not appear in the man page.
However, a path is not allowed here, rather just one of the predefined names "error", "info", "question", "warning", and probably "password".
On Debian, these names are translated to icon file paths, for example "info" to /usr/share/icons/gnome/xx/status/dialog-information.png
, where "xx" is the icon resolution that is calculated to be appropriate for being displayed in the dialog depending on the screen resolution, for instance "48x48".
If you set --icon-name
to something invalid, then no icon is displayed at all.
If you omit --icon-name
, then a hardcoded icon in zenity is used.
So, if you want to display a different icon for instance in the "information dialog", you would have to specify --icon-name=info
and replace the existing icon e.g. /usr/share/icons/gnome/48x48/status/dialog-information.png
with one of your liking, which can have a resolution different from 48x48.
Update:
Speaking of the gnome/
subdirectory: This corresponds to the icon theme I had selected in my appearance settings. Had I selected "Adwaita" for instance, then the subdirectory would be Adwaita/
.
1st, --window-icon
is the icon that is displayed in the title bar of the window, not the icon within the dialog box, which is placed to the left of the text you specify.
2nd, the latter icon can be set with --icon-name
, which is an undocumented feature that does not appear in the man page.
However, a path is not allowed here, rather just one of the predefined names "error", "info", "question", "warning", and probably "password".
On Debian, these names are translated to icon file paths, for example "info" to /usr/share/icons/gnome/xx/status/dialog-information.png
, where "xx" is the icon resolution that is calculated to be appropriate for being displayed in the dialog depending on the screen resolution, for instance "48x48".
If you set --icon-name
to something invalid, then no icon is displayed at all.
If you omit --icon-name
, then a hardcoded icon in zenity is used.
So, if you want to display a different icon for instance in the "information dialog", you would have to specify --icon-name=info
and replace the existing icon e.g. /usr/share/icons/gnome/48x48/status/dialog-information.png
with one of your liking, which can have a resolution different from 48x48.
Update:
Speaking of the gnome/
subdirectory: This corresponds to the icon theme I had selected in my appearance settings. Had I selected "Adwaita" for instance, then the subdirectory would be Adwaita/
.
edited yesterday
answered 2 days ago
nst0022
2613
2613
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
|
show 2 more comments
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
It seems like We are changing dialog icon permanently, It helps for ERROR and WARNING dialogs but for INFO I am writing program for multiple dialog icons at single run,
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
and how can i get this path as you specified /usr/share/icons/gnome/48*48/status/dialog-information.png
– AlphaCoder
2 days ago
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
How to get the path? I don't know, I stumbled upon this in the past, when I was trying to accomplish the same as you.
– nst0022
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I Tried with locate usr/share/icon/gnome/ , It was awesome experience. Thank You For conceal the mystry
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
I tried with changing default icon in 48*48 but it is still not work.
– AlphaCoder
yesterday
|
show 2 more comments
AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.
AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.
AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.
AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486768%2fhow-can-i-change-zenity-dialog-icon%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
According to the man page (
man zenity
) there is no--icon-name
option. Have you tried--window-icon=/home/64.png
like shown in the examples?– roaima
2 days ago
@roaima Thanks For (man zenity ), You can see --icon-name=NAME ** For ERROR dialog if you type *zenity--help-error in terminal , I Tried Your Trick But nothing happen new, Actually when we use this only ** --window-icon=/home/64.png* in zenity error then default error icon is visible, But when we use in zenity error this --window-icon=/home/64.png --icon-name=64.png then no any icon is visible.
– AlphaCoder
2 days ago
What OS are you using? I really don't see an
--icon-name
in my version on Debian Linux.– roaima
2 days ago
@roaima I am using Linux mint 19 and I want 64.png at dialog icon, you can see, the default icon for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '
– AlphaCoder
2 days ago