Closed FlorianReimold closed 2 years ago
Current solution already works fine. It however cannot open the ecal.ini
on Linux as root. I want to do a workaround at some point:
Check the permissions
Query mime type:
Shell: xdg-mime query filetype /usr/local/etc/ecal/ecal.ini
C++: auto mime_type = QMimeDatabase().mimeTypeForFile(path);
text/plain
Get Default application
Shell: xdg-mime query default text/plain
org.gnome.gedit.desktop
Unfortunatelly it stops here. But we can launch gedit with a magic parameter manually whenever we detect org.gnome.gedit.desktop
:
gedit admin:///usr/local/etc/ecal/ecal.ini
For all other cases we just let Qt open the file (it will use xdg-open
). This would give us a generic solution:
Fixed by #569
People sometimes struggle to find and edit the
ecal.ini
. As the monitor shows the path to the file anyways, we could easily transfor it into a hyperlink the user can click on.