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#8628 - [gdm] doesn't source environment for most users

Attached to Project: Arch Linux
Opened by Neil Darlow (neildarlow) - Tuesday, 13 November 2007, 12:13 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 10:25 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: The /etc/gdm/Xsession script sources $HOME/.profile and $HOME/.xprofile for user-specific environment settings. For the majority of normal users, who use BASH, it might be worthwhile extending the logic to include $HOME/.bash_profile too.

I discovered this while debugging startup of community/bouml (actually its projectControl and projectSynchro programs) which was reporting that a required environment variable wasn't set when it was actually set in $HOME/.bashrc (which is sourced by $HOME/.bash_profile).

My solution was to symlink $HOME/.bash_profile to $HOME/.xprofile but I can't help thinking that sourcing $HOME/.bash_profile in /etc/gdm/Xsession is the correct way to handle this.

Additional info:
* gdm-2.20.1-2
* /etc/gdm/Xsession

Steps to reproduce:
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Saturday, 03 October 2009, 10:25 GMT
Reason for closing:  Fixed
Comment by Dimos Dimoulis (dimosd) - Sunday, 02 March 2008, 09:56 GMT
By default .xsession includes this line
/bin/bash --login -i ~/.xinitrc

which reads .bash_profile. This worked for KDE but for Gnome I had to create an .xprofile containing
. $HOME/.bash_profile

so that I can set the environment/path. Not sure which one of the two behaviors is more correct but both desktop environments should behave the same.
Comment by Nikos Asimakis (nikos.asimakis) - Wednesday, 07 May 2008, 12:19 GMT
I had a similar problem with logins to gnome from gdm and then LC_* environment variables.

In $HOME/.profile I had included the following lines:

export LANG="en_US.utf8"
export LC_CTYPE="el_GR.utf8"
export LC_NUMERIC="el_GR.utf8"
export LC_TIME="el_GR.utf8"
export LC_COLLATE="el_GR.utf8"
export LC_MONETARY="el_GR.utf8"
export LC_MESSAGES="en_US.utf8"
export LC_PAPER="el_GR.utf8"
export LC_NAME="el_GR.utf8"
export LC_ADDRESS="el_GR.utf8"
export LC_TELEPHONE="el_GR.utf8"
export LC_MEASUREMENT="el_GR.utf8"
export LC_IDENTIFICATION="el_GR.utf8"

because I wanted to have the environment (menus, icons etc) in english and have the date, time, numeric formats in greek. Unfortunately the Xsession script was reseting them to $GDM_LANG.

I have modified the /etc/gdm/Xsession script to respect my LC_* variables when $LANG is equal to $GDM_LANG but set them to $GDM_LANG otherwise.

I think it would be nice to have something similar in the default gdm package.

I am attaching a diff for /etc/gdm/Xsession
Comment by Greg (dolby) - Wednesday, 23 July 2008, 19:21 GMT
Is this still a problem?
Comment by Jud (judfilm) - Friday, 05 December 2008, 12:44 GMT
Can this be closed?
Comment by Dimos Dimoulis (dimosd) - Friday, 05 December 2008, 19:43 GMT
This continues to be problematic. On gnome-terminal, bash-completion doesn't work, unless I start bash --login
It is supposed to be initialized by /etc/profile.d/bash-completion. It works "out of the box" on a Linux console.
Comment by Alessandro Doro (adoroo) - Sunday, 15 March 2009, 00:02 GMT
You have to configure your terminal if you want a login shell by default.

In gnome-terminal:
Edit > Profile Preferences; select the second tab ("Title and Command") then check "Run command as a login shell".

For xterm/rxvt you should set the X resource database entry "loginShell".

etc.
Comment by Roman Kyrylych (Romashka) - Thursday, 18 June 2009, 07:20 GMT
@ JGC: status of this?
Comment by Dimos Dimoulis (dimosd) - Thursday, 18 June 2009, 11:15 GMT
Not fixed (e.g. bash completion doesn't work by default on gnome terminal, works on linux console)
Comment by Roman Kyrylych (Romashka) - Saturday, 03 October 2009, 07:26 GMT
new GDM released, any changes?
Comment by Dimos Dimoulis (dimosd) - Saturday, 03 October 2009, 10:18 GMT
Current versions of bash completion and gdm work here

Loading...