LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2019, 05:58 AM   #1
The Lost Developer
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Rep: Reputation: Disabled
Blurred or Low quality of launcher icon is observed even using SVG icon


Hi.

My application's launcher icon is blurred or low quality even if I use Scalable Vector Graphics (SVG) Icon.
When I first encountered this issue, I tried to solve it by providing different set of sizes in /usr/share/icons/hicolor/[nxn]/apps. But in some Linux distros, icon still of low quality or worst case, nothing is displayed.

I have checked forums about Linux and mostly advised to have an SVG too.
I thought it would work but still no.

Is there difference in handling icons per Linux distros?

I am just new to Linux Development and your inputs are highly appreciated
 
Old 04-12-2019, 01:08 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
you are not giving us much info.
what launcher? how did you create it? what information does it contain? just show us the launcher's content. it's a .desktop file, contains text.
 
Old 04-12-2019, 05:37 PM   #3
The Lost Developer
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi ondoho,

It's an application launcher icon. Yes I have a .desktop file.
Code:
 
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name= MyApplication
Exec= /usr/bin/MyApp
Icon=appicon
Terminal=true
appicon is the filename for the PNGs in /usr/share/icons/hicolor/[nxn]/apps and SVG in usr/share/icons/hicolor/scalable/apps

Last edited by The Lost Developer; 04-12-2019 at 05:39 PM.
 
Old 04-13-2019, 12:49 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
if i put "appicon" into any desktop launcher, i get a placeholder (icon not available).
please, do not obfuscate the single most important piece of information i asked for.
actually i don't see why you'd need to put these placeholders (MyApp etc.) in anywhere.

just show us the content of that file, and maybe also describe what you're seeing on the desktop (or wherever that launcher resides).
and what distro all this is happening on.
 
Old 04-15-2019, 12:31 AM   #5
The Lost Developer
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
if i put "appicon" into any desktop launcher, i get a placeholder (icon not available).
Why doing so?

I don't know what's unclear to you but you asked for the content of my .desktop file and I provided it on my reply above.

MyApp is an executable file to launch the application I created. Wherever it is placed is not the main issue here.

I just followed the implementation here https://stackoverflow.com/questions/...t-tab-in-linux, that's why I put my icons on those path folders.

But then, blurry or pixelated icon on the launcher is displayed. The worst is, no icon is displayed. This happens in most of the Linux distros.

In ubuntu, icon is only clearly displayed when icon size (dock) is set to the highest possible value(size 64 when I checked it).
 
Old 04-15-2019, 01:58 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
there's no icon called "appicon".
see for yourself:
Code:
find /usr/share/icons -name '*appicon*'
also read:
https://standards.freedesktop.org/ic...ec-latest.html
no "appicon" there, either.

are you using google translate?
 
Old 04-15-2019, 03:58 AM   #7
The Lost Developer
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
"appicon" is the filename of my PNG and SVG icons. Of course, it's not in the Linux directory since I created it myself.

Quote:
Hi.
My application's launcher icon is blurred or low quality even if I use Scalable Vector Graphics (SVG) Icon.
When I first encountered this issue, I tried to solve it by providing different set of sizes in /usr/share/icons/hicolor/[nxn]/apps. But in some Linux distros, icon still of low quality or worst case, nothing is displayed.
I quoted my first post in this thread.

So my question now, is there any difference in handling application icons per Linux distros?
 
Old 04-15-2019, 01:19 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
so where's the appicon stored, what's its name, what are its dimensions?
fwiw, you can try this snippet:
Code:
python2 <<<'import gtk;icon_theme = gtk.icon_theme_get_default();icon_info = icon_theme.lookup_icon("appicon", 24, 0);print icon_info.get_filename()'
it will return the absolute path to the chosen icon.
play with the icon size requested; 24 in this case.
you should probably have PNG icons in various sizes, or a vastly oversized SVG icon.
you should also check if the application rendering the launcher is capable of using SVG icons. i'm not sure, but i seem to remember that that is not to be taken for granted.
 
Old 04-29-2019, 05:21 AM   #9
The Lost Developer
LQ Newbie
 
Registered: Apr 2019
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi Ondoho,

I stored my icons in /usr/share/icons/hicolor/[nxn]/apps for the icons size 32x32,48x48 and 256x256.
My SVG icon is in /usr/share/icons/hicolor/scalable/apps.

I have tried the code you provided with (appicon, 48) in Ubuntu 16.04. The correct path of 48x48 icon is returned.

So I set the Launcher Icon size into 48 and the icon in dock is displayed correctly.
But no icon displayed(only black) in alt+tab and in search menu. So I check the SVG icon in /usr/share/icons/hicolor/scalable/apps and I found out it was displayed as black. I don't know if there is something missing in my system but the SVG icon is OK in 18.04.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Long lag between clicking the Application Launcher icon and the launcher appearing in KDE alex14641 Slackware 2 03-28-2016 05:36 PM
[SOLVED] firefox launcher doesn't show icon on panel bar of slackware but launcher still there mshlinux Linux - Newbie 6 04-24-2013 10:56 PM
LXer: SVG Web: Google Brings SVG Support to Internet Explorer LXer Syndicated Linux News 0 08-25-2009 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration