Login
You're viewing the mstdn.social public feed.
  • Jun 28, 2026, 12:51 AM

    @mcc i think you can wire up your application to create a desktop file pointing to its own executable, wherever that is

    most 'portable' applications i've seen do this or just not bother at all with desktop files

    💬 1🔄 0⭐ 2

Replies

  • Jun 28, 2026, 12:55 AM

    @whitequark Imagine I have a Linux application in a directory. The entry point is a shell script named "artist_linux". If you run this from a command line, it runs the application. If you double click this in GNOME, it opens in gedit.

    Is there any way at all for me to helpfully engage with the Linux GUI (gnome, qt) short of changing my packaging strategy (eg, creating a Flatpak or Appimage)?

    Screenshot of a directory
    💬 4🔄 0⭐ 2
  • Jun 28, 2026, 12:56 AM

    @mcc assuming you're distributing this as a tar file and file mode gets preserved: if you replace the shell script with an executable int main() { system("./bin/artist_linux"); } it will definitely not get opened in gedit heh

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 0⭐ 0
  • Jun 28, 2026, 1:02 AM

    @whitequark but it presents as an executable, right? so if double clicked it would presumably run (no idea if it would have, for example, an icon)

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 1⭐ 6
  • 💬 0🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Jun 28, 2026, 12:59 AM

    @dotstdy @whitequark if the user cannot figure out how to launch the application, then writing a desktop file on first launch will not be helpful.

    additionally, it is unclear to me what a .desktop file would do if i had one. when i tried creating a .desktop file, I could not figure out how to interact with it. would you expect double clicking a .desktop file to open the application? For me it opened in a program named "Main Menu" created by a group named LibreMenuEditor.

    💬 3🔄 1⭐ 2
  • Jun 28, 2026, 1:01 AM

    @dotstdy @whitequark (Another oddity I'm just noticing; if you are looking at an application in the GNOME "Software" application, such as "Main Menu", there does not appear to be a way to share a link to that pane in GNOME software, such as would allow me to say, in a mastodon post, "this" and link to the "Main Menu" application to distinguish it from the other program in GNOME software named "Main Menu".)

    💬 0🔄 1⭐ 1
  • Jun 28, 2026, 1:01 AM

    @mcc @whitequark desktop file just adds an entry in the start menu, you still need to have some way to create it in the first place anyway, which means clicking on something executable.

    💬 1🔄 0⭐ 0
  • Jun 28, 2026, 1:02 AM

    @dotstdy it appears to mean "clicking on an ELF executable", since double clicking on a +x shell script does nothing

    💬 1🔄 0⭐ 0
  • Jun 28, 2026, 1:05 AM

    @mcc that depends on your desktop environment. (so yes, a regular elf binary is a good way to make it more likely to work without complexity)

    kde prompt for executable shell file
    💬 1🔄 1⭐ 1
  • Jun 28, 2026, 2:33 AM

    @dotstdy @mcc Yes this is a Nautilus problem. They're trying to be more secure by banning direct shell script execution, but in practice this is inconvenient for some use cases, especially if you're used to a Windows style way of distributing programs.

    Dolphin and some other file managers don't have this problem.

    Probably best to do an ELF executable. It is an oversight that ELF defines no embedded icon though.

    💬 0🔄 0⭐ 2
  • 💬 0🔄 1⭐ 2
  • Jun 28, 2026, 2:51 AM
    @mcc I understand that this is frustrating for you and it is needlessly hard. But I feel that on a system scale it is a net benefit that "if you grab a random package from the web it's kinda annoying to use". It encourage things to go through the proper channels and prevent the system from devolving into a mess over time with every program writing stuff into random places.

    In fact this can be seen with system managed config/state files vs home config/state files. home is a wild west and it's pretty much impossible to reliably cleanup or backup.
    💬 1🔄 0⭐ 0
  • Jun 28, 2026, 3:33 AM

    @shironeko but there are no proper channels. Or at least none that are consistent cross distribution. Unless I (1) make a container and (2) assume Ubuntu users will know what to do with a flatpak

    💬 1🔄 0⭐ 1
  • Jun 28, 2026, 11:03 AM
    @mcc cross distribution distribution channel is an oxymoron, although it would make for a good T-shirt. You are basically asking there to be only one distro.
    💬 1🔄 0⭐ 0
  • Jun 28, 2026, 3:15 PM

    @shironeko I don't need there to be only one distro; I just need there to be one fewer (Ubuntu).

    💬 0🔄 0⭐ 0
  • Jun 28, 2026, 8:33 PM

    @mcc @whitequark add installation instructions to the top of the script file so if someone opens it in gedit they will know what to do?

    #!/usr/bin/env bash
    echo "xfce: right click, open with, open with other application, use a custom command, browse, bash, open, open"

    Doesn't seem sketchy at all.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0