You are not logged in.

#1 2024-01-13 14:57:25

beast41514
Member
Registered: 2024-01-11
Posts: 44

[Solved]Is ~./profile file created by default ?

So i was trying to make wallpaper persist after reboot. I use (nitrogen) to set wallpaper. I searched around and found out i have to add this command to the file which executes at login:

nitrogen --restore

The candidates were (~/.bash_profile and ~/.profile). Since i didn't had (~/.profile) i used (~/.bash_profile) but it didn't work, later i found out that (~/.bash_profile) is executed when you login through console. But since i login graphically (lightdm), it was not getting executed. So i created the (~/.profile) file and added the command there and it worked.

My question is, is this the right way to do it ? I am worried that this approach could have downsides in the future and if there is a better one please tell me. I searched about it but couldn't find a clear answer. I don't know if i should be posting this kind of question here, so forgive me. I am very new to linux and forums.

Last edited by beast41514 (2024-02-12 16:36:42)

Offline

#2 2024-01-13 15:03:48

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

Re: [Solved]Is ~./profile file created by default ?

https://wiki.archlinux.org/title/LightD … on_wrapper

In this case, you want ~/.xprofile, you don't want it running on a normal TTY login.

Offline

#3 2024-01-13 15:14:21

beast41514
Member
Registered: 2024-01-11
Posts: 44

Re: [Solved]Is ~./profile file created by default ?

I don't have a (bash) folder in my home directory's config like in this example (~/.config/zsh/.zshenv) provided in the link above. Also what's TTY ? I am bad at abbreviations.

Last edited by beast41514 (2024-01-13 15:24:22)

Offline

#4 2024-01-13 17:46:25

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved]Is ~./profile file created by default ?

Scimmia wrote:

you don't want it running on a normal TTY login

~/.profile won't be read for a TTY login if the OP is using bash because Arch's bash package supplies /etc/skel/.bash_profile (which is a mistake IMO).

beast41514 wrote:

what's TTY ? I am bad at abbreviations

Ask a search engine, "tty linux" gives good results for me over at startpage.com. Just don't ask ChatGPT, it's full of shit big_smile


Jin, Jîyan, Azadî

Offline

#5 2024-01-14 04:47:30

beast41514
Member
Registered: 2024-01-11
Posts: 44

Re: [Solved]Is ~./profile file created by default ?

In the link they are providing the path to the shell (in their case zsh) but in my home directory there is no shell folder (bash). What should i do ?

Last edited by beast41514 (2024-01-14 04:50:35)

Offline

#6 2024-01-14 08:25:38

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

Re: [Solved]Is ~./profile file created by default ?

There's no "shell folder" in anybodies $HOME, the example lists ~/.config and is irrelevant here.

The suggestion is to run "nitrogen --restore" in something that's [edit, you're using lightdm: most lilkely] sourced by your GUI session scripts (and only them) and that'd be ~/.xprofile - you can completely ignore the illustrative example in the wiki. It's "how", not "what".

Last edited by seth (2024-01-14 08:26:27)

Offline

Board footer

Powered by FluxBB