Open chigh opened 11 years ago
It looks like bashrc_dispatch
is being read by Dash instead of Bash. bashrc_dispatch
uses options available only in Bash, as the name implies.
How did you install bashrc_dispatch
?
bashrc_dispatch is a file and .bashrc .bash_login .bash_profile and .profile are symlinks to bashrc_dispatch.
These are located in my home directory.
On May 24, 2013, at 16:51, Gioele notifications@github.com wrote:
It looks like bashrc_dispatch is being read by Dash instead of Bash. bashrc_dispatch uses options available only in Bash, as the name implies.
How did you install bashrc_dispatch?
— Reply to this email directly or view it on GitHub.
You have hit this bug in GDM and LightDM:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1097903 https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/678421
I will commit a work around soon. In the meantime you can add
[ -n "$BASH_VERSION" ] && exit
at the beginning of bashrc_dispatch
.
That doesn't seem to help and prevents me from logging in X11 or otherwise (e.g. via su - user
or ssh).
Can you please try adding the following at the beginning of bashrc_dispatch
?
[ -n "$BASH_VERSION" ] && return
I apologize; that was one of the modifications I didn't try on my own. When I use that, I am able to login to X, but all of the shells (terminal, ssh, etc) do not load any of the rc files, thus no variables are set, and no functions or aliases are loaded.
If this is helpful to you, I can continue. If not, I can just work around this problem.
This is also true when logging into a BASH shell on OSX (in Terminal, ssh, etc). If the [ -n "$BASH_VERSION" ] && return
is set, I am dropped to shell with only the system rc files having been sourced.
As a work-around, I have reconfigured sh
to be bash
instead of dash
. However, I may not be able to do this to systems to which I do not have root access. So, if there's a better fix as a normal user, I'd like to use it.
dpkg-reconfigure dash
I found a bit of a better work-around for this. At the beginning of .bashrc_dispatch:
export OLD_DISPLAY=$DISPLAY
[[ $SESSION = ubuntu && ! -z $DISPLAY ]] && unset DISPLAY
And at the end of .bashrc_dispatch
if [[ $SESSION = ubuntu ]]; then
export DISPLAY="$OLD_DISPLAY"
fi
When using this bashrc_dispatch, I noticed that I am unable to login to X11. I haven't had the opportunity to check on other Linux distributions, but it certainly happens on Ubuntu 12.10, and 13.04.
This is what's logged in ~/.xsession-errors:
I've narrowed it down to the last error. When logging in, and the shell it hits the following lines in the .bashrc_dispatch:
that error is logged and the X11 session is terminated and brought back to the login screen. If I comment those lines out, I can login (the previous errors are still logged, but apparently are not fatal to the X11 session), but I cannot tell if I'm missing any functionality.
I am hardly a shell expert, so are those lines absolutely necessary? What exactly do they do? Is there something that can be done to work around them?
Thanks.