gcmd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-usr] set default viewer to eog and default text ed to gedit


From: Michael
Subject: Re: [gcmd-usr] set default viewer to eog and default text ed to gedit
Date: Wed, 1 Feb 2017 19:48:33 +0100

Bonnie,

> also in my mime aps list there are duplicated lines one terminated by a 
> semi-colon ; 

All lines should be terminated like this. And you can safely remove duplicates.

> application/x-extension-xhtml=firefox.desktop
> application/x-extension-xhtml=firefox.desktop;

Probably something went wrong here, and the two lines were identified as 
different because of the ; (like if they did a "sort -u").

Just delete the first line.

> https://gcmd.github.io/doc.html#mime

A little outdatet too.... for example, to my best konwledge, the default.list 
file is no more used.

Just edit one the mimeaps.* files (if there are both) and as i said, it's even 
possible to make one a symbolic link to the other, as they don't really differ 
in syntax and content.


A short note on the system. As you can see, the mimeapps files refer to desktop 
files (like firefox.desktop) which then contain information about the target 
program, like execution path, execution environment, name and description in 
multiple languages ... there is no limit as to howh much information can be 
given, and it's freely configurable. The only thing that really must be given 
is the executaion path.

Also, the name of the desktop file can be freely chosen. There are "rules of 
good naiming practice" like if you create a cutsom file yourself, name it 
"firefox-usercreated" or "firefox-custom" or even "firefox-bonniespecial", you 
can also name it "my-webbrowser". It does not matter, as long as you use the 
specific name in the mimeapps list. However, if you want it to work together 
with your desktop manegers mime handler (like in Gnome oder KDE) you should 
respect their rules.

It is safe to do experiments. As gcmd seems to read the file every time a file 
is opened, you can do do tests editing the file just on-the-fly.


By the way, you can of course give an execution path to a little script which 
then launches the application, maybe conditionally. For example, you can 
analyze an URL that was clicked and then decide which browser to use; you could 
open PDF directly in a PDF viewer (which can open URLs) or download compressed 
archives and ISO files directly in the background with wget. Like that.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]