Questions tagged [xdg]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
15 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
37 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
16 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
15 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
5 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
21 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
65 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 ...
2
votes
0answers
75 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 '...
1
vote
1answer
103 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
55 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
48 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
152 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-...
2
votes
1answer
395 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 ...
0
votes
1answer
70 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_ ...
0
votes
0answers
25 views

How to simulate XDG links with wine

There is a windows app called AgentsReports.exe that functions only when you click on a link in the browser of a related website that holds this XDG scheme AgentsReports://agent_id=" + "2332lokiJJn&...
3
votes
1answer
283 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?
0
votes
3answers
1k 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
229 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 ...
11
votes
2answers
7k 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 ...
2
votes
1answer
975 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
238 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 ...
2
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 ...
3
votes
2answers
7k 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
119 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
60 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
793 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
84 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
186 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
3k 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
668 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 ...
5
votes
1answer
7k 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
345 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
536 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
555 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 ...
2
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 ...
10
votes
2answers
6k 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
167 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
618 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
70 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 ...
69
votes
2answers
32k 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
81 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. ...
1
vote
1answer
1k views

Why does dconf differ from dconf-editor?

Kali 2016.2 in Qemu: /usr/bin/qemu-system-x86_64 -boot d -m 5000 --enable-kvm -cdrom kali-linux-2016.2-amd64.iso I'm trying to list root dir: # /usr/bin/dconf list / org/ But dconf-editor shows ...
3
votes
1answer
330 views

Can I add the Twig file type to Linux?

I generally give Twig files a "twig" extension. As I understand it these Twig files are usually recognised as HTML like files by Linux using some sort of scan algorithm. So Nemo for example ...
1
vote
1answer
95 views

How to programmatically query the Freedesktop application database?

I know about xdg-mime which can query the mapping from MIME filetype to associated desktop application. But this can return mappings to non-existent applications, e.g. $ xdg-mime default non-...
4
votes
0answers
563 views

Is there a specification or defined purpose of XDG user directories from freedesktop.org?

Specifically I am asking about ~/Templates/, but any information about the other directories is appreciated. I understand how to use ~/Templates in the context of my graphical file manager, but I am ...
4
votes
1answer
821 views

Equivalent for `dm-tool switch-to-user `otheruser in different display managers

When using lightdm I can switch to another user by executing dm-tool switch-to-user. Is there a way that doesn't depend on the display manager? If not, what would be the equivalent command for the ...
1
vote
1answer
52 views

I just wanted to find where xdg-mime was looking for associations. What the hell is it _doing_?

It's too long to post the whole strace here, try strace -fe open,openat xdg-mime query default inode/directory suffice to say that command spits 429 lines, it seems like it's attaching processes to ...
0
votes
1answer
340 views

XDG resolves filename as text/plain

I have a MIME definition file which is installed as part of a package: $ rpm -ql virt-viewer | grep mime /usr/share/mime/packages/virt-viewer-mime.xml $ cat /usr/share/mime/packages/virt-viewer-mime....