You are not logged in.

#1 2023-08-31 11:48:30

ltsmohsen
Member
From: Isfahan, Iran
Registered: 2022-07-22
Posts: 4

[SOLVED]don't know where to put my start up scripts

Hi everyone, another noob question here...:D
I run archlinux  + i3wm
so there is xprofile, bashrc, xinit, xsession, and more..!
so I don't really know what is the best practice and where should I put my startup script like nitrogen, second keyboard layout, vnc .etc

Last edited by ltsmohsen (2023-08-31 15:03:33)


I Are Programmer I Make Computer Beep Boop... and I'm just getting started..!

Offline

#2 2023-08-31 12:49:05

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

Re: [SOLVED]don't know where to put my start up scripts

Context related, ie. you start things in the relevant context.
Eg. stuff you want to see in your X11 session (only) goes into some x11 config, either xinitrc or xprofile, depending on how you start the session and what is sourced.
(Several DMs will source xprofile, only startx/xinit and XDM use your xinitrc by default but you can also create an xinitrc xsession service, https://wiki.archlinux.org/title/Displa … _a_session )

For keyboard layouts/options and on likely a de-facto single user system, use an xorg configlet, https://wiki.archlinux.org/title/Xorg/K … tion_files as it will be resiliant against keyboard re-attachments.

bashrc is for interactive bash instances, so the things you want to set or run whenever you launch an interactive bash belongs there - not general system stuff you'd only want once per entire session.

Offline

#3 2023-08-31 12:49:05

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

Re: [SOLVED]don't know where to put my start up scripts

How do you start your graphical session?  Do you use a DM or startx/xinit?  That will determine whether xprofile or xinitrc are viable options (only one or the other most likely will be).  Bashrc is for your shell startup, so that is not a good choice here regardless.  Your i3 config would be a good option regardless of how you start i3.

Whether the i3 config itself or xinitrc / xprofile would be better is largely subjective.


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

Offline

#4 2023-08-31 12:52:05

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

Re: [SOLVED]don't know where to put my start up scripts

Bet Trilby by a split second cool

To add on "i3 config itself or xinitrc / xprofile", if you're only running i3 that's irrelevant. If you're optionally starting different WMs out of your xinitrc, things that are only relevant to the i3 session should probably go into the i3 config (those would then also be picked up by DM driven logins)

Last edited by seth (2023-08-31 12:52:25)

Offline

#5 2023-08-31 13:44:10

ltsmohsen
Member
From: Isfahan, Iran
Registered: 2022-07-22
Posts: 4

Re: [SOLVED]don't know where to put my start up scripts

Trilby wrote:

How do you start your graphical session?  Do you use a DM or startx/xinit?  That will determine whether xprofile or xinitrc are viable options (only one or the other most likely will be).  Bashrc is for your shell startup, so that is not a good choice here regardless.  Your i3 config would be a good option regardless of how you start i3.

Whether the i3 config itself or xinitrc / xprofile would be better is largely subjective.

I use lightDM and for now I just use i3wm but I'm planning to explore more WMs later


I Are Programmer I Make Computer Beep Boop... and I'm just getting started..!

Offline

#6 2023-08-31 14:23:43

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

Re: [SOLVED]don't know where to put my start up scripts

LightDM reads ~/.xprofile.  So use that for anything you want started / run with every graphical session started from LightDM (and i3's config for anything you want only for i3 as seth indicated).


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

Offline

Board footer

Powered by FluxBB