forked from pool/xdg-utils
Jiri Slaby
5ea23efc6c
Patch by Simon Lees simon@simotek.net based off a earlier patch by Tomas Cech, Fixes openSUSE bug 778786 this patch does 2 things, 1. In both xdg-su and xdg-terminal enlightenment is detected but then no action is performed, this patch performs a action in these cases 2. Rather then performing the generic action specific enlightenment actions have been added to use terminology rather then xterm as it is essientially the enlightenment terminal emulator and matches the terminology theme I'm happy to help get these fixes upstream, but i don't know who upstream is OBS-URL: https://build.opensuse.org/request/show/266558 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=40
87 lines
2.3 KiB
Diff
87 lines
2.3 KiB
Diff
Index: xdg-utils-20120916/scripts/xdg-su.in
|
|
Patch by Simon Lees simon@simotek.net based off a earlier patch
|
|
by Tomas Cech, this patch does 2 things,
|
|
1. In both xdg-su and xdg-terminal enlightenment is detected but then
|
|
no action is performed, this patch performs a action in these cases
|
|
2. Rather then performing the generic action specific enlightenment
|
|
actions have been added to use terminology rather then xterm as it
|
|
is essientially the enlightenment terminal emulator and matches the
|
|
terminology theme
|
|
===================================================================
|
|
--- xdg-utils-20120916.orig/scripts/xdg-su.in
|
|
+++ xdg-utils-20120916/scripts/xdg-su.in
|
|
@@ -525,6 +525,27 @@
|
|
|
|
[ 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
|
|
@@ -588,6 +609,10 @@
|
|
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-20120916/scripts/xdg-terminal.in
|
|
===================================================================
|
|
--- xdg-utils-20120916.orig/scripts/xdg-terminal.in
|
|
+++ xdg-utils-20120916/scripts/xdg-terminal.in
|
|
@@ -563,6 +563,19 @@
|
|
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=
|
|
@@ -606,6 +619,10 @@
|
|
lxde)
|
|
terminal_lxde "$command"
|
|
;;
|
|
+
|
|
+ enlightenment)
|
|
+ terminal_enlightenment "$command"
|
|
+ ;;
|
|
|
|
generic)
|
|
terminal_generic "$command"
|