Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

web UI for YaST

With python-bindings we can slowly move our wishes from impossible into possible group.One of our wishes is web UI. Today before lunch I did some research, and it works!

Fist of all enable mod_python in apache2, then configure Handler for Python.

Then write index.py with this code:
def getDescription():
 import ycp
  ycp.import_module('Lan')
  ycp.import_module('LanItems')
  ycp.Lan.Read(ycp.Term('nocache'))
  interfaces=ycp.LanItems.Overview()
  descr="<table>"
  for interface in interfaces:
   descr+="<tr><td>"+interface['table_descr'][0]+"</td>"
   descr+="<td>"+interface['rich_descr']+"</td></tr>"
   descr+="</table>"
   return descr

def index():
  s = """\
<html>
<body>
"""+getDescription()+"""
</body>
</html>
"""
  return s


It needs some hack - disable check if YaST code is running as root. I commented one line in Lan::Read() function. And result is here:

PRO/Wireless 3945ABG Network Connection PRO/Wireless 3945ABG Network Connection (Not connected)
MAC : 00:18:de:64:b8:0d

The device is not configured. Press Edit
to configure.


82573L Gigabit Ethernet Controller 82573L Gigabit Ethernet Controller
MAC : 00:16:41:aa:74:56
  • Device Name: eth0
  • Started automatically on cable connection
  • IP address assigned using DHCP


It's just summary of network devices configuration. I know it's very simple example, but as I wrote - the plan was to do it before lunch, not instead of ;-)

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE 11.0 At First Glance: It’s OK.

So I’m still running openSUSE 10.3 as my main desktop, and will be until next week when the pre-ordered boxed editions are supposed to ship. By then I’ll be able to do a full review of what I think about openSUSE 11.0, but I did download and install the GNOME Live CD yesterday, and so I wanted to just talk about a few points, good and bad.

Keep in mind, this is just me using this system for a few hours, and just talking about a few key points. If you’ve got comments about something I’ve said, please comment 😉

The Good

The art and look & feel of openSUSE 11.0 rocks! I really like the new GTK theme for the GNOME desktop, which gies the system a much needed refresh of the theme.

I also liked the GNOME live installer. Although it’s not the widely loved new installer from the DVD (which I’ll finally be able to use next week), it does look nice and do it’s job well. Unfortunately, it doesn’t have the world map included in the install, apparently it was included in response to a bug I filed in a late beta but came in too late for 11.0.

After the install and the reboot, I was brought to the login manager. It wasn’t the new login manager included in GNOME 2.22, but the older one. It still works, but I think in this day and age it’s time for people to be able to have a face browser. You know, 9 years after Mac OS 9 and Windows XP both included them.

On the desktop, I was shown the Greeter and a window asking for me to perform an online update. At the same time. Neither of which helped me, considering I have no internet access until I install the Madwifi driver. But if both windows are going to be shown at the same time, they should be a part of the same window, e.g. the user clicks out of the greeter, then the online update request is shown.

Setting up the online update was easy enough, although it still took a while. More on the online updating situation in the “The Bad” section below.

This was about the extention of the little playing around I did, so without further adieu…

The Bad

Yes, boo me if you will, but I unfortunatly found that the GNOME desktop seemed to regress in the polish department. The online update/greeter thing as mentioned earlier was one thing, but there are several other issues I have with 11.0. These may seem nit-picky, but these are things reviewers and users will take away from the system.

The first issue I noticed is something I filed a bug report about in 11.0, and that was the notification messages. They are over sized, obnoxious, and don’t fit in with the look and feel of openSUSE 11.0. For one, that little stripe is blue. 11.0 is green. Not a match, the board goes back. And it’s not even the shade of blue that matches the window decorations or the theme. And they are way too big. You can see the same message in 10.3 and 11.0, and the color and size difference. Worse than that, some applications change the color of the stripe for no apparent reason. NetworkManager is one, it makes it dark blue. PackageKit is another, making it this ugly shade of red. I’m sorry, this just doesn’t look professional to me.

Left is 10.3, Right is 11.0

Next, on the menu, is a button under Control Center for YaST. I don’t know when this was put in, but it had to have been late. It wasn’t in the last public release candidate, but it was snuck in in the later ones before gold, apparently. And it was a bad choice, considering YaST is already accessable from the Control Center. And it actually says YaST. Call me crazy, but if I’m a user looking to set up a new user, I’m probably not going to think, “well, I need to look for something called YaST”. Calling it Administrator Settings, as it was in 10.2 and 10.3 would work great. But it isn’t.

And another issue, in the Control Center, all but two of the Common Tasks are missing. And, the Show Administrator Settings (aka YaST) is missing. Meaning nowhere on the desktop is YaST referred to as anything but YaST. Bug report.

The 3D settings. I’m not sure making AIGLX default, and then not providing a way to switch on XGL for those people who AIGLX isn’t faster for, was the best option. Desktop Effects on my Intel graphics chip on 11.0 is really slow. Going into the console and switching on XGL works, but is that what you want to tell a new user who wants effects to actually work on his or her system to do?

Before I get to the big finish, I wanted to say: would it seriously have been a huge hit to the 11.0 development cycle to include at least a release candidate of Firefox 3, instead of Beta 5?

And finally, PackageKit. I’ve only used it a little, but I’m not a fan. Personally, I liked the GNOME openSUSE Updater from openSUSE 10.3, and with just a few improvements (such as showing what the updates are and allowing users to select or deselect them without loading up the YaST module), would have been a fine addition to 11.0. But instead, we’re using PackageKit’s updater, which is annoying and obnoxious, at least the time I used it. After getting online update set up, I get this blaring giant red notification message about 1 security update. I have the option of choosing to update it with a click of the button on the screen, so I click it. Then the root password dialog comes up, and after that another notification, this time in blue, comes up letting me know my system is being updated. After a minute, I get another notification, telling me it’s done. The icon goes away, I assume it’s finished. Then I try going into the Install Software, and I get a message that something else is accessing package management. What else is it? Well, PackageKit still has control over it, although it doesn’t tell me. At least with the openSUSE updater, you can see when it’s doing something.

I don’t see the value add for PackageKit vs. our own updater. Unless this is all about being as close to possible to GNOME upstream, in which case I don’t think that’s a case for which we need to be degrading user experiance. It is a desktop enviroment, we are supposed to be free to change it in whichever way we would like to make it better, and more openSUSE-ish. And although I’m reserving full judgement on openSUSE 11.0 GNOME until I get the full edition and live with it for a few days, I’m unfortunately not that impressed with it as of yet.

a silhouette of a person's head and shoulders, used as a default avatar

How to Make openSUSE 11.0 GM Live USB

openSUSE 11.0 with tons of impovement has been announced on June 19, 2008. Since then it was a busiest day for me : setting up a local mirror providing iso image for openSUSE fans in Indonesia, arrange openSUSE 11.0 release party and preparing Indonesian openSUSE community regular meeting on Saturday, June 21, 2008. We have planned all of these since last month but I must updated the planning with latest news and preparation.

Beside the planning, I also read some comments that noticed me with problem regarding openSUSE LiveUSB tutorial. The tutorial used openSUSE 11.0 RC1 and the modified initrd as noticed on the tutorial doesn’t fit with the GM version.

I have updated the initrdud that *should be*  applied with openSUSE 11.0 GM. I got it succeeded with my 2 GB USB Flash Disk. The overall process to make openSUSE 11.0 GM LiveUSB are same as described on the previous tutorial with RC1. The different thing is initrdud file.

openSUSE 11.0 LiveUSB sysinfo

openSUSE 11.0 LiveUSB Partitioner

Download the modified initrd file (called initrdud) from this link.

How to Modify the Initrd

Initrd modification needed to add nls_cp437.ko, module for mount vfat partition that commonly used by USB flash disk.

  1. Preparing your LiveUSB ISO. In this example, I used openSUSE-11.0-KDE4-LiveCD-i386.iso. Change with your downloaded LiveCD ISO instead
  2. Preparing, Extract and update the initrd
  3. su
    mkdir unpacked
    mkdir /mnt/iso
    mkdir /mnt/squash
    mount -o loop openSUSE-11.0-KDE4-LiveCD-i386.iso /mnt/iso/
    cd unpacked
    gzip -dc /mnt/iso/boot/i386/loader/initrd | cpio -i
    mount -o loop /mnt/iso/openSUSE-*read-only.* /mnt/squash/
    cp /mnt/squash/lib/modules/*/kernel/fs/nls/nls_cp437.ko lib/modules/*/kernel/fs/nls/
    cp /mnt/squash/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko lib/modules/*/kernel/fs/nls/
    cp -r /mnt/squash/lib/modules/*/kernel/fs/vfat lib/modules/*/kernel/fs/
    cp -r /mnt/squash/lib/modules/*/kernel/fs/fat lib/modules/*/kernel/fs/

  4. Edit the linuxrc file and change /bin/sh on top of the file with /bin/sh -x. This used for verbose option while boot, every command will be display before executed so if there is a problem, it will more easier to resolve.
  5. Modify the include file and change (replace) the function CDDevice with below code. This will change LiveCD to LiveUSB.
  6. function CDDevice {
    	# /.../
    	# changed this function so that it finds config.isoclient on vfat disks, e.g. USB drives
    	# ----
    	find /lib/modules/*/kernel/fs/nls/nls* -exec insmod {} \; # needed for vfat filesystem
            find /lib/modules/*/kernel/fs/*fat/*.ko -exec insmod {} \; # needed for vfat filesystem
            insmod /lib/modules/*/kernel/drivers/usb/storage/usb-storage.ko # needed for USB
    	sleep 5 # fixme; do this in a proper way
    	cddevs=`/usr/sbin/hwinfo --disk | grep sd | grep "Device File:" | cut -f2 -d: | cut -f2 -d " "` # looks for disks instead of CDs
    	echo cddevs $cddevs
    	for i in $cddevs;do
    		i=$i"1" # fixme; looks on the first partition only
    		echo i $i
    		if [ -b $i ];then
    			test -z $cddev && cddev=$i || cddev=$cddev:$i
    			echo cddev $cddev
    		fi
    	done
    	if [ -z $cddev ]; then
    		systemException \
    			"Failed to detect CD drive !" \
    		"reboot"
    	fi
    }
    
  7. Repack the initrd. We will place the initrdud in root of cureent folder :
  8. find . | cpio -o -H newc | gzip -9 > ../initrdud
    

Hope the above process solve the problem while making openSUSE 11.0 GM LiveUSB. Don’t forget to place a comment if you got any problem regarding this tutorial.

a silhouette of a person's head and shoulders, used as a default avatar
a silhouette of a person's head and shoulders, used as a default avatar

Installing wget on Mac OS X

Wget is a great command line  for grabbing things from the web, but it doesn’t ship with macs. So if you want to install it here are a few steps:

1. download the source file: http://ftp.gnu.org/pub/gnu/wget/wget-1.11.tar.gz
2. compile and install it:

tar -zxvf wget-1.11.tar.gz
cd wget-1.11/
./configure
make
sudo make install

Now the binary file is located in /usr/local/bin/. If you use bash as your default shell then you can add:

PATH=$PATH:/usr/local/bin; export PATH

in your .bash_profile.

Or if you want, you can do a symbolic link to have it in /usr/bin/:

sudo ln -s /usr/local/bin/wget /usr/bin/wget

That's all and ... happy downloading.

a silhouette of a person's head and shoulders, used as a default avatar

IPv6, prefixlen

This story started when I discussed with our openSUSE member Marek Stopka and he told me that he is running IPv6 network but because of really bad support in YaST2 he needs to configure that manually.
Oh, what a shame! So we made a deal that he'll test my patches and I'll try to implement initial support.
So now we have initial support for IPv6 in YaST. Initial means that you're able to configure "primary" address IPv6 type. Nothing more, nothing less.
Because of this I add new parameter to configure prefixlen (in v6 there is no netmask as we know from v4). In UI you can configure prefix with a little trick - instead of 255.255.255.0 you can write "/24".

Ok, example of CLI:


linux-1pi7:~ # yast lan list
0 79c970 [PCnet32 LANCE], Not configured

1 79c970 [PCnet32 LANCE], Not configured

linux-1pi7:~ # yast lan edit id=0 ip=2001:15c0:668e::5 prefix=48
Ethernet Network Card
MAC : 08:00:27:80:b5:07
Device Name: eth1
Started automatically at boot
IP address: 2001:15c0:668e::5/48


linux-1pi7:~ # yast lan list
0 Ethernet Network Card, 2001:15c0:668e::5

1 79c970 [PCnet32 LANCE], Not configured

linux-1pi7:~ #


And some screenshots from ncurses UI:






Of course there's still much work to implement full support, routing, network services support, test all possible cases, AutoYaST, etc.
Implemented in yast2-network-2.17.1

the avatar of Rupert Horstkötter

NNTP Access to the openSUSE Forums

For folks not that used to web interfaces, the openSUSE Forums team provides a secondary interface to our forums – NNTP. The intention of this post is to raise your attention on this possibility.

What is NNTP?

Using our NNTP interface, you’re able to participate in forums discussions without accessing the web interface at all. You’re able to use any newsreader supporting the RFC standard to read and even write posts. Actually your user-id gets recognized in the web interface if you set up your newsreader properly.

From my personal experience especially developers are in general more familiar in using mailing lists instead of browsing a web interface. One of our desires is to get more developers to the board. On the one hand, developers can provide competent assistance especially to our new users – on the other hand, the forums are able to provide a lot of feedback back to developers. The advantages are obvious!

The NNTP interface to the forums provides a neat way to browse significantly more content with less effort. You can get a quick overview about forums content using NNTP. Certainly you’ll not be able to see the great template created by Robert Lihm, but every choice has its drawback – Good to have a choice at least, isn’t it?

For detailed instructions on how to set up your newsreader properly to participate in forums discussions, be sure to check out the NNTP section within our forums FAQ.

We’re really looking forward to your contribution!

a silhouette of a person's head and shoulders, used as a default avatar

FirmwareUpdateKit

[PS. I coudn’t resist. I just had to name the package ‘*Kit’. 😉 ]

Need to do a firmware update with a DOS program?

Can get tricky if you don’t have a DOS system around. We used to provide a bootable floppy image for that in the past (package dosbootdisk). But who has a floppy drive anyway?

So, here comes the new
FirmwareUpdateKit
package. Install it and run run, e.g. fuk --grub foobar.exe That’s it. The next reboot gives you the option to start DOS and run foobar.exe.

fuk can also create bootable ISOs and, of course, even floppy images.

a silhouette of a person's head and shoulders, used as a default avatar

Converting Babylon Dictionaries to Stardict Format in OpenSuse

This blog does not add any information to the documentation you can find around. Anyway, it is not too long since someone was able to make Babylon dictionaries usable by software other than the proprietary Babylon application. And they have been trying for years… so it has not been a trivial step 🙂

If you do not know Stardict, you can get it from Yast. This is the official site.

A few dictionaries are also linked – ready and free to use – at Stardict website. However, I used Babylon when I was a Windows user and i have to admit that their dictionaries remain unbeaten. Matters not what language you want, mono-language or bi-language, technical, general purpose etc etc… they just rock!

You can get tons of dictionaries for free from Babylon website:

Now, go to Yast Software Manager and search for dictconv. Alternatively, you can install from source (which is what I personally did).

Installing is very easy: ./configure and then make all install

Now you’re all set. To use it to convert:

cd to the directory where you have the .BGL dictionaries and type: dictconv INPUT_FILENAME.BGL -o OUTPUT_FILENAME.ifo

Pay attention to the extension: must be .ifo. This will generate 3 files for each BGL dictionary: .ifo, .idx, .dict

Place all these 3 files in /usr/share/stardict/dic/ creating a separate folder for each dictionary. Then rebook Stardict and go to Manage Dictionary (bottom right): there you can select what comes first, activate or deactivate etc etc

Nothing difficult but def worth, and not only for non native speakers.. there are lots of technical terminology Babylon dictionaries that may well come handy.

Notice that with Stardict you can also implement Pronunciations of the typed words: see Stardict site: “WyabdcRealPeopleTTS package make StarDict pronounce English words. It is just many .wav files. Extract(tar -xjvf) the tarball at /usr/share/”.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sooo well… Have fun ~ Buon divertimento ~ Viel Spaß ~ I que te diviertas ~ Maak plezier ~ ha så roligt [hmm i’m just hoping the dictionaries mentioned just above are not making me do some poor figure for these few transations of “Have Fun”.. cuz i have no idea for any language except Italian :D]

a silhouette of a person's head and shoulders, used as a default avatar

running YaST in debugger

First of all - I like Python.
Second - we have some prototype for mysql-server configuration written in Python I never tried before.

So I check-in code from subversion and try to run. Unfortunately it exits with some errors like "couldn't initialize UI". So I open the code in Eric - great Python debugger.

With breakpoints, globals and locals variables dispatcher it was really easy to find problematic places in code. Also possibility to write code interactively into interpreter is very helpful.
And finally module runs ;-)


Sorry, video is pretty slow - probably ati driver problem ;-(