Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-21-2004, 01:07 PM
|
#1
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Rep:
|
aliases in xterm
I have some aliases in my ~/.bash_profile file and I wanted to put one in for realplayer as well since I have to export AUDIO everytime I start it. However if I edit that file it doesn't work in xterm. Is it possible to do and which file do I have to edit then?
|
|
|
11-21-2004, 01:45 PM
|
#2
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Xterm starts what's known as a non-login shell, i.e. it doesn't source your .bash_profile, just your .bashrc (if it exists). What I usually do is put all of my custom aliases etc. into .bashrc and then have .bash_profile source .bashrc.
|
|
|
11-21-2004, 02:42 PM
|
#3
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Original Poster
Rep:
|
How do you do that sourcing? Cause if I put any aliases in my .bashrc they don't work in bash itself,
|
|
|
11-21-2004, 06:35 PM
|
#4
|
Gentoo Developer
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Rep:
|
Put this in your bash_profile;
# /etc/skel/.bash_profile:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.10 2002/11/18 #19:39:22 azarah Exp $
#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc
Last edited by comprookie2000; 11-21-2004 at 06:38 PM.
|
|
|
11-21-2004, 07:58 PM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Question: Does it still not work after logging out. I would expect that the xterm process would be a child of your original login shell. Some distributions have an aliases file that is sourced by one of the startup scripts. Reading through the startup scripts in /etc/profile and ~/.bash_profile might help. Also, double check that /bin/bash is the shell listed in the passwd file.
|
|
|
11-22-2004, 09:50 AM
|
#6
|
Senior Member
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170
Original Poster
Rep:
|
Quote:
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/login.defs
#umask 022
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
alias x='startx & exit'
alias kde='startx /usr/bin/startkde & exit'
alias real='export AUDIO=/dev/dsp0 && aoss realplay'
|
Sourcing was already in it I guess. Could the problem be that I start with fluxbox with startx & exit? The xterm starts as philip@debian so I think it knows that it should use my files. What could be wrong
|
|
|
All times are GMT -5. The time now is 10:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|