You are not logged in.
When I run the:
timeshift-gtk
I'm getting this output
timeshift-gtk
E: Admin access is required to backup and restore system files.
Please re-run the application as admin (using 'sudo' or 'su')
(timeshift-gtk:93742): Gtk-CRITICAL **: 23:13:16.919: gtk_icon_theme_load_icon_for_scale: assertion 'GTK_IS_ICON_THEME (icon_theme)' failed
** (timeshift-gtk:93742): CRITICAL **: 23:13:16.919: gee_abstract_collection_get_size: assertion 'self != NULL' failed
I guess it's somehow related to the polkit. Any idea how can I fix it?
Last edited by aljustiet (2024-06-04 13:30:48)
Offline
Please re-run the application as admin (using 'sudo' or 'su')
Last edited by ewaller (2024-06-03 18:45:12)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Online
the output from the program you ran wrote:Please re-run the application as admin (using 'sudo' or 'su')
It's gtk application. I want to be able to run it from the applications launcher. In distributions like Linux mint it asks for the password when I launch it.
Last edited by aljustiet (2024-06-03 18:50:10)
Offline
what desktop environment do you use?
It works fine for me on plasma.
Offline
What groups is the user you started timeshift-gtk a member of? From the contents of /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy
<policyconfig>
<vendor>Tony George</vendor>
<vendor_url>https://github.com/teejee2008</vendor_url>
<action id="in.teejeetech.pkexec.timeshift-gtk">
<message gettext-domain="timeshift">Timeshift</message>
<description>Run Timeshift as Administrator</description>
<icon_name>timeshift</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/timeshift-gtk</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
<action id="in.teejeetech.pkexec.timeshift">
<message gettext-domain="timeshift">
Authentication is required to run Timeshift as Administrator
</message>
<description>Run Timeshift as Administrator</description>
<icon_name>timeshift</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/timeshift</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
your guess it is polkit related appears correct.
Offline
what desktop environment do you use?
It works fine for me on plasma.
I use Hyprland.
Offline
What groups is the user you started timeshift-gtk a member of? From the contents of /usr/share/polkit-1/actions/in.teejeetech.pkexec.timeshift.policy
<policyconfig> <vendor>Tony George</vendor> <vendor_url>https://github.com/teejee2008</vendor_url> <action id="in.teejeetech.pkexec.timeshift-gtk"> <message gettext-domain="timeshift">Timeshift</message> <description>Run Timeshift as Administrator</description> <icon_name>timeshift</icon_name> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/timeshift-gtk</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> <action id="in.teejeetech.pkexec.timeshift"> <message gettext-domain="timeshift"> Authentication is required to run Timeshift as Administrator </message> <description>Run Timeshift as Administrator</description> <icon_name>timeshift</icon_name> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/timeshift</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig>
your guess it is polkit related appears correct.
Offline
What is the output when you run `groups` as the same user you have the issue running `timeshift-gtk` as?
Offline
What is the output when you run `groups` as the same user you have the issue running `timeshift-gtk` as?
Offline
Do you have polkit and a polkit authentication agent installed?
pacman -Qs polkit
Offline
Do you have polkit and a polkit authentication agent installed?
pacman -Qs polkit
aljustiet@arch ~> pacman -Q | grep polkit
lib32-polkit 124-1
polkit 124-2
polkit-gnome 0.105-10
polkit-kde-agent 6.0.5-1
polkit-qt6 0.200.0-1
Offline
Offline
I manually run the
/usr/lib/polkit/polkit-kde-authentication-agent-1
and
hyprctl dispatcher exec /usr/lib/polkit-kde-authentication-agent-1
, then tried to launch the timeshift-gtk, but still have the same result
Offline
pkcheck -u -p $$ --enable-internal-agent -a in.teejeetech.pkexec.timeshift-gtk
Offline
I want to be able to run it from the applications launcher.
Run what, how?
The desktop entry in the package runs timeshift-launcher which in turn checks $- and $XDG_SESSION_TYPE to determine what it'll do and either run su, pkexec or su in a terminal.
Punching "timeshift-gtk" into a terminal will not work resp. consistently lead to that result.
If you want to debug the timeshift-launcher script add
exec 1> /tmp/timeshift.dbg 2>&1
set -x
below the shebang and click your icon that doesn't work. Then inspect /tmp/timeshift.dbg
Offline
pkcheck -u -p $$ --enable-internal-agent -a in.teejeetech.pkexec.timeshift-gtk
Now I'm having this output:
aljustiet@arch ~> rofi -show drun
(process:8709): Rofi-WARNING **: 12:45:20.673: ABI version of plugin: 'emoji.so' does not match: 00000006 expecting: 00000007
aljustiet@arch ~> localuser:root being added to access control list
(timeshift-gtk:8902): Gtk-WARNING **: 12:45:25.605: cannot open display:
localuser:root being removed from access control list
access control enabled, only authorized clients can connect
SI:localuser:aljustiet
Offline
I want to be able to run it from the applications launcher.
Run what, how?
The desktop entry in the package runs timeshift-launcher which in turn checks $- and $XDG_SESSION_TYPE to determine what it'll do and either run su, pkexec or su in a terminal.
Punching "timeshift-gtk" into a terminal will not work resp. consistently lead to that result.If you want to debug the timeshift-launcher script add
exec 1> /tmp/timeshift.dbg 2>&1 set -x
below the shebang and click your icon that doesn't work. Then inspect /tmp/timeshift.dbg
I have the content I've posted before this one.
Offline
Which is entirely not a trace of the timeshift-launcher script but from https://github.com/linuxmint/timeshift/ … t-launcher it looks like you entered the wayland/pkexec branch but the script doesn't import the relevant environment - this is probably a wayland specific issue.
https://github.com/linuxmint/timeshift/issues/206
Next to just inheriting the entire environment you could adapt https://gist.github.com/AladW/de1c5676d93d05a5a0e1 - obviously don't inherit it from xinit.
Offline
Which is entirely not a trace of the timeshift-launcher script but from https://github.com/linuxmint/timeshift/ … t-launcher it looks like you entered the wayland/pkexec branch but the script doesn't import the relevant environment - this is probably a wayland specific issue.
https://github.com/linuxmint/timeshift/issues/206
Next to just inheriting the entire environment you could adapt https://gist.github.com/AladW/de1c5676d93d05a5a0e1 - obviously don't inherit it from xinit.
I created the timeshift.sh shell script that executes the
bash -c 'pkexec env $(env) timeshift-launcher'
, and replaced the Exec line in the desktop file to execute that bash script.
Offline