File fix-enlightenment-support.patch of Package xdg-utils.openSUSE_Leap_42.1_Update
Index: xdg-utils-20150119/scripts/xdg-su.in
===================================================================
--- xdg-utils-20150119.orig/scripts/xdg-su.in
+++ xdg-utils-20150119/scripts/xdg-su.in
@@ -104,6 +104,27 @@ su_xfce()
[ x"$1" != x"" ] || exit_failure_syntax
+su_enlightenment()
+{
+# Enlightenment doesn't have any reasonably working su/sudo graphical interface
+# but terminology works as a drop in replacement for xterm and has a matching theme
+ if which terminology >/dev/null ; then
+ if [ -z "$user" ] ; then
+ terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd'"
+ else
+ terminology -g 60x5 -T "xdg-su: $cmd" -e "su -c '$cmd' '$user'"
+ fi
+
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+ else
+ su_generic
+ fi
+}
+
user=
cmd=
while [ $# -gt 0 ] ; do
@@ -167,6 +188,10 @@ case "$DE" in
su_xfce
;;
+ enlightenment)
+ su_enlightenment
+ ;;
+
*)
[ x"$user" = x"" ] && user=root
exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"
Index: xdg-utils-20150119/scripts/xdg-terminal.in
===================================================================
--- xdg-utils-20150119.orig/scripts/xdg-terminal.in
+++ xdg-utils-20150119/scripts/xdg-terminal.in
@@ -146,6 +146,19 @@ terminal_lxde()
fi
}
+terminal_enlightenment()
+{
+ if which terminology &>/dev/null; then
+ if [ x"$1" = x"" ]; then
+ terminology
+ else
+ terminology -e "$1"
+ fi
+ else
+ terminal_generic "$1"
+ fi
+}
+
#[ x"$1" != x"" ] || exit_failure_syntax
command=
@@ -189,6 +202,10 @@ case "$DE" in
lxde)
terminal_lxde "$command"
;;
+
+ enlightenment)
+ terminal_enlightenment "$command"
+ ;;
generic)
terminal_generic "$command"