[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-07 Thread Egon Elbre
For the sed/eval round we can always escape the special characters beforehand, there should be some function for that. But I agree with your conclusion. Warning or message is a good enough solution, even though I would like to see some hand-holding. I agree it just isn't worth the effort and the o

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-07 Thread Martin Pitt
That indeed would run .profile only once, but now introduces the problem that it dumps the entire environment, and all bash functions in set, and has to read and evaluate it back: $ set|wc -l 14698 Reading and evaluating 15.000 lines of shell is not a triviality. Also, can we make sure that mor

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-06 Thread Gunnar Hjalmarsson
I'll ask Martin P. to take a look. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in Ubuntu. https://bugs.launchpad.net/bugs/678421 Title: Error in ~/.profile halts the X startup To manage notifications about this bug go to: h

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-06 Thread Egon Elbre
The idea is simple: ### VARS=$( # this allows to capture subshell stdout to a variable . $HOME/script.sh 1>/dev/null # this prevents script printing something to stdout set # this prints all variables to stdout alias | sed 's/.*/alias \0/' # this prints aliases to stdout and prefixes them

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-06 Thread Gunnar Hjalmarsson
Hmm... Now this is above my head (again). ;-) One thing that it does not seem to handle is setting of aliases. ** Changed in: gdm (Ubuntu) Status: Incomplete => Confirmed -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-03 Thread Egon Elbre
Right forgot about the variables. After poking around in dash source I found that "$HOME/.profile" has been hardcoded. So the change needs be made in the shell to make ".profile" safe. Also I found a way to keep the variables from subshell ### test.sh ### ERRCODE=0 TEST="" VARS=$(set -e; . $HOME

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-02 Thread Gunnar Hjalmarsson
Nice try, Egon, but I think your solution has the same drawbacks as the idea I mentioned in comment #2. The parentheses would make the ~/.profile commands be run in a subprocess, so if no error, you would need to source ~/.profile in the main process as well, or else settings of e.g. environment va

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-07-02 Thread Egon Elbre
Sorry, I forgot about this due to other duties (work and school). This is not an active issue for me, but would be a nice touch to Ubuntu. This still happens in Oneiric (tested in daily). There are some differences, it just drops you into the default login screen without any explanation. Which is

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-06-30 Thread Pedro Villavicencio
We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms th

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-05-19 Thread Gunnar Hjalmarsson
I agree on the goal you describe, Egon, which is why I made an attempt to fix it. However, while the "run ~/.profile twice" proposal was rejected due to its disadvantages, it's the only way I was able to figure out that would prevent syntax errors from stopping the startup. I leave it to you to de

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-05-19 Thread Egon Elbre
Sure, silently just ignoring is just as bad. I just think that, it's a mistake that shouldn't prevent you to login and start up everything. The ~/.profile script can also easily be changed by non-experienced users (ones who may not know terminal that well). If that user doesn't get the session run

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-05-18 Thread Martin Pitt
I don't actually think that silently ignoring ~/.profile if it has errors is actually a good and expected behaviour. After all, the user just changed his ~/.profile and now restarted the session, perhaps to test the effect. The best thing to me would be a dialog box that actually showed the error

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-14 Thread Gunnar Hjalmarsson
As regards efficiency, ~/.profile typically contains something like this: if [ -n "$BASH_VERSION" ]; then # [ code that won't be run in bourne shell ] fi if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi export LANGUAGE="en" export LC_MESSAGES="en_US.UTF-8" export LANG="sv_SE.UTF-8"

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-14 Thread Gunnar Hjalmarsson
I want to correct myself: When discussing this with more experienced developers, my attention was called to the fact that I had missed the distinction between syntax errors and other errors. While a syntax error kills the process, other errors, e.g. "not found", don't. Hence you can disregard my ta

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-14 Thread Launchpad Bug Tracker
** Branch linked: lp:~gunnarhj/gdm/profile -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in Ubuntu. https://bugs.launchpad.net/bugs/678421 Title: Error in ~/.profile halts the X startup -- desktop-bugs mailing list desktop-b

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-14 Thread Gunnar Hjalmarsson
** Branch unlinked: lp:~gunnarhj/gdm/profile -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in Ubuntu. https://bugs.launchpad.net/bugs/678421 Title: Error in ~/.profile halts the X startup -- desktop-bugs mailing list desktop

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-05 Thread Gunnar Hjalmarsson
I had to set the -e option (errexit) in Xsession to make a ~/.profile error interrupt the startup. AFAICT that option is not set in the original Xsession script in GDM for Ubuntu. Anyway, maybe there are still cases where a ~/.profile error may lead to the behavior you describe. The linked branch

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-04-05 Thread Launchpad Bug Tracker
** Branch linked: lp:~gunnarhj/gdm/profile -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in Ubuntu. https://bugs.launchpad.net/bugs/678421 Title: Error in ~/.profile halts the X startup -- desktop-bugs mailing list desktop-b

[Bug 678421] Re: Error in ~/.profile halts the X startup

2011-03-11 Thread Sebastien Bacher
** Changed in: gdm (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gdm in ubuntu. https://bugs.launchpad.net/bugs/678421 Title: Error in ~/.profile halts the X startup -- desktop-bugs maili