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
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
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
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
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
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
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
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
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
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
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
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
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"
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
** 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
** 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
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
** 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
** 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
19 matches
Mail list logo