View Issue Details

IDProjectCategoryView StatusLast Update
0017707ScribusIntegrationpublic2025-12-10 12:01
Reporterzkeng Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSDebianOS Version13 Trixie
Product Version1.6.4 
Summary0017707: Sane defaults for: File/Preferences/External Tools
Description'xdg-open' should be the default for the following External Tools on Linux installations of Scribus:
Image Processing Tool
Web Browser
PDF Viewer

xdg-open is a widely accepted standard to call installed apps known to open the specified file. It will also work with Flatpak installations of Scribus, in contrast to a command like 'gimp'.

Sane defaults is important in order to provide the best out-of-the-box experience for new users. Allot of experience i required in order to manually set-up the External Tools. This is especially true for Flatpak users, because most will experience that specifying a binary will "mysteriously" fail even if the binary exists and should open an installed application like Gimp.
Steps To ReproducePlace an image in a Scribus document. Right click the image and select 'Image/Edit Image'.
The user will not be offered to open and edit the image in a third party editor unless this has been correctly configured by the user.
TagsNo tags attached.
PatchNo

Activities

ale

2025-12-09 18:56

manager   ~0053361

Just tried on my Debian computer (never used xdg-open before...)

xdg-open a-file.png

opens firefox.

Not really what I want Scribus to do.

I also guess that xdg-open will not be installed (or exist) for windows and might not be there on mac neither (which probably "still" has a good open command).

Personally, ii don't let Scribus run programs on my behalf, but I see why it can be an interesting option for other people.

I would say, that there should be an optional setup step, when first starting Scribus, one of the steps should be to define the default programs to be started, and in such a step xdt-open and open (depending on the platform) could be an option.

This could be a nice task for somebody who knows a bit of C++ / Qt and wants to contribute something easy but not tiny to Scribus.

zkeng

2025-12-10 12:01

reporter   ~0053362

Thank you for looking into this so quickly!

xdg-open will open the selected file with the default app on your computer... This will be the app specified to open the particular mimetype of the file: In your case a png-image.

The fact that it opened in Firefox probably means that firefox is specified to open the png [image/png=] mimetype in your global, or user, config file.

If no default app is specified in the global, or user, config files; then a list will pop-up where the user is asked to select an application.

Our computers at Open Studio (my architecture office www.openstudio.se) use a custom desktop built around the Openbox window manager, so we also like simplicity and if you ask me we don't need mimetypes; just setting up associations based on the file suffix is perfect (like it's done in XFE file manager)... But mimetypes is a reality in every major OS I guess and I really recommend configuring mimetype associations for the most common file types you work with. It makes life easier, at least for me, when most (modern) apps will open a file in my preferred app by default. And as I wrote in my last post: It might be the only way (without hacking complicated overrides) of creating interoperability between apps when sandboxed apps (like Flatpaks) are gaining traction and they don't have permissions to execute binaries.

User specific mimetype associations are stored in file '~/.local/share/applications/defaults.list', or '~/.local/share/applications/mimeapps.list'.

Global mimetype associations (for all users) are stored in file '/usr/share/applications/defaults.list'.

User specific mimetype associations will override global associations.

Below is a reference '~/.local/share/applications/defaults.list' file:
Note that:
Images (inlcuding png) will be opened by gimp from Debian repos.
PDF files will be opened by the Flatpak version of Okular from Flathub.
Directories will open in (the excelent) XFE file manager.
Note that Open Document Format (LibreOffice .odt, .ods) will also be opened in the file manager; this is a little hack.. The file manager is configured to open them with my custom .App.Image installation of LibreOffice, so with this hack I can make all kind of binaries and scripts my default choice for any mimetype.

##### START defaults.list EXAMPLE #####
[Default Applications]
inode/directory=xfe.desktop
image/jpeg=gimp.desktop
image/jpg=gimp.desktop
image/gif=gimp.desktop
image/png=gimp.desktop
image/tiff=gimp.desktop
application/vnd.oasis.opendocument.text=xfe.desktop
application/vnd.oasis.opendocument.spreadsheet=xfe.desktop
application/vnd.oasis.opendocument.presentation=xfe.desktop
application/pdf=org.kde.okular.desktop
##### END defaults.list EXAMPLE #####


Below are a few usable commands related to mimetypes...

Find out if there is a present mime type definition for your file type:
$ mimetype /path/to/file.pdf

Set default application associated with a mimetype for the current user:
$ xdg-mime default qpdfview.desktop application/pdf

Print default application associated with a mimetype:
$ xdg-mime query default application/pdf

Test to open a file with the associated application:
$ xdg-open /path/to/file.pdf

Issue History

Date Modified Username Field Change
2025-12-09 16:16 zkeng New Issue
2025-12-09 18:56 ale Note Added: 0053361
2025-12-10 12:01 zkeng Note Added: 0053362