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
########################
# 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-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
10-26-2008, 10:39 AM
"Anton Piatek"
.bash_aliases setup
2008/10/26 zhuzhixin <zhuzhixin@realss.com>:
> GI_Mike - Herman von Mandel wrote:
>> Greetings to the list!
>>
>> 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:
>>
>
> 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
No trees were destroyed in the sending of this message, however, a
significant number of electrons were terribly inconvenienced.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
10-26-2008, 10:50 AM
Andrei Popescu
.bash_aliases setup
On Sun,26.Oct.08, 18:51:51, zhuzhixin wrote:
> 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.
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
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
10-26-2008, 09:51 PM
zhuzhixin
.bash_aliases setup
GI_Mike - Herman von Mandel wrote:
> Greetings to the list!
>
> 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:
>
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.
> ~/.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-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
10-26-2008, 11:41 PM
zhuzhixin
.bash_aliases setup
Andrei Popescu wrote:
> 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
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org