New .Desktop Files Not Working

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

New .Desktop Files Not Working

Post by GatoradeNMilk »

Hello,
I am not very technically proficient, been using Mint for about 4 months and loving it. I upgraded to 21.2 XFCE from 21.1 XFCE . I had to grant permissions to everything on my Desktop, not really a problem for me, I just gave em permissions 1 at a time. Steam only launches from the Star Menu, now, but everything else seems to work from the Desktop still. Not really a problem for me, right.

I now have the immensely annoying problem of not being able to properly add new .Desktop files. If I add a program, like Brave, to the Desktop, the file will not work at all. I have taken a screenshot of the difference between a working .desktop file, Firefox, and the "broken link" .Desktop file, Brave. I have tried searching here on the forums and on search engines abroad.

About the screenshot: how do I attach the screenshot? For a description for if that is not possible: firefox.desktop has a General, Emblems, Highlight, Permissions, and Launcher Tab; com.brave.Browser.desktop has a General, Emblems, Highlight, and Permissions Tab, but NO Launcher Tab. The Firefox one has "Kind: Desktop Configuration File," while Brave has "Kind: broken link"

It isn't JUST brave, it seems to be anything I try to "Add to Desktop" at all.

Where should I start on fixing this? Thank you guys for your help.
RIH
Level 9
Level 9
Posts: 2910
Joined: Sat Aug 22, 2015 3:47 am

Re: New .Desktop Files Not Working

Post by RIH »

About the screenshot: how do I attach the screenshot?
If it is less than 200KIB in size -
Attachment tab at bottom of reply box - Add files - Search your computer to add files.

If more than 200 KIB in size -
either:
use an Application like Pix to reduce the size
or:
Use a hosting website (like Imgur) to upload your picture & then copy & paste the provided URL into your reply..
Image
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

Thank you. Here is the screenshot of comparing the two .desktop files. If you need me to change themes for clarity, please let me know!
Attachments
desktop file comparison.jpg
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: New .Desktop Files Not Working

Post by AndyMH »

.desktop files are just text files following a defined format, you can open them with your text editor and see, an example:

Code: Select all

[Desktop Entry]
Version=1.0
Name=OpenHantek
Comment=Oscilloscope
GenericName=Oscilloscope
Exec=OpenHantek
Icon=oscilloscope.png
Terminal=false
Type=Application
Categories=System;Other;
StartupNotify=true
When you install an application, it puts its .desktop file in /usr/share/applications. When you boot mint reads that folder and parses the content into your mint menu.

What you see on the desktop are files in /home/tristan/Desktop. You can manually copy .desktop files from /usr/share/applications to /home/tristan/Desktop, but the simplest thing to do is right click on Brave in the mint menu and "add to desktop". This is present in cinnamon, assume also there in xfce.

It looks like you tried to copy the .desktop file, but instead created a link that was broken.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

I tried adding it to the Desktop by right-clicking and clicking on "Add to Desktop," and it does not work. Just provides those broken links. The apps work fine from the launcher, though.
mikeflan
Level 17
Level 17
Posts: 7162
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: New .Desktop Files Not Working

Post by mikeflan »

Can you find anything in /usr/share/applications that says Brave?
If so, hold down the Ctrl and Shift, click on that Brave file, and drag and drop it to the desktop. Then let go of Ctrl and Shift. Does that link work?
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

I can not find Brave Browser there, no. I am looking around to see where it would be stored.
mikeflan
Level 17
Level 17
Posts: 7162
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: New .Desktop Files Not Working

Post by mikeflan »

Also look in /home/tristan/.local/share/applications
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

Hmmm, after fiddling around, this seems to only effect new Flatpaks, not System Packages.
User avatar
spamegg
Level 14
Level 14
Posts: 5117
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: New .Desktop Files Not Working

Post by spamegg »

GatoradeNMilk wrote: Sun Dec 10, 2023 2:12 pm Hmmm, after fiddling around, this seems to only effect new Flatpaks, not System Packages.
Flatpak desktop integration is fairly weak right now, as it's still improving. Also Flathub has been having some weird issues recently.

Could you show us the actual contents of the .desktop text files? There might be some syntax errors in them, or they might be pointing to the wrong folders, or maybe there are permission issues.

Can you run those Flatpaks from the Terminal OK? Like:

Code: Select all

flatpak run com.brave.Browser
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

Okay, running them from the tray or the command prompt works fine, that has not been the issue. However, I can confirm that works! :D

Okay, so opening a different Flatpak, OpenMW, in a text editor shows that the new Flatpak Desktop links are empty. Here is Peazip, a new Flatpak I just installed to test this theory, vs OpenMW, one I installed back on Mint 21.1.

As for solutions: How would I find where Flatpaks are so I can just "Make" my own desktop files? Fill the missing information in?
Attachments
desktop file content comparison 2.jpg
desktop file content comparison 1.png
GatoradeNMilk
Level 1
Level 1
Posts: 7
Joined: Tue Nov 07, 2023 9:53 pm

Re: New .Desktop Files Not Working

Post by GatoradeNMilk »

I don't know what has changed. I have googled "How to Create a Launcher, Linux Mint" and got nothing. The option was missing from my right-click/context menu. Just now, it appeared. So, my problem is solved. Thank you all for your help!
Post Reply

Return to “Xfce”