How can I open an AppImage with xdg-open through browser

Hello to everyone. For the last time, sorry for my english, i try to improve :smiley:
Today i want do for you a question a bit complicated.
I try to explain.
I have an application wich is an AppImage, Deezer. The flatpak format of that application don’t work proprely on my linux system, so i use AppImage of that. But unluckely there is a problem with it.
When i try to log in, in Chrome browser, on Dezzer online page, in the next step, chrome, try to open deezer application with xdg-open but don’t find it, because the application isn’t effectly intalled, but it’s only a AppImage. So i can’t do login in the application.
With some stratagem (installing befor and removing flatpak application after, and coping config folder) i had success.
But, my question is: there is some method to work xdg-open with a personalized application (how may to be an AppImage saved in a home folder)? In my case Deezer.
I don’t know if it is possibile, but i hope yes.

PS: reading onlie somethings, i believe to understand that i have to configure mimeapps.list in /.local/share/, but i haven’t understand a lot.

Thank you very much for any response.
I know it is a bit complicated, but i hope you can help me anyway.
Bye bye

There is an AUR package:
https://aur.archlinux.org/packages/deezer

Probably the easiest way.


Where is that AppImage from?
The official site doesn’t provide one.
Just saying - be careful.


… anyway:

AppImages are easy to integrate and run.

  • if it is some compressed archive - unpack it
  • give it exexute permissions (make executable, chmod ug+x AppImageName)
  • place the AppImage in ~/.local/bin

If that directory is in your $PATH (it should be by default),
you just type the name as with every other program.

There are tools to deal with AppImages (AppImage launcher is the name of one) - but I don’t know them or use them.


I just noticed:
~/.local/bin is not present by default

You would have to add that first.

I can give guidance if you want.

That wouldn’t be necessary when you use the AUR package instead of the AppImage.

1 Like

Thank you for response.
The AppImage is on the same page of flatpak version of program. It’s a fork from windows application. Sould be secure.
My problem was, not how to open a simply appimage, but how to open an appimage how default application trought browser.
Isn’t necessary, i have found alternative solution, but i would know if is possible.
From wath i understand i could modify the file mimeapps.list (or mimeapps.cache) with a command just like this: “x-scheme-handler/deezer=launcher-appimage-deezer.desktop;”
But don’t work

I assume you already made the application executable.

Then you need to create a desktop launcher for it - place the launcher in your ~/.local/share/applications.

Next assign the mimetype to the application

xdg-mime default <your-launcher.desktop> x-scheme-handler/<some-scheme>
2 Likes

Yes - but where?
Which page? :slightly_smiling_face:
I have lost my crystal ball. :grin:
I’d like to try - to see for myself and then perhaps be able to help.

Use the AUR package - that should give you no problems.

Sorry, you have right.
The page where i download appimage is this: Release v7.0.130 ¡ aunetx/deezer-linux ¡ GitHub

Thank you

EDIT: this, flatpak page: GitHub - aunetx/deezer-linux: An universal linux port of deezer, supporting Flatpak, Appimage, Snap, RPM, DEB...

I’ve tried, but seem don’t work :frowning:

My .desktop file is renamed in “alacarte-made.desktop” and is it: `

[Desktop Entry]
Name=Deezer AppImage
Exec=./Scaricati/deezer-desktop-7.0.120-x86_64.AppImage --disable-systray
Comment=
Terminal=false
Icon=/home/myname/Immagini/dev.aunetx.deezer.svg
Type=Application

So i have launched: “xdg-mime default alacarte-made.desktop x-scheme-handler/deezer”
Naturally the appimage is executable

What is wrong?

probably this:

Is the path correct? With the dot in front? Give it the full path?


I just downloaded the AppImage - works.
But I can’t test any further because I do not have an account and can’t log in to get prompted to use the app instead of the browser version.

place your appimage in the folder ~/.local/bin or provide full qualified path

/home/$USER/path/to/app-image

E.g. if you have a folder ~/Apps with deezer.appimage the path would be

Exec=/home/$USER/Apps/deezer.appimage

Example

 $ tree ~/Apps
/home/nix/Apps
└── deezer.appimage
 $ tree ~/.local/share/applications
/home/nix/.local/share/applications
├── deezer.desktop
├── mimeapps.list
└── mimeinfo.cache
 $ cat ~/.local/share/applications/deezer.desktop 
[Desktop Entry]
Categories=Multimedia
Comment=Deezer Music
Exec=/home/nix/Apps/deezer.appimage %u
Icon=applications-multimedia-symbolic
MimeType=deezer
Name=Deezer
Type=Application
Version=1.0
xdg-mime default deezer.desktop x-scheme-handler/deezer
Summary

1 Like

Thanks a lot for your help, but it doesn’t want to work
A strange thing that I noticed is that when I modify the deezer.desktop file and add the string “Mimetype=deezer” the icon of the launcher of Gnome mysteriously disappears :thinking:

Maybe the previous installation of flatpak version have modified something?
I don’t understand…
Seem all correct now

[Desktop Entry]
Categories=
Comment=Deezer
Exec=/home/fabiano/Scaricati/deezer-desktop-7.0.120-x86_64.AppImage %u --disable-systray
Icon=/home/fabiano/Immagini/dev.aunetx.deezer.svg
MimeType=deezer
Name=Deezer
Type=Application
Version=1.0
NoDisplay=false
Terminal=false

This is the deezer.desktop file. When this is the case, the icon in gnome panel disappear. When i comment the MimeType=deezer line, magicaly it appear

this is the content of the .desktop file that you'll get when you install the AUR version of the software

cat /usr/share/applications/deezer.desktop

[Desktop Entry]
Name=Deezer
StartupNotify=true
Icon=deezer
Comment=Deezer audio streaming service
StartupNotify=true
Exec=/usr/bin/deezer %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/deezer;
StartupWMClass=deezer
Categories=Audio;Music;Player;AudioVideo;
Keywords=Music;Player;Streaming;Online;
StartupWMClass=Deezer
X-GNOME-UsesNotifications=true

It works, of course, but as already said, I can’t test your use case because I do not have a deezer account and won’t get to choose to open using the app …


there is no such mime type


Use the AUR:
yay -S deezer
(or use pamac)
and be done with it :man_shrugging:

Thank you very much, really.
Under your advice i’ve tried to install deezer from AUR, with the console.
It work finally.
Using the graphic interface for install deezer AUR, don’t install it.
For this reason i don’t have installed before AUR package.

Now all seem work fine. thanks againg to everyone who helped me.

I made it work with the steps provided above - so I know it work - it you cannot make it work - then you deviated somewhere; perhaps your mime association has a conflicting entry; or your previous attempts has left some garbage; I have no idea.

You could try Gear Lever - Lorenzo Paderi which supposedly “installs” AppImages, creates desktop files, and might even update them.

However, I’m not fully satisfied and it might not work as you wish.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.