Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a custom function in my .profile, and I've added right at the bottom, after my custom aliases :

# custom functions
function eclipse-gtk {
       cd ~/development/eclipse-juno
       ./ &
       cd -

The function starts a custom version of my eclipse.

After I've added it, because I didn't wanted to log-out/log-in, I've reloaded my profile with the command:

. ~/.profile

and then I've tested my function by calling eclipse-gtk and it worked without any issue.

Today when I booted, I couldn't log in. After providing my password, in a few seconds I was back at the log-in screen. Dropping to command line using CTR + ALT + F1, I've commented out the function in my .profile and the log-in was possible without any issue.

My question is, what did I do wrong when I wrote the function? And if there is something wrong, why did it work yesterday after reloading the profile.

Thanks in advance.

Using: Ubuntu 12.04

share|improve this question
up vote 2 down vote accepted

I managed to find the problem. The syntax of the function name was wrong. Apparently I can't use "-" char in the function name.

Here is the new function which is working and I can login without any issues:

# custom functions
        cd ~/development/eclipse-juno
        ./ &
        cd -
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.