Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Debian uses the freedesktop mime specs. You can also change things using update-alternatives. Browsers are a pain because most set themselves as the default when they get installed.
What is "xdg-open" and does it have something to do with this?
man xdg-open gives this:
Quote:
xdg-open(1) - Linux man page
Name
xdg-open - opens a file or URL in the user's preferred application
Synopsis
xdg-open {file URL}
xdg-open {--help --manual --version}
Description
xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.
xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root.
So it does have something to do with your default (preferred) application. It's used on the command line.
Cheers,
jdk
xdg-open
So it opens an URL with the user's "default browser".
If you are not running a DE, then AFAIK you have to specify the required application every time.
Description: desktop integration utilities from freedesktop.org
xdg-utils contains utilities for integrating applications with the
desktop environment, regardless of which desktop environment is used.
They are part of freedesktop.org's Portland project.
.
The following utilities are included:
.
* xdg-desktop-menu - Install desktop menu items
* xdg-desktop-icon - Install icons on the user's desktop
* xdg-icon-resource - Install icon resources
* xdg-mime - Gather MIME information about a file
* xdg-open - Open a URL in the user's preferred application that
handles the respective URL or file type
* xdg-email - Open the user's preferred email client, potentially with
subject and other info filled in
* xdg-screensaver - Enable, disable, or suspend the screensaver
* xdg-settings - get various settings (default web browser) from
the desktop environment
Homepage: http://portland.freedesktop.org/
From the man page:
Quote:
Examples
Get the desktop file name of the current default web browser
xdg-settings get default-web-browser
Check whether the default web browser is firefox.desktop, which can be false
even if "get default-web-browser" says that is the current value (if only some
of the underlying settings actually reflect that value)
That was nice. I would still like to know how exactly to see and modyfy the association for every MIME type, etc. but I'll try to search for that later.
It was also a good chance to try out the "Add Reputation" feature!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.