How can I set default application for unknown file on xdg-open / mimeopen?Set default xdg-open application to...
What causes burn marks on the air handler in the attic?
Levenshtein Neighbours
When does The Truman Show take place?
Check disk usage of files returned with spaces
Nicely-spaced multiple choice options
Why did St. Jerome use "virago" in Gen. 2:23?
Do living authors still get paid royalties for their old work?
Linear and Integer programming materials
Unsolved Problems due to Lack of Computational Power
Meaning and structure of headline "Hair it is: A List of ..."
Gofer work in exchange for Letter of Recommendation
Can I submit a paper computer science conference using an alias if using my real name can cause legal trouble in my original country
What security risks does exposing the size of the plaintext entail?
Postdoc interview - somewhat positive reply but no news?
What does a comma signify in inorganic chemistry?
Are there reliable, formulaic ways to form chords on the guitar?
The Lucky House
Why is the name Bergson pronounced like Berksonne?
Combinatorial Argument for Exponential and Logarithmic Function Being Inverse
How could Tony Stark wield the Infinity Nano Gauntlet - at all?
Build a mob of suspiciously happy lenny faces ( ͡° ͜ʖ ͡°)
From France west coast to Portugal via ship?
Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?
Vegetarian dishes on Russian trains (European part)
How can I set default application for unknown file on xdg-open / mimeopen?
Set default xdg-open application to terminal programHow does filetype determination by filename extension in addition to XDG spec (mimeapps.list) workWhy does xdg-open use Firefox rather than the default app according to xdg-mime?XDG resolves filename as text/plainHow can I run a .desktop file?Arch linux + I3 + URXVT: ROFI opens nano editor in bash instead of URXVTCannot set default application for xdg-open
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications.
$ xdg-mime query filetype jquery.js
application/javascript
$ xdg-mime query default application/javascript # no output
$ xdg-open jquery.js
Error: no "view" mailcap rules found for type "application/javascript"
Opening "/tmp/jquery.js" with VLC media player (application/javascript)
On some files, it launches Calibre's E-book viewer (.rb for example).
EDIT I digged into xdg-open and found it executes following commands:
- Check filetype with
xdg-mime query filename "$file"andxdg-mime query default $filetype
run-mailcap --action=view "$file"mimeopen -L -n "$file"
The problem lies in mimeopen.
Then how can I change mimeopen to open any unknown files with featherpad, or specific app? In other words, I'd like to set default fallback application if mimeopen can not find any suitable apps.
desktop-environment vlc mime-types xdg-open user-default
add a comment |
On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications.
$ xdg-mime query filetype jquery.js
application/javascript
$ xdg-mime query default application/javascript # no output
$ xdg-open jquery.js
Error: no "view" mailcap rules found for type "application/javascript"
Opening "/tmp/jquery.js" with VLC media player (application/javascript)
On some files, it launches Calibre's E-book viewer (.rb for example).
EDIT I digged into xdg-open and found it executes following commands:
- Check filetype with
xdg-mime query filename "$file"andxdg-mime query default $filetype
run-mailcap --action=view "$file"mimeopen -L -n "$file"
The problem lies in mimeopen.
Then how can I change mimeopen to open any unknown files with featherpad, or specific app? In other words, I'd like to set default fallback application if mimeopen can not find any suitable apps.
desktop-environment vlc mime-types xdg-open user-default
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output ofecho $XDG_CURRENT_DESKTOPandecho $DESKTOP_SESSIONmight help. 2.1) It looks like it's runningrun-mailcapand thenmimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).
– fra-san
Nov 10 '18 at 12:34
Thanks! I digged into/usr/bin/xdg-openand confirmed that it executesmimeopen -L -n "$file". Now I'm checkingmimeopento find reasons why VLC is associated to these files.
– rad164
Nov 15 '18 at 4:14
If yourxdg-openis not executingopen_lxde()you may want to try setting the environment variableXDG_CURRENT_DESKTOP=LXDE. This wayxdg-openshould try to callpcmanfminstead ofmimeopenand, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.
– fra-san
Nov 15 '18 at 9:22
I'm using Lubuntu 18.10 and its DE is now LxQT. And inxdg-open,open_lxqtis just an alias ofopen_generic. I'll update my question based on our comments.
– rad164
Nov 15 '18 at 12:29
add a comment |
On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications.
$ xdg-mime query filetype jquery.js
application/javascript
$ xdg-mime query default application/javascript # no output
$ xdg-open jquery.js
Error: no "view" mailcap rules found for type "application/javascript"
Opening "/tmp/jquery.js" with VLC media player (application/javascript)
On some files, it launches Calibre's E-book viewer (.rb for example).
EDIT I digged into xdg-open and found it executes following commands:
- Check filetype with
xdg-mime query filename "$file"andxdg-mime query default $filetype
run-mailcap --action=view "$file"mimeopen -L -n "$file"
The problem lies in mimeopen.
Then how can I change mimeopen to open any unknown files with featherpad, or specific app? In other words, I'd like to set default fallback application if mimeopen can not find any suitable apps.
desktop-environment vlc mime-types xdg-open user-default
On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications.
$ xdg-mime query filetype jquery.js
application/javascript
$ xdg-mime query default application/javascript # no output
$ xdg-open jquery.js
Error: no "view" mailcap rules found for type "application/javascript"
Opening "/tmp/jquery.js" with VLC media player (application/javascript)
On some files, it launches Calibre's E-book viewer (.rb for example).
EDIT I digged into xdg-open and found it executes following commands:
- Check filetype with
xdg-mime query filename "$file"andxdg-mime query default $filetype
run-mailcap --action=view "$file"mimeopen -L -n "$file"
The problem lies in mimeopen.
Then how can I change mimeopen to open any unknown files with featherpad, or specific app? In other words, I'd like to set default fallback application if mimeopen can not find any suitable apps.
desktop-environment vlc mime-types xdg-open user-default
desktop-environment vlc mime-types xdg-open user-default
edited 2 days ago
rad164
asked Nov 6 '18 at 8:25
rad164rad164
535 bronze badges
535 bronze badges
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output ofecho $XDG_CURRENT_DESKTOPandecho $DESKTOP_SESSIONmight help. 2.1) It looks like it's runningrun-mailcapand thenmimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).
– fra-san
Nov 10 '18 at 12:34
Thanks! I digged into/usr/bin/xdg-openand confirmed that it executesmimeopen -L -n "$file". Now I'm checkingmimeopento find reasons why VLC is associated to these files.
– rad164
Nov 15 '18 at 4:14
If yourxdg-openis not executingopen_lxde()you may want to try setting the environment variableXDG_CURRENT_DESKTOP=LXDE. This wayxdg-openshould try to callpcmanfminstead ofmimeopenand, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.
– fra-san
Nov 15 '18 at 9:22
I'm using Lubuntu 18.10 and its DE is now LxQT. And inxdg-open,open_lxqtis just an alias ofopen_generic. I'll update my question based on our comments.
– rad164
Nov 15 '18 at 12:29
add a comment |
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output ofecho $XDG_CURRENT_DESKTOPandecho $DESKTOP_SESSIONmight help. 2.1) It looks like it's runningrun-mailcapand thenmimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).
– fra-san
Nov 10 '18 at 12:34
Thanks! I digged into/usr/bin/xdg-openand confirmed that it executesmimeopen -L -n "$file". Now I'm checkingmimeopento find reasons why VLC is associated to these files.
– rad164
Nov 15 '18 at 4:14
If yourxdg-openis not executingopen_lxde()you may want to try setting the environment variableXDG_CURRENT_DESKTOP=LXDE. This wayxdg-openshould try to callpcmanfminstead ofmimeopenand, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.
– fra-san
Nov 15 '18 at 9:22
I'm using Lubuntu 18.10 and its DE is now LxQT. And inxdg-open,open_lxqtis just an alias ofopen_generic. I'll update my question based on our comments.
– rad164
Nov 15 '18 at 12:29
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at
/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output of echo $XDG_CURRENT_DESKTOP and echo $DESKTOP_SESSION might help. 2.1) It looks like it's running run-mailcap and then mimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).– fra-san
Nov 10 '18 at 12:34
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at
/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output of echo $XDG_CURRENT_DESKTOP and echo $DESKTOP_SESSION might help. 2.1) It looks like it's running run-mailcap and then mimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).– fra-san
Nov 10 '18 at 12:34
Thanks! I digged into
/usr/bin/xdg-open and confirmed that it executes mimeopen -L -n "$file". Now I'm checking mimeopen to find reasons why VLC is associated to these files.– rad164
Nov 15 '18 at 4:14
Thanks! I digged into
/usr/bin/xdg-open and confirmed that it executes mimeopen -L -n "$file". Now I'm checking mimeopen to find reasons why VLC is associated to these files.– rad164
Nov 15 '18 at 4:14
If your
xdg-open is not executing open_lxde() you may want to try setting the environment variable XDG_CURRENT_DESKTOP=LXDE. This way xdg-open should try to call pcmanfm instead of mimeopen and, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.– fra-san
Nov 15 '18 at 9:22
If your
xdg-open is not executing open_lxde() you may want to try setting the environment variable XDG_CURRENT_DESKTOP=LXDE. This way xdg-open should try to call pcmanfm instead of mimeopen and, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.– fra-san
Nov 15 '18 at 9:22
I'm using Lubuntu 18.10 and its DE is now LxQT. And in
xdg-open, open_lxqt is just an alias of open_generic. I'll update my question based on our comments.– rad164
Nov 15 '18 at 12:29
I'm using Lubuntu 18.10 and its DE is now LxQT. And in
xdg-open, open_lxqt is just an alias of open_generic. I'll update my question based on our comments.– rad164
Nov 15 '18 at 12:29
add a comment |
2 Answers
2
active
oldest
votes
From man xdg-mime there is an option: xdg-mime default application mimetype(s) to set default applications. You can use
xdg-mime default featherpad.desktop application/javascript
to make featherpad.desktop as default editor for opening files like application/javascript.
Alternatively you can find a file under /usr/share/applications/ directory like default.list depends upon file manager in my case it is gnome-mimeapps.list (I am having gnome DE and nautilus FM). You can edit this file to launch default applications.
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
add a comment |
mimeopen treats unknown files as text/plain or application/octet-stream.
To set default application, run mimeopen with -d option. Since I could not find option to specify mimetype, you need to create dummy files at first.
touch text.txt # for text/plain
mimeopen -d text.txt # and choose your favorite app
echo -e \0 > data.dat # for application/octet-stream
mimeopen -d -M data.dat
or edit "~/.config/mimeapps.list".
[Default Applications]
text/plain=featherpad.desktop;
application/octet-stream=firefox.desktop;
mimeopen, which is shiped with File-MimeInfo, tries to find applications with parent mimytypes. For example, if the filetype starts with "text/", it has "text/plain" as parent. And all filetype inherits "application/octet-stream".
On mimeopen in my environment, the most "suitable" app for octet-stream is VLC Player and for text/plain, it is Calibre's E-book Viewer. That's why some files are opened with these apps.
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that usingecho -e \0 > filename.txt
– Jonas Berlin
2 days ago
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480059%2fhow-can-i-set-default-application-for-unknown-file-on-xdg-open-mimeopen%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
From man xdg-mime there is an option: xdg-mime default application mimetype(s) to set default applications. You can use
xdg-mime default featherpad.desktop application/javascript
to make featherpad.desktop as default editor for opening files like application/javascript.
Alternatively you can find a file under /usr/share/applications/ directory like default.list depends upon file manager in my case it is gnome-mimeapps.list (I am having gnome DE and nautilus FM). You can edit this file to launch default applications.
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
add a comment |
From man xdg-mime there is an option: xdg-mime default application mimetype(s) to set default applications. You can use
xdg-mime default featherpad.desktop application/javascript
to make featherpad.desktop as default editor for opening files like application/javascript.
Alternatively you can find a file under /usr/share/applications/ directory like default.list depends upon file manager in my case it is gnome-mimeapps.list (I am having gnome DE and nautilus FM). You can edit this file to launch default applications.
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
add a comment |
From man xdg-mime there is an option: xdg-mime default application mimetype(s) to set default applications. You can use
xdg-mime default featherpad.desktop application/javascript
to make featherpad.desktop as default editor for opening files like application/javascript.
Alternatively you can find a file under /usr/share/applications/ directory like default.list depends upon file manager in my case it is gnome-mimeapps.list (I am having gnome DE and nautilus FM). You can edit this file to launch default applications.
From man xdg-mime there is an option: xdg-mime default application mimetype(s) to set default applications. You can use
xdg-mime default featherpad.desktop application/javascript
to make featherpad.desktop as default editor for opening files like application/javascript.
Alternatively you can find a file under /usr/share/applications/ directory like default.list depends upon file manager in my case it is gnome-mimeapps.list (I am having gnome DE and nautilus FM). You can edit this file to launch default applications.
edited Nov 6 '18 at 11:26
answered Nov 6 '18 at 8:49
Prvt_YadvPrvt_Yadv
3,7913 gold badges17 silver badges34 bronze badges
3,7913 gold badges17 silver badges34 bronze badges
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
add a comment |
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
I'm afraid but I'd like to change behavior about all unknown files, not only about javascript...
– rad164
Nov 6 '18 at 11:01
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
@rad164 see updated answer.
– Prvt_Yadv
Nov 6 '18 at 11:16
add a comment |
mimeopen treats unknown files as text/plain or application/octet-stream.
To set default application, run mimeopen with -d option. Since I could not find option to specify mimetype, you need to create dummy files at first.
touch text.txt # for text/plain
mimeopen -d text.txt # and choose your favorite app
echo -e \0 > data.dat # for application/octet-stream
mimeopen -d -M data.dat
or edit "~/.config/mimeapps.list".
[Default Applications]
text/plain=featherpad.desktop;
application/octet-stream=firefox.desktop;
mimeopen, which is shiped with File-MimeInfo, tries to find applications with parent mimytypes. For example, if the filetype starts with "text/", it has "text/plain" as parent. And all filetype inherits "application/octet-stream".
On mimeopen in my environment, the most "suitable" app for octet-stream is VLC Player and for text/plain, it is Calibre's E-book Viewer. That's why some files are opened with these apps.
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that usingecho -e \0 > filename.txt
– Jonas Berlin
2 days ago
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
add a comment |
mimeopen treats unknown files as text/plain or application/octet-stream.
To set default application, run mimeopen with -d option. Since I could not find option to specify mimetype, you need to create dummy files at first.
touch text.txt # for text/plain
mimeopen -d text.txt # and choose your favorite app
echo -e \0 > data.dat # for application/octet-stream
mimeopen -d -M data.dat
or edit "~/.config/mimeapps.list".
[Default Applications]
text/plain=featherpad.desktop;
application/octet-stream=firefox.desktop;
mimeopen, which is shiped with File-MimeInfo, tries to find applications with parent mimytypes. For example, if the filetype starts with "text/", it has "text/plain" as parent. And all filetype inherits "application/octet-stream".
On mimeopen in my environment, the most "suitable" app for octet-stream is VLC Player and for text/plain, it is Calibre's E-book Viewer. That's why some files are opened with these apps.
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that usingecho -e \0 > filename.txt
– Jonas Berlin
2 days ago
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
add a comment |
mimeopen treats unknown files as text/plain or application/octet-stream.
To set default application, run mimeopen with -d option. Since I could not find option to specify mimetype, you need to create dummy files at first.
touch text.txt # for text/plain
mimeopen -d text.txt # and choose your favorite app
echo -e \0 > data.dat # for application/octet-stream
mimeopen -d -M data.dat
or edit "~/.config/mimeapps.list".
[Default Applications]
text/plain=featherpad.desktop;
application/octet-stream=firefox.desktop;
mimeopen, which is shiped with File-MimeInfo, tries to find applications with parent mimytypes. For example, if the filetype starts with "text/", it has "text/plain" as parent. And all filetype inherits "application/octet-stream".
On mimeopen in my environment, the most "suitable" app for octet-stream is VLC Player and for text/plain, it is Calibre's E-book Viewer. That's why some files are opened with these apps.
mimeopen treats unknown files as text/plain or application/octet-stream.
To set default application, run mimeopen with -d option. Since I could not find option to specify mimetype, you need to create dummy files at first.
touch text.txt # for text/plain
mimeopen -d text.txt # and choose your favorite app
echo -e \0 > data.dat # for application/octet-stream
mimeopen -d -M data.dat
or edit "~/.config/mimeapps.list".
[Default Applications]
text/plain=featherpad.desktop;
application/octet-stream=firefox.desktop;
mimeopen, which is shiped with File-MimeInfo, tries to find applications with parent mimytypes. For example, if the filetype starts with "text/", it has "text/plain" as parent. And all filetype inherits "application/octet-stream".
On mimeopen in my environment, the most "suitable" app for octet-stream is VLC Player and for text/plain, it is Calibre's E-book Viewer. That's why some files are opened with these apps.
edited 2 days ago
answered 2 days ago
rad164rad164
535 bronze badges
535 bronze badges
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that usingecho -e \0 > filename.txt
– Jonas Berlin
2 days ago
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
add a comment |
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that usingecho -e \0 > filename.txt
– Jonas Berlin
2 days ago
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that using
echo -e \0 > filename.txt– Jonas Berlin
2 days ago
It seems to detect empty files as text/plain. Wouldn't it be better to set the default for application/octet-stream if that is the root of all mimetypes? At least I was able to get a file detected like that using
echo -e \0 > filename.txt– Jonas Berlin
2 days ago
1
1
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
@JonasBerlin I added it to my answer, thanks!
– rad164
2 days ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480059%2fhow-can-i-set-default-application-for-unknown-file-on-xdg-open-mimeopen%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1) It looks like it's not a problem of MIME-type/application association. As you say, MIME types are recognized and a default application for them is not set. 2) Looking at
/usr/bin/xdg-open: it looks like it's unable to detect your desktop environment. Knowing the output ofecho $XDG_CURRENT_DESKTOPandecho $DESKTOP_SESSIONmight help. 2.1) It looks like it's runningrun-mailcapand thenmimeopen, (in a way that won't show you an application chooser), instead of running the file manager (pcmanfm, right?).– fra-san
Nov 10 '18 at 12:34
Thanks! I digged into
/usr/bin/xdg-openand confirmed that it executesmimeopen -L -n "$file". Now I'm checkingmimeopento find reasons why VLC is associated to these files.– rad164
Nov 15 '18 at 4:14
If your
xdg-openis not executingopen_lxde()you may want to try setting the environment variableXDG_CURRENT_DESKTOP=LXDE. This wayxdg-openshould try to callpcmanfminstead ofmimeopenand, if you are lucky (I'm not on LXDE, cannot test reliably), the file manager could ask you how to open files that have no explicit application association set.– fra-san
Nov 15 '18 at 9:22
I'm using Lubuntu 18.10 and its DE is now LxQT. And in
xdg-open,open_lxqtis just an alias ofopen_generic. I'll update my question based on our comments.– rad164
Nov 15 '18 at 12:29