I m trying to launch my application using xdg-open myFile.axsd
.
This is my StartupLinux.desktop file:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
MimeType=application/x-demo
Name=StartupLinux
Exec=/home/<user>/MyWorkspace/StartupLinux %f
This is my application-x-demo.xml file
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-demo">
<comment>new mime type</comment>
<glob pattern="*.axsd"/>
</mime-type>
</mime-info>
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:
Default application for “application/x-demo”: StartupLinux.desktop
Registered applications:
StartupLinux.desktop
Recommended applications:
StartupLinux.desktop
The problem is, If I run the command:
gio info myFile.axsd | grep "standard::content-type"
Command output:
standard::content-type: text/plain
The expected output was application/x-demo
but I m getting it as text/plain
, and a default text editor opens up instead of my app.
I have followed this link for the file association.
Note: StartupLinux is a Gui Application
Any help here?