MATE menu shenanigans

So I’ve got lots of stupid entries in my main menu in MATE — lots of things that seem to have been added by wine or something. And I’ve tried mozo/alacarte to get rid of them and they did not work.

The wine-related .desktop files live in the directories within…


Now, the menu system looks for .desktop files and creates a menu entry for each one. So… so if I go in there and change the ‘.desktop‘ files to ‘.nodesktop‘, what happens?

Used a clunky script (I know, I know, going via a temporary file to construct the script is amateurish at best; well, it works). It just renames within the current directory — it does not work recursively; I don’t want to be that destructive!

echo "#Rename .desktop files to .nodesktop" > tempfile
for f in *.desktop
g=$(basename "$f" .desktop).nodesktop
echo mv \"$f\" \"$g\" >> tempfile
bash tempfile
rm tempfile

I don’t know enough to know why I had to write the mv command out to make it work, but when I just tried to run 'mv \"$f\" \"$g\"' from inside the script it did not work. This works and does remove the entries from my menu. I can then selectively put them back if I so desire.

Anyway, this does work for the MATE menu.

I’m sure there’s a better way. I don’t know why the menu editors don’t work.

But they don’t.

Tags: , , , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: