Search my blog
Custom Search
Showing posts with label openSUSE. Show all posts
Showing posts with label openSUSE. Show all posts

Sunday, September 21, 2008

[HOWTO]Change ls command default colors

1.Test colors supported
This shell script shows all standard colour combinations on the current console.
If no colours appear, your console does not support ANSI colour selections.

#!/bin/bash
# Display ANSI colours.
#
esc="\033["
echo -e "\t 40\t 41\t 42\t 43\t 44 45\t46\t 47"
for fore in 30 31 32 33 34 35 36 37; do
line1="$fore "
line2=" "
for back in 40 41 42 43 44 45 46 47; do
line1="${line1}${esc}${back};${fore}m Normal ${esc}0m"
line2="${line2}${esc}${back};${fore};1m Bold ${esc}0m"
done
echo -e "$line1\n$line2"
done
2.Customize your ls output colors
first copy /etc/DIR_COLORS to HOME/.dir_colors.
then modify .dir_colors to your preferred themes(see comments in files).
by default, bash will use your cutomized colors next time when you open a new shell window.

NOTE: dircolors -p to view current color scheme.

-

Thursday, September 18, 2008

Points to Speed up YaST

By default, Yast with activate and check update for every repository entries you setup.
So it will be faster if you disenable those default options.
Better options:
1.check update by manually, don't let YaST check it every time.
2.keep only main repositories activating, disactivate temporary repositories.
only use temporary entries when you need.

Wednesday, September 17, 2008

openSUSE input method shorcut

1.IME switch on/off
ctrl+space(defalt)
I set as ctrl+Left shift.

2.switch between IMEs
ctrl+alt+down arrow(default) next IME
ctrl+alt+up arrow(default) previous IME

3.switch zennkaku/hannkaku in Anthy
ctrl+j(default)

4.switch chinese/english in Zhinengqanpin
shift(default)

openSUSE power managerment on Toshiba laptop

0.preface


1.openSUSE power management intro
To be added.

2.setup suspend to RAM and test
Unfortunately, my Toshiba laptop is not in the s2ram whitelist.
First find out proper options that work for you.
In my case, "sudo s2ram -f" works fine. You can find some test options combinations in http://en.opensuse.org/S2ram.

Second modify opsensuse options.The default is s2ram, no other options are set in openSUSE.
sudo vi /etc/pm/config.d/s2ram
add follow lines:
S2RAM_OPTS="-f"

3.setup suspend to RAM with KPowersave
When you close laptops's lid, the default action is to lock your screen not to suspend to RAM.
You can change it by follow steps.

Reference:
openSUSE Pm-utils: http://en.opensuse.org/Pm-utils
s2ram: http://en.opensuse.org/S2ram
KPowersave: http://en.opensuse.org/Projects_KPowersave