Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#1881 - ~/.xsession doesn't run .bashrc

Attached to Project: Arch Linux
Opened by Lukas Sabota (punkrockguy318) - Tuesday, 07 December 2004, 20:38 GMT
Last edited by Judd Vinet (judd) - Wednesday, 08 December 2004, 00:08 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

~/.xsession should also source ~/.bashrc, because environment variables are commonly set from there (ie: PATH, TERMCMD, etc). The new skel now sources . /etc/profile, but ~/.bashrc would probobly be a good idea as well.
This task depends upon

Closed by  Judd Vinet (judd)
Thursday, 10 February 2005, 21:37 GMT
Reason for closing:  Works for me
Comment by Judd Vinet (judd) - Tuesday, 07 December 2004, 20:53 GMT
It runs fine for me. I put this line in my .bashrc and then logged out and back in:

echo ".bashrc ran" >>/tmp/log

After logging back in and opening up a term, I saw two ".bashrc ran" lines, one for the initial login, and one for the terminal I opened up.

My .xsession file:

[jvinet@pluto ~]$ cat .xsession
#!/bin/sh

bash --login -i ~/.xinitrc
Comment by Lukas Sabota (punkrockguy318) - Tuesday, 07 December 2004, 21:02 GMT
Oops, I should have been more specific. When your using XDM, the .bashrc doesn't get set. If you open up a console, those variables would get set, but they aren't set for the X session. Ie: Let's say we're using xfterm4, which reads the TERCMD variable. If .xsession doesn't run .bashrc and read the TERMCMD variable, and you open xfterm4 from a menu, it will not work correctly because the TERMCMD is not set. Now if you open xfterm4 from a terminal in that session, it will run the .bashrc because it's running bash; making it work correctly.
Comment by Judd Vinet (judd) - Wednesday, 08 December 2004, 00:07 GMT
Hmmm... I still don't think I understand correctly.

I use xdm on this machine and I'm pretty sure (by that lame debugging trick above) that .bashrc is being ran. To confirm, i logged out, logged back in, then hit CTRL-ALT-F1 to get to a console, so I didn't have to open any terminals. Then I logged in as root (again to avoid running my real user's .bashrc) and checked the /tmp/log file. And it did indeed still have the ".bashrc ran" line in it. The only time .bashrc could have ran was when I logged in via xdm.

Loading...