Only set XORG_RUN_AS_USER_OK when no vt is specified (#1203780)

This commit is contained in:
Hans de Goede 2015-04-30 14:22:11 +02:00
parent b5175fc982
commit 8f68bf4936
2 changed files with 14 additions and 8 deletions

View File

@ -1,12 +1,15 @@
diff -up xinit-1.3.4/startx.cpp~ xinit-1.3.4/startx.cpp
--- xinit-1.3.4/startx.cpp~ 2015-03-18 12:13:11.000000000 +0100
+++ xinit-1.3.4/startx.cpp 2015-03-18 12:49:49.445624223 +0100
@@ -199,6 +199,8 @@ if [ x"$server" = x ]; then
if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
vtarg="vt$tty_num -keeptty"
+ XCOMM Fedora specific mod to make X run as non root
+ export XORG_RUN_AS_USER_OK=1
@@ -140,8 +140,10 @@
have_vtarg="yes"
fi
#endif
done
-if [ "$have_vtarg" = "no" ]; then
+if [ "$have_vtarg" = "no" -a x"$vtarg" != x ]; then
serverargs="$serverargs $vtarg"
+ XCOMM Fedora specific mod to make X run as non root
+ export XORG_RUN_AS_USER_OK=1
fi
serverargs="$serverargs $listenarg"

View File

@ -3,7 +3,7 @@
Summary: X.Org X11 X Window System xinit startup scripts
Name: xorg-x11-%{pkgname}
Version: 1.3.4
Release: 7%{?dist}
Release: 8%{?dist}
License: MIT
URL: http://www.x.org
@ -115,6 +115,9 @@ install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compa
%{_datadir}/xsessions/xinit-compat.desktop
%changelog
* Thu Apr 30 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-8
- Only set XORG_RUN_AS_USER_OK when no vt is specified (#1203780)
* Fri Mar 20 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-7
- Fix startx auto display select not working when a Xserver started by
gdm is running