From fe160f62dc5efda1a2fc945931fb21d0bf36e4a3 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 19:43:07 +0100 Subject: [PATCH] install a custom system xinitrc which tries to start the installed desktop manager provide directory %{_sysconfdir}/X11/xinit/xinitrc.d [release 1.3.3-2mamba;Fri Jun 27 2014] --- xinit-xinitrc | 27 +++++++++++++++++++++++++++ xinit.spec | 13 +++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 xinit-xinitrc diff --git a/xinit-xinitrc b/xinit-xinitrc new file mode 100644 index 0000000..375c33e --- /dev/null +++ b/xinit-xinitrc @@ -0,0 +1,27 @@ +#!/bin/sh +# +# ~/.xinitrc +# +# Executed by startx (run your window manager from here) + +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/*; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +# XFCE in questo caso รจ il default +case $1 in + gnome) exec gnome-session;; + kde) exec startkde;; + lxde) exec startlxde;; + xfce) exec startxfce4;; + *) for s in startkde gnome-session startlxde startxfce4; do + e=$(which $s) + if [ "$e" -a -x $e ]; then + exec $e + break + fi + done ;; +esac diff --git a/xinit.spec b/xinit.spec index 302f40d..90867cb 100644 --- a/xinit.spec +++ b/xinit.spec @@ -1,6 +1,6 @@ Name: xinit Version: 1.3.3 -Release: 1mamba +Release: 2mamba Summary: xinit - X Window System initializer Group: Graphical Desktop/Applications/Utilities Vendor: openmamba @@ -8,6 +8,7 @@ Distribution: openmamba Packager: Tiziana Ferro URL: http://xorg.freedesktop.org/ Source: http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2 +Source1: xinit-xinitrc License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -30,6 +31,9 @@ When this first client exits, xinit will kill the X server and then terminate. [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall +install -d -m0755 %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d +install -m0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -39,7 +43,8 @@ When this first client exits, xinit will kill the X server and then terminate. %files %defattr(-,root,root) -%config %{_sysconfdir}/X11/xinit/xinitrc +%{_sysconfdir}/X11/xinit/xinitrc +%dir %{_sysconfdir}/X11/xinit/xinitrc.d %{_bindir}/%{name} %{_bindir}/startx %{_mandir}/man?/* @@ -47,6 +52,10 @@ When this first client exits, xinit will kill the X server and then terminate. #ChangeLog README %changelog +* Fri Jun 27 2014 Silvan Calarco 1.3.3-2mamba +- install a custom system xinitrc which tries to start the installed desktop manager +- provide directory %{_sysconfdir}/X11/xinit/xinitrc.d + * Sat Sep 14 2013 Automatic Build System 1.3.3-1mamba - automatic update by autodist