You are not logged in.
Pages: 1
Hi,
I recently installed Arch Linux and used X server with dwm. I configured my .xinitrc file:
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#twm &
#xclock -geometry 50x50-1+1 &
# Launch custom script with dwm
while xsetroot -name " `date +"%D"` `date +"%H:%M %p"`"
do
sleep 20s
done &
nitrogen --restore
exec dwmI then open my session by doing sudo startx. Everything runs fine but my problem is that dwm runs as root, I'm unsure if it is supposed to be like that but because of this, things like dmenu and st run everything as root. I tried running startx as non-root also but then it simply crashes. I know the problem is obvious here but I don't understand what I'm supposed to change.
Last edited by aXXo (2021-09-02 21:09:55)
Offline
Running startx with elevated privileges has likely created files with root ownership in your home. Remove them and just run startx as your regular user.
Offline
Running startx with elevated privileges has likely created files with root ownership in your home. Remove them and just run startx as your regular user.
Thank you, indeed i simply logged as super user and in it's home directory (/root) listed all files (ls -a) and deleted one (.xauthority). I also copied my (.xinitrc) file to my user's home directory and (exit && startx). Fixed the problem!
Have a nice day ![]()
Last edited by aXXo (2021-09-02 20:29:02)
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
Pages: 1