FreeCAD Icon for Ubuntu

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD Icon for Ubuntu

Post by chrisb »

Thank you, I will do so a bit later and report.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD Icon for Ubuntu

Post by chrisb »

I installed the stable version and now both - stable and unstable - show the FreeCAD icon in the launcher. Thank you!
I was surprised that the linux version has still version number 0.16.6703, while Mac and Windows are already on 6707.

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6703 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 2ce5c8d2e3020d05005ed71f710e09e9aa561f40
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD Icon for Ubuntu

Post by triplus »

chrisb wrote:I installed the stable version and now both - stable and unstable - show the FreeCAD icon in the launcher. Thank you!
You're welcome.
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: FreeCAD Icon for Ubuntu

Post by M4x »

I've the same problem. FreeCAD-daily is showing the wrong icon (standard "application icon"). I've tried to install the stable release alongsinde the daily build (like suggested here) but it's not working. Further information regarding my FreeCAD installations:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10958 (Git)
Build type: None
Branch: master
Hash: df1e2642d0f1b7e43f2f0e0f66159804bea58681
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
NormandC wrote:Assuming you are using the freecad-daily package, the "/usr/share/menu/freecad-daily/menu" text file looks for the icon in /usr/share/freecad-daily/freecad.xpm. Can you check that the icon is indeed on your system?
I did like NormandC suggested (looking for the icon and so on) and it's all there.

I'm looking forward to any suggestions :-)
M4x
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FreeCAD Icon for Ubuntu

Post by kkremitzki »

One thing worth mentioning is that "stable release" refers to version 0.16, but it looks like you downloaded 0.15 which is what's currently in the repos. You should replace it via:

Code: Select all

sudo add-apt-repository ppa:freecad-maintainers/freecad-stable
sudo apt update
sudo apt upgrade
(and you may need to run sudo apt install freecad again as well, but I think the 0.15->0.16 update should get done with sudo apt upgrade.)

Can you try that and see if it changes the behavior? It's strange because there are many ways this can be broken, but it should be working out of the box (i.e. it does on a fresh VM.)

If that doesn't fix it, here's a sort of hacky way to hardcode the icon:

1. Run: cp /usr/share/applications/freecad-daily.desktop ~/.local/share/applications/
2. Open up ~/.local/share/applications/freecad-daily.desktop in a text editor
3. Change the line Icon=freecad to Icon=/path/to/icon/file.extension

Edit: missed a sudo apt upgrade
Last edited by kkremitzki on Sun Apr 30, 2017 11:16 am, edited 1 time in total.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: FreeCAD Icon for Ubuntu

Post by M4x »

Hey kkremitzki,

correct, I used the version from the repo and not the last stable. My mistake. It wasn't enough to perform

Code: Select all

sudo apt-get update
sudo apt-get upgrade
But after removing freecad and installing it again (this time the 0.16 version), it works. :D I still don't understand why this happens :-)

This is the stable I'm currently using:
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD Icon for Ubuntu

Post by NormandC »

Okay, I ignored this issue until now, I just had a look at it.

The application icon is managed by the /usr/share/applications/freecad-daily.desktop file.

When I renamed the daily package to freecad-daily following the 0.16 release last year, I set the "Icon" field to "freecad", because that's the name of the icons available in /usr/share/freecad-daily/. At the time it seemed to work, because I didn't think of doing checks with the stable PPA freecad removed from my system.

Now is the first time I bothered looking up the desktop specification... :oops:

https://specifications.freedesktop.org/ ... atest.html
Icon
Icon to display in file manager, menus, etc. If the name is an absolute path, the given file will be used. If the name is not an absolute path, the algorithm described in the Icon Theme Specification will be used to locate the icon.
I'm really bad with scripts, but it seems like the algorithm does not look for icons in the /usr/share/freecad-daily/ folder.

The Installing Application Icons section in the Icon Theme Specifications stipulates:
So, you're an application author, and want to install application icons so that they work in the KDE and Gnome menus. Minimally you should install a 48x48 icon in the hicolor theme. This means installing a PNG file in $prefix/share/icons/hicolor/48x48/apps. Optionally you can install icons in different sizes. For example, installing a svg icon in $prefix/share/icons/hicolor/scalable/apps means most desktops will have one icon that works for all sizes. You might even want to install icons with a look that matches other well known themes so your application will fit in with some specific desktop environment.
It happens that the freecad-daily package already installs icons in both location mentioned, but they are named freecad-daily.png/svg so as not to conflict with the icons from the freecad package.

So what's needed is to simply rename the Icon entry to "freecad-daily" instead of "freecad".

I will make the change on the Daily PPA so the next update should fix the icon.
Last edited by NormandC on Sun Apr 30, 2017 4:31 pm, edited 1 time in total.
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: FreeCAD Icon for Ubuntu

Post by M4x »

Thank you very much for your detailed explanation! Always happy to learn something new :-) And of course thanks for fixing this.
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FreeCAD Icon for Ubuntu

Post by NormandC »

Don't thank me before it's actually fixed :D
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: FreeCAD Icon for Ubuntu

Post by M4x »

:mrgreen:
Post Reply