Difference between revisions of "En:Tips"

From Sabayon Wiki
Jump to: navigation, search
(Restore KDE pager after loading Compiz)
m (XScreensaver, The manual)
(11 intermediate revisions by 2 users not shown)
Line 36: Line 36:
 
If, for example you want to search for '''Xorg''' , enter the following in the Search field:
 
If, for example you want to search for '''Xorg''' , enter the following in the Search field:
 
{{Console| <pre class="clear">xorg site:forum.sabayon.org</pre>}}
 
{{Console| <pre class="clear">xorg site:forum.sabayon.org</pre>}}
 +
 +
 +
 +
 +
The same works for Google-search, too., but vice-versa:
 +
* http://www.google.com
 +
If, for example you want to search for '''Xorg''' , enter the following in the Search field:
 +
{{Console| <pre class="clear">site:forum.sabayon.org xorg</pre>}}
  
 
==ERROR: Certificate verification error for xxxxxx==
 
==ERROR: Certificate verification error for xxxxxx==
Line 57: Line 65:
  
 
==Cheat Codes==
 
==Cheat Codes==
 +
 
ATI
 
ATI
 
  noddc res=1024x768 refresh=60 opengl=ati
 
  noddc res=1024x768 refresh=60 opengl=ati
Line 64: Line 73:
 
How to use? hit F5 on the boot up screen of the livecd/dvd and add one of the lines above pending on your hardware
 
How to use? hit F5 on the boot up screen of the livecd/dvd and add one of the lines above pending on your hardware
 
More Cheat/Boot Parameters here:
 
More Cheat/Boot Parameters here:
[http://wiki.sabayonlinux.org/index.php?title=En:Sabayon_Linux#Boot_parameters_and_workarounds_for_problematic_Hardware Boot parameters and workarounds for problematic Hardware]
+
[[En:Sabayon_Linux#Boot_parameters_and_workarounds_for_problematic_Hardware Boot parameters and workarounds for problematic Hardware]]
  
 
==FireFox Search Engine Plugins ==
 
==FireFox Search Engine Plugins ==
[https://addons.mozilla.org/en-US/firefox/addon/3682 Firefox Addon]  << allows you to add searches easily directly from website - add forum, wiki, etc..
 
  
http://mycroft.mozdev.org/download.html?name=gentoo&sherlock=yes&opensearch=yes&submitform=Search
+
* [https://addons.mozilla.org/en-US/firefox/addon/3682 Firefox Addon]  << allows you to add searches easily directly from website - add forum, wiki, etc..
 +
 
 +
* http://mycroft.mozdev.org/download.html?name=gentoo&sherlock=yes&opensearch=yes&submitform=Search
  
[http://www.sabayonlinux.org/forum/viewtopic.php?t=8536 Sabayon Linux Forum Search Plugin]
+
* [http://forum.sabayon.org/forum/viewtopic.php?t=8536 Sabayon Linux Forum Search Plugin]
  
 
==Checking your MD5SUM==
 
==Checking your MD5SUM==
Line 102: Line 112:
 
==Installation==
 
==Installation==
  
* [http://wiki.sabayon.org/index.php?title=En:Introduction#Installation_Guide:_Step_by_Step Installation Guide: Step by Step]
+
* [[En:Introduction#Installation_Guide:_Step_by_Step|Installation Guide: Step by Step]]
  
 
Once you've installed Sabayon, be sure to check out the Package Managers and learn them
 
Once you've installed Sabayon, be sure to check out the Package Managers and learn them
Line 120: Line 130:
 
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.
 
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'''
+
'''Goes in $HOME/.bashrc'''
  
 
  # Lists files in various ways
 
  # Lists files in various ways
Line 189: Line 199:
  
 
==Restore KDE pager after loading Compiz==
 
==Restore KDE pager after loading Compiz==
When The standard KDE Desktop is loaded, you will find the pager next to the kick-off starter icon.br />
+
When The standard KDE Desktop is loaded, you will find the pager next to the kick-off starter icon.,
consisting of four little Desktop icons.,br />
+
 
However, when you start Compiz, it becomes one big Desktop icon.<br />
+
consisting of four little Desktop icons.
This is a known bug at KDE.org, see:<br />
+
 
 +
However, when you start Compiz, it becomes one big Desktop icon.
 +
 
 +
This is a known bug at KDE.org, see:
 +
 
 
https://bugs.kde.org/show_bug.cgi?id=198105
 
https://bugs.kde.org/show_bug.cgi?id=198105
  
On that same bug report, they offer a workaround, but only works with a little adjustment.<br />
+
On that same bug report, they offer a workaround, but only works with a little adjustment.
Here's what you got to do, to get it working:<br />
+
 
 +
Here's what you got to do, to get it working:
 +
 
 
As normal user, open your favourite terminal, and enter:
 
As normal user, open your favourite terminal, and enter:
 
{{Console| <pre class="clear">nano -w ~/.kde4/Autostart/plasma-restart.sh</pre>}}
 
{{Console| <pre class="clear">nano -w ~/.kde4/Autostart/plasma-restart.sh</pre>}}
 
Enter the following text:<br />
 
Enter the following text:<br />
 
  #!/bin/bash
 
  #!/bin/bash
(sleep 10 && kbuildsycoca4 &&
+
(sleep 10 && kbuildsycoca4 &&
kquitapp plasma-desktop >/dev/null 2>&1 &&
+
kquitapp plasma-desktop >/dev/null 2>&1 &&
kstart plasma-desktop & >/dev/null 2>&1 &&
+
kstart plasma-desktop & >/dev/null 2>&1 &&
exit 0) &
+
exit 0) &
 +
 
 +
Save the script, by hitting the (CTRL+O) key-combination, and exit the nano editor. (CTRL+X)
 +
 
 +
Now, we have to make the script executable.
 +
 
 +
At the terminal, enter:
 +
{{Console| <pre class="clear">chmod +x ~/.kde4/Autostart/plasma-restart.sh</pre>}}
 +
What the script basically does is Forcing the plasma-desktop to restart and restore the 4 little pager buttons,
 +
 
 +
while compiz is running.  The delay of 10 secs. (sleep 10) is necessarily for Compiz to get fully loaded, and then execute the script.
 +
 
 +
After a reboot, or restarting XDM, you should have Compiz enabled., AND the four little Desktop pager.
  
 
==Revdep-Rebuild==
 
==Revdep-Rebuild==
 
'''Note: Revdep-Rebuild is not for Entropy systems, only for Portage. Entropy users must NEVER run this command.'''
 
'''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 [http://xelserv.com:81/eclipse/revdep-update.sh 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 [http://www.sabayonlinux.org/forum/viewtopic.php?f=54&t=13322&start=0&st=0&sk=t&sd=a here] if there's anything you'd like to know or ask about.
+
<!-- Pay attention: This script starts runinng automatically! --~~~~ -->
 +
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 [http://xelserv.com:81/eclipse/revdep-update.sh 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 [http://forum.sabayonlinux.org/viewtopic.php?f=54&t=13322&start=0&st=0&sk=t&sd=a here] if there's anything you'd like to know or ask about.
  
 
==Editing text files as root==
 
==Editing text files as root==
Line 309: Line 338:
  
 
Then click on: Select File Type (By Extension) and scroll down to .png and save it in your home directory or wherever you like.
 
Then click on: Select File Type (By Extension) and scroll down to .png and save it in your home directory or wherever you like.
 +
<!-- FIXME: GIMP changed its menu structure so this is somewhere under Export. Please modify the instruction respectively. --~~~~ -->
  
 
Now we need to backup the existing menu image.
 
Now we need to backup the existing menu image.
Line 317: Line 347:
 
Then we will need to copy the image you made to that directory.
 
Then we will need to copy the image you made to that directory.
 
In this example, i saved the image to my Desktop:
 
In this example, i saved the image to my Desktop:
  # cp /home/username/Desktop/mainmenu.png /usr/share/razor/themes/light/
+
  # cp $HOME/Desktop/mainmenu.png /usr/share/razor/themes/light/
 
That's all.
 
That's all.
 
After log out and back in, you should have a nice picture of your choice as your Menu icon.
 
After log out and back in, you should have a nice picture of your choice as your Menu icon.
Line 336: Line 366:
 
==XScreensaver, The manual==
 
==XScreensaver, The manual==
  
How to automatically run / replace XScreensaver on startup on different DE's
+
How to automatically run / replace XScreensaver on startup on different desktop environments:
  
 
*http://www.jwz.org/xscreensaver/man1.html
 
*http://www.jwz.org/xscreensaver/man1.html

Revision as of 23:36, 28 January 2013

i18n: ca de en es id tr

Tips

Resources

Sabayon is basically Gentoo (Gentoo's testing branch)so many things related to Gentoo also applies to Sabayon, with this in mind the following links will be very helpful in solving any problems you may have. Make sure to bookmark them. In particular, Sabayon is based on Gentoo's testing branch. Gentoo's testing branch is about on par with Debian's Sid (unstable branch) releases. Though based on the bleeding edge, you will find Sabayon is quite stable and perhaps more cutting edge.

A key difference is Sabayon, when using the package manager Entropy, loads packages in binary form, with thier own dependencies, and use flags can not be set. However, Sabayon when using portage is basically "gentoo testing" and more customizable, also more bleeding edge. . .



Those links will tell anyone what Gentoo is and how to use it. The amount of Gentoo documentation is just unreal, spend sometime searching.

kolsyra wrote: Here is a very good site for understanding Linux in general. Very good reading if you lack the fundamental "how Linux works" knowledge but also very entertaining for someone that just wants to know more about Linux: http://www.linuxtopia.org/online_books/introduction_to_linux/index.html

Sabayon Linux Wiki page with a list of on-line and printed books about Linux:

Easy searching the Sabayon-Forum

Sometimes, when searching the Forum on a particular subject, you get the message:

The following words in your search query were ignored because they are too common words

Instead of using the Forum's search-box, you can use DuckDuckGo search engine:

If, for example you want to search for Xorg , enter the following in the Search field:

xorg site:forum.sabayon.org



The same works for Google-search, too., but vice-versa:

If, for example you want to search for Xorg , enter the following in the Search field:

site:forum.sabayon.org xorg

ERROR: Certificate verification error for xxxxxx

run:

# emerge ca-certificates 

and after that, run again the previous emerge command.



frozen KDE daemon, menu froze or konqueror not opening

For Those that are having the frozen KDE daemon, menu froze or konqueror not opening, simply run in konsole - that will work till you reboot:

killall -SIGKILL kded


For 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

ATI

noddc res=1024x768 refresh=60 opengl=ati

nVidia

noddc res=1024x768 refresh=60 opengl=nvidia

How to use? hit F5 on the boot up screen of the livecd/dvd and add one of the lines above pending on your hardware More Cheat/Boot Parameters here: En:Sabayon_Linux#Boot_parameters_and_workarounds_for_problematic_Hardware 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..

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]

Installation

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

Entropy and HOWTO: The Complete Portage Guide.

Entropy#Fresh_Install_-_What_to_do.3F

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:
res=1024x768
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/.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

Restore KDE pager after loading Compiz

When The standard KDE Desktop is loaded, you will find the pager next to the kick-off starter icon.,

consisting of four little Desktop icons.

However, when you start Compiz, it becomes one big Desktop icon.

This is a known bug at KDE.org, see:

https://bugs.kde.org/show_bug.cgi?id=198105

On that same bug report, they offer a workaround, but only works with a little adjustment.

Here's what you got to do, to get it working:

As normal user, open your favourite terminal, and enter:

nano -w ~/.kde4/Autostart/plasma-restart.sh

Enter the following text:

#!/bin/bash
(sleep 10 && kbuildsycoca4 &&
kquitapp plasma-desktop >/dev/null 2>&1 &&
kstart plasma-desktop & >/dev/null 2>&1 &&
exit 0) &

Save the script, by hitting the (CTRL+O) key-combination, and exit the nano editor. (CTRL+X)

Now, we have to make the script executable.

At the terminal, enter:

chmod +x ~/.kde4/Autostart/plasma-restart.sh

What the script basically does is Forcing the plasma-desktop to restart and restore the 4 little pager buttons,

while compiz is running. The delay of 10 secs. (sleep 10) is necessarily for Compiz to get fully loaded, and then execute the script.

After a reboot, or restarting XDM, you should have Compiz enabled., AND the four little Desktop pager.

Revdep-Rebuild

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]
ServiceTypes=text/*
Actions=EditAsRoot
Encoding=UTF8
X-KDE-Priority=TopLevel

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

ServiceTypes=text/*

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


X-KDE-Priority=TopLevel

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!

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.

caution:

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/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 desktop environments: