Questions tagged [xdg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Cleared cached thumbnailer?

I am trying to create a thumbnailer entry [Thumbnailer Entry] MimeType=application/x-wad64; Exec=my_command It looks like it is picked up correctly by Thunar. However, changing the command has no ...
0
votes
0answers
113 views

Portable way to set custom URL scheme handler for all users

I already know how to create a custom URL scheme and set its handler using xdg-utils: xdg-settings set default-url-scheme-handler name handler.desktop However, the command affects only the current ...
1
vote
0answers
60 views

How to set all youtube links to open in mpv

I would like to set my system to open all links is mpv as default ie. I click link to youtube video in IRC, mumble, discord, signal etc. it opens in mpv. I have read through xdg-open and xdg-mime but ...
0
votes
0answers
45 views

xdg-open opens my .desktop file in text viewer or editor instead of launching the executable I want

I tried to create a .desktop file to launch xfreerdp with certain command-line arguments, using https://wiki.archlinux.org/index.php/Desktop_entries as a quick reference. Its file name is something....
1
vote
0answers
48 views

xdg-scheme-handler doesn't open script with same terminal that launching it from a desktop menu does

I'm trying to set a x-scheme-handler URI for my python application. This application is launched via a shell script in /usr/bin. I've had a desktop file for a while, and it's worked fine, opening the ...
0
votes
0answers
12 views

Why is Chromium the default application for every MIME type?

I've configured a pretty standard Arch Linux desktop environment, and every file type I've tried so far (MP4, PDF, PNG, etc) opens in Chromium unless I configure some other program to open it. This ...
0
votes
0answers
62 views

How do I unset my default xdg browser?

I want to debug a program's behaviour when the user has no default web browser set, but I'm not sure how I'd return to this state after setting one. I know that I can set my default browser via xdg-...
0
votes
0answers
30 views

How to avoid clutter in file system (especially $HOME)

Question How to have a file system that does not clutter itself over time? Explanation Pacman manages to keep tidy the system well enough when you delete some application, but only at system level (...
1
vote
1answer
116 views

Where is the relevant .desktop file?

I can open a Python source file using xdg-open, e.g., $ xdg-open Documents/tmp/paramk.py Waiting for Emacs... $ what happens is that emacsclient is invoked and xdg-open returns when I close the Emacs'...
1
vote
0answers
82 views

Setting DISPLAY=:0 and XAUTHORITY=/home/pi/.Xauthority causes FFmpeg to run poorly

I've setup a webcam viewer that detects when a USB webcam is plugged in with a udev rule, then starts a systemd service that executes a script that starts an FFmpeg/FFplay webcam stream. I noticed ...
0
votes
0answers
17 views

Find a file in XDG directories

Today I was looking for all the mimeapps.list files in my system. Essentially one should test the following files: $XDG_CONFIG_HOME/mimeapps.list $XDG_CONFIG_DIRS/mimeapps.list $XDG_DATA_DIRS/...
0
votes
0answers
25 views

Why xdg-open can't load lib from LD_PRELOAD from .desktop?

I has /usr/share/applications/wfica.desktop, which contains: Exec=env LD_PRELOAD="/lib64/libcrypto.so.1.0.2o" /opt/Citrix/ICAClient/wfica -icaroot /opt/Citrix/ICAClient %f When I run that ...
0
votes
0answers
10 views

Make Nautilus recognize other trash folders

I have some Trash folder that follows XDG-Trash specification, i.e. each trashed item has corresponding .trashinfo file. I want that Nautilus should recognize coustom Trash folders and show it similar ...
2
votes
0answers
25 views

Is it possible to use unicode character within glob pattern in mime definition file?

I'm issuing the command xdg-mime install nv-custom.xml - using this file: <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/...
0
votes
1answer
170 views

How to set MIME priority for applications?

Image types (e.g. image/jpeg, image/png etc.) are widely supported by ImageMagick and Eye of GNOME, so the only way I see to set priority for EOG is to check it's supported formats in .desktop and ...
3
votes
0answers
169 views

Debian Buster XFCE: make PCManFM default, including for Open a Directory, as in Chromium - downloads - show in folder

Using Debian Buster XFCE. XFCE is married to Thunar, so cannot remove thunar. I would prefer Chromium (or any other app that might choose to open a directory), as when viewing Downloads and clicking '...
2
votes
1answer
244 views

Assign an icon to a custom mimetype

I tried to create a custom mimetype (text/graphml+xml) by creating the file ~/.local/share/mime/packages/graphml+xml-mime.xml with this content: <?xml version="1.0" encoding="UTF-8"?> <mime-...
3
votes
0answers
79 views

Links try and fail to open in firefox, then open in chromium after killall firefox

Whenever I click a link in some GUI applications, such as signal or slack, either nothing happens, or I just see the screen flash (the screen also flashes when I start firefox normally). This happens ...
0
votes
0answers
63 views

Cannot make xdg-mime query return chosen browser

After maybe one year of using Chromium as the default browser, my Linux switched spontaneously to using Firefox (probably because of some updates). I want to switch back. Based on this answer, I ...
0
votes
0answers
337 views

How to disable /etc/xdg/{something}?

Take /etc/xdg/kwinrulesrc for example: $ cat /etc/xdg/kwinrulesrc [1] Description=dde-dock desktop=-1 desktoprule=2 wmclass=dde-dock dde-dock wmclasscomplete=true wmclassmatch=1 [2] Description=dde-...
3
votes
1answer
733 views

What is the procedure to update mime type associations in KDE?

I would like to revert to the default mime definitions at the system level, and also rebuild my local mime database. I am running Arch Linux KDE. The Arch Wiki says, If you use a desktop ...
1
vote
1answer
105 views

In XDG Base Directory Specification what if $HOME is unset or empty

Personally I'd like to adhere to to XDG Base Directory Specification to make my utility more portable. However when doing so it requires me to re-implement for systems that do not have the XDG_ ...
3
votes
1answer
578 views

How do I get XDG_CONFIG_HOME from a shell script / command line?

Is ${XDG_CONFIG_HOME:-${HOME}/.config} enough or there are more tricks to it? Is there maybe some xdg-user-dir CONFIG or xdg-settings invocation that gives me where to expect programs' configs?
1
vote
3answers
2k views

Why are the XDG variables for my account undefined when I login through SSH?

When logged in to the desktop: $ env | grep XDG_ XDG_CONFIG_DIRS=/etc/xdg XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session4 XDG_MENU_PREFIX=xfce- XDG_SEAT=seat0 XDG_SESSION_DESKTOP=xfce ...
1
vote
1answer
258 views

MIME type text/html: how & where defined?

I've asked a related question on AskUbuntu (How to open *.htm differently than *.html?) with no interest yet, so I'm addressing the same issue with a more fundamental question. I cannot find how and ...
16
votes
2answers
10k views

Create a custom URL Protocol Handler

I would like to register a URL scheme (or protocol) handler for my own custom URL protocol, so that clicking on a link with this custom protocol will execute a command on that URL. Which steps do I ...
3
votes
1answer
1k views

Understanding AutostartCondition key in .desktop files

CentOS 7.x with GNOME 3 Shell by default provides the following *.desktop files under /etc/xdg/autostart/ with AutostartCondition key: # gnome-welcome-tour.desktop [Desktop Entry] Type=Application ...
1
vote
1answer
380 views

Where should I store my application files (data, cache, logs, crashes, etc.) [closed]

Although I did some research on this subject, I couldn't reach the exact information I wanted. Actually, not exactly disclosed, everyone approached in a different way. For the: Filesystem Hierarchy ...
3
votes
1answer
2k views

Launch default terminal emulator by command

How do I launch the default terminal emulator by command? x-terminal-emulator won't work because I'm not using a Debian and xdg-terminal doesn't seem to exist either. Is there any other way to launch ...
2
votes
2answers
4k views

How to create / delete $XDG_RUNTIME_DIR at login / logoff

Today I was surprised to ssh into my box running Arch Linux and find that /run/user/$(id -u) didn't exist. The XDG Base Directory Specification says: $XDG_RUNTIME_DIR defines the base directory ...
4
votes
2answers
10k views

What's the right way to add directories to XDG_DATA_DIRS?

I've installed some app under /opt/myapp, which has a /opt/myapp/share directory. As I finish installing, it tells me: Note that '/opt/myapp/share' is not in the search path set by the XDG_DATA_HOME ...
0
votes
0answers
131 views

Change icons directory to a xdg base directory

How can I change the icons directory from ~/.icons to $XDG_DATA_HOME/icons/? I set $XDG_DATA_HOME to ~/.data/, but it didn't work (it seems that the icon configuration is not compliant to XDG Base ...
0
votes
2answers
67 views

Can I use ~/.config/ instead of ~/ for arbitrary packages?

I read very little about xdg, probably just enough to be dangerous. From what I've seen online, it looks like the new cool thing is to put specification files for X in ~/.config/ instead of just ~/ ...
3
votes
1answer
1k views

How to make flatpak applications use standard locations for user data files?

Applications installed with Flatpak are keeping user data and configuration under ~/.var/app/ (see Wiki and documentation). I would like the applications installed with Flatpak to reuse the ...
0
votes
1answer
101 views

Is there a standard XDG location for user secrets?

XDG defines ~/.config, ~/.cache and other shell-agnostic locations for user configuration files. Some applications define their own locations for user secrets, like ~/.ssh and ~/.gpg. Is there an XDG-...
2
votes
1answer
209 views

Which program runs $XDG_CONFIG_HOME/autostart in Debian 9?

Which program runs $XDG_CONFIG_HOME/autostart in Debian 9? I tried putting the following .desktop file in $XDG_CONFIG_HOME/autostart: [Desktop Entry] Type=Application Name=test Comment=test ...
2
votes
1answer
2k views

Cannot set default application for xdg-open

I am trying to make gthumb the default when opening png files from the terminal $ xdg-mime default ~/.gnome/apps/gthumb.desktop image/png I created this symlink: $ ls -l ~/.gnome/apps/gthumb....
6
votes
4answers
4k views

xdg-open on debian 9 fails to open browser

I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message; Quite strange as you can see, it's prepending the ...
2
votes
1answer
737 views

Switching user with gdmflexiserver from i3

Apparently, when using gdm3 (the default of Ubuntu 18.04) we should be able to run gdmflexiserver to get a new greeter and log in with resp. switch to another user. When running the command in my i3 ...
10
votes
2answers
8k views

Is there a home directory location for overriding icons?

There are a few home directory locations that complement /usr locations. Files in these locations override their /usr counterparts. For example: ~/.local/bin complements /usr/bin ~/.local/share/...
3
votes
1answer
386 views

Why does xdg-open use Mendeley as default for PDFs?

Similar to this question, I have some applications (Calibre, texdoc) open PDFs with Mendeley. Opening PDFs from Thunar, Thunderbird, Firefox etc. opens evince, the expected default. It seems that ...
0
votes
1answer
563 views

how can i change default xdg-viewer on chromium

I want to change my external default viewer not to be xdg, i need it too be VNC... I tried on chrome/settings but found nothing. im using ubuntu 14.04(ZorinOS
0
votes
1answer
600 views

What is the command line equivalent of xdg Terminal=true?

When I create an xdg-desktop file with Terminal=true, this has the effect of: launching a new terminal window running the command in that terminal (from Exec=command) What is the equivalent CLI ...
4
votes
1answer
1k views

What is the user equivalent of the global /opt directory?

I'm wondering if anybody has agreed on a user equivalent of the global /opt directory, for third-party packages that are distributed as a tarball to be unpacked as a single directory. Examples include ...
11
votes
2answers
8k views

Open a directory in the default file manager and select a file

In a program which I am writing I want to offer the functionality to open the directory where the file which I am currently processing is located and automatically select that file (so that the user ...
4
votes
0answers
177 views

Set default program for MIME type: image/*

Is there really no way to set the default program for all MIME sub-types of a top-level type? E.g., image/*. I am talking about the XDG MIME spec, and not the older mailcap scheme. And I'm not asking ...
0
votes
2answers
896 views

recreate xdg directories after accidentally deleting it

im running xdg-user-dirs-update command, which create two files in .config directory, user-dirs.dirs and user-dirs.locale. user-dirs.dirs lookes like this: # This file is written by xdg-user-dirs-...
4
votes
1answer
74 views

How to use SELinux to reject applications' modifications to home directory?

I have grown to be annoyed by applications ignoring the XDG base directory specification. What's the best way to deny applications any changes to the home directory except in the specified ...
75
votes
2answers
37k views

Which distributions have $HOME/.local/bin in $PATH?

Example: in Ubuntu, there is always a .local directory in the home directory and .profile includes this line: PATH="$HOME/bin:$HOME/.local/bin:$PATH" $HOME/.local/bin does not exist by default, but ...
2
votes
0answers
99 views

Is there a standard way for getting the media mount path (like /media/user, /run/media/user…)?

In an application, I need to find out where removable media is mounted. On Ubuntu, this happens in /media/username/ . On Arch, it is /run/media/username/ . On other systems, its just /media/ etc. ...