http://www.pantz.org/software/shell/enhancingshellprompt.html
Default root prompt doesn't show host and current folder, because root doesn't have ~/.bashrc file, that loads /etc/bashrc. To fix it, simply copy .bashrc from other user's home dir or, if you don't need to include /etc/bashrc, create the .bashrc file with
echo 'PS1="[\u@\h \W]\\$ "' > /root/.bashrc
which can also go to %post in kickstart.
To load the change without relogin, run
. ~/.bashrc
(don't miss the dot at the beginning)
Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts
Thursday, November 13, 2008
Wednesday, November 12, 2008
CentOS 5.2 - my desktop configuration
Normally I use Fedora for desktop, but this time I tried something a bit different
Started with kickstart that I previously put together to install headless server and then I installed gnome and the rest.
Gnome
yum groupinstall 'X Window System' 'GNOME Desktop Environment'
# if get error:" 0002483: nautilus-sendto requires a non-existent libgaim.so.0" do
http://bugs.centos.org/view.php?id=2483
wget http://mirror.centos.org/centos/5/os/i386/CentOS/nautilus-sendto-0.7-5.fc6.i386.rpm
rpm -Uvh --nodeps nautilus-sendto-0.7-5.fc6.i386.rpm
Display
It was a nightmare to set up the correct resolution. First I was trying to find correct setting for my monitor on internet and manually edit xorg.conf, but had no luck. Then I was just fiddling with System/Preferences/Screen Resolution and System/Administration/System and the follwing commands till I got it right, but can't say what made it work.
system-config-display --reconfig
Xorg -configure
xinit
The resulting config looks like this:
cat /etc/X11/xorg.conf
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1680x1050"
HorizSync 31.5 - 65.5
VertRefresh 56.0 - 65.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nv"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Now, when looking at the first line of the file above, it seems that
system-config-display --reconfig
made it work.
USB Mouse & Keyboard
This was another issue that gave me hard time, but this time it was of my own making. I forgot that I purposely disabled USB support in kickstart with this line:
bootloader --location=mbr --append="nousb enforcing=0"
Worked that out from startup log:
dmesg | grep usb
#got message: "usbcore: USB support disabled"
vim /boot/grub/grub.conf
# and remove nousb to get USB working
PgAdmin
Install DAG repo from
http://dag.wieers.com/rpm/FAQ.php#B
then
yum install pgadmin3
Firefox Flash plugin
download yum repo rpm from adobe.com and then run
yum install flash-plugin
Firefox Java plugin
http://it.megocollector.com/?p=832
cd /usr/lib/mozilla/plugins
ls -s /usr/java/jre1.6.0_10/plugin/i386/ns7/libjavaplugin_oji.so ibjavaplugin_oji.so
# java location might differ, see what's in /usr/java folder
gnome-do and deskbar-applet
They look fancy, but in the end, alt+F2 might be good enough for me.
gnome-do : activate with Win+space
http://rpm.pbone.net/index.php3/stat/4/idpl/9221111/com/gnome-do-0.4.2.0-1.el5.kb.i386.rpm.html
deskbar applet : activate with alt+F3
http://rpm.pbone.net/index.php3/stat/4/idpl/4838900/com/deskbar-applet-2.17.2-3.el5.rf.i386.rpm.html
Finally, xterm's gray background makes me sad.
echo 'XTerm*background: white' >> /etc/X11/Xresources
Started with kickstart that I previously put together to install headless server and then I installed gnome and the rest.
Gnome
yum groupinstall 'X Window System' 'GNOME Desktop Environment'
# if get error:" 0002483: nautilus-sendto requires a non-existent libgaim.so.0" do
http://bugs.centos.org/view.php?id=2483
wget http://mirror.centos.org/centos/5/os/i386/CentOS/nautilus-sendto-0.7-5.fc6.i386.rpm
rpm -Uvh --nodeps nautilus-sendto-0.7-5.fc6.i386.rpm
Display
It was a nightmare to set up the correct resolution. First I was trying to find correct setting for my monitor on internet and manually edit xorg.conf, but had no luck. Then I was just fiddling with System/Preferences/Screen Resolution and System/Administration/System and the follwing commands till I got it right, but can't say what made it work.
system-config-display --reconfig
Xorg -configure
xinit
The resulting config looks like this:
cat /etc/X11/xorg.conf
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1680x1050"
HorizSync 31.5 - 65.5
VertRefresh 56.0 - 65.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nv"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Now, when looking at the first line of the file above, it seems that
system-config-display --reconfig
made it work.
USB Mouse & Keyboard
This was another issue that gave me hard time, but this time it was of my own making. I forgot that I purposely disabled USB support in kickstart with this line:
bootloader --location=mbr --append="nousb enforcing=0"
Worked that out from startup log:
dmesg | grep usb
#got message: "usbcore: USB support disabled"
vim /boot/grub/grub.conf
# and remove nousb to get USB working
PgAdmin
Install DAG repo from
http://dag.wieers.com/rpm/FAQ.php#B
then
yum install pgadmin3
Firefox Flash plugin
download yum repo rpm from adobe.com and then run
yum install flash-plugin
Firefox Java plugin
http://it.megocollector.com/?p=832
cd /usr/lib/mozilla/plugins
ls -s /usr/java/jre1.6.0_10/plugin/i386/ns7/libjavaplugin_oji.so ibjavaplugin_oji.so
# java location might differ, see what's in /usr/java folder
gnome-do and deskbar-applet
They look fancy, but in the end, alt+F2 might be good enough for me.
gnome-do : activate with Win+space
http://rpm.pbone.net/index.php3/stat/4/idpl/9221111/com/gnome-do-0.4.2.0-1.el5.kb.i386.rpm.html
deskbar applet : activate with alt+F3
http://rpm.pbone.net/index.php3/stat/4/idpl/4838900/com/deskbar-applet-2.17.2-3.el5.rf.i386.rpm.html
Finally, xterm's gray background makes me sad.
echo 'XTerm*background: white' >> /etc/X11/Xresources
Subscribe to:
Posts (Atom)