You are not logged in.

#1 2023-07-27 10:39:54

Myphis
Member
Registered: 2023-07-22
Posts: 61

.xinitrc doen't work

Hello, guys, I run an issue with .xinitrc file.

I installed bspwm and it works, but all lines before

exec

don't.
Here my .xinitrc

#!/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 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
# exec xterm -geometry 80x66+0+0 -name login
polybar &
echo "it works" >> test.txt &
picom &
/path/to/user/.fehbg &
exec bspwm

even

echo 

doesn't work!

Some guess?
Tank you

Offline

#2 2023-07-27 10:55:30

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,205

Re: .xinitrc doen't work

Because you  put them in the wrong file or backgrounded them by adding & .

fehbg does need to be backgrounded and in .xinitrc to work
echo should NOT be backgrounded

polybar should be started by bspwm, not before it. see https://wiki.archlinux.org/title/Bspwm#Using_polybar
No idea about picom, sorry.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-07-27 10:56:06

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: .xinitrc doen't work

What command are you running?

Offline

#4 2023-07-27 12:18:31

Myphis
Member
Registered: 2023-07-22
Posts: 61

Re: .xinitrc doen't work

Lone_Wolf wrote:

Because you  put them in the wrong file or backgrounded them by adding & .

fehbg does need to be backgrounded and in .xinitrc to work
echo should NOT be backgrounded

polybar should be started by bspwm, not before it. see https://wiki.archlinux.org/title/Bspwm#Using_polybar
No idea about picom, sorry.

I dont thinck that backgrounding changes the way how ECHO works!

OK, with polybar it's clear, I changed it and it works well.

Thanks

Offline

#5 2023-07-27 12:20:40

Myphis
Member
Registered: 2023-07-22
Posts: 61

Re: .xinitrc doen't work

Scimmia wrote:

What command are you running?

Nothing more, I saved .xinitrc and logout to create a new session... But feh doesn't work

Offline

#6 2023-07-27 12:45:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: .xinitrc doen't work

There's something more.  Your ~/.xinitrc doesn't just source itself.  Are you running startx or xinitr or something esle to start your graphical session?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-07-27 14:38:02

Myphis
Member
Registered: 2023-07-22
Posts: 61

Re: .xinitrc doen't work

Trilby wrote:

There's something more.  Your ~/.xinitrc doesn't just source itself.  Are you running startx or xinitr or something esle to start your graphical session?

Ah, this is what, yeah, I run startx

Offline

#8 2023-07-27 15:05:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: .xinitrc doen't work

even echo doesn't work!

Since you're passing a relative path, where did you look?
Try

echo snafu > /tmp/snafu.txt

/path/to/user/.fehbg &

Is that nonsense literally in your xinitc?
If no, don't post redacted stuff, you're redacting pot. issues.

Online

#9 2023-07-27 15:31:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: .xinitrc doen't work

Myphis wrote:

Ah, this is what, yeah, I run startx

Then the stderr from that command would be useful:

startx 2>~/startx.errlog

Last edited by Trilby (2023-07-27 15:31:55)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB