OM LX4.0 gio open : No application is registered as handling this file

Tags: #<Tag:0x00007fc0c12c08d8>

Hello,

  • OpenMandriva Lx version:
    OM LX 4.0 (on VirtualBox machine)

  • Desktop environment (KDE, LXQT…):
    Operating System: OpenMandriva Lx 4.0
    KDE Plasma Version: 5.15.5
    KDE Frameworks Version: 5.58.0
    Qt Version: 5.12.3
    Kernel Version: 5.1.9-desktop-1omv4000
    OS Type: 64-bit
    Processor: 1 × Intel® Core™ i5-4460 CPU @ 3.20GHz
    Memory: 2,9 GiB of RAM

  • Description of the issue (screenshots if relevant):

I can’t use in my python3 code the command " gio open mypdf.pdf ".
Here is my code :

try :
subprocess.call([“gio”, “open”, “/tmp/test_pdf.pdf”])
except :
print (“Can’t open the PDF with GIO command…”)

[root@OpenMandriva4 ~]# gio open /tmp/tmp6t
/tmp/tmp6t_ozemp /tmp/tmp6t_ozemp.pdf
[root@OpenMandriva4 ~]# gio open /tmp/tmp6t_ozemp.pdf
gio: file:///tmp/tmp6t_ozemp.pdf: No application is registered as handling this file
[root@OpenMandriva4 ~]#
`

  • Relevant informations (hardware involved, software version, logs or output…):
    I have this very same python code working well on others Linux systems (OpenSuse, Debian, Mint, Ubuntu, Mageia, Fedora), but OM LX4.0 doesn’t like it …
    I have a workaround with “xdg-open” command, but “gio” is planned to be the next best solution to make that.
    gio should be the one who replace xdg-open in the future.

Any idea why “gio open” doesn’t work on my system ?
Is it a bug ?

Thank you for any reply :slight_smile:

Welcome @zylyco to OpenMandriva Forum

Well you installed KDE Plasma Desktop not Gnome. That would be using KIO not GIO.

https://api.kde.org/frameworks/kio/html/index.html

As I understand it OpenMandriva has and had for development of OM Lx 4.0 a goal of getting rid of as much G* stuff as possible for the default installation. So my guess would be that for gio to work some packages would need to be installed.

Post-edit: If you are curious as to why OpenMandriva developers are on Freenode IRC @
#openmandriva-cooker. User IRC channel is #openmandriva.

xdg-open is a much better way than gio open – gio is the GNOME way of doing things, xdg-open is the cross-desktop approach.
gio apparently has no intention of detecting KDE applications like okular (which is what it should be using to display a pdf).

1 Like

Thank you Sirs for your answer.
I take your opinion in count, and change my mind : I used xdg-open instead of gio, and all is well for me.
Problem solved.

See you :wink:

1 Like