LinHES Forums
http://forums.linhes.org/

knoppmyth's alt+x - how to get it to read my .bashrc?
http://forums.linhes.org/viewtopic.php?f=6&t=19554
Page 1 of 1

Author:  graysky [ Fri Feb 20, 2009 5:58 pm ]
Post subject:  knoppmyth's alt+x - how to get it to read my .bashrc?

I found the cool shortcut keys for fluxbox in /etc/X11/fluxbox/keys

I'd like to replace the command that alt-x uses to start an xterm with the ability to source my dot files (.bashrc) to enable color.

It currently reads:
Code:
Mod1 x :ExecCommand xterm -fn *18*


Thanks!

Author:  brfransen [ Fri Feb 20, 2009 6:02 pm ]
Post subject: 

/etc/X11/fluxbox/keys

Author:  graysky [ Fri Feb 20, 2009 6:09 pm ]
Post subject: 

@brfransen - I found that and edited my post probably just as you replied... do you know about sourcing my ~/.bashrc

Author:  Truck [ Fri Feb 20, 2009 6:17 pm ]
Post subject: 

Sounds like you just need to change the default shell for the appropriate user (mythtv). This is done using the "chsh" command while logged in as the correct user:
Code:
truck@XXXX:~$ chsh
Password:
Changing the login shell for truck
Enter the new value, or press ENTER for the default
        Login Shell [/bin/bash]:


You could also edit the /etc/passwd file directly as root and just change the default shell for the required users.

Cheers

Author:  graysky [ Fri Feb 20, 2009 6:31 pm ]
Post subject: 

Thanks for the suggestion... I made the switch in my /etc/passwd file for my users, but I don't see the colors getting sourced when I alt+x within fluxbox. Only when I type 'bash' do they get loaded.

Author:  tjc [ Fri Feb 20, 2009 9:19 pm ]
Post subject: 

Sourcing $HOME/.bashrc isn't done automatically. That name is only a convention, bash actually uses whatever file the BASH_ENV variable is set to, and if it's not set it won't source anything.

BASH_ENV
must be set and export in your profile (read the bash man page for the fallbacks for that, it's too complicated to repeat here) if you want it to load a settings file for each new shell invocation. Oh and if it's already been loaded once by .bash_profile/.bash_login/... you may actually be better off _not_ reloading it every time since that can cause other issues.

Author:  graysky [ Sat Feb 21, 2009 3:39 am ]
Post subject: 

I'll look into it, thanks tjc.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/