Behind the scenes of YaST

| No Comments | No TrackBacks

SUSE has long used YaST as a management tool. It makes it easy to make changes to your system without knowing (or caring) what happens behind the scenes.

At Guru Labs, our Linux Training is all about teaching students what happens "behind the scenes". We strive to document the official and best practice techniques (not always the same thing, unfortunately).

Recently we were updating our courseware and wanted to document how to disable IPv6 in the various Enterprise Linux distributions. The question came up, "What does YaST actually do when you toggle the Enable/Disable IPv6 checkbox in the YaST network module." To answer that question I performed the following steps on SLES11.

Search for the string IPv6 in the YaST network module.

grep -n IPv6 $(rpm -ql yast2-network)

In the output, found these lines looked interesting (Note the Disable/Enable strings)

/usr/share/YaST2/modules/Lan.ycp:316:global void SetIPv6(boolean status){
/usr/share/YaST2/modules/Lan.ycp:324:void writeIPv6(){
/usr/share/YaST2/modules/Lan.ycp:424: writeIPv6();
/usr/share/YaST2/modules/Lan.ycp:654: status_v6 = _("Support for IPv6 protocol is enabled");
/usr/share/YaST2/modules/Lan.ycp:656: link_v6 = Hyperlink (href_v6, _("Disable IPv6"));
/usr/share/YaST2/modules/Lan.ycp:662: status_v6 = _("Support for IPv6 protocol is disabled");
/usr/share/YaST2/modules/Lan.ycp:664: link_v6 = Hyperlink (href_v6, _("Enable IPv6"));


Based on my experience I guessed that the writeIPv6 function does the work of enabling and disabling IPv6 on the system.

So I took a look at that function using the line number found by grep:

vim /usr/share/YaST2/modules/Lan.ycp +324

I found the following:

void writeIPv6(){
SCR::Write(.target.string, "/etc/modprobe.d/ipv6", sformat("%1install ipv6 /bin/true", ipv6?"#":""));
SCR::Write(.sysconfig.windowmanager.KDE_USE_IPV6, ipv6?"yes":"no");
}

That pointed me at the two files "/etc/modprobe.d/ipv6" and "/etc/sysconfig/windowmanger".

Looking at the files it seems YaST simply removes/adds the comment character in front of the one-and-only line in the file /etc/modprobe.d/ipv6 and it toggles the variable KDE_USE_IPV6 in /etc/sysconfg/windowmanager.

If you ever have the need to discover what YaST is doing behind the scenes, you can use the same technique.

As far as blogging software goes, it's hard to go wrong with Movable Type. It is open source, supports PostgreSQL (unfortunately, due to be dropped in MT5.0, hopefully it will be re-added in 5.1), supports multiple users and blogs out of the box, can operate in static, partial-dynamic, and full dynamic mode.

If for some reason you or a user forgets their password you can reset the password via the following SQL commands

PostgreSQL

Make sure to install the postgresql-contrib package if you don't already have it installed.

Install the crypto functions into the Movable Type database, this is a one time task.

psql -d movabletype -f /usr/share/pgsql/contrib/pgcrypto.sql

Now connect to the movabletype database and run the following command to reset a password:

UPDATE mt_author SET author_password = crypt('the-new-password', gen_salt('des')) WHERE author_name = 'USERNAME-GOES-HERE';

MySQL

The MySQL database already has the crypto functions built-in, so reset the password with the following SQL statement:

UPDATE mt_author SET author_password = encrypt('the-new-password') WHERE author_name = 'USERNAME-GOES-HERE';

What GDK_NATIVE_WINDOWS=1 means

| 2 Comments | No TrackBacks

I noticed in the list of Common Fedora 12 Bugs that in order to run the current version of Adobe Acroread for Linux it must be launched with:
GDK_NATIVE_WINDOWS=1 acroread

Note that GDK is the underlying graphical toolkit for creating GUI applications using GTK (most commonly for applications used on the GNOME desktop). The Linux version of Adobe Acroread uses GTK/GDK.

I was curious about GDK_NATIVE_WINDOWS=1 and I found the following information:

From www.gtk.org I found



GDK has been rewritten to use 'client-side windows'. This means that GDK maintains its own window hierarchy and only uses X windows where it is necessary or explicitly requested. Some of the benefits of this change are

  • Reduced flicker
  • The ability to do transformed and animated rendering of widgets
  • Easier embedding of GTK+ widgets, e.g. into Clutter scene graphs


Launching an app with GDK_NATIVE_WINDOWS=1 application turns off this feature. This is needed if the application manipulates the windows it creates using direct X API calls or a mixture of X API and GDK instead of just going through GDK. When using "client-side windows" all window manipulation by an application must go through GDK. Adobe needs to update Acroread to be compatible with this feature.

Here is a video demonstration from Alexander Larsson showing some of the effects made possible with 'client-side-windows'. You can also check out his blog post The return of client side windows:

The official documentation on ClientSideWindows is here.

I have a ThinkPad T61p Fedora 11 Linux laptop. Lately for some Linux training products we have been developing I've been doing alot of virtualization work on my laptop. Even though it has a fast dual core CPU, 8GB of RAM, and a fast internal 500GB SATA hard drive I've been seriously bottlenecked when I have a bunch of virtual machines doing lots of I/O. Some operations that normally take 20 minutes to complete have been taking 90 minutes. That is a serious productivity killer.

I need to add more hard drives and spread the I/O load across them. I would like to upgrade to a SSD drive, but I require 500GB capacity and although the just hit the market, it has several draw backs (besides the price) including using a MLC architecture. I briefly considered USB 2.0 hard drives but I knew that the USB 2.0 connection was a bottleneck

I decided to add an external eSATA hard drive using an ExpressCard eSATA controller.

Here are raw sequential I/O throughput the benchmark numbers on three drives. I tested the performance using hdparm -tT /dev/{sda,sdb,sdc}

Internal SATA SAMSUNG HM500LI 500GB
73.4 MB/sec

eSATA Western Digital WD10EVVS-63E 1TB "My DVR Expander"
85.1 MB/sec

USB 2.0 Lacie 120GB rugged
24.4 MB/sec

I used a Syba SD-PCBX-ESA2 ExpressCard SIL3132 Chipset 2x e-SATA II, 54mm. The great thing about Linux is that the controller was supported out of the box by Linux's sata_sil24 driver. I had nothing to install. I just plugged everything in and it all worked.

It would have been nice if my laptop had a built-in eSATA port. Hopefully my next Calpella platform based Thinkpad will have bottleneck free USB 3.0 ports and hopefully eSATA as well.

I've been running Fedora 11 on my T61p laptop, and I recently ran into the bug that caused repeated kernel oopes when running a NFS server and serving a bunch of data.

This bug has been fixed with the F11 kernel 2.6.29.6-213.fc11 which (as of July 9th, 2009) hasn't been pushed out yet (it is currently pending for fedora-updates-testing). I installed the new kernel and it has fixed the bug. Hurray for progress.

Unfortunately the yak shaving continues. I'm using RPM Fusion to get drivers for my Nvidia video card in my laptop. Since I'm running an unreleased kernel, the RPM Fusion repo doesn't have a matching kmod-nvidia package for the kernel portion of the Nvidia driver. My system automatically reverted to the VESA driver. Having the Nvidia libraries installed while using the VESA driver caused Unexpected signal: 11 problems for VMware workstation.

In order to build a matching kmod-nvidia package I performed the following (note I'm running 64bit Linux).

# yum install -y buildsys-build-rpmfusion-kerneldevpkgs-newest-x86_64

Now install the kernel-devel package for the newer kernel. I downloaded it from the Koji web page and manually installed it with rpm -ivh.

Download the newest nvidia-kmod.src.rpm from http://download1.rpmfusion.org/nonfree/fedora/updates/11/SRPMS/. Adjust the URL as needed for your version of Fedora.

Then, the command to rebuild the binary RPM that matches your running kernel is.

$ rpmbuild --rebuild nvidia-kmod-VERSIONINFO.src.rpm --define "kernels $(uname -r)" --target $(uname -m)

In my particular case it was:

$ rpmbuild --rebuild nvidia-kmod-185.18.14-1.fc11.1.src.rpm --define "kernels $(uname -r)" --target $(uname -m)

Recent Comments

  • GeeF: That's a really good post. I had the same problem read more
  • Dale: This seem to be necessary to be able to play read more
  • anonymous: Thanks. Helped me to build nvidia driver for custom built read more
  • Dax: Thanks for the comments. I have updated the RPMs on read more
  • notbrainsurgery: Thanks for providing these instructions and RPMs. Since 1.6.0.16 is read more
  • Marcus: Hi Dax, How hard do you think it would be read more
  • John Dunlap: You are the man! It works beautifully! Thanks! read more
  • PapaDocta: is there a way to enable unicode support for sms, read more
  • Ivan Arsenijevic: I was installing Fedora 11 32-bit and Fedora 11 64-bit read more
  • Gidde: Thanks a lot! I was missing the kernel driver for read more

Recent Assets

  • dsc_0135-cropped.jpg

Find recent content on the main index or look in the archives to find all content.