Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Strange behaviour [SOLVED]

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
consufed
Posts: 31
Joined: 2013-08-11 21:57

Strange behaviour [SOLVED]

#1 Post by consufed »

Debian stretch amd64 XFCE. HW System running Debian without problems for c. 3 years, apart from HDD crash 3 months ago; HDD replaced with SSD.
Since about 2 weeks I have 2 strange repeatable symptoms:
(1) To logout or shutdown, I have to perform the complete action two times: click on 'applications-logout-logout'; the two instances of logout or shutdown can be separated by any length of time, as if a latch is being set.
(2) On boot and login, .bashrc is not executed. Normally .bashrc is run when .profile is executed, so that after login, certain actions such character composing and sound settings are carried out. But .bashrc is now only executed when I open a console.
These 2 consistent faults are a minor nuisance, but are possibly indicative of a more serious problem. I cannot say if the 2 problems started at the same time or not, nor can I recall any causative specific action. Seems unlikely that the 2 symptoms are linked, but....
I played around trying to run fsck, but this was not possible - 'init 1' just freezes the system, after a some screen output. fsck is also not part of the installation image. Anyway, it seems that fsck is run during boot.
Last edited by consufed on 2018-02-26 20:00, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Strange behaviour

#2 Post by bw123 »

consufed wrote:(2) On boot and login, .bashrc is not executed. Normally .bashrc is run when .profile is executed, so that after login, certain actions such character composing and sound settings are carried out. But .bashrc is now only executed when I open a console.
I've been confused by .profile and .bashrc myself, and noticed that ~/.profile is not read when booting to lightdm then login to plasma desktop. If I boot my fluxbox installation without a display manager all the way to login prompt and login, then .profile is read as before.

The reason I noticed is that ~/.profile is what adds ~/bin to the users path, and this situation breaks that path in any terminals opened under plasma desktop. I don't know what the answer is, or whether it's related to your problem, but it has been this way ever since I installed stretch about a yr ago.
resigned by AI ChatGPT

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1490
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 58 times

Re: Strange behaviour

#3 Post by oswaldkelso »

I've been confused by .profile and .bashrc myself
Your not the only one.

https://blog.flowblok.id.au/2013-02/she ... ripts.html
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Strange behaviour

#4 Post by Head_on_a_Stick »

consufed wrote:Normally .bashrc is run when .profile is executed
That is not true, ~/.bashrc is run if you open any interactive shell whereas ~/.profile is only sourced for login shells.
confused wrote:.bashrc is not executed
What makes you think this?

What doesn't happen that you think should happen, exactly?

I don't use bash myself (mksh ftw!) but I can assure you that ~/.bashrc works exactly as expected in Debian 9 because I have been testing our BunsenLabs Helium desktop extensively recently (based on stretch) and we need ~/.bashrc to work properly.
bw123 wrote:~/.profile is not read when booting to lightdm
Use ~/.xsessionrc instead ;)
deadbang

consufed
Posts: 31
Joined: 2013-08-11 21:57

Re: Strange behaviour

#5 Post by consufed »

I wrote: 'Normally .bashrc is run when .profile is executed'
This statement is true by default in Debian 9.
Head_on_a_stick wrote that 'Normally .bashrc is run when .profile is executed' is not true.
Head_on_a_stick meant to write: 'Normally .bashrc is run when .profile is executed' and 'when you login' in the default installation of Debian 9.
Head_on_a_stick implied that my .bashrc is not working.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Strange behaviour

#6 Post by Head_on_a_Stick »

consufed wrote:Head_on_a_stick meant to write: 'Normally .bashrc is run when .profile is executed' and 'when you login' in the default installation of Debian 9.
No, I didn't. My statement is completely correct.

It is certainly true that the stock Debian /etc/skel/.profile sources ~/.bashrc but we cannot be sure that applies to your system until you post the content of your ~/.profile ;)
confused wrote:Head_on_a_stick implied that my .bashrc is not working.
No, I didn't.

You stated that your ~/.bashrc doesn't work, I am doubting that assertion.

What, exactly, doesn't work for you?

What do you think should happen? What actually happens?
deadbang

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Strange behaviour [SOLVED]

#7 Post by Head_on_a_Stick »

Why has this thread been marked [SOLVED]?

Please share your solution with the community so that others can benefit.
deadbang

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Strange behaviour

#8 Post by bw123 »

Head_on_a_Stick wrote:
bw123 wrote:~/.profile is not read when booting to lightdm
Use ~/.xsessionrc instead ;)
Use .xessionrc instead of .profile to add ~/bin to path? Not sure I'd want that, what about ssh, or logins that don't start an x session?

If I use .xsessionrc to source .profile it would have potential to source .profile twice, depending on whether login or dm starts the x session. Also, what if X session is started under ssh? I really like keeping things simple and as close to defaults as possible.

This whole thing is confusing. I know most people use only one setup, but I use my computers quite a few different ways.
Head_on_a_Stick wrote:
can assure you that ~/.bashrc works exactly as expected in Debian 9 because I have been testing our BunsenLabs Helium desktop
sheesh, give me a break.
resigned by AI ChatGPT

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Strange behaviour

#9 Post by Head_on_a_Stick »

bw123 wrote:Use .xessionrc instead of .profile to add ~/bin to path?
I was just pointing out that if LightDM is used then ~/.xsessionrc fills the same role that ~/.profile does for a console login.

Anything that you would add to ~/.profile for a console-based login can be added to ~/.xsessionrc to produce the same effect for a login under LightDM.
sheesh, give me a break.
I wasn't talking to you :P
deadbang

Post Reply