Function inside .profile results in no log-in

Posted by bioShark on Ask Ubuntu See other posts from Ask Ubuntu or by bioShark
Published on 2012-12-10T21:17:37Z Indexed on 2012/12/10 23:18 UTC
Read the original article Hit count: 313

Filed under:
|
|
|
|

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
       ./eclipse_wb.sh &
       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

© Ask Ubuntu or respective owner

Related posts about bash

Related posts about login