From Sabayon Wiki
Revision as of 07:57, 26 July 2013 by Jablko (talk | contribs) (Cheat Codes)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
i18n: ca de en es id tr



Sabayon je v základu Gentoo (testovací větev Gentoo) takže spousta věcí, které se vztahují k Gentoo lze aplikovat také v Sabayonu. Pokud budete mít toto na paměti, následující odkazy budou užitečné v řešení problémů na které můžete narazit.

Hlavní odlišností Sabayonu je to, že používá systém pro správu balíčků Entropy a načítá balíčky v binární podobě s jejich vlastními závislostmi. USE flags nemohou být nastaveny a použity. Nicméně, Sabayon při použití Portage je vlastně "gentoo testing" a je více přizpůsobitelný, ale také více nestabilní. . .

Na těchto odkazech se dozvíte užitečné informace o Gentoo. Množství dokumentace Gentoo je prostě neskutečné, musíte strávit nějaký čas hledáním.

Existuje velmi dobrá stránka pro porozumění Linuxu samotného. Je dobré si ji přečíst, pokud vám chybí základní znalosti jak Linux funguje. Může být ale také zábavná pro někoho, kdo se chce dozvědět o Linuxu více: http://www.linuxtopia.org/online_books/introduction_to_linux/index.html

Stránka Sabayon Linux Wiki se seznamem tištěných a on-line knih o Linuxu:

CHYBA: Chyba ověření certifikátu pro xxxxxx


# emerge ca-certificates 

a potom znovu spusťte předchozí příkaz emerge.

Zamrzlý KDE démon, zamrzlé menu nebo se neotvírá Konqueror

V konzoli spusťte:

 # killall -SIGKILL kded 

Bude to fungovat do té doby, než restartujete počítač.

Nvidia Kernel Mismatch

# emerge -C nvidia-drivers; rmmod nvidia; rm /lib/modules/$(uname -r)/video/nvidia.ko; rm /usr/lib/opengl/nvidia -rf; emerge nvidia-drivers; eselect opengl set nvidia; reboot

Cheat Codes


noddc res=1024x768 refresh=60 opengl=ati


noddc res=1024x768 refresh=60 opengl=nvidia

Jak je použít? Stiskněte F5 na startovací obrazovce LiveCD/DVD a přidejte jednu z výše uvedených řádek v závislosti na vašem hardware. Další Cheat codes jsou zde: Boot parameters and workarounds for problematic Hardware

FireFox Search Engine Plugins

Firefox Addon << allows you to add searches easily directly from website - add forum, wiki, etc..


Sabayon Linux Forum Search Plugin

Checking your MD5SUM

Before you attempt installing Sabayon (or any Linux distro for that matter) you should check your md5sum. "What on earth is that!?" you may ask. Well, md5sum is an ingenious algorithm which, when you run a string of data through it, will spit out a string of letters and numbers. This string will be totally and completely unique to that data. So in our case, we want to create an md5sum of the Sabayon LiveCD or LiveDVD .iso file.

Why should I go through all the trouble?

Well, when the developers create the master .iso from which all the other .iso's will be copied and distributed the developers calculate an md5sum of that .iso. They then post the results of the md5sum in the release notes. This is so you can verify if the .iso you have downloaded has not been tampered with, or has downloaded correctly.

MANY installation error are a result of folks not checking their md5sums before trying to install. Hey folks, entropy is real! Sometimes bits of a file get lost in the shuffle. Make sure your .iso file is 100% there.

So how on earth do I check this vaunted md5sum.

In Linux it could not be easier:

md5sum /path/to/file.iso

You can then compare the outcome with the official, posted md5sum to verify that you have EXACTLY the same file as lxnay created!

Remember to also verify the integrity of the LiveCD/DVD once you have burned it, to make sure that your burner didn't make any boo boos. The procedure for verifying the integrity of a LiveCD/DVD is given on the following Wiki page:

You can also use K3B to check the md5sum. This is done automatically when you chose to burn a cd or dvd iso image to disc, using this program. Then as before, check it against the published md5sum.

In the windows world? You are trying to jump into the Linuxverse? There are several programs out there for free. Here is one.[1]


Once you've installed Sabayon, be sure to check out the Package Managers and learn them

Entropy and HOWTO: The Complete Portage Guide.


Live CD Display is Compressed or Partially Viewable

When booting from the LiveCD/DVD and your display is extremely small resolution or appears to be compressed or partially viewable try booting with the following command line option:
This will give you a resolution of 1024 by 768. If you need a different resolution just change the height and width to that which you require.

Useful aliases

I have gathered information from a few sources to come up with a useful list of aliases that users may want to put into their environment.

Goes in /home/user/.bashrc

# Lists files in various ways
# -l in single column format, I use this when I want to see the extra attributes about a file
# the addition of 'h' shows file sizes in human readable form
# the addition of 'a' shows hidden files (names starting with '.')
# the addition of 'F' annotates files with addition chars
# feel free to man ls for a more detailed explanation
alias ll='ls -l' # or alias ll='ls -lh'
alias l.='ls -a'
alias ll.='ls -al'
alias ls='ls -aF --color=always'

# Simply renames grep to search
alias search=grep

# Shortcut to mount and unmount your cdrom drive
# ? doesn't this happen automatically on most distros ?
alias mcd='mount /mnt/cdrom'
alias ucd='umount /mnt/cdrom'

# Starts Midnight Commander in colored mode
alias mc='mc -c'

# Directory traversal
# Seems SuSE used to set these by default
alias ..='cd ..'
alias ...='cd ../..'

# Adding the -i will prompt for confirmation which can be good for new 
# and unexpected/annoying for more experienced users
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Fixes wrong typing
alias sl='ls'

# Forces modprobe to always be verbose
alias modprobe='modprobe -v'

# Shows all running tasks
alias pm='ps auxw | more'

# Reports disk usage in human readable format
alias df='df -h'

# Create shortcuts to different directories
# alias cda='cd /var/www/localhost/htdocs'

# for some reason, sometimes cpufreqd decides to run the
# CPU at max speed even though the load is 0.01.  This
# alias lets me see if that's happening.
alias cur='sed -e "s/000$/ MHz/" < /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq'

# Allows for you to search what you have typed previously
alias gh='history | grep -i'

More info at the following

Learning the bash Shell, 3rd Edition

Bash Prompt HOWTO

Customizing your Bash environment

Getting Started with BASH

Revdep-Rebuild Woes?

Note: Revdep-Rebuild is not for Entropy systems, only for Portage. Entropy users must NEVER run this command.

In my travels of Sabayon I have come across many who have let their packages get all too out of date for a revdep-rebuild to fix. I've prepared a short script here which overrides the old revdep-rebuild with an optional update feature. You can either keep this somewhere independant of revdep-rebuild, or replace revdep-rebuild with it - it should be able to stand on its own. Look here if there's anything you'd like to know or ask about.

Editing text files as root

Some people like to have an "Edit as root" for text files in right click menu. The way for do this for konqueror is create a file ended in .desktop (example: kwrite.desktop) in /usr/share/apps/konqueror/servicemenus/ with the following code inside:

[Desktop Entry]

[Desktop Action EditAsRoot]
Name=Edit as root
Exec=kdesu -u root -n --noignorebutton -c 'kwrite %U'


Tells what kind of files will be afected by this menu entry. In this case, all text files. You can open kcontrol and take a look in KDE components, file associations for see what you can add. For example, if you want to add also .desktop files (like the one we are creating!), the line will be ServiceTypes=text/*,application/x-desktop


With this line, you will see "Edit as root" when you do right click. Without that line you will see the option under submenu actions.

Existing Reiser4 partitions - CAREFUL!

Enabling back/forward mouse buttons in Konqueror and Dolphin file managers

First, you must install xautomation and xbindkeys from Entropy.

Next, create a text file named .xbindkeysrc and save it to your home directory. The content of the file should be:

# xbindkeys configuration #
# Version: 1.8.0
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
# The format of a command line is:
# "command to start"
# associated key
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).

# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events

# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.

#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable

# Examples of commands:

control+shift + q

# set directly keycode (here control + f with my keyboard)
c:41 + m:0x4

# specify a mouse button
control + b:2

#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
## set directly keycode (here control+alt+mod2 + f with my keyboard)
# alt + c:0x29 + m:4 + mod2
## Control+Shift+a release event starts rxvt
# release+control+shift + a
## Control + mouse button 2 release event starts rxvt
# Control + b:2 + Release

# dolphin go back
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"

# dolphin go forward
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"

# End of xbindkeys configuration #

Now create an autostart entry in /home/user_name/.kde4/Autostart named xbindkeys.desktop containing the following code:

[Desktop Entry]

Now just reboot your computer and you should have back/forward mouse button functionality in Dolphin and Konqueror. This, of course can also work when running a different Desktop Environment. eg. XFCE.

Some like the XFCE looks and feel, but mainly use KDE apps. In this case, add the xbindkeys.desktop script to XFCE-settings --> session and startup. (Make sure you enable the KDE-services under the Advanced tab.)

terminal reverse search

Terminal power users already know that a log of all the commands you execute are kept in history. (Go ahead, type history to see them.)

Well, you can also search your command history as you type, using the very useful Ctrl+R key combination.

In the terminal, hold down Ctrl and press R to invoke "reverse-i-search." Type a letter - like s - and you'll get a match for the most recent command in your history that starts with s. Keep typing to narrow your match. When you hit the jackpot, press Enter to execute the suggested command.

Also, !characters will execute the last command that matches the specified characters. (So !ssh will run the last ssh you used.)

Of course good history search only works if you've got a long history. To extend the length of the history list in your terminal, add the following lines to your .bash_profile:

HISTFILESIZE=1000000000 HISTSIZE=1000000

Once you've got your history built up, you can use this command to see what items you type in the terminal the most. (Great way to decide what aliases you need to set up.)

history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r

The result will be a list of commands you've issued ordered by frequency. This is a fabulous way to identify what commands could use a shorter alias; for example, if I type ssh mylongservername.com 20 times a day, it's worth setting up an alias like sshg to get that done in fewer keystrokes.

alternative KDE task-manager

If you have got many tasks in your task-manager you should consider using Smooth-tasks.

This alternative task-manager allows you to just display the icons of a task thus using less space but still maintaining the ability of the user to distinguish the different tasks.

Install smooth-tasks from Entropy.

After installing and substituting it with the original task-manager, you should have a deep look at the settings since they are much broader.

One way of using the features of smooth-tasks could be to only display the icons of tasks and move the panel to the left or right of the screen. This is most useful on widescreens.


for those of you who use KDE and will be upgrading to KDE 4.8.0 when it becomes available in Entropy: If you're using the smooth-tasks widget, it seems that it does not work in KDE 4.8.0 However, there is a widget called Icon-Only Task Manager which does basically the same thing. So use that instead. When using Desktop-effects, rather than Compiz, you have to untick 'Highlight Window' (Kickoff > System Settings > Desktop Effects | 'All Effects' tab), otherwise, when you hover the mouse pointer over the icon on the Panel of a minimised window, both the window preview and the window itself are displayed while the mouse pointer is over the icon.

Install standalone fonts downloaded from the Internet

If you downloaded some fonts as standalone files (ie. somefont.ttf) you can install them in 2 ways. If you want to install them for the current user only follow these steps:

# cp somefont.ttf ~/.fonts/
# cd ~/.fonts
# fc-cache

If ~/.fonts does not exists, just create it.

If you want to set the fonts up for the whole system and all the users, copy all of them in /usr/share/fonts/ and run the fc-cache command there as root.

How to change menu icon in Razor-Qt

When using Razor-qt you'll find that you can't change the menu icon like we can in KDE.

However, there is still a way to change the default icon into our nice looking Sabayon "foot" logo. :-) or whatever image you like.

For this to work, we need the commandline, a image editor, and a custom image.

So first we will need to make an image that will work with the main menu.

Next we will edit the image. You can use your preferred image editor, but in this example i will use Gimp.

In Gimp, when the image is loaded, Go to Image >> Scale Image.

Under image size make sure the width and height both are 64.

If you put 64 in one and the other changes click on the chain to the right.

Next, click File>Save As... and change the name to: mainmenu.png

Then click on: Select File Type (By Extension) and scroll down to .png and save it in your home directory or wherever you like.

Now we need to backup the existing menu image. Open the terminal, and become root by entering "su", followed with the "root" password. backup the existing menu image:

# cp /usr/share/razor/themes/light/mainmenu.png /usr/share/razor/themes/light/backup.mainmenu.png

Replace light with your current theme but light is default. Then we will need to copy the image you made to that directory. In this example, i saved the image to my Desktop:

# cp /home/username/Desktop/mainmenu.png /usr/share/razor/themes/light/

That's all. After log out and back in, you should have a nice picture of your choice as your Menu icon.

Learning to work with the VI (VIM) editor

For those who like to learn working with the VI editor, but can't find proper documentation, or doesn't understand the manpage or help function:

VI has a build-in tutor., that will learn you in a interactive way, the ins and outs of VI.

instead of run vi or vim, run:

# vimtutor 

at the commandline, and follow the instructions.

While running "vimtutor", you are actually already running VI. Enjoy learning :-)

XScreensaver, The manual

How to automatically run / replace XScreensaver on startup on different DE's