Tag Info

Hot answers tagged

12

Because those applications that place configuration files in $HOME are ignoring the XDG Base Directory Specification, notably: There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME... If $XDG_CONFIG_HOME is either not set or empty, a ...


11

You can use perl-file-mimeinfo in the extra repository to manage mimetypes. Example to open all .pdf files in apvlv: /usr/bin/vendor_perl/mimeopen -d $file.pdf and then, at the prompt, enter the application: apvlv.


9

It indicates that chromium may be passed a list of URLs on its command line. See the Exec key of the Desktop Entry Specification for a description of the available codes and what they mean.


8

Have a look at the file $HOME/.local/share/applications/defaults.list There is a section [Default Applications] to specify the programs for particular mime types. You can add for example: application/x-debian-package=gdebi.desktop The .desktop files can be found in /usr/share/applications/ or you can create your own files under ...


7

I think you've jumped the gun a bit — while many people may agree Wayland has a better design for the modern era (though some still disagree even on that), the implementation is not yet finished, and it doesn't yet do everything needed to overtake X, nor are the applications and toolkits ready for it. This fall Wayland is expected to declare its API stable ...


6

Using the tool wmctrl you can get all the above information, specifically the -d switch. Example $ wmctrl -d 0 * DG: 5760x900 VP: 0,0 WA: 0,25 1440x826 Workspace 1 1 - DG: 5760x900 VP: 0,0 WA: 0,25 1440x826 2 - DG: 5760x900 VP: 0,0 WA: 0,25 1440x826 N/A 3 - DG: 5760x900 VP: 0,0 WA: 0,25 1440x826 N/A Details One line is output for each ...


6

Mine /etc/mime.types starts with: # This file maps Internet media types to unique file extension(s). It is # distributed in Arch Linux as the mime-types package, which is based on # Gentoo's app-misc/mime-types package. # # The table below contains both registered and (common) unregistered types. # A type that has no unique extension can be ignored -- they ...


6

Why not to use utilities from xdg itself? To make Thunar the default file-browser, i.e. the default application for opening folders. $ xdg-mime default Thunar.desktop inode/directory to use xpdf as the default PDF viewer: $ xdg-mime default xpdf.desktop application/pdf This should create an entry in your local MIME database: ...


5

The mimetype in question is: x-scheme-handler/ed2k I just tried it. I installed amule and created a file userapp-amule.desktop in ~/.local/share/applications: [Desktop Entry] Name=aMule Name[en_US]=userapp-amule Exec=amule %u Icon=amule Terminal=false Type=Application Categories=Network;P2P; Comment=A client for the eD2k network ...


5

To answer my own question: Ignacio's answer takes care of the large icon on the system menu, and the taskbar launcher if you add one. Changing the icon on the taskbar button/panel button took more digging. Uninstalling the 'native' Firefox from LMDE (sudo apt-get remove firefox) and installing the tar.gz from http://getfirefox.com still left me with the ...


5

A complement to jasonwryan's great answer, addressing some of your issues: Your $XDG_CONFIG_HOME is not set to ~/. It simply isn't set. So applications that follow the XDG Speciifcation use the default ~/.config The dirs inside /.config are not hidden because they don't have to. The whole point of using a ~/.config dir is to un-clutter the user's $HOME. ...


4

Usually this information is handled in 2 places: Application .desktop files advertise what program can open MIME database which specifies what application should be used to open file with specific MIME The MIME database can be customized by editing .local/share/applications/mimeapps.list and .local/share/applications/mimeinfo.cache. The tool which allows ...


3

The Linux kernel generates a code each time a key is pressed on a keyboard. That code is compared to a table of keycodes defining a figure that is then displayed. This process is complicated by Xorg, which starts its own table of keycodes. Each keycode can belong to a keysym. A keysym is like a function, started by typing a key. Xmodmap allows you to edit ...


3

Note: My information may be out of date. I know there already are a lot of Wayland libs in Ubuntu. Wayland is still relatively new and it's a long way from well tested and complete. Several distributions are migrating towards Wayland and we will most likely see Wayland based distributions next year. X has been used for decades and there are a lot of old ...


3

The type detection information isn't actually embedded in the file program, the file program just reads the magic file and then searches the signatures in that file to see what matches. The magic file exists both as a compiled version, magic.mgc, and as the original source that is human readable and is just called magic. On my Fedora based systems these can ...


3

Use the xdg-mime command. xdg-mime default application mimetype Ask the desktop environment to make application the default application for opening files of type mimetype. An application can be made the default for several file types by specifying multiple mimetype s. The above is taken from man xdg-mime, slightly modified to copy the ...


2

glibc doesn't know anything about MIME types; the API functions live at the level of desktop environment APIs, and the freedesktop.org recognize that harmonizing them is an impossible task so they only specify the shell-level interface. You either use that via popen() or code for a particular desktop environment.


2

I don't believe there's a C API for querying mime-types in the same way that xdg-mime works. xdg-mime is just a shell script that queries your desktop environment (Gnome, KDE, or other), and runs the appropriate command to get the MIME type from that DE's internal configuration. You could replicate the behaviour of the shell script, or just call the shell ...


2

if you just want to associate them directly, and not make them default, you can add them to /usr/share/applications/mimeinfo.cache (system-wide), or ~/.local/share/applications/mimeinfo.cache (per-user). edit: using xdg-mime, as geekosaur suggests, might perhaps be more robust. In this case, you would want xdg-mime install [--mode mode] ...


2

Well I don't know if the sourcecode for the file command is human readable. But if you would like to find out why your mp4 is recognised as a iso I would start to read the sourcecode. http://packages.debian.org/experimental/file http://ftp.de.debian.org/debian/pool/main/f/file/file_5.04.orig.tar.gz


2

In GNOME 3, Nautilus no longer manages the DESKTOP. In other words, there is no DESKTOP hence XDG_DESKTOP_DIR is meaningless to Nautilus. You'll have to re-enable the DESKTOP in order to have it among other Nautilus bookmarks in the side pane, either through Gnome-tweak-tool: Have file manager handle the desktop [ON] or, in terminal: gsettings set ...


2

If using xdg-open to open applications, then use xdg-mime to set the default application for a given mime type (typically, installing xdg-utils gives you the xdg-mime and related programs). For example, to see the "filetype" (mime-type, if you will) of given file: $ xdg-mime query filetype tmp.txt text/plain $ xdg-mime query filetype foo.pdf ...


1

You can find out what's going on behind the scenes of an application by using the tool strace. Simply invoke the tool in question like so: $ strace <app> Be warned there will be a lot of output generated by this tool so you'll likely want to dump it to a file. $ strace -o <logfile> <app> Example First collect the log. $ strace -o ...


1

Those environment variables are all optional. If they are not set then your script must substitute the default values given in the specification itself. someprog --cachedir "${XDG_CACHE_HOME:-$HOME/.cache}"


1

xdg-mime is part of a collection of scripts called xdg-utils, "a set of common interfaces for desktop environments (DE)". In your particular case, I'll just quote MestreLion's comment from here: If you dont have any desktop enviroment, you should not use xdg-mime *(or any other xdg tool). xdg is meant to provide interoperability* between different ...


1

Your icon theme (whatever you're using) is probably inheriting another theme which is inheriting another theme etc...until it finds all the icons. Look in your theme's index.theme file and see what icon theme it inherits. Look there for the battery icon. If you dont find it there, look at what theme that inherits..etc. You'll probably find the icon after ...


1

The man page for polkitd says: ... Users or administrators should never need to start this daemon as it will be automatically started by dbus-daemon(1) ... Therefore polkitd will be restarted when dbus service is restarted. Since this service interacts with the desktop manager it is safer to log out of the desktop session, stop xdm service, restart ...


1

I think I find the answer. On my system "xdg-mime query filetype ..." uses"file" command to get the file type, while on ubuntu it uses "gnomevfs". It seems the "file" command does not check xml entries of shared-mime-info, but looks into the file "/user/share/file/magic" to get the file MIME type. If I use "file" command on Ubuntu, it can not tell me the ...



Only top voted, non community-wiki answers of a minimum length are eligible