Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this .
clofresh
Citizen
Posts: 87 Joined: Sun Jul 26, 2009 4:21 pm
Contact:
Post
by clofresh » Sat Apr 25, 2015 3:08 pm
Hi, I'm on arch linux running awesomewm without a desktop environment and have installed the love package, but I can't seem to get xdg-open to open .love files. This is what I tried:
Code: Select all
$ pacman -Q love
love 0.9.2-1
$ cat /usr/share/mime/packages/love.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-love-game">
<comment>LÖVE game</comment>
<glob pattern="*.love"/>
</mime-type>
</mime-info>
$ sudo update-mime-database /usr/share/mime
$ cat /usr/share/applications/love.desktop
[Desktop Entry]
Name=LÖVE
Comment=The unquestionably awesome 2D game engine
MimeType=application/x-love-game;
Exec=/usr/bin/love %f
Type=Application
Categories=Development;Game;
Terminal=false
Icon=love
NoDisplay=true
$ xdg-mime default love.desktop application/x-love-game
$ xdg-open Eyebrella.love
xdg-open: no method available for opening 'Eyebrella.love'
Any suggestions?
Last edited by
clofresh on Sun Apr 26, 2015 12:31 am, edited 1 time in total.
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sat Apr 25, 2015 3:20 pm
What does the following command say?
clofresh
Citizen
Posts: 87 Joined: Sun Jul 26, 2009 4:21 pm
Contact:
Post
by clofresh » Sat Apr 25, 2015 6:17 pm
Hmm interesting, it sees it as a zip. Wonder how it's getting that
Code: Select all
$ xdg-mime query filetype Eyebrella.love
application/zip
s-ol
Party member
Posts: 1077 Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:
Post
by s-ol » Sat Apr 25, 2015 6:40 pm
clofresh wrote: Hmm interesting, it sees it as a zip. Wonder how it's getting that
Code: Select all
$ xdg-mime query filetype Eyebrella.love
application/zip
well, it
is a zip, but the pattern matching should/could match it to löve before the file-inspection works.
bartbes
Sex machine
Posts: 4946 Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:
Post
by bartbes » Sat Apr 25, 2015 8:09 pm
Interesting, it seems if xdg-mime can't detect a DE, it falls back to 'file', which uses its own filetype database. The gnome-open command does work for me (I run awesome on arch too).
You can verify this happens by running:
Code: Select all
bash -x xdg-mime query filetype Eyebrella.love
clofresh
Citizen
Posts: 87 Joined: Sun Jul 26, 2009 4:21 pm
Contact:
Post
by clofresh » Sun Apr 26, 2015 12:27 am
Ah didn't know it was just a bash script. This makes it work:
Code: Select all
alias xdg-open='DE=gnome xdg-open'
xdg-open Eyebrella.love
Rucikir
Party member
Posts: 129 Joined: Tue Nov 05, 2013 6:33 pm
Post
by Rucikir » Wed Jun 14, 2017 12:43 pm
Hi !
This is a bit necroposting, but I had the exact same issue.
Another solution is to install a
xdg-open alternative like
perl-file-mimeinfo .
Most importantly, xdg-utils apps will actually call mimetype instead of file for MIME type detection, if it does not detect your desktop environment . This is important because file does not follow the XDG standard.
.
Users browsing this forum: Ahrefs [Bot] and 4 guests