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.










share|improve this question









New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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















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.










share|improve this question









New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 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













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.










share|improve this question









New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









roaima

42.4k551116




42.4k551116






New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









AlphaCoder

441




441




New contributor




AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






AlphaCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 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




    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










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/.






share|improve this answer























  • 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











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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

























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/.






share|improve this answer























  • 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















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/.






share|improve this answer























  • 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













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/.






share|improve this answer














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/.







share|improve this answer














share|improve this answer



share|improve this answer








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


















  • 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










AlphaCoder is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt