From df7ba0f2d8e5fd95a9a8f6e8c0bf669879fcaa4c Mon Sep 17 00:00:00 2001 From: potkan Date: Tue, 28 Apr 2026 23:23:20 +0200 Subject: [PATCH] Upload files to "res" --- res/4y.service | 15 +++++++ res/config.ini | 110 ++++++++++++++++++++++++++++++++++++++++++++++ res/valgrind.supp | 31 +++++++++++++ res/wsetup.sh | 54 +++++++++++++++++++++++ res/xsetup.sh | 102 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 312 insertions(+) create mode 100644 res/4y.service create mode 100644 res/config.ini create mode 100644 res/valgrind.supp create mode 100644 res/wsetup.sh create mode 100644 res/xsetup.sh diff --git a/res/4y.service b/res/4y.service new file mode 100644 index 0000000..e2b79b4 --- /dev/null +++ b/res/4y.service @@ -0,0 +1,15 @@ +[Unit] +Description=TUI display manager +After=systemd-user-sessions.service plymouth-quit-wait.service +After=getty@tty2.service + +[Service] +Type=idle +ExecStart=/usr/bin/4y +StandardInput=tty +TTYPath=/dev/tty2 +TTYReset=yes +TTYVHangup=yes + +[Install] +Alias=display-manager.service diff --git a/res/config.ini b/res/config.ini new file mode 100644 index 0000000..5da7a8c --- /dev/null +++ b/res/config.ini @@ -0,0 +1,110 @@ +# animation enabled +#animate = false +#animate = true + +# the active animation +# 0 -> PSX DOOM fire (default) +# 1 -> CMatrix +#animation = 0 + +# the char used to mask the password +#asterisk = * +#asterisk = o + +# background color id +#bg = 0 + +# blank main box +#blank_box = true + +# erase password input on failure +#blank_password = false +#blank_password = true + +# console path +#console_dev = /dev/console + +# input active by default on startup +#default_input = 2 + +# foreground color id +#fg = 9 + +# remove main box borders +#hide_borders = false +#hide_borders = true + +# remove f1 commands +#hide_f1_commands = false +#hide_f1_commands = true + +# number of visible chars on an input +#input_len = 34 + +# active language +#lang = en +#lang = fr + +# load the saved desktop and login +#load = true + +# main box margins +#margin_box_h = 2 +#margin_box_v = 1 + +# total input sizes +#max_desktop_len = 100 +#max_login_len = 255 +#max_password_len = 255 + +# cookie generator +#mcookie_cmd = /usr/bin/mcookie + +# event timeout in milliseconds +#min_refresh_delta = 5 + +# default path +#path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin + +# command executed when pressing F2 +#restart_cmd = /sbin/shutdown -r now + +# save the current desktop and login as defaults +#save = true + +# file in which to save and load the default desktop and login +#save_file = /etc/4y/save + +# service name (set to ly to use the provided pam config file) +#service_name = 4y + +# command executed when pressing F1 +#shutdown_cmd = /sbin/shutdown -a now + +# terminal reset command (tput is faster) +#term_reset_cmd = /usr/bin/tput reset + +# tty in use +#tty = 2 + +# wayland setup command +#wayland_cmd = /etc/4y/wsetup.sh + +# add wayland specifier to session names +#wayland_specifier = false +#wayland_specifier = true + +# wayland desktop environments +#waylandsessions = /usr/share/wayland-sessions + +# xorg server command +#x_cmd = /usr/bin/X + +# xorg setup command +#x_cmd_setup = /etc/4y/xsetup.sh + +# xorg xauthority edition tool +#xauth_cmd = /usr/bin/xauth + +# xorg desktop environments +#xsessions = /usr/share/xsessions diff --git a/res/valgrind.supp b/res/valgrind.supp new file mode 100644 index 0000000..274f2f0 --- /dev/null +++ b/res/valgrind.supp @@ -0,0 +1,31 @@ +{ + pam + Memcheck:Leak + ... + obj:/usr/lib/libpam.so.0.84.2 + ... +} + +{ + termbox + Memcheck:Leak + ... + fun:tb_init + ... +} + +{ + libc/dynamic + Memcheck:Leak + ... + fun:_dl_catch_exception + ... +} + +{ + libc/groups + Memcheck:Leak + ... + fun:initgroups + ... +} diff --git a/res/wsetup.sh b/res/wsetup.sh new file mode 100644 index 0000000..42be624 --- /dev/null +++ b/res/wsetup.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# wayland-session - run as user +# Copyright (C) 2015-2016 Pier Luigi Fiorini + +# This file is extracted from kde-workspace (kdm/kfrontend/genkdmconf.c) +# Copyright (C) 2001-2005 Oswald Buddenhagen + +# Note that the respective logout scripts are not sourced. +case $SHELL in + */bash) + [ -z "$BASH" ] && exec $SHELL $0 "$@" + set +o posix + [ -f /etc/profile ] && . /etc/profile + if [ -f $HOME/.bash_profile ]; then + . $HOME/.bash_profile + elif [ -f $HOME/.bash_login ]; then + . $HOME/.bash_login + elif [ -f $HOME/.profile ]; then + . $HOME/.profile + fi + ;; +*/zsh) + [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" + [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc + zhome=${ZDOTDIR:-$HOME} + # zshenv is always sourced automatically. + [ -f $zdir/zprofile ] && . $zdir/zprofile + [ -f $zhome/.zprofile ] && . $zhome/.zprofile + [ -f $zdir/zlogin ] && . $zdir/zlogin + [ -f $zhome/.zlogin ] && . $zhome/.zlogin + emulate -R sh + ;; + */csh|*/tcsh) + # [t]cshrc is always sourced automatically. + # Note that sourcing csh.login after .cshrc is non-standard. + wlsess_tmp=`mktemp /tmp/wlsess-env-XXXXXX` + $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $wlsess_tmp" + . $wlsess_tmp + rm -f $wlsess_tmp + ;; + */fish) + [ -f /etc/profile ] && . /etc/profile + xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` + $SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp" + . $xsess_tmp + rm -f $xsess_tmp + ;; + *) # Plain sh, ksh, and anything we do not know. + [ -f /etc/profile ] && . /etc/profile + [ -f $HOME/.profile ] && . $HOME/.profile + ;; +esac + +exec $@ diff --git a/res/xsetup.sh b/res/xsetup.sh new file mode 100644 index 0000000..c7fa214 --- /dev/null +++ b/res/xsetup.sh @@ -0,0 +1,102 @@ +#! /bin/sh +# Xsession - run as user +# Copyright (C) 2016 Pier Luigi Fiorini + +# This file is extracted from kde-workspace (kdm/kfrontend/genkdmconf.c) +# Copyright (C) 2001-2005 Oswald Buddenhagen + +# Note that the respective logout scripts are not sourced. +case $SHELL in + */bash) + [ -z "$BASH" ] && exec $SHELL $0 "$@" + set +o posix + [ -f /etc/profile ] && . /etc/profile + if [ -f $HOME/.bash_profile ]; then + . $HOME/.bash_profile + elif [ -f $HOME/.bash_login ]; then + . $HOME/.bash_login + elif [ -f $HOME/.profile ]; then + . $HOME/.profile + fi + ;; +*/zsh) + [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" + [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc + zhome=${ZDOTDIR:-$HOME} + # zshenv is always sourced automatically. + [ -f $zdir/zprofile ] && . $zdir/zprofile + [ -f $zhome/.zprofile ] && . $zhome/.zprofile + [ -f $zdir/zlogin ] && . $zdir/zlogin + [ -f $zhome/.zlogin ] && . $zhome/.zlogin + emulate -R sh + ;; + */csh|*/tcsh) + # [t]cshrc is always sourced automatically. + # Note that sourcing csh.login after .cshrc is non-standard. + xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` + $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $xsess_tmp" + . $xsess_tmp + rm -f $xsess_tmp + ;; + */fish) + [ -f /etc/profile ] && . /etc/profile + xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` + $SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp" + . $xsess_tmp + rm -f $xsess_tmp + ;; + *) # Plain sh, ksh, and anything we do not know. + [ -f /etc/profile ] && . /etc/profile + [ -f $HOME/.profile ] && . $HOME/.profile + ;; +esac + +[ -f /etc/xprofile ] && . /etc/xprofile +[ -f $HOME/.xprofile ] && . $HOME/.xprofile + +# run all system xinitrc shell scripts. +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done +fi + +# Load Xsession scripts +# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required +# by the scripts to work +xsessionddir="/etc/X11/Xsession.d" +OPTIONFILE=/etc/X11/Xsession.options +USERXSESSION=$HOME/.xsession +USERXSESSIONRC=$HOME/.xsessionrc +ALTUSERXSESSION=$HOME/.Xsession + +if [ -d "$xsessionddir" ]; then + for i in `ls $xsessionddir`; do + script="$xsessionddir/$i" + echo "Loading X session script $script" + if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then + . "$script" + fi + done +fi + +if [ -d /etc/X11/Xresources ]; then + for i in /etc/X11/Xresources/*; do + [ -f $i ] && xrdb -merge $i + done +elif [ -f /etc/X11/Xresources ]; then + xrdb -merge /etc/X11/Xresources +fi +[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources + +if [ -f "$USERXSESSION" ]; then + . "$USERXSESSION" +fi + +if [ -z "$*" ]; then + exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session." +else + exec $@ +fi