bugGNU Octave - Bugs: bug #53102, Octave should set Wayland...


bug #53102: Octave should set Wayland Application ID

Submitted by:  None
Submitted on:  Fri 09 Feb 2018 01:46:39 AM UTC  
Category:  GUI Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Andrius ┼átikonas Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.1
Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Wed 28 Mar 2018 09:47:44 PM UTC, comment #9:

I pushed a change on the stable branch to take care of this


The window class and associated desktop file are set correctly for me (in a GNOME Wayland desktop session) when running Octave both as a X11 client and as a Wayland client.

This will be part of the upcoming Octave 4.4 release.

Mike Miller <mtmiller>
Project Administrator
Sat 10 Feb 2018 01:22:12 AM UTC, comment #8:

I looked into the Qt function and the Wayland Application ID protocol and I agree Octave should set this whenever possible.

It's convenient that GNOME is able to associate an arbitrary WM_CLASS property with a desktop entry using the StartupWMClass property, but unfortunately it seems KDE is not able to do so. Either way, I think this is a robust change to make.

I'll make sure this is done and that the desktop file name agrees with the application ID. I'll probably also add some calls to setApplicationName, setApplicationVersion, setOrganizationDomain, setOrganizationName, etc.

Mike Miller <mtmiller>
Project Administrator
Fri 09 Feb 2018 09:55:43 PM UTC, comment #7:

Non Qt applications can still set application icon.

It is taken from desktop file, Icon= parameter.

And non-qt applications can still change window class. I just gave an example. Well, often application and desktop file have exactly the same name, so there is no problem. E.g. evice has desktop file named evince.desktop. And I think each toolkit has some API to set window class. At the very least there is wayland C api to do that.

Fri 09 Feb 2018 09:48:12 PM UTC, comment #6:

This seems like a very glaring error on the part of the Plasma Wayland session. This means that any application that is not Qt based has no way to set an application icon? Do emacs and rxvt and xterm exhibit the same problem? If not, why not? Can someone else using KDE Plasma on Wayland verify this?

Mike Miller <mtmiller>
Project Administrator
Fri 09 Feb 2018 09:23:28 PM UTC, comment #5:

No, it doesn't help. But from what I've seen in the kwin ant qtwayland code, it shouldn't have helped.

Unfortunately, GNOME Wayland currently fails to start on my laptop, so I can't test there.

By the way, here is the original blog post of KWin maintainer explaining situation a little bit

I've seen quite a few other examples of Qt applications with window apps. And following suggestion in that blog and calling QGuiApplication::setDesktopFileName works. I fixed quite a few apps myself.

setDesktopFileName is only available in Qt 5.7.0, is if you want to support older Qt, you should add some #if macros.

Fri 09 Feb 2018 09:11:37 PM UTC, comment #4:

Yeah, you're probably right. But running with or without QT_QPA_PLATFORM=wayland I get a correct application icon under GNOME. The window decorations appear differently so I assume it is using different platform backends each time, but the icon is always correct.

Does modifying the desktop file to launch the octave-gui executable directly change anything for you, if the Exec name matches exactly to the window class name? We had seen similar behavior in GNOME before, and adding StartupWMClass=octave-gui to the desktop descriptor resolved that.

Mike Miller <mtmiller>
Project Administrator
Fri 09 Feb 2018 08:45:01 PM UTC, comment #3:

By the way, are you sure you are running Octave as Wayland client.

I suspect what happens is that Gnome just doesn't care about anything that's non gtk, so they don't set


and you are actually running Octave as XWayland client.

Fri 09 Feb 2018 08:26:37 PM UTC, comment #2:

Well, I can't see any Window icon or when I click Alt+Tab. But I use Plasma Wayland, not Gnome.

My desktop file has StartupWMClass=octave-gui

I wonder why is there a difference between Gnome and Plasma. I thought icon is always set by Qt Wayland QPA according to this wm class but isn't Qt Wayland QPA still used for Octave on Gnome Wayland.

Maybe GNOME Wayland has some other mechanism for setting window icon.

Fri 09 Feb 2018 08:16:30 PM UTC, comment #1:

I see the Octave icon in a GNOME Wayland session. Where does the icon not show for you, in the application menu, in the Alt+Tab switcher, in the application launcher itself?

Does your desktop file contain "StartupWMClass=octave-gui"?

Btw, I plan to fix the desktop name to be org.octave.Octave.desktop for the next release.

Mike Miller <mtmiller>
Project Administrator
Fri 09 Feb 2018 01:46:39 AM UTC, original submission:

Octave window under Wayland shows generic Wayland icon.

Octave desktop file is named http://www.octave.org-octave.desktop
But Qt Wayland QPA looks for octave-gui.desktop and since there is mismatch it does not find any.

Please set the correct path to your desktop file using

By the way, your desktop file name also doesn't match recommendation by freedesktop.org (i.e. reverse dns) but oh well, at least make it consistent with where windows icon is looked at.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-28 mtmiller StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2018-02-10 mtmiller Severity3 - Normal => 1 - Wish
        StatusNeed Info => Confirmed
        SummaryNo Icon under Wayland => Octave should set Wayland Application ID
    2018-02-09 mtmiller StatusWorks For Me => Need Info
    2018-02-09 mtmiller StatusNone => Works For Me

    Back to the top

    Powered by Savane 3.3