inflexion Posted January 13, 2005 Report Share Posted January 13, 2005 read the FAQ about this and in MDK10.1 /etc/profile.d/alias.sh exists so i though ok su then add my own but that didnt work :( so i made a user.sh in profile.d and only the firefox alias works??? Any ideas cause im really stuck, read about putting them in the .bash_profile will that work Quote Link to comment Share on other sites More sharing options...
aru Posted January 13, 2005 Report Share Posted January 13, 2005 (edited) read the FAQ about this and in MDK10.1 /etc/profile.d/alias.sh exists so i though ok su then add my own but that didnt work :( it works if its rightly typed. BUT you need to re-source that file to make it's settings available to the current bash (or full login) session. so i made a user.sh in profile.d and only the firefox alias works??? may you please post that file. We trust you but with that plain information we can't do anything :) Any ideas cause im really stuck, read about putting them in the .bash_profile will that work <{POST_SNAPBACK}> That depends for who do you want those aliased be available. If are just for your own user, place them in .bashrc which it's the natural place for aliases (of course you need to be sure that .bashrc get's sourced in a login session (but that's the default in Mdk). If the aliases are for everybody then place them at /etc/profile.d/alias.sh Post the examples of what you are doing and we may better help you. Edited January 13, 2005 by aru Quote Link to comment Share on other sites More sharing options...
inflexion Posted January 13, 2005 Author Report Share Posted January 13, 2005 (edited) # Linux-Mandrake configuration: Chmouel Boudjnah <chmouel@mandrakesoft.com> # # Common Aliases for a system. # # The Semantic is : # If exist a ~/.alias and the user hasn't specified a # LOAD_SYSTEM_ALIAS variables then don't do any system aliases # If there is no ~/.alias but the user has specified a # IGNORE_SYSTEM_ALIASES then don't do any system aliases. [[ -f ~/.alias ]] && [[ -z $LOAD_SYSTEM_ALIASES ]] && return 0 [[ -n $IGNORE_SYSTEM_ALIASES ]] && return 0 [ -e /etc/sysconfig/system ] && . /etc/sysconfig/system if [ -f ~/.dir_colors ]; then eval `dircolors --sh ~/.dir_colors` else eval `dircolors --sh /etc/DIR_COLORS` fi # default ls options LS_OPTIONS="-F" # this should be removed once the bug with ls and multibytes locales is fixed [ -r /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh case "$LC_ALL$LC_CTYPE" in ja*|ko*|zh*) LS_OPTIONS="$LS_OPTIONS --show-control-chars" ;; *) if [ "`locale charmap`" = "UTF-8" ]; then LS_OPTIONS="$LS_OPTIONS --show-control-chars" fi ;; esac # emacs doesn't support color if [ $TERM != "emacs" ];then LS_OPTIONS="$LS_OPTIONS --color=auto" fi alias ls="ls $LS_OPTIONS" alias d="ls" alias l="ls" # classical listing. alias ll="ls -l" # List detailled. alias la='ls -a' # List all. alias lsd="ls -d */" # List only the directory. alias cd..="cd .." alias s="cd .." alias p="cd -" alias md="mkdir" alias rd="rmdir" alias cp="cp -i" alias mv="mv -i" alias rm="rm -i" alias firefox="/usr/share/firefox/firefox/firefox" # Make a filter for less if [ -x /usr/bin/lesspipe.sh ];then export LESSOPEN="|/usr/bin/lesspipe.sh %s" fi if [ -n "$CLASS" -a "$CLASS" = "beginner" ];then # Size of a directory (by default Human Readable). alias du='du -h' # Size of a disk (by default Human Readable). # and don't probe supermount alias df='df -h -x supermount' fi that is my alias.sh and this is my user.sh alias firefox="/usr/share/firefox/firefox/firefox" alias targz="tar -xzvf" alias tarbz="tar -xjvf" alias matt="cd /mnt/win_d/Documents\ and\ Settings/Matt/" just noticed that ive duplicated the firefox entry is that the reason? Edited January 13, 2005 by inflexion Quote Link to comment Share on other sites More sharing options...
Qchem Posted January 13, 2005 Report Share Posted January 13, 2005 This may not be what you're looking for, but would it not be easier to place a sym link for firefox in a dir thats in your path, such as /usr/bin? eg ln -s /usr/share/firefox/firefox/firefox /usr/bin/firefox Quote Link to comment Share on other sites More sharing options...
aru Posted January 13, 2005 Report Share Posted January 13, 2005 Your environment please? Are you login in rl5 or rl3, are you using gnome, kde, anyother. Does it happens too if you login in textmode. Also do you have a .alias file in your home directory or the environment variable $IGNORE_SYSTEM_ALIASES notice that the better information you give us the faster we can solve your problem Quote Link to comment Share on other sites More sharing options...
inflexion Posted January 13, 2005 Author Report Share Posted January 13, 2005 sorry i missed your point, im using kde on RL5 not tried text mode and there is no .alias file in my home directory and ive got this in the alias.sh file right at the start, if this is what you mean? [[ -f ~/.alias ]] && [[ -z $LOAD_SYSTEM_ALIASES ]] && return 0 [[ -n $IGNORE_SYSTEM_ALIASES ]] && return 0 [ -e /etc/sysconfig/system ] && . /etc/sysconfig/system if [ -f ~/.dir_colors ]; then eval `dircolors --sh ~/.dir_colors` else eval `dircolors --sh /etc/DIR_COLORS` fi Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted January 13, 2005 Report Share Posted January 13, 2005 alias targz="tar -xzvf" alias tarbz="tar -xjvf" alias matt="cd /mnt/win_d/Documents\ and\ Settings/Matt/" Adding those right after the firefox alias in alias.sh didn't work? Add them there and then do (as your regular user): . /etc/profile.d/alias.sh There is a space between the . and the / Quote Link to comment Share on other sites More sharing options...
inflexion Posted January 13, 2005 Author Report Share Posted January 13, 2005 thanks seams to be working, ill see if i reboot changes that :P Quote Link to comment Share on other sites More sharing options...
aru Posted January 14, 2005 Report Share Posted January 14, 2005 thanks seams to be working, ill see if i reboot changes that :P <{POST_SNAPBACK}> It will. If you boot into runleve 3 I'm sure it will work, and if you boot into another desktop it will work too, but I guess it will fail for KDE, there is an issue with bash login shells and the way kde is run. this has been asked several times, let's see if I quickly find any of those posts (I'm in a hurrry...)... ...OK this is the post: http://mandrakeusers.org/index.php?showtop...indpost&p=12531 HTH Quote Link to comment Share on other sites More sharing options...
inflexion Posted January 14, 2005 Author Report Share Posted January 14, 2005 aru no mate its fine ive rebooted a couple of times and its all working fine :D i guess that . /etc/profile.d/alias.sh solved the problem?? Quote Link to comment Share on other sites More sharing options...
aru Posted January 14, 2005 Report Share Posted January 14, 2005 aru no mate its fine ive rebooted a couple of times and its all working fine :D i guess that . /etc/profile.d/alias.sh solved the problem?? <{POST_SNAPBACK}> but aren't you doing ". /etc/profile.d/alias.sh" each time, are you? Quote Link to comment Share on other sites More sharing options...
inflexion Posted January 14, 2005 Author Report Share Posted January 14, 2005 nope its all working fine, no need to initialise it everytime Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.