You are not logged in.

#1 2021-04-04 18:28:59

kbunny
Member
Registered: 2021-04-04
Posts: 29

[Solved].bash problem

Hi.

I recently start using dwm but I can set a background for it only manually
For some reason my .bash_login don't execute any background setter

exec startx $(which dwm)

exec xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
exec xrandr --addmode Virtual1 1920x1080_60.00
exec xrandr --output Virtual1 --mode 1920x1080_60.00

nitrogen --restore & 

Last edited by kbunny (2021-04-05 11:40:14)

Offline

#2 2021-04-04 18:29:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved].bash problem


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-04-04 18:35:28

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

Re: [Solved].bash problem

None of this should be in a bash_login file, but in xinitrc as indicated above.  Further, the `exec` command replaces the current shell with it's arguments.  So `exec startx ...` replaces the current shell running bash_login with startx, and nothing else after that line in .bash_login will ever run.


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

Offline

#4 2021-04-04 18:37:07

kbunny
Member
Registered: 2021-04-04
Posts: 29

Re: [Solved].bash problem

.xinitrc doesn't execute neither

Offline

#5 2021-04-04 18:39:04

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

Re: [Solved].bash problem

Nothing will magically execute without you using the proper commands.
https://bbs.archlinux.org/viewtopic.php?id=57855

Last edited by Trilby (2021-04-04 18:39:28)


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

Offline

#6 2021-04-04 19:40:55

kbunny
Member
Registered: 2021-04-04
Posts: 29

Re: [Solved].bash problem

Trilby wrote:

None of this should be in a bash_login file, but in xinitrc as indicated above.  Further, the `exec` command replaces the current shell with it's arguments.  So `exec startx ...` replaces the current shell running bash_login with startx, and nothing else after that line in .bash_login will ever run.

~/.bash_login

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
fi

~/.xinitrc

#!/bin/sh

# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)

# invoke global X session script
. /etc/X11/Xsession

nitrogen --restore &
exec dwm

and at startup it starts a xfce4-terminal..

Offline

#7 2021-04-04 20:41:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved].bash problem

How did you install Arch?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2021-04-04 21:22:08

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

Re: [Solved].bash problem

And what is /etc/X11/Xsession?  What's in it?  Where did it come from?

As far as I can tell, that is not provided by any archlinux package.  However, a quick google search indicates that it may be used in Manjaro.

Last edited by Trilby (2021-04-04 21:22:54)


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

Offline

#9 2021-04-04 21:36:15

kbunny
Member
Registered: 2021-04-04
Posts: 29

Re: [Solved].bash problem

jasonwryan wrote:

How did you install Arch?

Does it matter?

Offline

#10 2021-04-04 21:50:22

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved].bash problem

kbunny wrote:
jasonwryan wrote:

How did you install Arch?

Does it matter?

Yes. Nothing about your approach, or your system, suggests that you have installed following the wiki. Therefore how, exactly, did you install your system?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2021-04-05 08:20:17

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

Re: [Solved].bash problem

Trilby wrote:

And what is /etc/X11/Xsession?  What's in it?  Where did it come from?

As far as I can tell, that is not provided by any archlinux package.  However, a quick google search indicates that it may be used in Manjaro.

It's actually a Debian original, inherited by Ubuntu.
No idea about manjaro and I also could not find a good source that they use it.


@kbunny: if this is about the init process on a Ubuntu system you could just as much ask  on an adroid forum.
Nothing we tell you is going to work since there're slight differences and also

at startup it starts a xfce4-terminal

So what? Did you configure dwm to launch an xfce-terminal?
Do you actually know how your dwm was configured?

Iow:

Jason wrote:

How did you install Arch?

This is not to harass you, but to spare everyone a futile exercise in frustration.
So yes, it matters.

Offline

#12 2021-04-05 11:38:26

kbunny
Member
Registered: 2021-04-04
Posts: 29

Re: [Solved].bash problem

Trilby wrote:

And what is /etc/X11/Xsession?  What's in it?  Where did it come from?

As far as I can tell, that is not provided by any archlinux package.  However, a quick google search indicates that it may be used in Manjaro.

Fixed. It called for /etc/X11/Xsession. I just removed that line
Thanks for help

Sorry for making everyone frustrated

Offline

Board footer

Powered by FluxBB