Toshaan Bharvani
2 years ago
commit
36f97cf129
13 changed files with 684 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||||||
|
From 72939fed64b00be4a74dd0e1bf0b418e00ac4c57 Mon Sep 17 00:00:00 2001 |
||||||
|
From: Hans de Goede <hdegoede@redhat.com> |
||||||
|
Date: Fri, 20 Mar 2015 14:30:08 +0100 |
||||||
|
Subject: [PATCH xinit 3/3] startx: Make startx auto display select work with |
||||||
|
per user /tmp dirs |
||||||
|
|
||||||
|
If a separate /tmp per user is used the existing auto display select code |
||||||
|
does not work, add an extra check for the unix socket for the display number |
||||||
|
existing in /proc/net/unix (linux only). |
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||||
|
--- |
||||||
|
startx.cpp | 6 +++++- |
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-) |
||||||
|
|
||||||
|
diff --git a/startx.cpp b/startx.cpp |
||||||
|
index fe49996..3b0dd86 100644 |
||||||
|
--- a/startx.cpp |
||||||
|
+++ b/startx.cpp |
||||||
|
@@ -120,7 +120,11 @@ enable_xauth=1 |
||||||
|
XCOMM Automatically determine an unused $DISPLAY |
||||||
|
d=0 |
||||||
|
while true ; do |
||||||
|
- [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break |
||||||
|
+ [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || |
||||||
|
+#ifdef __linux__ |
||||||
|
+ grep -q "/tmp/.X11-unix/X$d" "/proc/net/unix" || |
||||||
|
+#endif |
||||||
|
+ break |
||||||
|
d=$(($d + 1)) |
||||||
|
done |
||||||
|
defaultdisplay=":$d" |
||||||
|
-- |
||||||
|
2.3.3 |
||||||
|
|
@ -0,0 +1,78 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This |
||||||
|
# copyrighted material is made available to anyone wishing to use, modify, |
||||||
|
# copy, or redistribute it subject to the terms and conditions of the |
||||||
|
# GNU General Public License version 2. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with this program; if not, write to the Free Software |
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||||||
|
|
||||||
|
GSESSION="$(type -p gnome-session)" |
||||||
|
MSESSION="$(type -p mate-session)" |
||||||
|
STARTKDE="$(type -p startkde)" |
||||||
|
STARTLXDE="$(type -p startlxde)" |
||||||
|
|
||||||
|
# check to see if the user has a preferred desktop |
||||||
|
PREFERRED= |
||||||
|
if [ -f /etc/sysconfig/desktop ]; then |
||||||
|
. /etc/sysconfig/desktop |
||||||
|
if [ "$DESKTOP" = "GNOME" ]; then |
||||||
|
PREFERRED="$GSESSION" |
||||||
|
elif [ "$DESKTOP" = "MATE" ]; then |
||||||
|
PREFERRED="$MSESSION" |
||||||
|
elif [ "$DESKTOP" = "KDE" ]; then |
||||||
|
PREFERRED="$STARTKDE" |
||||||
|
elif [ "$DESKTOP" = "LXDE" ]; then |
||||||
|
PREFERRED="$STARTLXDE" |
||||||
|
fi |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -n "$PREFERRED" ]; then |
||||||
|
exec "$PREFERRED" |
||||||
|
fi |
||||||
|
|
||||||
|
# now if we can reach here, either no desktop file was present, |
||||||
|
# or the desktop requested is not installed. |
||||||
|
|
||||||
|
if [ -n "$GSESSION" ]; then |
||||||
|
# by default, we run GNOME. |
||||||
|
exec "$GSESSION" |
||||||
|
elif [ -n "$STARTKDE" ]; then |
||||||
|
# if GNOME isn't installed, try KDE. |
||||||
|
exec "$STARTKDE" |
||||||
|
elif [ -n "$STARTLXDE" ]; then |
||||||
|
# if neither GNOME nor KDE then LXDE |
||||||
|
exec "$STARTLXDE" |
||||||
|
fi |
||||||
|
|
||||||
|
# We should also support /etc/X11/xinit/Xclients.d scripts |
||||||
|
XCLIENTS_D=/etc/X11/xinit/Xclients.d |
||||||
|
if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then |
||||||
|
exec -l $SHELL -c "$SSH_AGENT $XCLIENTS_D/Xclients.$1.sh" |
||||||
|
fi |
||||||
|
|
||||||
|
# Failsafe. |
||||||
|
|
||||||
|
# these files are left sitting around by TheNextLevel. |
||||||
|
rm -f $HOME/Xrootenv.0 |
||||||
|
|
||||||
|
# Argh! Nothing good is installed. Fall back to twm |
||||||
|
{ |
||||||
|
# gosh, neither fvwm95 nor fvwm2 is available; |
||||||
|
# fall back to failsafe settings |
||||||
|
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45' |
||||||
|
|
||||||
|
if [ -x /usr/bin/xclock ] ; then |
||||||
|
/usr/bin/xclock -geometry 100x100-5+5 & |
||||||
|
fi |
||||||
|
if [ -x /usr/bin/xterm ] ; then |
||||||
|
/usr/bin/xterm -geometry 80x50-50+150 & |
||||||
|
fi |
||||||
|
if [ -x /usr/bin/firefox -a -f /usr/share/doc/HTML/index.html ]; then |
||||||
|
/usr/bin/firefox /usr/share/doc/HTML/index.html & |
||||||
|
fi |
||||||
|
if [ -x /usr/bin/twm ] ; then |
||||||
|
exec /usr/bin/twm |
||||||
|
fi |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
! /etc/X11/Xmodmap |
||||||
|
! |
||||||
|
! global Xmodmap file -- used by both xdm and xinit (startx) |
||||||
|
|
||||||
|
! keycode and keysym remapping should generally be used only if the X |
||||||
|
! server config file has been configured to disable the XKEYBOARD |
||||||
|
! extension |
||||||
|
|
||||||
|
! i386 and alpha |
||||||
|
! keycode 22 = BackSpace |
||||||
|
! keycode 107 = Delete |
||||||
|
|
||||||
|
! powerpc |
||||||
|
! keycode 59 = BackSpace |
||||||
|
! keycode 125 = Delete |
||||||
|
|
||||||
|
! sparc |
||||||
|
! keycode 50 = BackSpace |
||||||
|
! keycode 73 = Delete |
||||||
|
|
||||||
|
! Euro sign support |
||||||
|
! keycode 26 = e E currency |
||||||
|
! keycode 54 = c C cent |
||||||
|
! keycode 113 = Mode_switch Mode_switch Multi_key |
||||||
|
|
@ -0,0 +1,13 @@ |
|||||||
|
! This is the global resources file that is loaded when |
||||||
|
! all users log in, as well as for the login screen |
||||||
|
|
||||||
|
! Fix the Xft dpi to 96; this prevents tiny fonts |
||||||
|
! or HUGE fonts depending on the screen size. |
||||||
|
Xft.dpi: 96 |
||||||
|
|
||||||
|
! hintstyle: medium means that (for Postscript fonts) we |
||||||
|
! position the stems for maximum constrast and consistency |
||||||
|
! but do not force the stems to integral widths. hintnone, |
||||||
|
! hintslight, and hintfull are the other possibilities. |
||||||
|
Xft.hintstyle: hintmedium |
||||||
|
Xft.hinting: true |
@ -0,0 +1,93 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This |
||||||
|
# copyrighted material is made available to anyone wishing to use, modify, |
||||||
|
# copy, or redistribute it subject to the terms and conditions of the |
||||||
|
# GNU General Public License version 2. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with this program; if not, write to the Free Software |
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||||||
|
|
||||||
|
# redirect errors to a file in user's home directory if we can |
||||||
|
if [ -z "$GDMSESSION" ]; then |
||||||
|
# GDM redirect output itself in a smarter fashion |
||||||
|
errfile="$HOME/.xsession-errors" |
||||||
|
if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ); then |
||||||
|
chmod 600 "$errfile" |
||||||
|
[ -x /sbin/restorecon ] && /sbin/restorecon $errfile |
||||||
|
exec > "$errfile" 2>&1 |
||||||
|
else |
||||||
|
errfile=$(mktemp -q /tmp/xses-$USER.XXXXXX) |
||||||
|
if [ $? -eq 0 ]; then |
||||||
|
exec > "$errfile" 2>&1 |
||||||
|
fi |
||||||
|
fi |
||||||
|
fi |
||||||
|
|
||||||
|
SWITCHDESKPATH=/usr/share/switchdesk |
||||||
|
|
||||||
|
# Mandatorily source xinitrc-common, which is common code shared between the |
||||||
|
# Xsession and xinitrc scripts which has been factored out to avoid duplication |
||||||
|
. /etc/X11/xinit/xinitrc-common |
||||||
|
|
||||||
|
# This Xsession.d implementation, is intended to obsolete and replace the |
||||||
|
# various mechanisms present in the 'case' statement which follows, and to |
||||||
|
# eventually be able to easily remove all hard coded window manager specific |
||||||
|
# content from this script. See bug #142260 for additional explanation and |
||||||
|
# details. All window manager rpm packages and desktop environment |
||||||
|
# packages should be modified to provide the Xsession.d/Xsession.$wm scripts |
||||||
|
# to start themselves up. In the future, the legacy switchdesk mechanisms |
||||||
|
# and hard coded window managers and desktop environments will be removed from |
||||||
|
# this script. |
||||||
|
XCLIENTS_D=/etc/X11/xinit/Xclients.d |
||||||
|
if [ "$#" -eq 1 ] && [ -x "$XCLIENTS_D/Xclients.$1.sh" ]; then |
||||||
|
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $XCLIENTS_D/Xclients.$1.sh" |
||||||
|
else |
||||||
|
# now, we see if xdm/gdm/kdm has asked for a specific environment |
||||||
|
case $# in |
||||||
|
1) |
||||||
|
if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then |
||||||
|
exec -l $SHELL -c "$SWITCHDESKPATH/Xclients.$1"; |
||||||
|
fi; |
||||||
|
|
||||||
|
case "$1" in |
||||||
|
failsafe) |
||||||
|
exec -l $SHELL -c "xterm -geometry 80x24-0-0" |
||||||
|
;; |
||||||
|
gnome|gnome-session) |
||||||
|
# lack of SSH_AGENT is intentional, see #441123. though |
||||||
|
# the whole thing should really happen in xinitrc.d anyway. |
||||||
|
exec -l $SHELL -c gnome-session |
||||||
|
exec /bin/sh -c "exec -l $SHELL -c \"gnome-session\"" |
||||||
|
;; |
||||||
|
kde|kde1|kde2) |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"startkde\"" |
||||||
|
;; |
||||||
|
twm) |
||||||
|
# fall back to twm |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"twm\"" |
||||||
|
;; |
||||||
|
*) |
||||||
|
# GDM provies either a command line as the first argument or |
||||||
|
# provides 'failsafe', 'default' or 'custom'. KDM will do the |
||||||
|
# same at some point |
||||||
|
if [ "$1" != "default" -a "$1" != "custom" ]; then |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT /bin/sh -c "exec -l $SHELL -c \"$1\"" |
||||||
|
fi |
||||||
|
;; |
||||||
|
esac |
||||||
|
esac |
||||||
|
fi |
||||||
|
|
||||||
|
# otherwise, take default action |
||||||
|
if [ -x "$HOME/.xsession" ]; then |
||||||
|
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.xsession" |
||||||
|
elif [ -x "$HOME/.Xclients" ]; then |
||||||
|
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients" |
||||||
|
elif [ -x /etc/X11/xinit/Xclients ]; then |
||||||
|
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients" |
||||||
|
else |
||||||
|
# should never get here; failsafe fallback |
||||||
|
exec -l $SHELL -c "xsm" |
||||||
|
fi |
||||||
|
|
@ -0,0 +1,12 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# Copyright (C) 2006 Red Hat, Inc. All rights reserved. This |
||||||
|
# copyrighted material is made available to anyone wishing to use, modify, |
||||||
|
# copy, or redistribute it subject to the terms and conditions of the |
||||||
|
# GNU General Public License version 2. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with this program; if not, write to the Free Software |
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||||||
|
# |
||||||
|
[ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] && |
||||||
|
xhost +si:localuser:`id -un` >& /dev/null |
@ -0,0 +1,38 @@ |
|||||||
|
diff -up xinit-1.3.4/xinit.c.client-session xinit-1.3.4/xinit.c |
||||||
|
--- xinit-1.3.4/xinit.c.client-session 2014-03-25 10:20:26.000000000 +0100 |
||||||
|
+++ xinit-1.3.4/xinit.c 2014-09-11 17:03:30.928360694 +0200 |
||||||
|
@@ -89,6 +89,8 @@ char xserverrcbuf[256]; |
||||||
|
|
||||||
|
#define TRUE 1 |
||||||
|
#define FALSE 0 |
||||||
|
+#define OK_EXIT 0 |
||||||
|
+#define ERR_EXIT 1 |
||||||
|
|
||||||
|
static char *default_server = "X"; |
||||||
|
static char *default_display = ":0"; /* choose most efficient */ |
||||||
|
@@ -560,6 +562,7 @@ startClient(char *client_argv[]) |
||||||
|
{ |
||||||
|
clientpid = fork(); |
||||||
|
if (clientpid == 0) { |
||||||
|
+ int fd; |
||||||
|
set_environment(); |
||||||
|
setWindowPath(); |
||||||
|
|
||||||
|
@@ -567,7 +570,16 @@ startClient(char *client_argv[]) |
||||||
|
Error("cannot change uid"); |
||||||
|
_exit(EXIT_FAILURE); |
||||||
|
} |
||||||
|
- setpgid(0, getpid()); |
||||||
|
+ fd = open ("/dev/null", O_RDONLY); |
||||||
|
+ |
||||||
|
+ if (fd < 0) { |
||||||
|
+ Error("cannot open /dev/null: %s\n", strerror(errno)); |
||||||
|
+ _exit(ERR_EXIT); |
||||||
|
+ } |
||||||
|
+ close (STDIN_FILENO); |
||||||
|
+ dup2 (fd, STDIN_FILENO); |
||||||
|
+ close (fd); |
||||||
|
+ setsid(); |
||||||
|
Execute(client_argv); |
||||||
|
Error("Unable to run program \"%s\"", client_argv[0]); |
||||||
|
|
@ -0,0 +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 |
||||||
|
@@ -140,8 +140,10 @@ |
||||||
|
have_vtarg="yes" |
||||||
|
fi |
||||||
|
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 |
||||||
|
|
||||||
|
XCOMM if no display, use default |
@ -0,0 +1,7 @@ |
|||||||
|
#!/bin/sh |
||||||
|
for session in ~/.xsession ~/.Xclients /etc/X11/xinit/Xclients ; |
||||||
|
do |
||||||
|
if [ -f ${session} ] ; then |
||||||
|
exec ${session} |
||||||
|
fi |
||||||
|
done |
@ -0,0 +1,4 @@ |
|||||||
|
[Desktop Entry] |
||||||
|
Name=User script |
||||||
|
Comment=This session runs ~/.xsession or ~/.Xclients if available |
||||||
|
Exec=/usr/libexec/xinit-compat |
@ -0,0 +1,33 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# Copyright (C) 1999 - 2005 Red Hat, Inc. All rights reserved. This |
||||||
|
# copyrighted material is made available to anyone wishing to use, modify, |
||||||
|
# copy, or redistribute it subject to the terms and conditions of the |
||||||
|
# GNU General Public License version 2. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with this program; if not, write to the Free Software |
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||||||
|
# |
||||||
|
# Authors: |
||||||
|
# Mike A. Harris <mharris@redhat.com> |
||||||
|
|
||||||
|
# Mandatorily source xinitrc-common, which is common code shared between the |
||||||
|
# Xsession and xinitrc scripts which has been factored out to avoid duplication |
||||||
|
. /etc/X11/xinit/xinitrc-common |
||||||
|
|
||||||
|
# The user may have their own clients they want to run. If they don't, |
||||||
|
# fall back to system defaults. |
||||||
|
if [ -f $HOME/.Xclients ]; then |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \ |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients |
||||||
|
elif [ -f /etc/X11/xinit/Xclients ]; then |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \ |
||||||
|
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients |
||||||
|
else |
||||||
|
# Failsafe settings. Although we should never get here |
||||||
|
# (we provide fallbacks in Xclients as well) it can't hurt. |
||||||
|
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45' |
||||||
|
[ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 & |
||||||
|
[ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 & |
||||||
|
[ -x /usr/bin/twm ] && /usr/bin/twm |
||||||
|
fi |
@ -0,0 +1,61 @@ |
|||||||
|
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This |
||||||
|
# copyrighted material is made available to anyone wishing to use, modify, |
||||||
|
# copy, or redistribute it subject to the terms and conditions of the |
||||||
|
# GNU General Public License version 2. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with this program; if not, write to the Free Software |
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||||||
|
|
||||||
|
# xinitrc-common |
||||||
|
# |
||||||
|
# This is common code shared by both Xsession and xinitrc scripts. Be sure |
||||||
|
# to take this into account when fixing bugs or adding new functionality. |
||||||
|
|
||||||
|
# Set up i18n environment |
||||||
|
if [ -r /etc/profile.d/lang.sh ]; then |
||||||
|
. /etc/profile.d/lang.sh |
||||||
|
fi |
||||||
|
|
||||||
|
[ -r $HOME/.profile ] && . $HOME/.profile |
||||||
|
|
||||||
|
userresources=$HOME/.Xresources |
||||||
|
usermodmap=$HOME/.Xmodmap |
||||||
|
userxkbmap=$HOME/.Xkbmap |
||||||
|
|
||||||
|
sysresources=/etc/X11/Xresources |
||||||
|
sysmodmap=/etc/X11/Xmodmap |
||||||
|
sysxkbmap=/etc/X11/Xkbmap |
||||||
|
|
||||||
|
# merge in defaults |
||||||
|
[ -r "$sysresources" ] && xrdb -nocpp -merge "$sysresources" |
||||||
|
[ -r "$userresources" ] && xrdb -merge "$userresources" |
||||||
|
|
||||||
|
# merge in keymaps |
||||||
|
if [ -r "$sysxkbmap" ]; then |
||||||
|
setxkbmap $(cat "$sysxkbmap") |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -r "$userxkbmap" ]; then |
||||||
|
setxkbmap $(cat "$userxkbmap") |
||||||
|
fi |
||||||
|
|
||||||
|
# xkb and xmodmap don't play nice together |
||||||
|
if ! [ -r "$sysxkbmap" -o -r "$userxkbmap" ] ; then |
||||||
|
[ -r "$sysmodmap" ] && xmodmap "$sysmodmap" |
||||||
|
[ -r "$usermodmap" ] && xmodmap "$usermodmap" |
||||||
|
fi |
||||||
|
|
||||||
|
# run all system xinitrc shell scripts. |
||||||
|
for file in /etc/X11/xinit/xinitrc.d/* ; do |
||||||
|
. $file |
||||||
|
done |
||||||
|
|
||||||
|
# Prefix launch of session with ssh-agent if available and not already running. |
||||||
|
if [ -z "$SSH_AGENT" ] && [ -z "$SSH_AUTH_SOCK" ] && [ -z "$SSH_AGENT_PID" ] && [ -x /usr/bin/ssh-agent ]; then |
||||||
|
if [ "x$TMPDIR" != "x" ]; then |
||||||
|
SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR" |
||||||
|
else |
||||||
|
SSH_AGENT="/usr/bin/ssh-agent" |
||||||
|
fi |
||||||
|
fi |
@ -0,0 +1,270 @@ |
|||||||
|
%global pkgname xinit |
||||||
|
|
||||||
|
Summary: X.Org X11 X Window System xinit startup scripts |
||||||
|
Name: xorg-x11-%{pkgname} |
||||||
|
Version: 1.4.0 |
||||||
|
Release: 11%{?dist} |
||||||
|
License: MIT |
||||||
|
URL: https://www.x.org |
||||||
|
|
||||||
|
Source0: https://xorg.freedesktop.org/archive/individual/app/%{pkgname}-%{version}.tar.bz2 |
||||||
|
Source10: xinitrc-common |
||||||
|
Source11: xinitrc |
||||||
|
Source12: Xclients |
||||||
|
Source13: Xmodmap |
||||||
|
Source14: Xresources |
||||||
|
# NOTE: Xsession is used by xdm/kdm/gdm and possibly others, so we keep it |
||||||
|
# here instead of the xdm package. |
||||||
|
Source16: Xsession |
||||||
|
Source17: localuser.sh |
||||||
|
Source18: xinit-compat.desktop |
||||||
|
Source19: xinit-compat |
||||||
|
|
||||||
|
# Fedora specific patches |
||||||
|
Patch1: xinit-1.0.2-client-session.patch |
||||||
|
Patch5: 0003-startx-Make-startx-auto-display-select-work-with-per.patch |
||||||
|
# Fedora specific patch to match the similar patch in the xserver |
||||||
|
Patch6: xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch |
||||||
|
|
||||||
|
# The build process uses cpp (the C preprocessor) to do some text |
||||||
|
# processing on several files that are not C or C++. However, these |
||||||
|
# files have '.cpp' extensions, which causes cpp to preprocess them |
||||||
|
# using cc1plus, which is part of gcc-c++. We could patch the build |
||||||
|
# to pass '-xc' or '-xassembler-with-cpp' to cpp to avoid this, but |
||||||
|
# doing so actually causes the processing to be done differently |
||||||
|
# somehow, and a bunch of empty lines to show up at the top of |
||||||
|
# startx (which is one of the files so processed). So it seems better |
||||||
|
# to just BuildRequire gcc-c++ for now, so the processing is done as |
||||||
|
# it was before. See https://bugs.freedesktop.org/show_bug.cgi?id=107368 |
||||||
|
# for more on this. |
||||||
|
BuildRequires: make |
||||||
|
BuildRequires: automake gcc gcc-c++ |
||||||
|
BuildRequires: pkgconfig(x11) |
||||||
|
BuildRequires: dbus-devel |
||||||
|
|
||||||
|
# NOTE: startx needs xauth in order to run, but that is not picked up |
||||||
|
# automatically by rpm. (Bug #173684) |
||||||
|
Requires: xorg-x11-xauth |
||||||
|
# next two are for localuser.sh |
||||||
|
Requires: coreutils |
||||||
|
Requires: xhost |
||||||
|
|
||||||
|
Provides: %{pkgname} = %{version} |
||||||
|
|
||||||
|
%description |
||||||
|
X.Org X11 X Window System xinit startup scripts. |
||||||
|
|
||||||
|
%package session |
||||||
|
Summary: Display manager support for ~/.xsession and ~/.Xclients |
||||||
|
|
||||||
|
%description session |
||||||
|
Allows legacy ~/.xsession and ~/.Xclients files to be used from display |
||||||
|
managers. |
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q -n %{pkgname}-%{version} |
||||||
|
%patch1 -p1 |
||||||
|
%patch5 -p1 |
||||||
|
%patch6 -p1 |
||||||
|
|
||||||
|
%build |
||||||
|
%configure |
||||||
|
make %{?_smp_mflags} |
||||||
|
|
||||||
|
%install |
||||||
|
%make_install |
||||||
|
install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compat.desktop |
||||||
|
|
||||||
|
# Install Red Hat custom xinitrc, etc. |
||||||
|
{ |
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit |
||||||
|
|
||||||
|
install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc-common |
||||||
|
|
||||||
|
for script in %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do |
||||||
|
install -p -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/} |
||||||
|
done |
||||||
|
|
||||||
|
install -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xmodmap |
||||||
|
install -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xresources |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d |
||||||
|
install -p -m 755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/localuser.sh |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/Xclients.d |
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_libexecdir} |
||||||
|
install -p -m 755 %{SOURCE19} $RPM_BUILD_ROOT%{_libexecdir} |
||||||
|
} |
||||||
|
|
||||||
|
%files |
||||||
|
%doc COPYING README ChangeLog |
||||||
|
%{_bindir}/startx |
||||||
|
%{_bindir}/xinit |
||||||
|
%dir %{_sysconfdir}/X11/xinit |
||||||
|
%{_sysconfdir}/X11/xinit/xinitrc |
||||||
|
%{_sysconfdir}/X11/xinit/xinitrc-common |
||||||
|
%config(noreplace) %{_sysconfdir}/X11/Xmodmap |
||||||
|
%config(noreplace) %{_sysconfdir}/X11/Xresources |
||||||
|
%dir %{_sysconfdir}/X11/xinit/Xclients.d |
||||||
|
%{_sysconfdir}/X11/xinit/Xclients |
||||||
|
%{_sysconfdir}/X11/xinit/Xsession |
||||||
|
%dir %{_sysconfdir}/X11/xinit/xinitrc.d |
||||||
|
%{_sysconfdir}/X11/xinit/xinitrc.d/* |
||||||
|
%{_mandir}/man1/startx.1* |
||||||
|
%{_mandir}/man1/xinit.1* |
||||||
|
|
||||||
|
%files session |
||||||
|
%{_libexecdir}/xinit-compat |
||||||
|
%{_datadir}/xsessions/xinit-compat.desktop |
||||||
|
|
||||||
|
%changelog |
||||||
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.0-11 |
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags |
||||||
|
Related: rhbz#1991688 |
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.0-10 |
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 |
||||||
|
|
||||||
|
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-9 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Nov 5 11:00:56 AEST 2020 Peter Hutterer <peter.hutterer@redhat.com> - 1.4.0-8 |
||||||
|
- Add BuildRequires for make |
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-7 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-6 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-5 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||||
|
|
||||||
|
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 1.4.0-3 |
||||||
|
- Rebuild with gcc-c++ (build without it succeeded but was broken) |
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon Mar 12 2018 Adam Jackson <ajax@redhat.com> - 1.4.0-1 |
||||||
|
- xinit 1.4.0 |
||||||
|
|
||||||
|
* Mon Feb 19 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.3.4-18 |
||||||
|
- Add BR for automake and gcc |
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-17 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-16 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-15 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-14 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
||||||
|
|
||||||
|
* Wed Dec 14 2016 Hans de Goede <hdegoede@redhat.com> - 1.3.4-13 |
||||||
|
- Check for all 3 of SSH_AGENT, SSH_AGENT_PID and SSH_AUTH_SOCK to fix |
||||||
|
a regression introduced by the previous fix (rhbz#1352339) |
||||||
|
|
||||||
|
* Mon Aug 29 2016 Hans de Goede <hdegoede@redhat.com> - 1.3.4-12 |
||||||
|
- Drop 0001-startx-Pass-nolisten-tcp-by-default.patch this is the |
||||||
|
server default now |
||||||
|
- Check for SSH_AUTH_SOCK not SSH_AGENT in xinitrc-common (rhbz#1352339) |
||||||
|
|
||||||
|
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-11 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
||||||
|
|
||||||
|
* Wed Jan 20 2016 Peter Hutterer <peter.hutterer@redhat.com> |
||||||
|
- s/define/global/ |
||||||
|
|
||||||
|
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-10 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon May 18 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-9 |
||||||
|
- Fix typo in Xsession file (rhbz#1222299) |
||||||
|
|
||||||
|
* 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 |
||||||
|
|
||||||
|
* Wed Mar 18 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-6 |
||||||
|
- Set XORG_RUN_AS_USER_OK when starting X on the current tty, to run X |
||||||
|
to run without root rights when possible |
||||||
|
|
||||||
|
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.3.4-5 |
||||||
|
- Rebuilt for Fedora 23 Change |
||||||
|
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code |
||||||
|
|
||||||
|
* Tue Feb 3 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-4 |
||||||
|
- xinitrc-common: Do not override SSH_AGENT if already set (rhbz#1067676) |
||||||
|
|
||||||
|
* Thu Jan 22 2015 Simone Caronni <negativo17@gmail.com> - 1.3.4-3 |
||||||
|
- Xorg without root rights breaks by streams redirection (#1177513). |
||||||
|
- Format SPEC file; trim changelog. |
||||||
|
|
||||||
|
* Wed Oct 1 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.4-2 |
||||||
|
- Add support for MATE to Xclients (#1147905) |
||||||
|
|
||||||
|
* Thu Sep 11 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.4-1 |
||||||
|
- New upstream release 1.3.4 |
||||||
|
- Resolves #806491 #990213 #1006029 |
||||||
|
- Remove stale ck-xinit-session references from xinitrc-common (#910969) |
||||||
|
- Make startx pass "-nolisten tcp" by default, use -listen as server |
||||||
|
option to disable this (#1111684) |
||||||
|
- Teach Xclients script about lxde (#488602) |
||||||
|
|
||||||
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-13 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
||||||
|
|
||||||
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-12 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
||||||
|
|
||||||
|
* Tue Mar 25 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.2-11 |
||||||
|
- Fix startx ignoring a server or display passed on the cmdline (#960955) |
||||||
|
- Drop Fedora custom patch to unset XDG_SESSION_COOKIE, this was only for CK |
||||||
|
|
||||||
|
* Thu Jan 23 2014 Dave Airlie <airlied@redhat.com> 1.3.2-10 |
||||||
|
- fix for ppc64le enable (#1056742) |
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-9 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
||||||
|
|
||||||
|
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-8 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
||||||
|
|
||||||
|
* Mon Oct 01 2012 Kevin Fenzi <kevin@scrye.com> 1.3.2-7 |
||||||
|
- Add patch to not switch tty's, so systemd-logind works right with startx. |
||||||
|
- Partially Fixes bug #806491 |
||||||
|
|
||||||
|
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-6 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Apr 26 2012 Adam Jackson <ajax@redhat.com> 1.3.2-5 |
||||||
|
- xinit 1.3.2 |
||||||
|
|
||||||
|
* Thu Mar 08 2012 Adam Jackson <ajax@redhat.com> 1.3.1-5 |
||||||
|
- Rebuild |
||||||
|
|
||||||
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-3 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
||||||
|
|
||||||
|
* Wed Nov 16 2011 Adam Jackson <ajax@redhat.com> 1.3.1-2 |
||||||
|
- Drop ConsoleKit integration, being removed in F17 |
||||||
|
|
||||||
|
* Mon Jul 25 2011 Matěj Cepl <mcepl@redhat.com> - 1.3.1-1 |
||||||
|
- New upstream version. Patches updated. |
||||||
|
|
||||||
|
* Sat May 28 2011 Matěj Cepl <mcepl@redhat.com> - 1.0.9-21 |
||||||
|
- xinitrc-common sources ~/.profile (Bug 551508) |
||||||
|
|
||||||
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-20 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
Loading…
Reference in new issue