Initial commit

This commit is contained in:
Fierelier 2023-12-12 07:08:51 +01:00
commit ac10b95789
9 changed files with 104 additions and 0 deletions

9
LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2023
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

8
eldont-pipewire Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ "$SUDO_UID" = "" ]; then
echo "SUDO_UID is not set."
exit 1
fi
export XDG_RUNTIME_DIR="/tmp/$SUDO_UID-runtime-dir"
exec pipewire

8
eldont-pipewire-pulse Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ "$SUDO_UID" = "" ]; then
echo "SUDO_UID is not set."
exit 1
fi
export XDG_RUNTIME_DIR="/tmp/$SUDO_UID-runtime-dir"
exec pipewire-pulse

8
eldont-wireplumber Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ "$SUDO_UID" = "" ]; then
echo "SUDO_UID is not set."
exit 1
fi
export XDG_RUNTIME_DIR="/tmp/$SUDO_UID-runtime-dir"
exec wireplumber

27
eldont-xorg Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
VT="$(basename "$(ps hotty $$)")"
VT="${VT//tty/}"
#DISPLAY_RAW="$(($VT - 1))"
DISPLAY_RAW="$VT"
VT="$(($VT + 6))"
DISPLAY=":$DISPLAY_RAW"
CMD=(X "$DISPLAY")
if ! [ "$1" = "" ]; then
CMD+=("-config")
CMD+=("$1")
fi
CMD+=("vt$VT")
LOGFILE="$SUDO_HOME/.local/share/eldont-xorg/${DISPLAY_RAW}.txt"
unprivlx mkdir -p "$(dirname "$LOGFILE")"
if [ -f "$LOGFILE" ]; then
rm -f "$LOGFILE"
fi
unprivlx touch "$LOGFILE"
echo "* Starting: ${CMD[@]}"
"${CMD[@]}" &
PID=$!
unprivlx "$SUDO_HOME/.eldont-xorg" "$DISPLAY"
kill -n 15 "$PID" &>/dev/null

13
readme.txt Normal file
View File

@ -0,0 +1,13 @@
Some scripts for elogind-less systems. Made to be used in conjunction with privlx: https://git.lumen.sh/Fierelier/privlx
* skel/:
Stuff that goes into the user directory
* skelroot/
Stuff that goes into the root user's directory
* eldont-pipewire-pulse, eldont-wireplumber, eldont-pipewire:
Scripts enabling the use of pipewire (need to be launched with privlx)
* eldont-xorg:
Script enabling the use of X, launches X server with a user's ~/.eldont-xorg (needs to be launched with privlx)

25
skel/.eldont-xorg Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
export DISPLAY="$1"
DISPLAY_RAW="${DISPLAY:1}"
set +e
while true; do
echo "* Waiting for Xorg server ..."
if [ -S "/tmp/.X11-unix/X$DISPLAY_RAW" ]; then
break
fi
sleep 1
done
# Dirty, not needed if you use a "proper" DE
xterm & disown
sleep 3
# Here you can do some more stuff if you need it
glxinfo -B | grep "Vendor: AMD"
if [ "$?" = "0" ]; then
xrandr --output "VGA-1" --mode "1680x1050"
fi
# Your DE
exec me.fier.de start

View File

@ -0,0 +1,2 @@
-- Disable arbitration of user allowance of bluetooth via D-Bus user session
bluez_monitor.properties["with-logind"] = false

View File

@ -0,0 +1,4 @@
-- Disable reserving devices via D-Bus user session
alsa_monitor.properties["alsa.reserve"] = false
-- Disable use of flatpak portal integration
default_access.properties["enable-flatpak-portal"] = false