alias nur auf Konsole nicht aber in x-window

Warum Debian und/oder eine seiner Spielarten? Was muss ich vorher wissen? Wo geht es nach der Installation weiter?
Antworten
Benutzeravatar
mymain
Beiträge: 339
Registriert: 29.07.2005 13:40:28
Lizenz eigener Beiträge: MIT Lizenz

alias nur auf Konsole nicht aber in x-window

Beitrag von mymain » 13.09.2005 13:15:10

Halle zusammen,

ich habe in der /etc/profile alias definiert, die auf der Konsole funktionieren aber z.B auf der Konsole vom kde nicht.
Nun könnte ich in der ~.bashrc nochmal das selbe eintragen,
will aber es systemweit machen und nicht für jeden user einzeln.

Benutzeravatar
mymain
Beiträge: 339
Registriert: 29.07.2005 13:40:28
Lizenz eigener Beiträge: MIT Lizenz

Problbem selbst gelöst

Beitrag von mymain » 15.09.2005 14:16:27

Hallo zusammen,

muss mir mal selbst antworten.
Habe mal Kanotix gebootet und es wie dort gemacht.:wink:
Die aliase sind auch in /etc/profile.
In der /etc/bash.bashrc steht nur eine Zeile die habe ich übernommen.
Meine: /etc/profile und /etc/bash.bashrc

Code: Alles auswählen

# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
    ;;
*)
    ;;
esac

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion
#fi

# von kantotix für alias
[ -f /etc/profile ] && . /etc/profile

Code: Alles auswählen

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
    PS1='\u@\h:\w\$ '
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
        alias ls='ls --color=auto'
	    alias dir='ls --color=auto --format=vertical'
	        alias vdir='ls --color=auto --format=long'
		fi

# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ..='cd ..'
alias ...='cd ../..'
alias -- +='pushd .'
alias -- -='popd'
alias unzip='unzip -L'
# short commands

alias h='history'
alias j="jobs -l"
alias c="clear"
alias o="less"

export PATH

umask 022

Antworten