Skip to main content
Share Your Experience: Take the 2024 Developer Survey
17 votes

Find out the owner of a DBus service name

You can get the caller PID via org.freedesktop.DBus.GetConnectionUnixProcessID: qdbus org.freedesktop.DBus /org/freedesktop/DBus \ org.freedesktop.DBus.GetConnectionUnixProcessID org.freedesktop....
don_crissti's user avatar
  • 83.2k
9 votes
Accepted

Find out the owner of a DBus service name

The d-bus debug utility d-feet which is available as a package in many systems seems to be able to find the process id and command providing a service. For example, I ran it on a Fedora 23 xfce4 X11 ...
meuh's user avatar
  • 51.7k
9 votes

Why do some applications use ~/.config/appname for their config data while others use ~/.appname?

A more controversial answer is: ~/.config is the default for the XDG standard, which only applies to applications adhering to the FreeDesktop.org standards (also via use of the $XDG_CONFIG_HOME ...
David Gardner's user avatar
7 votes

Why do freedesktop .desktop files not allow relative paths?

You could use an inline shell script to compute the path: Exec=sh -e -c "exec \\"\\$(dirname \\"\\$0\\")/some_app\\"" %k Yes, two levels of escaping are required.
Timothy Baldwin's user avatar
7 votes
Accepted

How to identify the notification daemon?

I found out myself. Trigger the notification again Open a console, and run xwininfo to find out which process created the notification window. Uninstall that application, and install a different one (...
danuker's user avatar
  • 317
6 votes

What does %k mean in Exec=?

According to the Desktop Entry Specifications: %k The location of the desktop file as either a URI (if for example gotten from the vfolder system) or a local filename or empty if no location is ...
Sergiy Kolodyazhnyy's user avatar
6 votes

Drag-and-drop without the drag

2019 now but stil... This is my current screenshot tool. The xdotool commands are relevant regarding how to automate a file drag. Here the script (started via hotkey in the example): 2.bin$ cat ...
Red Pill's user avatar
  • 898
4 votes

How to properly and easily configure `xdg-open` without any environment?

For those like me that did not know how to get the proper mimetype to use with xdg-mime: 1- Initial situation: $ xdg-open . opens vscodium (who hardcoded this stupid file association?) :[ 2- Problem: ...
liar666's user avatar
  • 41
4 votes

How to utilize XDG directories and paths in Bash?

I believe systemd-path is widely available and it could be used to get paths with environment aware resolution and with proper fallbacks: $ systemd-path user-shared /home/Xerkus/.local/share $ HOME=/...
Xerkus's user avatar
  • 141
4 votes

Why do freedesktop .desktop files not allow relative paths?

Keep in mind that the FreeDesktop standard is just that: a standard. In principle a vendor such as KDE, GNOME, LXDE, or XFCE could add support for relative paths without going through the standards ...
Nathaniel M. Beaver's user avatar
4 votes
Accepted

Opening a URL with xdg-open using Mozilla Remote Protocol

I cannot say anything about the specification but as far as just the result matters I (not being familiar with the quoting in such files, though) would expect this to work: Exec=bash -c 'echo ...
Hauke Laging's user avatar
  • 90.1k
4 votes

free desktop dbus error while installing any package using pip

This seems to be a bug in pip. More recent versions might not show this behaviour. If you can, upgrade to the latest pip version. If not, you can use a workaround by setting the environment variable ...
icebird23's user avatar
4 votes

Store Firefox Primary Password in Secret Service

As of my knowledge firefox currently does not have built-in support for storing the primary password (previously known as the master password) using the freedesktop secret service DBus API or any ...
Z0OM's user avatar
  • 3,179
3 votes

Opening a URL with xdg-open using Mozilla Remote Protocol

I just had this problem recently and there is a specification. here If the % is for the application, you need to put %%. That is for the future, when creating a .desktop file for youtube-dl and using ...
WGRM's user avatar
  • 807
3 votes

Why is the icon I've placed into /usr/share/icons not displaying in the MATE Applications menu?

I had the same problem and what worked for me was to update the cache of the hicolor theme: /usr/share/icons/hicolor/icon-theme.cache. You do this with the following command: sudo gtk-update-icon-...
Simon-Teodor Mărăcine's user avatar
3 votes

Purpose of the autostart-scripts directory

Because (as user villapx discovered) KDE Plasma 5 has this autostart-scripts directory in its source, I am assuming that it is an undocumented feature of Plasma 5 and that I was running this profile ...
palswim's user avatar
  • 5,217
3 votes

Gnome programs (eog/gnome-terminal) have a slow start and produce a DBus.Error.NoReply Warning

This solves it for me export NO_AT_BRIDGE=1 alias open='xdg-open ' then to trigger appropriate app to open arbitrary file issue (for example) : open some-cool-image.jpg
Scott Stensland's user avatar
2 votes

How to restart polkitd?

When using systemd, restarting polkit is as easy as: sudo systemctl restart polkitd.service
flood's user avatar
  • 298
2 votes
Accepted

Desktop icon without image in Gnome (Debian Jessie)

The Icon= key should contains the path to the .png file or just the name of the file (without the .png) if the file is installed in /usr/share/icons/hicolor/<file size>. Not the path to the ...
Bigon's user avatar
  • 2,182
2 votes
Accepted

Where mimeopen saves default app config?

I found the records: mimeopen when no desktop environment is specified saves the records in: $HOME/.local/share/applications/defaults.list
atevm's user avatar
  • 287
2 votes

Purpose of the autostart-scripts directory

I'm adding some extra information here for general googlers on this dir.. It seems KDE changed the workings of this dir in 2021 (without telling people widely, much to the ire of some), and "...
alchemy's user avatar
  • 637
2 votes

Drag-and-drop without the drag

Found this question while trying to figure out how to solve this, I eventually went the route of developing a solution to fit my needs. I wanted to post it here for anyone in the future that might be ...
sillybanaja's user avatar
2 votes
Accepted

Fixing the "DBUS-call failed" error when opening files with xdg-open

Solution was to install a thumbnailer package. I chose tumbler. You can install it using pacman: sudo pacman -S tumbler Imidietly after install everything works fine. Thanks @bain for helpful ...
Jan Černý's user avatar
  • 1,381
2 votes
Accepted

Ubuntu Notification Failed to execute program org.freedesktop.Notifications: No such file or directory (23)

Fixed, added a file in /usr/share/dbus-1/services/org.freedesktop.Notifications.service with [D-BUS Service] Name=org.freedesktop.Notifications Exec=/usr/lib/notification-daemon/notification-daemon ...
Kryptic Coconut's user avatar
2 votes
Accepted

How to run a "Desktop Entry" from another "Desktop Entry"?

You may use dex. It is a Python program meant to "generate and execute DesktopEntry files of the Application type" (quoting its manual). Just put in your custom desktop entry a key along the ...
fra-san's user avatar
  • 10.3k
2 votes

Why do freedesktop .desktop files not allow relative paths?

I needed a path relative to the home directory in my firefox.desktop. Such that every user get's his own firefox-profile started, i.e. firefox-frank sitting in ~/Documents/... aka /home/frank/...
Frank N's user avatar
  • 472
2 votes
Accepted

How do I keep stdin open when launching an executable via a Desktop Entry File (i.e. .desktop)?

As pointed out in the comments, the latest version of the FreeDesktop Desktop Entry Specification is under-specified in regards to how implementations should set up standard IO. The list of defined ...
Tenders McChiken's user avatar
2 votes

How can I find the value of $XDG_CONFIG_HOME, $XDG_CONFIG_HOME, $XDG_STATE_HOME, etc in a Bash script?

The spec explains how to handle missing values: If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used. and so on for all the XDG variables. As a result ...
Stephen Kitt's user avatar
1 vote

Why do freedesktop .desktop files not allow relative paths?

For the Exec fileld I suppose that the reason is that it is not obvious what path should be used as base. For example you expect relativeness to *.desktop file location, but I expect relativness to ...
Ovsyanka's user avatar
  • 119
1 vote

Drag-and-drop without the drag

You can use Selenium for this task. It is an open source tool to interact with web browsers. Assuming you use Arch Linux and want to write in python, install python-selenium aur package (or via pip: ...
Ashark's user avatar
  • 959

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