3

I just uninstalled the pre-installed LibreOffice from Ubuntu 16.04 and installed the 5.0.5-version. Now there occured a problem with the launcher icon that (I think) wasn't there before:

The icon shown for Calc has a very bad quality and always says that it is an untitled document, even when the opened document is clearly titled

enter image description here

This problem does not occur for the other LibreOffice programs, as you can see at the Writer-icon above the Calc-icon.

When I search for LibreOffice in the Dash, two different possibilities show up for Calc

enter image description here

"untitled 1 - LibreOffice Calc" and "LibreOffice 5.0 Calc"

The latter is the right one. But even when I click on it, it opens the first icon/application, although at first it shows the right (high-quality) icon in the launcher for a second. Both open the 5.0.5-version, but with the wrong icon and the wrong title. The same problem occurs with LibreOffice Main.

I have read a bit about icons in Unity at some websites (also this one), which lead me to the folder /usr/share/app-install/desktop, where I also found the "ugly" images, which are related to .xdesktop -files. Interestingly, in this folder, only the .xdesktop -file of Calc and Main have an icon at all, not the others.

Has it got something to do with the files in the folder /usr/share/app-install/desktop/? What about the files in the folder /usr/share/icons? Is it related to the icon-theme, which I changed?
Does anyone know how I can get the right icon and the right Calc -application to be used? Is there possibly a remainder of the previous LibreOffice version on the system?

0

3 Answers 3

2

Default directories for launchers

The two default directories for .desktop files (launchers) are:

/usr/share/applications

for gloablly installed applications, and

~/.local/share/applications

for locally installed applications (~ stands for your home directory, /home/yourname) , or local versions of the launchers.

About LibreOffice

LibreOffice however is a bit of a stranger in our midst, if it comes to .desktop files.

While the default (Ubuntu) version of LibreOffice stores its .desktop files, as usual, in

/usr/share/applications

the downloaded version stores them in

/usr/local/share/applications

That is, links to the launchers. The real launchers are in

/opt/libreoffice5.0/share/xdg/

What happened

There are two options:

  1. Somehow, you have a local copy of the Libreoffice launcher in ~/.local/share/applications. If so, it will overrule all other occurrences of the same launcher (as mentioned, ~ stands for your home directory, /home/yourname). If so, remove the file(s), log out and back in.
  2. the launcher in /usr/share/applications was left behind for some reason, by an error during uninstall. If the first option is not the case:

    • Navigate to /usr/share/applications open a terminal window, type:

      sudo rm
      

      and subsequently drag the LibreOffice Calc launcher over into the terminal window in order to insert the file-directory. Then press Enter. Of course, you can also do that by typing the command:

      sudo rm /usr/local/share/libreoffice-calc.desktop
      

      and hitting Enter.

    • Log out and back in and it should be fixed.

1
  • I am on version 6.3 of LibreOffice and looks like these filelocation do not apply anymore... Jan 29, 2020 at 8:13
0

There was also the question about the images (icons) for LibreOffice. Well, even if that was directly asked: Personally I was searching for the folder containing that file countless times, and I always found this stackoverflow entry, which was not helpful in this regard. It mentioned the folder /usr/share/app-install/desktop, but that did not contain any files for me (Ubuntu 21.04).

Thus, in case anybody needs this as well: The libreoffice icons are stored in:

/usr/share/icons/hicolor/48x48/apps
0

I had the same icon problem when I upgraded from LibreOffice to LibreOffice 7.2, the icons weren't applied to LibreOffice like every other app. The solution was to go into the .desktop entry and remove the 7.2 wording

Run each one of these at a time and change the entry to the below -

sudo vim libreoffice7.2-base.desktop
sudo vim libreoffice7.2-calc.desktop
sudo vim libreoffice7.2-draw.desktop
sudo vim libreoffice7.2-impress.desktop
sudo vim libreoffice7.2-math.desktop
sudo vim libreoffice7.2-startcenter.desktop
sudo vim libreoffice7.2-writer.desktop

Here is one example for writer:-

  #Icon=libreoffice7.2-writer
  Icon=libreoffice-writer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .