You are not logged in.

#1 2025-04-04 14:21:39

duek
Member
Registered: 2025-04-03
Posts: 2

dwm with display manager and .sh

Hello,
I used Arch with KDE for a bit and decided to try dwm.
When setting it up with SDDM, most tutorials advise me to Execute dwm with a script, instead of plainly calling dwm. I understant that is so I can set up initial configs and not have to reboot every time I change some config.
But when I do that, I simply cant login in, dwm does not work. When I use just Exec=dwm, it works, but I have to set up everything evertime, like wall paper, monitor, etc..

this is my  /usr/share/xsessions/dwm.desktop:

[Desktop Entry]
Encoding=UTF-8
Name=dwm
Comment=Dynamic window manager
# Exec=dwm
Exec=/usr/local/bin/startdwm.sh
Icon=dwm
Type=XSession

and this is my /usr/local/bin/startdwm.sh:

#!/bin/sh

feh --bg-scale ~/Pictures/Wallpapers/pxfuel.jpg
setxkbmap us,ru -option 'grp:caps_toggle'
dwmblocks &

while true; do
    # Log stderror to a file
    dwm 2>~/.dwm.log
    # No error logging
    #dwm >/dev/null 2>&1
done

Last edited by duek (2025-04-04 16:07:51)

Offline

#2 2025-04-04 15:40:57

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,774

Re: dwm with display manager and .sh

Please use [code][/code] tags. Edit your post in this regard.

stat /usr/local/bin/startdwm.sh

nb. that you're not gonna be able to exit that session, maybe break the loop if "$?" is 0 or 15?

Offline

#3 2025-04-04 16:09:49

duek
Member
Registered: 2025-04-03
Posts: 2

Re: dwm with display manager and .sh

but the .sh doesnt work either way, even if I change it to a simple

 exec dwm 

sorry for the tags, just fixed that. Thanks!

Offline

#4 2025-04-04 19:53:53

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,774

Re: dwm with display manager and .sh

You responded to a sidebar, but ignored the important part - the stat. (tl;dr: is the script executable?)

Offline

Board footer

Powered by FluxBB