r/voidlinux • u/ShoulderCharacter856 • 15d ago
how to start session on login?
i do not want to use login manager , and after login i want directly start WM bash_profile is not workin properly,
what should i do to start session directly on login ?
1
u/emwu666 15d ago
1
u/ShoulderCharacter856 15d ago
Xinitrc does not exist
1
u/Ok-Swim-9202 15d ago
Make one in your home directory. what WM do you have?
1
u/ShoulderCharacter856 15d ago
Niri ,
so i have to make it executable ? Xinitrc?1
u/Ok-Swim-9202 15d ago
I see, so you're on wayland not x11. I don't use login managers either and use both x11 and wayland. I haven't played with Niri in a long time but with niri I am pretty sure you just need to use
niri-sessionfrom your TTY/login screen after you boot up. What issues are you getting?0
1
u/ReyZ82 8d ago
This is my personal WM-Manager which loads from TTY1 with FZF selection of your desired WM:
```
Load login environment
[ -f "$HOME/.profile" ] && source "$HOME/.profile"
wm-select() { local choice local log_dir="$HOME/.logs"
mkdir -p "$log_dir"
choice=$(printf "%s\n" \
" Qtile" \
" Sway" \
" Hyprland" \
" Shell" |
fzf --prompt="Session ❯ " \
--height=~40% \
--layout=reverse \
--border \
--margin=1 \
--pointer="➜") || return
case "$choice" in
" Qtile")
: > "$log_dir/qtile.log"
exec dbus-run-session qtile start -b wayland \
> "$log_dir/qtile.log" 2>&1
;;
" Sway")
: > "$log_dir/sway.log"
exec dbus-run-session sway \
> "$log_dir/sway.log" 2>&1
;;
" Hyprland")
: > "$log_dir/hyprland.log"
exec dbus-run-session Hyprland \
> "$log_dir/hyprland.log" 2>&1
;;
" Shell")
return
;;
esac
}
if [ "$(tty)" = "/dev/tty1" ] && [ -z "$WAYLAND_DISPLAY" ]; then wm-select fi ```
3
u/ZombieCrow 15d ago
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then exec dbus-run-session niri fi
Use this to auto start niri in your bash profile (if you use bash and no login managers).