Jana
4 September 2022 18:43
21
[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 ~]$
Strit
4 September 2022 18:47
22
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?
What’s the output of:
pkexec timeshift-gtk
You seem to have the proper dependencies installed.
Jana
4 September 2022 19:03
26
[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
Jana
4 September 2022 19:16
28
[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 ~]$
Zesko
4 September 2022 19:23
29
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
Jana
4 September 2022 19:38
30
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
Zesko
4 September 2022 19:44
32
Jana:
Work Gui + Terminal *
kdesu timeshift-gtk
You can create the Desktop application:
Copy the Desktop application:
cp /usr/share/applications/timeshift-gtk.desktop ~/.local/share/applications/
Edit $HOME/.local/share/applications/timeshift-gtk.desktop
to change Exec=
to
Exec=/usr/bin/bash -c "kdesu timeshift-gtk"
Try to click timeshift app without terminal.
1 Like
Jana
4 September 2022 19:51
34
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
raguse
4 September 2022 19:55
35
Well in such case you should also be able to use
env DISPLAY=$DISPLAY timeshift-launcher
OR
env DISPLAY=:0.0 timeshift-launcher
Zesko
4 September 2022 19:57
36
Jana:
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
Both run with root privileges. kdesu
is official for KDE.
Zesko
4 September 2022 19:59
38
But Timeshift requires running with root privileges to create system backup.
Jana
4 September 2022 20:01
39
That’s exactly what I thought
raguse
4 September 2022 20:02
40
@Zesko timeshift-launcher goes through polkit, which then runs pkexec timeshift-gtk. Technically the same as the other.
1 Like