manuskript icon indicating copy to clipboard operation
manuskript copied to clipboard

Inconsistent / missing navigation menu icons on Linux Mint

Open Brosephus002 opened this issue 6 years ago • 25 comments

Icons and labels for the main menu on the left don't seem to be working properly. Sizes for icons are inconsistent and some are missing. Is there anything I can do to fix this? screenshot from 2019-02-14 20-40-41

Using linux mint 19.1 cinnamon.

Brosephus002 avatar Feb 15 '19 03:02 Brosephus002

Thank you @Brosephus002 for your interest in Manuskript.

The screen shot says it all. Somehow there is an issue with locating the icons for the Navigation panel.

The code that loads the icons is as follows: https://github.com/olivierkes/manuskript/blob/baeb5f4653f886b021bb97fbdc5d4aa504cb5a90/manuskript/mainWindow.py#L1150-L1175

There is a copy of the icons in the manuskript icons/NumixMsk directories, and often in the Theme being used.

The following command will search for the locations of icons, for example, "stock_view-details"

locate stock_view-details

There must be something different about Linux Mint 19.1 Cinnamon.

QUESTION: What method did you use to install Manuskript?


EDIT: I came across the following links that may be related and imply an open bug in Qt:

The last link is six years old but indicates:

Icon themes are only directly supported on the X11 platform for the GNOME and KDE desktop environments.

EDIT2: Additionally the last link indicates:

Qt5 still only supports kde and gnome by default, but the Qt Platform Abstraction layer at least makes it possible to create custom theme plugins (LXQT is one desktop environment that takes advantage of this). There are also several more DE's that are now treated as gtk/gnome: X-CINNAMON, UNITY, MATE, XFCE and LXDE.

gedakc avatar Feb 15 '19 17:02 gedakc

I downloaded the .deb version from the site and ran it using mint's package installer.

Brosephus002 avatar Feb 16 '19 16:02 Brosephus002

~What desktop are you using (e.g., KDE, GNOME, XFCE, LXDE, other)?~ EDIT: Doh, you already mentioned "CINNAMON" above.

Can you try to Run Manuskript from Source Code on Linux?

Because you installed the .deb version, the required packages should already be installed. Most likely you should only need the steps to perform the Manuskript Installation. If you choose to install using git then you will also have the option of running the latest develop branch code.

EDIT2: Would you please also copy and paste the log from the terminal window so that we can see the manuskript startup messages?

gedakc avatar Feb 16 '19 17:02 gedakc

Ran developer version, no change in icons.

Log:

loads/manuskript-develop$ bin/manuskript Debug: Web rendering engine used: QWebView qt5ct: using qt5ct plugin Running manuskript version 0.8.0. Note: No translator found or loaded from system locale for locale en_US. qt5ct: D-Bus global menu: no

Brosephus002 avatar Feb 16 '19 22:02 Brosephus002

Thank you testing the develop version and for posting the log.

One key line in the log is:

qt5ct: using qt5ct plugin

To me this indicates that the Cinnamon desktop is without Qt integration, and must instead use the Qt5 Configuration Tool. Unfortunately it seems that this doesn't work 100% with Qt theme icons, such as those used by Manuskript which uses Python3 and Qt5.

Is it possible for you to choose the X-Cinnamon desktop on login?
If so that might have better Qt integration as was mentioned in an earlier quote.

gedakc avatar Feb 16 '19 22:02 gedakc

There is no option for X-cinnamon, only for regular cinnamon(default) and cinnamon(software rendering). Tested the developer version on software rendering, no change.

Brosephus002 avatar Feb 17 '19 20:02 Brosephus002

It would appear that the Cinnamon desktop does not work well with Qt5 icons.

The link Qt Supported Platforms indicates support for Linux/X11, but unfortunately does not provide a definitive list of desktops supported.

gedakc avatar Feb 17 '19 20:02 gedakc

I take it to mean the problem is on linux mint end then?

Could mainWindow.py be modified to display the icons in the icons/custom folder?

Brosephus002 avatar Feb 18 '19 03:02 Brosephus002

I take it to mean the problem is on linux mint end then?

As best I can tell, the issue is that the Cinnamon desktop does not integrate with Qt, and does not implement Qt Platform Abstraction. If you were to use Linux Mint with a different desktop, such as KDE, GNOME, XFCE, or LXDE then the problem should disappear.

Could mainWindow.py be modified to display the icons in the icons/custom folder?

It might be possible. Please feel free to experiment and develop a solution. When you have a working solution then create a Push Request to have the code reviewed.

gedakc avatar Feb 18 '19 17:02 gedakc

Also happens to me in Manjaro Gnome 18.0, it was installed thru pamac. Also, sometimes if I change the theme it'll crash.

NeoHikamaru avatar May 22 '19 17:05 NeoHikamaru

@NeoHikamaru more information about your setup would be helpful, and could aid in determining if your desktop also lacks integration with Qt.

Please provide the console log from starting manuskript in a terminal window (just copy and paste the text as was done in this post).

The software versions of Python and Qt would be help too (See manuskript menu Help -> About).

gedakc avatar May 23 '19 15:05 gedakc

It would appear that the Cinnamon desktop does not work well with Qt5 icons.

The link Qt Supported Platforms indicates support for Linux/X11, but unfortunately does not provide a definitive list of desktops supported.

Same problem with XFCE desktop. Actually, it looks worse than the screenshot above: there's no delineation between fields.

rcrx avatar Aug 30 '19 18:08 rcrx

@rcrx can you provide more information, such as the GNU/Linux distro and version, plus the Manuskript software versions (Help -> About). A screen shot would also be helpful.

I have tested Manuskript on Debian 10 with XFCE4 (4.12.5) and all looks normal.

gedakc avatar Aug 30 '19 18:08 gedakc

@rcrx can you provide more information, such as the GNU/Linux distro and version, plus the Manuskript software versions (Help -> About). A screen shot would also be helpful.

Hey @gedakc ,

sorry for not being specific enough. I was hoping the distro was implied: also Mint (in this case 19.2). I think XFCE was 4.13.4 (or whatever comes standard with Linux Mint). As for Manuskript, version number 0.9.0-1.

I can get you a screenshot but I'd have to reproduce the issue first.

rcrx avatar Sep 01 '19 17:09 rcrx

@gedakc

A screenshot will not do this justice. Here's a screencast: https://github.com/rcrx/manusckript_issue-498/raw/master/demo-2019-09-03_13.15.07.mkv

rcrx avatar Sep 03 '19 19:09 rcrx

Thanks for the screencast.

Can you check to confirm if you are running XFCE?

For example you might check for locally install xfce4 packages with:
dpkg -l | grep xfce4

Also can you start manuskript from a terminal session and then copy the console log and paste it into this thread between a set of three back quotes (```) so that the text is in a fixed font?

gedakc avatar Sep 04 '19 20:09 gedakc

Definitely XFCE

rcrx avatar Sep 04 '19 21:09 rcrx

@rcrx, can you start manuskript from a terminal session and then copy and paste the console log output into thread?

I suspect that XFCE on Linux Mint is missing Qt5 integration and hence is missing the icons.

Following is a screen shot of Manuskript running on XFCE4 on Debian 10 Buster.

Manuskript-on-Debian-10-XFCE

Note that all the icons are present.

Console log follows:

user@debian10:~$ ./manuskript.gedakc/bin/manuskript 
Debug: Web rendering engine used: QTextEdit
Running manuskript version 0.9.0.
Note: No translator found or loaded from system locale for locale en_US.
Loading: /home/user/test-manuskript.msk
Detected file format version: 1. Zip: True.
Project /home/user/test-manuskript.msk loaded.
user@debian10:~$ 

gedakc avatar Sep 04 '19 23:09 gedakc

@gedakc

Yeah, I can. I'll have to reinstall first, though.

rcrx avatar Sep 07 '19 00:09 rcrx

>>> ~ $ /usr/bin/manuskript 
Debug: Web rendering engine used: QWebView
qt5ct: using qt5ct plugin
Running manuskript version 0.9.0.
Note: No translator found or loaded from system locale for locale en_US.
qt5ct: D-Bus global menu: no
inotify_add_watch("~/.config/qt5ct") failed: "No such file or directory"
>>> ~ $ apt list qt5*
Listing... Done
qt5-assistant/bionic 5.9.5-0ubuntu1 amd64
qt5-default/bionic-updates 5.9.5+dfsg-0ubuntu2.3 amd64
qt5-doc/bionic,bionic 5.9.5-0ubuntu1 all
qt5-doc-html/bionic,bionic 5.9.5-0ubuntu1 all
qt5-gtk-platformtheme/bionic-updates,now 5.9.5+dfsg-0ubuntu2.3 amd64 [installed]
qt5-image-formats-plugins/bionic 5.9.5-0ubuntu1 amd64
qt5-qmake/bionic-updates 5.9.5+dfsg-0ubuntu2.3 amd64
qt5-qmake-bin/bionic-updates 5.9.5+dfsg-0ubuntu2.3 amd64
qt5-qmltooling-plugins/bionic-updates 5.9.5-0ubuntu1.1 amd64
qt5-style-plugins/bionic,now 5.0.0+git23.g335dbec-2build5 amd64 [installed]
qt5ct/bionic,now 0.34-1build2 amd64 [installed]
qt5dxcb-plugin/bionic 1.1.8.4+ds-1build1 amd64
qt5keychain-dev/bionic 0.7.0-3 amd64
qt5qevercloud-dev/bionic 3.0.3+ds-3 amd64
qt5serialport-examples/bionic 5.9.5-0ubuntu1 amd64

rcrx avatar Sep 10 '19 18:09 rcrx

It seems that on all the desktops where this crash issue occurs, each one includes a console line similar to:

qt5ct: using qt5ct plugin

From the qt5ct website I read the following:

qt5ct: This program allows users to configure Qt5 settings (theme, font, icons, etc.) under DE/WM without Qt integration.

To me this means that the desktops that experience this problem with missing icons and crashes all lack Qt integration. Of note is that reports of this issue are consistently on Linux Mint.

In my testing of other GNU/Linux distros, such as Debian, Fedora, and Ubuntu, the issue with missing icons and crashes does not occur.

As another example I tested Xubuntu 18.04 which uses XFCE and Manuskript runs fine.
Screenshot follows:

Manuskript-Xubuntu-18 04-Icons-Shown

I suspect that someone with knowledge of Linux Mint and Qt integration is needed to troubleshoot and fix this problem.

gedakc avatar Sep 10 '19 19:09 gedakc

Workaround

Anyone experiencing this issue might consider installing a snap package of Manuskript, which was created thanks to @tomwardill with PR #511.

  1. Uninstall any prior Manuskript package. For example on Linux Mint:
    sudo apt purge manuskript
  2. Install snapd per the Basic snap usage tutorial. For example on Linux Mint:
    sudo apt install snapd
  3. Install Manuskript similar to method mentioned in above tutorial.
    For example on Linux Mint:
    sudo snap install --edge manuskript
  4. Run Manuskript. For example from a terminal window:
    manuskript

Following is a screen shot of the Manuskript 0.9.0 snap package running on Linux Mint 19 Cinnamon:

Manuskript-0 9 0-Snap-Pkg-on-LinuxMint-19-Cinnamon

gedakc avatar Sep 11 '19 17:09 gedakc

I may be mistaken, but I believe /snap/bin/ has to be added to $PATH (on Linux Mint).

echo 'export PATH="/snap/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

Edit: bear in mind the snap package only includes Fusion and Windows themes, and so does not resolve issues of inconsistent theming with gtk.

rcrx avatar Sep 11 '19 21:09 rcrx

The icons are loaded, they're just not alternating/contrasting for dark themes:

Manuskript (Mint-Y-Dark-Red)

Linux Mint 19.2, deb install (manuskript-0.10.0-1.deb).

OdinVex avatar Oct 26 '19 10:10 OdinVex

I have the same issue, but only when I'm running from source. If I run from source, I get dark mode, but the icons are all janky: image If I run from the installed .deb, icons look fine, but I'm stuck with white theme: image

lbenedetto avatar Jan 26 '22 21:01 lbenedetto