Skip to content
This repository was archived by the owner on Oct 16, 2022. It is now read-only.

Bad file explorer in Kubuntu 18.04 #219

Closed
ghost opened this issue Jun 19, 2018 · 10 comments
Closed

Bad file explorer in Kubuntu 18.04 #219

ghost opened this issue Jun 19, 2018 · 10 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jun 19, 2018

After selecting a specific backup and after clicking the browse button, the default file browser Dolphin will not open, but open the Gwenview image viewer.

Steps needed to repeat the error:

  • install Kubuntu
  • install Timeshift
  • create backup
  • open backup

I also checked the manjaro and there is the same problem, also the problem concerns more the environment, not the system.

@teejee2008 teejee2008 self-assigned this Jun 23, 2018
@teejee2008
Copy link
Owner

You need to fix the associations for the inode/directory mime type on your system (check on Google).

Timeshift executes xdg-open to open snapshot folder in file manager. xdg-open uses the default file/folder associations on your system. Your system seems to be configured to open with Gwenview. You need to change that to Dolphin.

@emanuc
Copy link

emanuc commented Jul 8, 2018

I have a problem, here are some logs, I hope it is useful:
Kubuntu 18.04
Timeshift 18.6.1

emanu@emanuc:~$ timeshift-launcher
Configurazione caricata: /etc/timeshift.json
/dev/sda1 is mounted at: /mnt/timeshift/backup, options: rw,relatime,compress=lzo,ssd,space_cache,autodefrag,subvolid=5,subvol=/
Executing Dolphin as root is not possible.
Executing Dolphin as root is not possible.
Warning: program returned non-zero exit code #1
WARNING: You don't seem to have any mimeinfo.cache files.
Try running the update-desktop-database command. If you
don't have this command you should install the
desktop-file-utils package. This package is available from
http://freedesktop.org/wiki/Software/desktop-file-utils/
Can't call method "get_value" on an undefined value at /usr/bin/mimeopen line 159.
[19190:19190:0708/201321.389564:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: firefox: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found
[19216:19216:0708/201321.442664:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening '/mnt/timeshift/backup/timeshift-btrfs/snapshots'
Configurazione salvata: /etc/timeshift.json

@teejee2008
Copy link
Owner

According to the error message, your system does not support running file manager (Dolphin) as root. You won't be able to browse the snapshots.

@willem179
Copy link

I had the same problem on Lubuntu: Pressing the browse button opens Audacious.
The reason is that xdg-open is not really meant be used by the root account. Root is no
desktop user.

Timeshift runs under the root account and xdg-open finds no .desktop file for mime type
inode/directory, because the root account has no .desktop files at all.
xdg-open then defaults to /usr/share/applications/defaults.list which
happens to be the unmodified "gnome" list in Lubuntu, containing the following line:
inode/directory=nautilus-folder-handler.desktop

But on Lubuntu the nautilus-folder-handler.desktop item does not exist.
Lubuntu does not use nautilus.
Apparently the system then takes the first application that has inode/directory in
its accepted mime types, in my case Audacious.

The problem could be solved for Lubuntu by changing the offending line in
/usr/share/applications/defaults.list to:
inode/directory=pcmanfm.desktop
but I am not sure if that survives possible updates of the system.

A better solution is to add a new defaults.list file to the root account:
/root/.local/share/appplications/defaults.list
containing only these two lines:

inode/directory=pcmanfm.desktop
x-directory/normal=pcmanfm.desktop

@Djaler
Copy link
Contributor

Djaler commented Jan 27, 2019

@teejee2008 xdg-open man page said that xdg-open shouldn't be run from root too (https://linux.die.net/man/1/xdg-open). Looks like you run xdg-open through the pkexec for files/websites (https://github.com/teejee2008/timeshift/blob/master/src/Utility/TeeJee.System.vala#L356), but not for directories(https://github.com/teejee2008/timeshift/blob/master/src/Utility/TeeJee.System.vala#L370). Why?

@Djaler
Copy link
Contributor

Djaler commented Feb 4, 2019

@teejee2008 can you check this please?

@teejee2008
Copy link
Owner

Files in the snapshot directory are owned by root. Opening it in a file manager running as a normal user is not useful.

I'll change this so that the file manager is opened directly instead of using xdg-open.

@teejee2008 teejee2008 added this to the v19.06 milestone Feb 7, 2019
@call0fcode
Copy link

For now, just before it is fixed on v19.06 as @teejee2008 said above (June 30, 2019 is the latest planned day for release), you can do the workaround commented by @willem179.

I share with you a little video of my issue on KDE neon 5.15 (it opened VScode instead of the file explorer) and the corresponding steps I made to fix it:

https://streamable.com/wzpa8

@JackDinn
Copy link

is this still due to be fixed for KDE in a few days ? I have not been able to use timeshift for a long time and am looking forward to using it again.
I have tried the workarounds but Manjaro KDE does not allow dolphin to run as root so none of them worked.
Thx.

@teejee2008 teejee2008 modified the milestones: v19.08, v19.10 Aug 11, 2019
@teejee2008
Copy link
Owner

This is fixed. Duplicate of #186

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants