Skip to content

Commit d1e1a50

Browse files
committed
timeshift-launcher: Remove wayland check, rename copy_env() to
setup_env(). We don't need to check the environment anymore, and setup_env is a little more appropriate than copy_env since we're not copying verbatim anymore.
1 parent 331d568 commit d1e1a50

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/AppConsole.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class AppConsole : GLib.Object {
7575
return 0;
7676
}
7777

78-
Main.copy_env();
78+
Main.setup_env();
7979

8080
LOG_ENABLE = false;
8181
init_tmp();

src/AppGtk.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public class AppGtk : GLib.Object {
6666
}
6767
}
6868

69-
Main.copy_env();
69+
Main.setup_env();
7070

7171
Gtk.init(ref args);
7272

src/Core/Main.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public class Main : GLib.Object{
370370
}
371371

372372
// copy env from the spawning parent to this
373-
public static void copy_env() {
373+
public static void setup_env() {
374374
Pid user_pid = TeeJee.ProcessHelper.get_user_process();
375375
string[]? user_env = TeeJee.ProcessHelper.get_process_env(user_pid);
376376
if(user_env == null) {

src/timeshift-launcher

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ else
1212
su - -c "${app_command}"
1313
else
1414
# script is running in non-interactive mode
15-
if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
16-
pkexec "${app_command}"
17-
elif command -v pkexec >/dev/null 2>&1; then
15+
if command -v pkexec >/dev/null 2>&1; then
1816
pkexec "${app_command}"
1917
elif command -v sudo >/dev/null 2>&1; then
2018
x-terminal-emulator -e "sudo ${app_command}"

0 commit comments

Comments
 (0)