UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 `('
bash: _python: line 15: ` !(?(*/)python*([0-9.])|-?))'
bash: error importing function definition for `_python'
bash: _k3b: line 21: syntax error near unexpected token `('
bash: _k3b: line 21: ` _filedir @(cue|iso|toc);'
bash: error importing function definition for `_k3b'
bash: _xz: line 15: syntax error near unexpected token `('
bash: _xz: line 15: ` --decompress | --list | --test | -!(-*)[dlt]*)'
bash: error importing function definition for `_xz'
bash: _tar: line 8: syntax error near unexpected token `('
bash: _tar: line 8: ` ?(-)[cr]*f)'
bash: error importing function definition for `_tar'
bash: _growisofs: line 12: syntax error near unexpected token `('
bash: _growisofs: line 12: ` /?(r)dev/*)'
bash: error importing function definition for `_growisofs'
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?
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.
Last edited by CollieJim; 03-21-2013 at 08:21 AM.
Reason: Mire details
..
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
...
I'll keep looking.
It is something in the root user config files looks like, .bashrc or .profile , look in the lines where the error messages are pointing, compare the files in other machines if you can.
Have you tried su - ? su - In Debian work as su in Ubuntu and in Debian just su work as sudo su in Ubuntu.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.