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

Empty Menu when a .desktop file contains NUL byte #78

Open
saladpanda opened this issue May 14, 2020 · 0 comments
Open

Empty Menu when a .desktop file contains NUL byte #78

saladpanda opened this issue May 14, 2020 · 0 comments

Comments

@saladpanda
Copy link

I recently installed Ubuntu Mate 20.04 which uses "Advanced MATE Menu" 20.04.1.
Somehow a .desktop file with a NUL byte ended up in my ~/.local/share/applications which lead to the mate menu showing no applications at all.

Hexdump of the bad desktop file:

hexdump -C masterpdf.desktop 
00000000  23 21 2f 75 73 72 2f 62  69 6e 2f 65 6e 76 20 78  |#!/usr/bin/env x|
00000010  64 67 2d 6f 70 65 6e 0a  5b 44 65 73 6b 74 6f 70  |dg-open.[Desktop|
00000020  20 45 6e 74 72 79 5d 0a  54 79 70 65 3d 41 70 70  | Entry].Type=App|
00000030  6c 69 63 61 74 69 6f 6e  0a 4e 61 6d 65 3d 4d 61  |lication.Name=Ma|
00000040  73 74 65 72 20 50 44 46  20 45 64 69 74 6f 72 0a  |ster PDF Editor.|
00000050  45 78 65 63 3d 6d 61 73  74 65 72 70 64 66 65 64  |Exec=masterpdfed|
00000060  69 74 6f 72 0a 00                                 |itor..|
00000066

Removing the last byte from this file or replacing it with a space made all applications reappear.

I think a single faulty .desktop file should not make all other applications disappear but only the one faulty entry at best. I don't even know whether a NUL byte in a .desktop file counts as faulty as e.g. the brisk menu even shows the masterpdf.desktop entry without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant