Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-08-21 00:39:24

Mireg
Member
Registered: 2023-08-21
Posts: 5

Matlab icon in Window Buttons panel widget not respecting icon theme

Hello, I've installed Matlab R2023a recently. The issue is basically the title. I am using Papirus-Dark icon theme. Here is the list of things I've noticed/done so far to make it clearer:
- the Matlab icon is the only icon not respecting the icon theme in the Window Buttons widget, instead, it shows the default Matlab icon
- I've had to create matlab.desktop file by hand, maybe I've missed something
- Matlab is showing in Whisker Menu correctly, with the proper Papirus icon

Contents of the matlab.desktop file:

[Desktop Entry]
Version=1.0
Type=Application
Name=MATLAB
Comment=MATLAB R2023a
Icon=matlab
Exec=/usr/local/MATLAB/R2023a/bin/matlab -desktop -prefersoftwareopengl
Terminal=false
Categories=Development;Math;Science;Education

I am on Fedora 38 Xfce spin, Xfce version is 4.18

Last edited by Mireg (2023-08-21 02:26:02)

Offline

#2 2023-08-21 17:30:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,985

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

Hello and welcome.

Its difficult to test a proprietary solution on my system, but does adding a "StartupWMClass" entry in the desktop file help:

StartupWMClass=matlab

If not, can you post back the output of xprop (and clicking on the matlab window when the cursor changes to a cross)?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-08-21 19:26:57

Mireg
Member
Registered: 2023-08-21
Posts: 5

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

I've added the StartupWMClass at the end of the desktop file like this and it doesn't work unfortunately (I've logged out and back):

[Desktop Entry]
Version=1.0
Type=Application
Name=MATLAB
Comment=MATLAB R2023a
Icon=matlab
Exec=/usr/local/MATLAB/R2023a/bin/matlab -desktop -prefersoftwareopengl
Terminal=false
Categories=Development;Math;Science;Education
StartupWMClass=matlab

The output of xprop when clicked the icon:

_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_STICK
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x4a4e7a00
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_FOCUSED
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		window id # of group leader: 0x1000001
_GTK_THEME_VARIANT(UTF8_STRING) = "dark"
XdndAware(ATOM) = BITMAP
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 1919
_NET_WM_OPAQUE_REGION(CARDINAL) = 
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
WM_WINDOW_ROLE(STRING) = "Panel"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 16777221, 16777222
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1000004
WM_CLIENT_LEADER(WINDOW): window id # 0x1000001
_NET_WM_PID(CARDINAL) = 17898
WM_LOCALE_NAME(STRING) = "en_US.utf8"
WM_CLIENT_MACHINE(STRING) = "fedora"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		program specified minimum size: 1920 by 49
		program specified maximum size: 1920 by 49
		program specified base size: 0 by 0
		window gravity: Static
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "xfce4-panel", "Xfce4-panel"
WM_ICON_NAME(STRING) = "xfce4-panel"
_NET_WM_ICON_NAME(UTF8_STRING) = "xfce4-panel"
WM_NAME(STRING) = "xfce4-panel"
_NET_WM_NAME(UTF8_STRING) = "xfce4-panel"

Edit: Sorry, I've misread your instructions and clicked on the Window Button instead. Here is the xprop output when clicked Matlab window (in terminal the icons are shown as colored blocks, representing the default matlab icon):

_NET_WM_ICON_GEOMETRY(CARDINAL) = 248, 1152, 48, 48
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x4a4e7a00
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_STICK
_NET_WM_DESKTOP(CARDINAL) = 3
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x1, 0x0, 0x0
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x2f, 0x0, 0xe0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
XdndAware(ATOM) = BITMAP
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
		Initial state is Normal State.
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 24, 0
_NET_WM_ICON(CARDINAL) = 	Icon (32 x 32):
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████
	████████████████████████████████████████████████████████████████

	Icon (16 x 16):
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████
	████████████████████████████████


_NET_WM_PID(CARDINAL) = 18784
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "MATLAB R2023a - academic use"
WM_CLIENT_LEADER(WINDOW): window id # 0x4e0002e
_NET_WM_ICON_NAME(UTF8_STRING) = "MATLAB R2023a - academic use"
_NET_WM_NAME(UTF8_STRING) = "MATLAB R2023a - academic use"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified location: 0, 0
		program specified location: 0, 0
		program specified size: 1920 by 1131
		window gravity: NorthWest

Last edited by Mireg (2023-08-21 19:33:40)

Offline

#4 2023-08-22 00:02:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,985

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

I can't test this to see if it works, but here are some suggestions:

  1. Does the matlab executable accept the "class" parameter? If so, try running matlab like this:

    matlab --class "MATLAB R2023a - academic use"
  2. In the papirus theme, in every directory where there is a matlab icon file:

    find /usr/share/icons/Papirus-Dark -name matlab.* -print

    ...create a similar-sized version of the new icon with the name "MATLAB R2023a - academic use". Then run:

    sudo gtk-update-icon-cache -f /usr/share/icons/Papirus-Dark
  3. Consider using the xfce4-docklike-plugin instead as it bases its icons on the one defined in the .desktop files (window buttons uses libwnck).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-08-22 02:35:31

Mireg
Member
Registered: 2023-08-21
Posts: 5

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

No, it does not accept any --class parameter unfortunately.
After executing it with -h argument, I found this option among many, idk what it means (most likely nothing):

-display Xdisplay       - Send X commands to X server display, Xdisplay.
                              Linux only.

Honestly, Matlab on Linux feels "not good". I am glad I've managed to install it like a normal person and not have to make it's folders in /bin/local/ manually before executing it's install script like half a year ago. I am not even able to sign in in the application, but that fortunately doesn't matter. Seems like the Linux version of the app is not MathWorks's priority big_smile

I don't want to bother you with this piece of proprietary **** anymore. Thank you for letting me know about the xfce4-docklike-plugin. If I hate something, then it is inconsistency on my desktop, so I will definitely check it out.

Last edited by Mireg (2023-08-22 02:42:23)

Offline

#6 2023-08-22 02:39:29

Mireg
Member
Registered: 2023-08-21
Posts: 5

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

I've just noticed the kitty's (the terminal emulator) icon doesn't use the Papirus icon either. Strange. Never mind, I will try the xfce4-docklike-plugin.

Offline

#7 2024-02-25 16:51:57

Mireg
Member
Registered: 2023-08-21
Posts: 5

Re: Matlab icon in Window Buttons panel widget not respecting icon theme

Hi again,
I recently remembered I've used XFCE for some time some time ago. I've moved to other DEs since then. I still use Matlab and I noticed that when I turn it on either via clicking the icon in whichever menu or via "matlab" command in terminal, it first launches some thing that seems to then start Matlab itself. The "launcher" thing indeed has the icon specified in the .desktop file, but it closes shortly after activation. Then actuall Matlab window appears and it has the default Matlab icon, so it is probably hardcoded. Behaved like this in every DE I've tried out since then. Indeed a strange piece of software. I just wanted to let know everyone who may stumble over this thread.

Offline

Board footer

Powered by FluxBB