Results 1 to 6 of 6

Thread: Double-clicking on shell-script or .Desktop file no longer works?

  1. #1
    Join Date
    Nov 2004
    Beans
    90

    Double-clicking on shell-script or .Desktop file no longer works?

    I am trying to write a simple wrapper around FreeRDP, so that a user can launch this when double-clicking on it within Ubuntu (GNOME).

    However, double-clicking on either a Bash shell script, or .desktop file no longer seems to work in Ubuntu.

    Is this intended behaviour?

    (There's a discussion of this https://askubuntu.com/questions/1184...-desktop-files - apparently it broke in Ubuntu 19.10, and hasn't been fixed since?)

    Is there any way to get it working, or some way to run a command in a script file, by double-clicking on it within Ubuntu?

  2. #2
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Double-clicking on shell-script or .Desktop file no longer works?

    Is this intended behaviour?
    If it is anything to do with Gnome then it is most definitely intentional by the Gnome developers. I have one application icon on my desktop and when I upgraded from 18.04 to 20.04 it lost the ability to launch the application until I did a right click and selected Allow Launching. Can you not do the same?

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  3. #3
    Join Date
    May 2010
    Beans
    3,246

    Re: Double-clicking on shell-script or .Desktop file no longer works?

    If you put the file in
    Code:
    /usr/share/applications
    You should be able to launch it from the ALT+F2 dialogue / search for it just like an application

  4. #4
    Join Date
    Jun 2014
    Beans
    7,377

    Re: Double-clicking on shell-script or .Desktop file no longer works?

    This is deliberate by the Gnome developers. See the link below for a detailed explanation.

    https://www.omgubuntu.co.uk/2018/01/...s-removed-3-28

    1 methods of doing this are explained at the link below.

    https://linuxconfig.org/how-to-creat...al-fossa-linux

    Another option is to install the following extension;
    Code:
     ]sudo apt install gnome-shell-extension-desktop-icons
    I used the last option which worked as advertised.

  5. #5
    Join Date
    Jun 2014
    Beans
    7,377

    Re: Double-clicking on shell-script or .Desktop file no longer works?

    This is deliberate by the Gnome developers. See the link below for a detailed explanation.

    https://www.omgubuntu.co.uk/2018/01/...s-removed-3-28

    1 methods of doing this are explained at the link below.

    https://linuxconfig.org/how-to-creat...al-fossa-linux

    Another option is to install the following extension;
    Code:
     ]sudo apt install gnome-shell-extension-desktop-icons
    I used the last option which worked as advertised.

    You should be able to launch it from the ALT+F2 dialogue / search for it just like an application
    First thing I tried, didn't work but I can't remember exactly the error.

  6. #6
    Join Date
    Aug 2013
    Beans
    4,941

    Re: Double-clicking on shell-script or .Desktop file no longer works?

    Quote Originally Posted by victorhooi View Post
    I am trying to write a simple wrapper around FreeRDP, so that a user can launch this when double-clicking on it within Ubuntu (GNOME).

    However, double-clicking on either a Bash shell script, or .desktop file no longer seems to work in Ubuntu.

    Is this intended behaviour?

    (There's a discussion of this https://askubuntu.com/questions/1184...-desktop-files - apparently it broke in Ubuntu 19.10, and hasn't been fixed since?)

    Is there any way to get it working, or some way to run a command in a script file, by double-clicking on it within Ubuntu?
    Double click script works here (if you set preferences in nautilus and of course set file to executable) but .desktop files don't. Ubuntu 20.04. One alternative is to use nemo as your file manager. Install nemo and run this in the terminal
    Code:
    xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
    To reverse, go to ~/.config/mimeapps.list and remove this line in the [Default Applications] section.
    Code:
    inode/directory=nemo.desktop
    If you find that nemo doesn't refresh itself as I have in one of my laptops, add this line to /etc/sysctl.conf and reboot
    Code:
    fs.inotify.max_user_watches=524288

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •