Category Archives: Sabayon

Square font issue in Sabayon 10 and Sabayon 11

There were some issues with Sabayon fonts that is fonts appear to be in square. This issue is resolved by the following command given below

equo install x11-libs/gdk-pixbuf x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/pango

For further detatils visit sabayon forum.

Some reports of images not showing up in the web browser.  Please do:

  • equo remove media-libs/jpeg-8d –nodeps
  • equo install media-libs/libjpeg-turbo


Connecting java and mysql database

For connecting java application with the mysql database, you need to
follow 5 steps to perform database connectivity.

In this example we are using MySql as the database. So we need to know
following informations for the mysql database:

1. *Driver class: * The driver class for the mysql database is
2. *Connection URL: * The connection URL for the mysql database is
*jdbc:mysql://localhost:3306/test* where jdbc is the API, mysql is
the database, localhost is the server name on which mysql is
running, we may also use IP address, 3306 is the port number and
sonoo is the database name. We may use any database, in such case,
you need to replace the test with your database name.
3. *Username: * The default username for the mysql database is *root*.
4. *Password: * Password is given by the user at the time of installing
the mysql database. In this example, we are going to use root as the

Let’s first create a table in the mysql database, but before creating
table, we need to create database first.

create database test;
use test;
create table emp(id int(10),name varchar(40),age int(3));

Here’s the code

import java.sql.*;
class MysqlCon
public static void main(String args[]){

Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/test”,”root”,”root”);

//here test is database name, root is username and password

Statement stmt=con.createStatement();

ResultSet rs=stmt.executeQuery(“select * from emp”);

System.out.println(rs.getInt(1)+”  “+rs.getString(2)+”  “+rs.getString(3));


}catch(Exception e){ System.out.println(e);}


To connect java application with the mysql database mysqlconnector.jar file is required to be loaded.

We have to manually download the mysqlconnector.jar from the internet and paste the mysqlconnector.jar file in jre/lib/ext folder

Download the mysqlconnector.jar file. Go to jre/lib/ext folder and paste

I use sabayon 10 and path in my os is /etc/java-config-2/current-system-vm/jre/lib/ext/mysqlconnector.jar

Now compile the code and run it.

Thank You for reading

Updating kernel in Sabayon using Entropy

Switching your kernel using kernel-switcher is the easiest way, and actually recommended,as it also installs the right kernel modules/drivers. Check for more information on

Entropy:Using Kernel Switcher !


Kernel versions may vary!


Do not reboot until you have completed all the steps in this article!

This How-to helps you to update your kernel by using the Entropy package manager.

First of all you must update the Entropy package manager to the latest version to overcome other issues. Become root by using the su command:

 $ su

Press Enter, type the root password then press Enter again. Now you can update the package manager. First of all update the repositories:

 # equo update

If equo tells you there is a newer Entropy version available, you should install it:

 # equo install entropy

Sometimes you need to update configuration files too, so use the command:

 # equo conf update

and follow its instructions. Entropy is now up-to-date and we can move on to installing the latest kernel image:

 # equo install --ask linux-sabayon

The output should look something like this:

 # equo install --ask linux-sabayon
>>  @@ These are the chosen packages:
>>    # (1/1) [] sys-kernel/linux-sabayon-2.6.36-r1
>>     Versions: Not installed / NoTag / NoRev ===> 2.6.36-r1 / NoTag / 0
>> 	Action:		 Install
>>  @@ Packages involved: 1
     Would you like to continue with dependencies calculation ? [Yes/No]  y

Let that install.

Once done, you need to select the kernel with eselect and install all kernel-related drivers that have been rebuilt to work with the new kernel. To show the list of kernels you can select, run:

 # eselect kernel list

The output would look like this:

 # eselect kernel list
Available kernel symlink targets:
  [1]   linux-2.6.35-sabayon
  [2]   linux-2.6.36-sabayon *

As you can see there are two kernel entries and we need to select the latest, which is number [2]. In the example above, the correct kernel is already selected (indicated by the *). Should you need to select a kernel, e.g. [2] run:

 # eselect kernel set 2

Now the kernel symlink is set to the new kernel and we can install the updated kernel drivers. We need to look for the drivers that are installed for the old kernel, so that we can install the appropriate versions for our new kernel.

One way is to search the installed packages for the old kernel version and redirect the output to a file which you can look into later to select the drivers you need.

# equo query installed 2.6.35-sabayon > kernel-upgrade.txt

Open another terminal and read the file:

 # less kernel-upgrade.txt

Look through the list and write down the packages that need to be installed for the new kernel. You can whittle down the number of installed packages in the search to just those that are specifically kernel-related by filtering using grep as follows:

# equo query installed 2.6.35-sabayon | grep '#'

For example:

# equo query installed 2.6.35-sabayon | grep '#'
>>      @@ Package: app-emulation/virtualbox-guest-additions-3.2.12#2.6.35-sabayon branch: 5, [__system__] 
>>      @@ Package: net-wireless/broadcom-sta- branch: 5, [__system__] 
>>      @@ Package: net-wireless/ndiswrapper-1.56#2.6.35-sabayon branch: 5, [__system__] 
>>      @@ Package: x11-drivers/xf86-video-virtualbox-3.2.12#2.6.35-sabayon branch: 5, [__system__]

Equo is able to resolve the latest version of a specific kernel module on its own. The install line for the example above, should look something like this:

# equo install --ask virtualbox-guest-additions#2.6.36-sabayon broadcom-sta#2.6.36-sabayon ndiswrapper#2.6.36-sabayon xf86-video-virtualbox#2.6.36-sabayon

which is resolved by Equo to the following versions:

>>  @@ These are the chosen packages:
>>    # (1/4) [] app-emulation/virtualbox-guest-additions-3.2.12#2.6.36-sabayon
>>     Versions: Not installed / NoTag / NoRev ===> 3.2.12 / 2.6.36-sabayon / 0
>> 	Action:		 Install
>>    # (2/4) [] net-wireless/broadcom-sta-
>>     Versions: Not installed / NoTag / NoRev ===> / 2.6.36-sabayon / 2
>> 	Action:		 Install
>>    # (3/4) [] net-wireless/ndiswrapper-1.56#2.6.36-sabayon
>>     Versions: Not installed / NoTag / NoRev ===> 1.56 / 2.6.36-sabayon / 1
>> 	Action:		 Install
>>    # (4/4) [] x11-drivers/xf86-video-virtualbox-3.2.12#2.6.36-sabayon
>>     Versions: Not installed / NoTag / NoRev ===> 3.2.12 / 2.6.36-sabayon / 0
>> 	Action:		 Install
>>  @@ Packages involved: 4
     Would you like to continue with dependencies calculation ? [Yes/No] y

Once that is finished, all drivers are updated for the latest kernel and you should be safe to reboot into the new kernel.

Removing kernel in Sabayon 10

Removing kernel sources

After a new kernel is installed and if it works satisfactorily, the old kernel can be removed. To remove the old kernel sources, emerge’s –depclean option (short form -c) can be used to remove all old or unused versions of a slotted package, e.g. for sys-kernel/gentoo-sources.

root # emerge --ask --depclean gentoo-sources

Be sure to verify that it is not removing the sources for the currently running kernel. (See kernel upgrade article on how to upgrade.)

Protecting kernel sources

If newer kernel sources has been merged and you run –depclean before switching to the newer sources, the current sources will be removed. But if you want to stay with the current sources, this removal is not wanted, because you may need the sources e.g. for updating external kernel modules. It’s therefore good practice to add the specific kernel version to your world file to protect it from –depclean operations.

root # emerge --ask --noreplace gentoo-sources:3.3.8

Note the slot notation, using a colon instead of a dash. Every kernel version is its own slot.

Remove kernel leftovers

Using eclean-kernel

app-portage/eclean-kernel is a simple tool for old kernel cleanup/removal. It removes both built kernel files and build directories if they’re no longer reference by any preserved kernel.

For example, to keep three newest kernels around:

root # eclean-kernel -n 3

Manual removal

Portage however only removes the files it installed – the files generated during the kernel build and installation remain. They can be safely removed.

  • When a kernel is built in the source directory, files generated during the build process remain, and are not removed by Portage:
root # rm -r /usr/src/linux-3.X.Y
  • During kernel setup, the kernel modules are copied to a sub directory of /lib/modules/:
root # rm -r /lib/modules/3.X.Y
  • The old files in /boot can also be removed:
root # rm /boot/kernel-3.X.Y
root # rm /boot/
root # rm /boot/config-3.X.Y
  • Lastly, remove all leftover entries from your bootloader’s config file.

Command for Restarting XDM in Sabayon

root#  /etc/init.d/xdm restart

The above code tells that it will restart the xdm manager. We might have situations that we get only command line. To turn the command line to GUI use can use the above command or the command below.

root#  /etc/init.d/xdm start

Kernel update


Start with:
% emerge -u gentoo-sources
% eselect kernel list
% cd /usr/src/linux
% make menuconfig

% make && make modules_install

File systems –>
Filesystem in Userspace support (automount ntfs3g)

% cp arch/x86_64/boot/bzImage /boot/kernel-3.1.6-gentoo
% nano -w /boot/grub/grub.conf
% module-rebuild populate

After kernel update emerge nvidia-drivers
Remove old kernel
% emerge -P gentoo-sources

Remove the bzImage file for the kernel /boot
Using old kernel .config to configure a new one
% cd /usr/src/linux-2.6.9-gentoo-r2
% cp ../linux-2.6.9-gentoo-r1/.config .
% make oldconfig

A much safer upgrading method is to copy your config as previously shown, and then simply run make menuconfig. This avoids the problems of make oldconfig mentioned previously, as make menuconfig will load up your previous configuration as much as possible into the menu.

Note: r8169 (ethernet driver as module), alsa as module. – Linux Kernel Driver Database

View original post

Updating Sabayon

Emerge is the primary portage tool for package management. It allows you to install and remove packages as well as perform various other related tasks.


Update and etiquette

Emerge does not connect to the Internet to check for new package versions, it compares your current packages against your local portage database. You must synchronise this local database with the Gentoo package servers in order to make emerge aware of new software versions, otherwise emerge will never see software updates. You can synchronise it by doing :

emerge –sync
Note: The synchronisation induces a pretty heavy load on the Gentoo servers. The Gentoo netiquette allows users to a maximum of one update per day. Updating more than once a day is considered abuse and will get you banned temporarily.

 Updating your system

Simply doing emerge world will most likely not have the desired result when attempting to upgrade your system. Often a better way to do this is by using :

emerge -uavDN world

Here is an explanation of the extra switches and what they do:

  • u: The update switch is often included for clarity, but is the default action when using the “world” or “system” package specifications.
  • a: (ask) This is highly recommended on any emerge. It will tell you what it’s planning to do before it does it. This gives you a chance to scan the list to make sure nothing is terribly wrong.
  • v: (verbose)[optional] This gives you more verbose output. It is technically optional, but it is often helpful.
  • D: (deep)The world package is not a list of every single package on your system. Only the ones you have emerged. For example, if you do emerge gnome there will be many dependencies installed on you system as well as gnome-base/gnome; however, only gnome-base/gnome will be recorded in the world files. Using D scans through the dependencies for updates too.
  • N: (newuse)[optional] This is the most optional of them all. Essentially what it does is check for any changes in the USE flags. This would normally be the case if you changed something in /etc/make.conf or maybe /etc/portage/package.use. For example, if you added USE=”java” in /etc/make.conf and mozilla-firefox was originally emerged with the default setting (-java), then adding N would cause this command to re-emerge mozilla-firefox with the new USE variables. This should probably be used only when you want to rebuild all packages with changed useflags, which is not likely part of your routine updates. See USE Flags for more information.
  • e: [highly optional] This option pretends that nothing is installed, it is only useful when upgrading a part of your toolchain. The emerge -e command is perfectly equivalent to a stage 1 installation. Use it only if you know what you do. Check out this post for more information.]

Note : Tips for servers

On servers and other stable systems, it may not be desirable to upgrade everything on your system frequently. You should still upgrade those packages that have security vulnerabilities if you might be affected. This can be done with the following:

glsa-check -l affected

Apply the fixes for any vulnerabilities found that might affect your server.

It is also recommended to update your kernel frequently, since GLSAs are not issued for kernel vulnerabilities.

 Checking for broken packages

Did you break anything during the upgrade? Use “revdep-rebuild” to find out.


This is highly recommended after any package update if this package is a dependency of another installed package.

Portage 2.2 (in rc at the time of this writing) handles this by itself with a feature called preserved-libs. emerge will not remove old .so files when upgrading until it determines that no binaries link against them. To rebuild all packages and (hopefully) cause portage to remove these, run:

emerge -a @preserved-rebuild
Note: if binary packages link to the preserved lib, rebuilding the packages will not fix this, so even after the preserved-rebuild, the files will not be removed. It is up to you whether or not to remove them manually, as removing them will probably break some package, but they are outdated files

 Update config files

If emerge outputs :

Warning:IMPORTANT: X config files in ‘/etc’ need updating.See the CONFIGURATION FILES section of emergeman page to learn how to update config files.

You must update your configuration file. You can do this using an automated gentoo tool called dispatch-conf bundled in the gentoolkit package. Install it :

emerge -av gentoolkit

Once it is installed, launch it using


The tool will show you the modified configuration files and their modifications and allows you to use the new or the old one.

 Using Genlop

Genlop is a tool that parses log files. Genlop can be used to find out how long your emerge world will take. A basic command to do this would be :

emerge -p world | genlop -p

But you can add any number of portage switches from above to your emerge command.

 Special Cases

There may be several cases where the above does not upgrade what you want. The main case is when you are using CVS packages like Enlightenment DR17. Note that this should be the exception, not the rule. You should avoid using CVS unless you are willing to accept the consequences that they may bring.

The reason this does not upgrade CVS packages is because the packages do not change versions (they stay at 9999 usually). Also this means that the dependencies cannot be checked in the proper way either. This is probably just as well anyways. CVS packages should be handled separately. Something like :

emerge -av cvs_packages

should do the trick.

Sabayon 9 : Good distro

With all the attention that tends to get heaped on Linux distributions like Ubuntu, Mint, and Fedora, it can be easy to forget about all the many other worthy contenders out there offering users a world of free choice.

sabayon linuxSabayon Linux is one of those lesser-known contenders that has nevertheless attracted a significant following of its own over the years.

I wrote about the release of Sabayon 8 back in February, but earlier this month the project launched a brand-new update with some notable new features, including a choice of what it calls three “tier-1” flavors.

Ready for a look? Here are some of the highlights of this new release.

1. Three Desktop Options

Sabayon 9 is available in three flavors, each offering a different desktop environment. GNOME 3.2.3, KDE 4.8.3, and the lightweight Xfce 4.10 are the options available in this release, giving users a nice range of alternatives.

2. A New Application Browser

Sabayon RigoSabayon 9’s new Rigo application browser (Click image to enlarge.)Replacing Sulfur as the default GUI on the Entropy package manager, meanwhile, is Rigo, a new, minimalistic “Application Browser” user interface. “Rigo is a search-based, modern, modular, and scalable application for browsing Sabayon packages,” the project team explains in the official Sabayon 9 announcement. “It includes 99 percent of the features people are supposed to find in a tool that can be used to find, update, and remove applications, but the team is not done yet.”

3. A Hardened Gentoo Profile

Sabayon Linux is based on Gentoo, a distribution typically targeting advanced users, and Sabayon 9 adds the Hardened Gentoo profile, which offers extra security. “A lot of effort has been put into securing the base system packages,” the developers say. A hardened kernel, meanwhile, could arrive in the near future, they add.

4. Linux 3.4

Speaking of the kernel, Sabayon 9 includes an upgrade to the recently released Linux 3.4 kernel. The 32-bit x86 version, meanwhile, now includes a PAE (Physical Address Extension) kernel “to allow systems stuck with this ancient architecture to support more than 4GB of RAM,” the project team explains.

5. Updates and Fixes

Last but not least, LibreOffice has been updated to version 3.5.3 in Sabayon 9, which also incorporates numerous bug fixes since the last version’s release.

Currently at No. 14 on the DistroWatch page-hit rankings list, Sabayon 9 is available as a free download from the project site.

Package management in Sabayon using Portage tree

Portage is a package management system that is used by Gentoo and Sabayon to install, uninstall and maintain software on your system. The Portage system consists of the Portage tree, theemerge command and the settings in your make.conf file.


The Portage Tree

The Portage tree is a local copy (located in /usr/portage) of the central software package repository. Whenever you install software on your system with the emerge command, the Portage tree is searched. If a matching package name is found, it’s dependencies are calculated, the source code for the package and its dependencies are downloaded and then they’re all compiled and installed onto your system.
Maintaining the Portage tree
You should update your Portage tree on a regular basis (about once a week or so) to help keep your system up to date:

 emerge --sync

Another area of the Portage tree that needs maintenance is the /usr/portage/distfiles directory. This is where all the downloaded source code and binary packages are stored. Every 4 to 6 months or so you should delete everything in this directory to save storage space. You can do this by using the rm command:

 rm -rf /usr/portage/distfiles/*

The emerge command

The emerge command is the primary way you, the user, will interface with Portage. To run “emerge”, you should first open up the terminal program of your choice and login as root.
(Note: this document only covers the basics of emerge. for an in-depth guide, check out the emerge wiki page or the emerge man page)

Installing packages
To install a package, simply type “emerge” and the name of the package you want to install. For example, if you wanted to install the Opera web browser:

 emerge opera

Some package names aren’t what you would expect them to be, If you wanted to emerge firefox for example:

 emerge mozilla-firefox

It is usually safer to add the –ask option to emerge and check that it will really install what you want before proceeding:

 emerge -a mozilla-firefox
 These are the packages that would be merged, in order:
 Calculating dependencies... done!
 [ebuild     U ] www-client/mozilla-firefox-2.0 [2.0_beta2]     
 Would you like to merge these packages? [Yes/No]


If you’re having trouble finding a package you can search the Portage tree for it. For example:

 emerge -s firefox

would output something like this:

 [ Results for search key : firefox ]
 [ Applications found : 2 ]

     Latest version available:
     Latest version installed:
     Size of files: 39,034 kB
     Description:   Firefox Web Browser
     License:       MPL-1.1 NPL-1.1

     Latest version available:
     Latest version installed: [ Not Installed ]
     Size of files: 12,751 kB
     Description:   Firefox Web Browser

You can also check out the Gentoo Online Package Database to locate packages:

Uninstalling Packages
To uninstall a package, the emerge command is ran with the “–unmerge” modifier. For example, if you wanted to uninstall Opera:

 emerge --unmerge opera

(Note: This is the “safe” way to remove emerged programs, There are methods to remove a package and all of its dependencies, but they can lead to b0rked system.)

Updating The System

First you should update the portage tree as shown above in maintaining the Portage tree

After the portage tree is updated, you can update your system by typing:

 emerge -auDN world

This will “re-emerge” any package that has a newer version available in the Portage tree.
(Note re-emerging a program is different than reinstalling it: the existing version on your system is replaced with the recompiled package, leaving your configuration files, program settings, bookmarks, most recently used files, themes etc. intact.)

Performing a system update might result in some configuration files needing to be updated. For more information about this, check the emerge wiki.

First look at Sabayon Linux 9

Sabayon Linux Sabayon Linux is a Gentoo-based binary distribution whose goal is to provide an easy and complete desktop experience right out-of-the-box. Sabayon began life as RR4 and, if memory serves, was basically a live system that tried to install Gentoo using a familiar wizard interface. It didn’t really work well. When Fabio Erculiani, founder of Sabayon, decided to go the binary route and adopt Fedora’s Anaconda installer, the distro really began to take off. It usually sits in the DistroWatch Page Hit Ranking chart in the top 15 these days.

Sabayon Linux 9 was released last week, and since I’m still torn between using Mageia and Sabayon, I knew I had to at least test it. I downloaded and booted the 64-bit KDE edition.

I was struck by how soothingly simplistic the default background is in version 9, which wasn’t always the case. The install proceeded without any problems, although I do have a few complaints. For example, after the user chooses the install drive, they need to choose which kind of install and “Replace Existing Linux Systems” is the default choice. I hope no one clicks through there too fast without reading closely. Another is that only the install drive showed up in Boot Loader Device. So, I was stuck installing the bootloader on the install partition and manually adding Sabayon 9 to the legacy GRUB configuration (that I was hoping to replace). No one ever accused Sabayon of being a fast booter, but how often does one restart anyway?

Sabayon Linux

Sabayon Linux 9 – the default KDE desktop
(full image size: 350kB, screen resolution 1920×1080 pixels)

Rigo Application Browser

The big news this release is the new Entropy (package manager) front-end, dubbed Rigo Application Browser. Search is the main philosophy behind Rigo and as long as you know what you’re looking for, it’s quick and easy. It’s a little harder to browse around and see what’s there. For example, “games” pulls up some games and “office” finds a lot of office stuff, but “desktops” doesn’t retrieve desktops. I like a straight-forward category browsing.

Sabayon Linux

Sabayon Linux 9 – Rigo search result
(full image size: 240kB, screen resolution 1187×790 pixels)

Updates are handled through Rigo now too. The user is informed of any updates available and can choose to Update System, Show, or Ignore. There was only one update offered as I was testing, and I clicked Update System. Well, I sat there and sat there, and finally thought, “oh man, this thing isn’t working.” But when I closed out the Rigo window, I saw underneath the root password pop-up that had actually popped-under. It works real good after you give the password. However, that popping under is reproducible. In fact, it does it every time.

Sabayon Linux

Sabayon Linux 9 – Rigo Notices pane
(full image size: 214kB, screen resolution 780×569 pixels)

The development team sends out little notices from time to time and users can receive them in Rigo. It makes it easy to see any issues that may come up like this LibreOffice announcement and workaround (an upstream issue, btw). Clicking More Info on any package does just that, gives all the package particulars. Show Me lets users see the command-line output from any operation. From the configuration screen one can update repositories, clean Entropy web service cache, or view any configuration files that need updating. Rigo packs a lot of functionality in a tiny space and it seems to work well. It’s quicker, more responsive than Sulfur, but some will still prefer equo at the command-line for those quick installs.

Hardware Configuration

Most hardware today is auto-detected and auto-configured, but I still have some old confusing hardware. One thing Sabayon could use is a hardware configuration tool. There are some individual tools, but no centralized control center or anything. First up, I have two monitors attached and the easiest way to a fresh configure is NVIDIA Settings. (Sabayon had automagically configured my graphics card to use the NVIDIA drivers.) But I couldn’t get the sound on my old TV/FM card to work; I’m almost afraid it may not work with the newer kernels. Sabayon 9 ships with Linux 3.4.0. All my other hardware seems to be functioning properly.

Another new feature of Sabayon 9 is for the 32-bit user. According to the press release, those downloading 32-bit editions will get a PAE kernel “to allow systems stuck with this ancient architecture to support more than 4GB of RAM.”


The standard desktop versions of Sabayon usually ship with lots of handy applications, although the list seems to be shrinking more and more as time goes on. The KDE version includes things like Gwenview, Chromium, Clementine, XBMC, VLC Media Player, and Yakuake. I had to install LibreOffice, Firefox, KMail, and GIMP. Of course, all that was really easy with Rigo! You’ll probably find your favorites in the repositories too because that’s one of Sabayon’s best selling points. They have a very large repository of additional software and, in fact, it’s probably one of the best. I rarely attempt to find something that isn’t in there.

Sabayon Linux

Sabayon Linux 9 – LibreOffice, Chromium, VLC, and Dolphin
(full image size: 1,305kB, screen resolution 1680×1050 pixels)

Users can choose between GNOME 3.2.3, KDE 4.8.3, and Xfce 4.10. As a KDE user and someone who’s been using Mageia 1 for a year, I’ve been anxious to test newer versions of KDE. I’ve been hearing some good things about KDE 4.8.x. My main concern was Kmail, but fortunately, the talk of KDE’s recent improvements proved accurate. Kontact crashed a couple of times while importing and moving folders around, but under normal operation it seems stable (if not exactly quirk-free). Akregator also seems stable so far, but I’ve learned not to turn my back on that one.

Wrap Up

Sabayon Linux has been for quite a while a top-flight distribution and version 9 only adds to that reputation. The new package management GUI has a modern or trendy feel to it that could appeal to the younger set, while others might miss advanced features. I worried about the integration of Gentoo Hardened, but I haven’t detected any weirdness from it as of yet. The KDE desktop seems stable so far, which is always a selling point. Everything about Sabayon is easy enough for a newcomer, as easy as any other, unless they have some hardware that needs manual configuration. For me, it just feels like going /home.