Verhalten der KDE-Konsole ändern

Software besorgen und anwenden
Post Reply
Message
Author
msp

Verhalten der KDE-Konsole ändern

#1 Post by msp »

Hi,

ich habe im normalen Konsolenmodus (ohne X) Fraben für ls definiert, so dass verschiedene Dateitypen
verschiedenfarbig dargestellt werden.
Das gleiche Verhalten hätte ich jetzt gerne in meinem Konsolen Fenster unter KDE (2.2.1).
Außerdem hätte ich gerne, dass das Prompt genauso wie im Konsolenmodus aussieht.

Was muss ich dafür tun?

MfG

Michael

Boron

Re: Verhalten der KDE-Konsole ändern

#2 Post by Boron »

Hi msp,

für den Promt ergänze einfach in der Datei ~/.bashrc die Zeile:
PS1="\h\w\$ "
Dies sollte dann Rechnername und aktuelles Verzeichniss anzeigen. Du kannst vor das \h noch ein \u machen, dann bekommst du den User-Namen auch noch.

Mit den Farben kann ich dir leider nicht helfen <img src="http://www.pl-forum.de/UltraBoard/Images/Sad.gif" border="0" align="middle">

Gruss Boron

msp

Re: Verhalten der KDE-Konsole ändern

#3 Post by msp »

Vielen Dank für deine Antwort!

Jetzt funktioniert es. ICh weiß jetzt auch warum es bei mir nicht funktionierte. Ich hatte gar keine .bashrc.
Tja, wenn man mal wieder die man-pages nicht richtig liest. (.bashrc wird für nicht login-shells verwendet).

Falls dich das mit den Farben interessiert (habe ich mir von der SuSE-Distri geklaut):
Trage in der .bashrc folgendes ein:

# define colors for the ls command, so that differnt file-types are displayed
# in different colors
LS_COLORS="no=00:fi=00:di=01;34:ln=01:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:ex=01;31:*.cmd=01;32:*.exe=01;32:*.com=01; 32:*.btm=01;32:*.bat=01;32:*.tar=00;31:*.tgz=00;31:*.rpm=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;
31:*.gz=00;31:*.bz2=00;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.png=01;35:"

# SuSE uses -N and -T 0
# I don't know exactly know the meaning of these two parameters.
# According to the ls man-page:
# -N has to do something with displaying special characters; at the moment it
# seems that it's working better for me without -N
# -T 0 has to do something with tabs, don't know the exact effect of this
# --color sets the color modes of ls; tty is used by SuSE, I don't know what
# tty in this context should mean, can't find it in the ls man-page
LS_OPTIONS="--color=tty" #-T 0 -N

export LS_COLORS

MfG

Michael

Post Reply