Questions tagged [xdgutils]

The xdg-utils package is a set of simple scripts that provide basic desktop integration functions for any Free Desktop, such as Linux. They are intended to provide a set of defacto standards.

This version of xdg-utils contains the following commands:

  • xdg-desktop-menu: command line tool for (un)installing desktop menu items
  • xdg-desktop-icon: command line tool for (un)installing icons to the desktop
  • xdg-mime: command line tool for querying information about file type handling and adding descriptions for new file types
  • xdg-icon-resource: command line tool for (un)installing icon resources
  • xdg-open: opens a file or URL in the user's preferred application
  • xdg-email: command line tool for sending mail using the user's preferred e-mail composer
  • xdg-screensaver: command line tool for controlling the screensaver
68 questions
2
votes
0 answers

How do I know what program 'xdg-open' will use to open a directory? (Python)

So I have this: def openSegmentDirectory(self): if platform.system() == "Windows": os.startfile(self.segmentPath) elif platform.system() == "Linux": subprocess.Popen(['xdg-open', self.segmentPath]) else: #for mac …
pretzlstyle
  • 2,774
  • 5
  • 23
  • 40
2
votes
1 answer

Creating a file association icon in Ubuntu with xdgutils

I am using the xdg utility to attempt to associate a image with a file association. I have ran this command and the equivalent for 48,64 and 128 sizes, none of them seem to have an effect. xdg-icon-resource install --context mimetypes --size 256…
Dan
  • 29,100
  • 43
  • 148
  • 207
2
votes
1 answer

How to create a Linux desktop icon cross desktop (KDE, GNOME) with xdg-desktop-icon?

I'd like to use the xdg-desktop-icon tool because it can be scripted and works cross desktop (at least on Linux with Gnome and KDE). At least it is supposed to do so according to freedesktop.org. 1 Made a minimal file: test.desktop [Desktop…
James Mitch
  • 519
  • 2
  • 11
  • 26
1
vote
1 answer

Shopify CLI: Running as root without --no-sandbox is not supported

Usually to start Shopify theme development environments locally, I invoke this Shopify theme dev command in my terminal from the project root folder. It needs root grants, so I add sudo it first. If the command is for the first time, authentication…
1
vote
0 answers

Opening file manager using xdg-open gives warnings (nemo:85552): Gtk-WARNING **

I am new to using linux mint. Used "xdg-open ." to open the current directory in the file manager. But when I do this I get the following warnings. *(nemo:85552): Gtk-WARNING *: 09:21:45.991: Failed to register client:…
alan7ur1n9
  • 11
  • 1
1
vote
1 answer

xdg-open 'Segmentation Fault': it took to long time then throw error

well I noticed xdg-open command not working as expected for opnening files or urls and after a deep investigation I found the below Trace: bash -x xdg-open "https://suckless.org" after running the above line I found the code enters an infinite loop…
1
vote
1 answer

How do you make xdg-utils detect a file association for my application from a distribution package?

I am building a distribution package for xnec2c and I want .nec files to associate with xnec2c and also display the associated icon. (This question is different than the many xdg-utils answers out there because it asks about packaging and whether…
KJ7LNW
  • 1,437
  • 5
  • 11
1
vote
0 answers

How do you remove an xdg-mime default association?

So xdgmime default foo.desktop application/x-foo will associate a mime type in ~/.local/share/applications/mimeapps.list like this: [Default Applications] ... application/x-foo=foo.desktop What is the "proper" way to remove the association? I just…
KJ7LNW
  • 1,437
  • 5
  • 11
1
vote
1 answer

How to register a "Linux" file association with autotools

I'm writing an application that uses its own file type. I'd like to integrate the file association with the desktop environment. I know that this can be done with a command, but how should it be integrated with autotools? Currently, my app can be…
1
vote
1 answer

xdg-open: no method available for opening ./directory

I try to open a directory using xdg-open in Ubuntu. It works if I run xdg-open ./dir in terminal. I have a Flask web app that opens directories using xdg-open in some situations. When I start the app from terminal in development mode (By running $…
mwxgaf
  • 66
  • 1
  • 9
1
vote
0 answers

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:
HPPH
  • 35
  • 7
1
vote
1 answer

xdg-mime install does not update files mime-type association

I am currently not able to install and assoziate files to a new MIME-Type under CentOS (CentOS Linux release 7.4.1708 (Core)). I need the installation only for the current user, not for the whole system. I am doing the following steps: Creating a…
user3169920
  • 13
  • 1
  • 4
1
vote
1 answer

Python equivalent to xdg-mime query filetype

I'm looking for a python library that provides that returns exactly the same mime type for a given file as the bash command xdg-mime query filetype . The goal is to use that function to find all file in a diretory with a certain mime type…
konstin
  • 476
  • 7
  • 16
0
votes
0 answers

Ubuntu 22.04: xdg-open opening Text Editor instead of browser when called from C++ program

I'm a currently running on Ubuntu 22.04 and calling the following xdg-open system call from a C++ program: QString cmd = "xdg-open /home/user/foo.html &"; int ret = system(cmd.toStdString().c_str()); Instead of opening the default Firefox browser…
anshah
  • 105
  • 9
0
votes
0 answers

Permission error in using xdg-open when opening file with registered extension

I have been trying to perform File Association on Ubuntu 20.04 using WSL2. I have my mime Type specification file at /usr/share/mime/packages/application-x-demo.xml. This is the content of apllication-x-demo.xml. I have my .desktop file at…