export and alias lines in /etc/profile lead to unstartable GNOME session

Bug #235040 reported by Florian Effenberger
4
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

For command line tools, I often add

export ftp_proxy="http://my.proxy:3128"
export http_proxy="http://my.proxy:3128"
export https_proxy="http://my.proxy:3128"
alias ls="ls --color"

to /etc/profile. Beginning with 8.04, the GNOME session can't start in this case anymore, I only get a terminal in the failsafe mode. Worked fine with 7.04. Maybe a parsing problem?

Revision history for this message
Florian Effenberger (floeff) wrote :

Might be related to Bug #48876

Revision history for this message
Dereck Wonnacott (dereck) wrote :

Try ' instead of "

alias ls='ls --color'

Changed in xorg:
status: New → Incomplete
Revision history for this message
Mackenzie Morgan (maco.m) wrote :

Can you comment out the ls alias and try to reproduce it?

Revision history for this message
spliffster (spliffster) wrote :

I am the original reporter of Bug #48876. It has been fixed and now it's there again. I guess it is caused by sloppy shell scripting in xinit and the such.

Check the following comment in Bug #48876
> Matthew Wang wrote on 2006-08-05: (permalink)
-- quote --
I encountered this problem in 6.06 today. If you have set 'ls' as an alias with argument '--color' in /etc/profile or $HOME/profile, it will be triggered.

The root cause is that, the script /etc/gdm/Xsession will source /etc/profile and $HOME/.profile, then it use "ls $1" to read /etc/X11/Xsession.d, the ANSI color control characters in its output will cause the problem.

Here's the fix: modify /etc/gdm/Xsession, change line 82
    for F in $(ls $1); do
to
   for F in $(/bin/ls $1); do
-- quote --

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.