Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Xorg icon appearing in the title bar in KDE (possibly in other desktop environments as well) #390

Closed
n3thshan opened this issue Jan 5, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@n3thshan
Copy link

n3thshan commented Jan 5, 2025

CLICK TO SEE WORKAROUND FOR KDE!!!

Description

The following screenshot best describes the issue:
Screenshot_20250105_221848-1

A fix for this is suggested here and that is to set "copy-icon": true in the flatpak manifest.

Obsidian Version

Obsidian - Markdown-based knowledge base

          ID: md.obsidian.Obsidian
         Ref: app/md.obsidian.Obsidian/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 1.7.7
     License: LicenseRef-proprietary=https://obsidian.md/eula
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 642.0 MB
     Runtime: org.freedesktop.Platform/x86_64/24.08
         Sdk: org.freedesktop.Sdk/x86_64/24.08

      Commit: a6bd00645adfd3265b60d65f392e235c7fd743f3d2fb138c31d4a7d4abe9606e
      Parent: 158b7a266a474af5e636a9cb00996c1e562f3c37832378b7af1b07a2e513e9f7
     Subject: Update pandoc module (f23c648d)
        Date: 2024-12-23 20:49:24 +0000

Sandbox Permissions

[Context]
shared=network;ipc;
sockets=x11;pulseaudio;ssh-auth;
devices=dri;
filesystems=/mnt;xdg-config/gtk-4.0:ro;xdg-run/app/com.discordapp.Discord:create;~/.icons:ro;xdg-run/gnupg:ro;/run/media;home;/media;xdg-config/gtk-3.0:ro;~/.local/share/fonts:ro;
persistent=~/.ssh;

[Environment]
SSH_ASKPASS=/app/libexec/openssh/ssh-askpass
OBSIDIAN_ENABLE_AUTOSCROLL=0
PATH=/usr/bin:/app/bin:/app/texlive/bin:/app/texlive/bin/x86_64-linux:/app/texlive/bin/aarch64-linux
OBSIDIAN_DISABLE_GPU=0
QT_QPA_PLATFORMTHEME=kde
GH_PATH=gh
OBSIDIAN_CLEAN_CACHE=1
XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons:~/.icons

Hardware Information

lspci -nn | grep -E 'VGA|Display'
00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08)

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Arc(tm) Graphics (MTL) (0x7d55)
    Version: 24.2.8
    Accelerated: yes
    Video memory: 7669MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Arc(tm) Graphics (MTL)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.8
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.8
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.2.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

System Information

No response

Logs

No response

@n3thshan n3thshan added the bug Something isn't working label Jan 5, 2025
@joshua-stone
Copy link
Collaborator

@n3thshan Please give more information about your distro and KDE version.

According to the flatpak-builder documentation, copy-icon is set alongside rename-icon:

https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html

rename-icon (string)
    Any icon with this name will be renamed to a name based on id during the cleanup phase. Note that this is the icon name, not the full filename, so it should not include a filename extension. 
..
copy-icon (boolean)
    If rename-icon is set, keep a copy of the old icon file.

https://github.com/search?q=org%3Aflathub%20copy-icon&type=code

Obsidian isn't using rename-icon, so adding that parameter doesn't appear to alter the build:

#392

I recommend trying this workaround instead:

flathub/com.spotify.Client#68 (comment)

@n3thshan
Copy link
Author

n3thshan commented Jan 8, 2025

thanks for ur input. none of them worked however but upon more research the following workaround works for KDE:

Start obsidian -> right click title bar -> select configure special application settings -> Add property -> scroll down to desktop filename and add it -> type md.obsidian.Obsidian instead of 'obsidian' for the desktop filename

@joshua-stone
Copy link
Collaborator

@n3thshan Can you share the full path of the desktop file and the desktop file's contents? For example,

$ find /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/ -name '*.desktop' | while read INFILE; do echo "File: $INFILE"; cat $INFILE; done
File: /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/export/share/applications/md.obsidian.Obsidian.desktop
[Desktop Entry]
Name=Obsidian
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=obsidian.sh --file-forwarding md.obsidian.Obsidian @@u %U @@
Terminal=false
Type=Application
Icon=md.obsidian.Obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;
X-Flatpak-Tags=proprietary;
X-Flatpak=md.obsidian.Obsidian
File: /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/files/share/applications/md.obsidian.Obsidian.desktop
[Desktop Entry]
Name=Obsidian
Exec=obsidian.sh %U
Terminal=false
Type=Application
Icon=md.obsidian.Obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

@n3thshan
Copy link
Author

n3thshan commented Jan 9, 2025

here you go:

File: /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/export/share/applications/md.obsidian.Obsidian.desktop
File: /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/export/share/applications/md.obsidian.Obsidian.desktop
[Desktop Entry]
Name=Obsidian
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=obsidian.sh --file-forwarding md.obsidian.Obsidian @@u %U @@
Terminal=false
Type=Application
Icon=md.obsidian.Obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;
X-Flatpak-Tags=proprietary;
X-Flatpak=md.obsidian.Obsidian
File: /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/files/share/applications/md.obsidian.Obsidian.desktop
[Desktop Entry]
Name=Obsidian
Exec=obsidian.sh %U
Terminal=false
Type=Application
Icon=md.obsidian.Obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

@joshua-stone
Copy link
Collaborator

@n3thshan Sorry, I meant the newly-generated desktop file that you created in KDE.

@n3thshan
Copy link
Author

n3thshan commented Jan 9, 2025

@n3thshan Sorry, I meant the newly-generated desktop file that you created in KDE.

oh no no. i didnt create any new desktop file. this is just a window rule that identifies the window and applies the proper name to the app so that it properly displays the icon.

image

@joshua-stone
Copy link
Collaborator

@n3thshan I'm not sure how to fix this in a cross-desktop way within the constraints of the Freedesktop desktop entry spec. Even an attempt to explicitly set the StartupWMClass property doesn't do anything:

#393

Seems like KDE users will have to employ a workaround as this a semi-regular issue:

#348
#265

I've also confirmed that the AppImage is affected:

Screenshot from 2025-01-09 13-16-39

Here is the rule I was able to set up:

cat ~/.config/kwinrulesrc
[General]
count=1
rules=e89a99d0-a726-4e5a-ac41-e7a88d3c770f
 
[e89a99d0-a726-4e5a-ac41-e7a88d3c770f]
Description=Application settings for obsidian
clientmachine=localhost
desktopfile=md.obsidian.Obsidian
desktopfilerule=3
wmclass=obsidian
wmclassmatch=1

Screenshot from 2025-01-09 12-47-55

I think it would be better to file an issue with upstream KDE, because this doesn't seem to be solvable within flatpak.

@n3thshan
Copy link
Author

thanks for your time with regards to this issue! i will report it whenever i can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants