LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 11-21-2004, 01:07 PM   #1
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
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?
 
Old 11-21-2004, 01:45 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 11-21-2004, 02:42 PM   #3
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Original Poster
Rep: Reputation: 45
How do you do that sourcing? Cause if I put any aliases in my .bashrc they don't work in bash itself,
 
Old 11-21-2004, 06:35 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
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.
 
Old 11-21-2004, 07:58 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 11-22-2004, 09:50 AM   #6
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Original Poster
Rep: Reputation: 45
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xterm - howto lauch an xterm into a specific directory jobano Linux - Software 11 01-30-2023 04:45 AM
aliases in C++ djgerbavore Programming 6 03-16-2005 08:35 PM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM
using aliases after doing su? NonSumPisces Linux - Newbie 2 08-15-2004 02:19 PM
See aliases gubak Linux - Newbie 0 08-04-2004 06:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration