Permission error in using xdg-open when opening file with registered extension

762 Views Asked by At

I have been trying to perform File Association on Ubuntu 20.04 using WSL2.

  1. I have my mime Type specification file at /usr/share/mime/packages/application-x-demo.xml. This is the content of apllication-x-demo.xml.

    enter image description here

  2. I have my .desktop file at /usr/share/applications/StartupLinux.desktop. This is the content of my StartupLinux.desktop:

    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Terminal=true
    MimeType=application/x-demo
    Name=StartupLinux
    Exec=/home/<user>/MyWorkspace/StartupLinux.sh
    
  3. If I run the command:

    gio info myFile.axsd | grep "standard::content-type"
    

    ... I get the that my extension is successfully registered with the mime. Command output:

    standard::content-type: application/x-demo
    
  4. If I run the command:

    gio mime application/x-demo
    

    ... I get that my application is the default application for the mime type. Command output:

    enter image description here

The Problem: If I try to open my file using xdg-open, I'm getting a permission error:

/usr/bin/xdg-open: 800: : Permission denied

I have tried the these links, but did not find any working solution:

0

There are 0 best solutions below