Bash errors when terminal is started
I have just updated kubuntu 12.04.2, and now get the following when I start a terminal window:
Code:
bash: _python: line 15: syntax error near unexpected token `(' |
Which terminal is that(xterm, rxvt)? Does that happen in the virtual consoles too when you press ctrl+alt+(F1-F6) and login? One of the files that define the terminal session is broken, that is for sure, but which one?
Regards |
Someday I hope to be more observant. Not likely though. And more precise in the problem description...
I've found that the problem only occurs when I 'su' for a root prompt and give the root password. I know that root shells are frowned upon, but sometimes it is convenient. Starting a shell in konsole or emacs or a vc is not a problem, and 'sudo su' with my user password is not a problem. At least I know how to avoid the errors now. Could it be a path problem? Or perhaps ~/.bashrc? 'su' alone gives me a shell with /root as the home directory and $USER = root, and errors 'sudo su' keeps my usual home directory and $USER = root, but no errors 'kdesu emacs' gives me /root, $USER = root, and no errors. (I start the shell automatically.) I'll keep looking. |
Quote:
Have you tried su - ? su - In Debian work as su in Ubuntu and in Debian just su work as sudo su in Ubuntu. Regards |
I've found another instance.
From konsole or the emacs shell invoking a script from /usr/local/bin which does not start with #! will give the errors. It looks like there is a python script somewhere that cannot find modules. /usr/bin/python is linked to python2.7. |
I have put echos at the beginning and end of /etc/bash.bashrc, /etc/profile/, ~/.bashrc, and ~/.profile.
When I enter a command that is built-in, no errors When the command is not built-in, I get the errors. None of the echos are displayed. It appears to be internal to bash. |
probably the SHELL variable is overwritten?
you can try set -x and strace |
set returns 86 lines of variable values, and 7632 lines of function definitions!
Where do they come from? I've tried grep on /etc and /usr and nothing shows. Possibly because they are in a compressed file? The problem code seems to be in these functions. It looks like there is something in the problem strings that case does not like. |
see man bash and look for the login process to see what is happening
|
The errors are in bash_completion.d files.
|
All times are GMT -5. The time now is 10:45 PM. |