Jump to content

Newbie profile question


Recommended Posts

I was remotely connected to my PC at home the other day when I finally figured out how to set up aliases and stuff in my user profile...it's in .bash_profile.

 

But when I got home and logged in, none of the aliases I had set in .bash_profile worked (although they still work when I connect remotely).

 

So what's the deal? I have a different profile when I ssh than when I sit down at my computer and log on directly?

Link to comment
Share on other sites

...when I finally figured out how to set up aliases and stuff in my user profile...it's in .bash_profile.

 

You are wrong my friend, aliases and stuff should go into .bashrc, not inside .bash_profile

 

Why? well, you'd better read this: http://www.faqs.org/docs/bashman/bashref_63.html

 

The 'problem' you are getting is because you wrongly placed your aliases into .bash_profile, which is only read when launching a login shell, and because *I'm sure* you are using KDE on runlevel 5, aren't you?

 

In the proccess of launching KDE from some versions till now there is no 'login shell' step, so never .bash_profile gets sourced.

 

When you login remotely you are launching a *login shell*, that's why the aliases are present then.

 

 

on .bash_profile you should only put environment variables and a .bashrc call. The file .bashrc is there to handle all the interactive settings: aliases, prompt, functions, non global variables, and so on.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...