Apparently I am missing something which is frustrating me a bit. I have a user account on a Debian Etch system which is needing some additional aliases and rather than muck around with .bashrc, I would rather the aliases be placed in ~/.bash_aliases.
The user created aliases within a ~/.bash_aliases file having a permission setting of 600. I then removed the comments from ~/.bashrc allowing for this file to be read.
After a source .bashrc, . ~/.bash_aliases, the user logging out and logging back in, and a complete reboot - this file is still not being read as aliases are coming back as unknown commands.
This should be a fairly straight forward and easy task to accomplish. Below are the snippets:
~/.bashrc
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
~/.bash_aliases
########################
# VNC Server aliases
########################
# create vnc server connection
vncsmall="vncserver -depth 24 -geometry 800x600 :1"
vncbig="vncserver -depth 24 -geometry 1024x768 :1"
# end vnc server connection
killvnc="vncserver -kill :1"
# check if vnc server is already running
runvnc="ps -A | grep vnc"
(Note: it is ok if he uses :1 - vncserver runs off a non-standard port and my iptables ensures he's the person using it via MAC)
Any ideas what I'm missing here?
Thanks!
Michael
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
I think the file .bash_aliases need permission to execute. For when you
open a terminal, it invoke ~/.bashrc which will invoke .bash_aliases.
Hope this will be help.
I think it is a different issue - sourcing (the . command in bash)
does not require execute permission. The problem is that bash just
loads and runs the aliases file, so each alias line still needs to be
formatted like a bash command: e.g.
alias ls='ls --color'
Try putting "alias" at the beginning of each of your aliases to see if
that works, otherwise it is probably just setting env variables
Anton
--
Anton Piatek
email: an...@piatek.co.uk
blog/photos: http://www.strangeparty.com
pgp: [0xB307BAEF] (http://www.strangeparty.com/anton.asc)
fingerprint: 116A 5F01 1E5F 1ADE 78C6 EDB3 B9B6 E622 B307 BAEF
No trees were destroyed in the sending of this message, however, a
significant number of electrons were terribly inconvenienced.
Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
> Sorry for being a nitpick, but you don't need execute permissions as
> long as you only *source* the file (which is what was done here). The
> OP's problem was due to the fact that he forgot to add the 'alias'
> statement.
>
> Regards,
> Andrei
Thanks very much:-)
Regards,
Zhu Zhixin