 |
 |
Switching shells?
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
How do I switch my default shell for X11 under Panther? I tried changing it in Netinfo Manager, but the shell still comes up as tcsh rather than bash.
Also, what it is the bash configuration file (like .cshrc for tcsh)?
thanks!
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Midwest
Status:
Offline
|
|
kman-
Have you switched your Terminal Preferences ? There are two choices- for one ou need to reconfig /usr/bin/login, the other allows you to enter a startup command-- /bin/bash works.
If you want to have one shell cofiguration file, use .bash_profile or .profile. Both are valid, both configure your environment. There is a .bashrc file which configs your interactive shell. I use both. I keep my aliases , functions, etc in .bashrc while my environment settings are in bash_profile.
Here is my .bash_profile[code]ENV=$HOME/.bashrc
Code:
export ENV
export ANT_HOME=/usr/local/ant/apache-ant-1.6beta2
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.29
export JAVA_HOME=/usr
export CVSROOT=/usr/local/cvsrep
PATH=${PATH}:${ANT_HOME}/bin:/usr/local/mysql/bin:/Users/craig/bin
export PATH
and here is my .bashrc
Code:
alias path='echo -e ${PATH//:/\\n}'
alias lm='ls -la | more'
alias lt='ls -atrl | more'
alias ..='cd ..'
alias ~='cd ~'
alias /='cd /'
alias dsk='cd ~/Desktop'
alias lcl='cd /usr/local'
alias jvd='cd ~/Documents/Java_code'
alias pld='cd ~/Documents/Perl'
alias ant='/usr/local/ant/apache-ant-1.6beta2/bin/ant'
alias lg='ls -G'
set completion-ignore-case on
set show-all-if-ambiguous on
PS1="\u:\w \$ "
PS2="> "
HTH
Craig
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
That is helpful, but my biggest problem is that my X11 xterm windows keep coming up as tcsh rather than bash. My Terminal.app windows come up as bash (I set it is preferences to /bin/bash. How do I switch the xterm windows to default to bash?
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
Okay. I just logged out and back in again and that was apparently necessary to get the netinfo database to kick in. Anyway, I now have my bash shell running in both Terminal and X11 xterm so now I can reconfigure all my config files.
Thanks!
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
Perusing around the net, I learned that it is best to set environment variables in .bash_profile since it is run only once during login, while .bashrc is run each time a new shell is launched (by typing bash). With that little tidbit, I set up all of my variables in .bash_profile.
Here's the interesting bit. They get set when I run Terminal.app, but not when I launch X11 and an xterm window. If I type 'login' in the xterm window and then login, they load fine. How come login doesn't get run when an xterm window is launched, but it does when a Terminal window is opened?
I'm just a bit perplexed between Terminal and X11.
thanks,
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Midwest
Status:
Offline
|
|
kman,
For xterm and other X11 term apps the file referenced for your interactive shell is .xinitrc. By default X11 looks in /etc/x11/xinit for xinitrc (no dot) and executes it. If you have .xinitrc (w/ .dot prefix) in your home directory, X11 will reference that instead. You can edit that file and set it up to meet your specs.
To get this started
Code:
cp /etc/x11/xinit/xinitrc ~/.xinitrc
This leaves the original untouched as should be done and gives you an edible file.
X11 is xWindows and Terminal is Aqua.
HTH
Craig
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
Originally posted by suthercd:
kman,
For xterm and other X11 term apps the file referenced for your interactive shell is .xinitrc. By default X11 looks in /etc/x11/xinit for xinitrc (no dot) and executes it. If you have .xinitrc (w/ .dot prefix) in your home directory, X11 will reference that instead. You can edit that file and set it up to meet your specs.
To get this started
Code:
cp /etc/x11/xinit/xinitrc ~/.xinitrc
This leaves the original untouched as should be done and gives you an edible file.
X11 is xWindows and Terminal is Aqua.
HTH
Craig
That really helps! Thanks.
Can I just launch .bash_profile from .xinitrc to keep things simple? That way I would only have to edit one file from here on out.
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Midwest
Status:
Offline
|
|
mmmmm.......no. Run
Code:
cat /etc/x11/xinit/xinitrc
in the Terminal to view the contents. You'll see there are some env variables and paths set you need for X11.
You also need (initially) the quartz-wm window manager that is included. Takes a bit, but you'll realize that you are operating 2 distinct windowing systems. What you do in X11 is separate from Aqua. Quartz-wm enables the ability to use the X11 pasteboard for copy-and paste between the 2 environments.
There are other window and desktop managers. wmaker, blackbox, enlightment are some window managers. There are desktop managers like kde and gnome which provide the same type of interface as Apple does with Aqua, et al. After a while it becomes clear that somewhere along the line Apple figured out what it was doing. Other interfaces open up some new tools and more, but nothing is as smooth and well thought through as Apple's stuff.
Craig
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status:
Offline
|
|
Thanks for all of your help. I still have a couple of questions.
I am trying to set up my machine to run a bunch of bioinformatics tools which, as you might expect, all run under x11. I have successfully set up my environment in .bashrc and .bash_profile so that my Terminal sessions know where to look for apps. I have it set up so that launching an x11 app from Terminal will work just fine.
If I run xterm I have to 'login' first so that it picks up my bash settings. I understand that x11 is unique from Aqua and Terminal is unique from xterm, but if xterm is a bash shell why doesn't it pick up my bash settings when it is initially launched. It seems logical to me that bash is bash and it should be using .bashrc and .bash_profile when it starts up whether it is in Terminal or xterm. So I could use some clarification there.
Second, if most of what I am going to be using is x11 based, does it make sense to spend most of my time in the x11 environment and thus use xterm rather than Terminal since Terminal just launches most of my apps in x11 anyway? Does Terminal offer features that xterm doesn't? As a newbie to x11, I could use some advice, pointers, etc on using Terminal, x11, xterm, etc.
Third, I installed all of my bioinformatics packages using a standard OSX package installer which put everything in /usr/ebiotools. This seems to work great, but now I also want to start adding some things using fink (which I haven't installed yet). If I start installing things via fink how will it interact with my manually installed bioinf apps? I know fink installs in /sw and it can use a placeholder for Apple's x11 environment. Let's say I install kde and a different window manager with fink. Will that confuse my x11 apps that weren't installed with fink?
Thanks for any enlightenment you can provide.
kman
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
You could simply stay with tcsh.
-
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|