File: synaptic-pkexec

package info (click to toggle)
synaptic 0.84.6
  • links: PTS
  • area: main
  • in suites: buster
  • size: 21,340 kB
  • sloc: cpp: 24,306; xml: 10,562; ansic: 2,084; makefile: 578; sh: 452; sed: 93; python: 82
file content (19 lines) | stat: -rwxr-xr-x 568 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

USING_WAYLAND=0
if [ ! "x${WAYLAND_DISPLAY}" = "x" ]; then
    USING_WAYLAND=1
fi
if [ "x${XDG_SESSION_TYPE}" = "xwayland" ]; then
    USING_WAYLAND=1
fi

if [ "x${USING_WAYLAND}" = "x1" ]; then
    # Running wayland; start synaptic without pkexec
    zenity --warning --width=500 --text \
        "You are using Wayland environment, Synaptic will continue without administrative privileges.\\n\
To make Synaptic fully functional, please restart your session without Wayland."
    exec "/usr/sbin/synaptic" "$@"
else
    pkexec "/usr/sbin/synaptic" "$@"
fi