How To Specify Default Applications For File Types: Business Office I - Ascendance Line

Numerous apps vie to opened upward your PDF files past times default - evince, xpdf, Adobe Reader, Okular, etc. If you lot don't similar the default every bit dictated past times your desktop environment, you lot tin modify it.

The full general stance is that default applications for file types, or 'file association', is governed past times a fix of configuration files. Having said that, I wishing an universal method existed to modify file association that is independent of the Linux distribution, the desktop environment, the file manager, in addition to the application. In reality, the desktop environs may pick out to translate the same configuration file inwards dissimilar ways, or utilisation dissimilar files altogether. Below is the full general physical care for that has served me well.

xdg-mime

If you lot are comfortable amongst command-line, in addition to then I'd recommend that you lot utilisation the xdg-mime tool first.

Before nosotros modify the default application for opening a PDF document, let's rank the electrical flow default application.

 $ xdg-mime inquiry default application/pdf  evince.desktop 

The inwards a higher house ascendency requires that you lot know the post explains how to uncovering the MIME type of files.

If evince is non the default plan you lot want, you lot tin modify it to enjoin xpdf every bit follows.

 $ xdg-mime default xpdf.desktop application/pdf 

The minute declaration - xpdf.desktop - specifies the default application inwards the course of pedagogy of its desktop filename. Every application must convey a desktop file containing configuration data inwards lodge to live on registered into the desktop environment's bill of fare system. The global desktop file must be inwards the /usr/share/applications directory. Local desktop files must be inwards the /.local/share/applications directory for private users.

Before you lot run xdg-mime, you lot must brand certain that:

  1. The desktop file preexists inwards the right directory for your application.
  2. You render the right desktop file advert every bit an declaration to xdg-mime.
 $ ls -l /usr/share/applications/*xpdf*.desktop -rw-r--r-- 1 beginning root 181 Mar  four 10:13 /usr/share/applications/xpdf.desktop 

The xdg-mime ascendency inserts 1 business into the [Default Applications] department of the local configuration file for file association ( /.local/share/applications/mimeapps.list).

 application/pdf=xpdf.desktop 

To verify that xpdf is forthwith indeed the default application:

  1. Open a PDF file using the command.
     $ xdg-open somefile.pdf 
  2. Double click a PDF file from within your favourite file manager.

With my Debian wheezy organisation running GNOME 3, xpdf forthwith opens PDF files past times default from both the command-line in addition to the Nautilus file manager.

If you lot are non comfortable amongst the command-line or xpdf does non opened upward the PDF file past times default from your file manager, the remedy is to configure the default application using your file manager. That volition live on the topic of utilisation two of this series.

Berlangganan update artikel terbaru via email:

0 Response to "How To Specify Default Applications For File Types: Business Office I - Ascendance Line"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel