How to create a system backup?

[voboda@manjaro ~]$ timeshift-launcher

(timeshift-gtk:13524): Gtk-WARNING **: 20:39:06.425: cannot open display: 
[voboda@manjaro ~]$
 [voboda@manjaro ~]$ pacman -Qs polkit
local/polkit 121-1
    Application development toolkit for controlling system-wide privileges
local/polkit-kde-agent 5.25.4-1 (plasma)
    Daemon providing a polkit authentication UI for KDE
local/polkit-qt5 0.114.0-1
    A library that allows developers to access PolicyKit API with a nice Qt-style API
[voboda@manjaro ~]$

This github issue mentions that the package might be missing a dependency for wayland support.

Try installing xorg-xhost with:
sudo pacman -S xorg-xhost

EDIT: Sorry, it’s already a dependency.

The x86 timeshift package depends on xorg-xhost, why doesn’t the ARM package?

It is.

What’s the output of:

pkexec timeshift-gtk

You seem to have the proper dependencies installed.

[voboda@manjaro ~]$ pkexec timeshift-gtk

(timeshift-gtk:13636): Gtk-WARNING **: 21:01:51.756: cannot open display: 
[voboda@manjaro ~]$

Is there a difference this way? Make sure to run all three commands regardless of what happens:

xhost +SI:localuser:root
pkexec timeshift-gtk
xhost -SI:localuser:root
[voboda@manjaro ~]$ pkexec timeshift-gtk

(timeshift-gtk:13835): Gtk-WARNING **: 21:14:24.768: cannot open display: 
[voboda@manjaro ~]$ xhost +SI:localuser:root
localuser:root being added to access control list
[voboda@manjaro ~]$ pkexec timeshift-gtk

(timeshift-gtk:13850): Gtk-WARNING **: 21:14:48.713: cannot open display: 
[voboda@manjaro ~]$ xhost -SI:localuser:root
localuser:root being removed from access control list
[voboda@manjaro ~]$ pkexec timeshift-gtk

(timeshift-gtk:13864): Gtk-WARNING **: 21:15:13.843: cannot open display: 
[voboda@manjaro ~]$

Try to run

pkexec env XDG_RUNTIME=$XDG_RUNTIME timeshift-gtk

OR

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY timeshift-gtk

OR

For KDE

kdesu timeshift-gtk

not Work

pkexec env XDG_RUNTIME=$XDG_RUNTIME timeshift-gtk

Work Gui + Terminal

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY timeshift-gtk

Work Gui + Terminal*

kdesu timeshift-gtk

Output of echo $DISPLAY?

You can create the Desktop application:

  1. Copy the Desktop application:
cp /usr/share/applications/timeshift-gtk.desktop ~/.local/share/applications/
  1. Edit $HOME/.local/share/applications/timeshift-gtk.desktop to change Exec=
    to
Exec=/usr/bin/bash -c "kdesu timeshift-gtk"
  1. Try to click timeshift app without terminal.
1 Like

echo $DISPLAY
:0.0

I used the kdesu timeshift-gtk command in the original shortcut and it works like a charm.

I will also try your additional solution.

PS:
do both commands have the same user?

Work Gui + Terminal run with privileges as user voboda ?

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY timeshift-gtk

Work Gui + Terminal* run with privileges as user voboda or root ?

kdesu timeshift-gtk

Well in such case you should also be able to use

env DISPLAY=$DISPLAY timeshift-launcher

OR

env DISPLAY=:0.0 timeshift-launcher

Both run with root privileges. kdesu is official for KDE.

both commands don’t work

But Timeshift requires running with root privileges to create system backup.

That’s exactly what I thought :slight_smile:

@Zesko timeshift-launcher goes through polkit, which then runs pkexec timeshift-gtk. Technically the same as the other.

1 Like