For some days now I’m working on a GUI written in python. I needed X and konsole, so I gave python-yui (python-binding of libyui) a try.
Libyui is the YaST2 User Interface library and python-yui is part of openSUSE 11.0.
If you want to have a quick look you can try my (demo-) widgets.py. It shows some, but not all widgets available. Klaus Kaempf uploaded it to the svn (tnx!).
Dependency:
zypper in python-yui
wget -nd "http://svn.opensuse.org/svn/yast/trunk/libyui-bindings/swig/python/examples/widgets.py"
a) with GTK/QT GUI:
python widget.py
b) with ncurses/konsole GUI:
export DISPLAY2 = $DISPLAY; unset DISPLAY; python widget.py ; export DISPLAY=$DISPLAY2 ; unset DISPLAY2
Have Phun!
Edit:
Here’s a screenshot,
Archive for 2008
GUI with python and libyui
August 7th, 2008 by Jan-Simon MölleropenSUSE TV
August 5th, 2008 by Andrew WafaaSome may know about the Geeko’s Tube, I’m not so sure that many do though. There has been for a while now tube.opensuse.org, this is the official repository of videos by openSUSE people. All the video is in .ogg format, and as such will play straight out of the box regardless of whether users are purists/pragmatists/whatever.
There are several services out on the web that offer video streaming in flash, one that caught my attention is blip.tv. So why is blip different to YouTube et al? Well for starters they openly use Open Source (they’re not ashamed of it), they support multiple formats for uploading and playback, and they provide multiple mechanisms to get your shows out there.
After some consultation on the mailing lists and IRC, I have created an openSUSE channel on blip.tv – http://opensuse.blip.tv The aim is for videos by the openSUSE Community for the openSUSE Community can get uploaded there and reach a much wider audience. There are only a few videos on there at the moment but the content will grow (I’m just having a few ISP issues over here :-/ ). So what content is able to go on there? The short answer is any, yes there are only a couple of catches: they must preferably be clean (remember the audience is varied from young to old), have an openSUSE twist (the whole reason for the channel). At present there are a few screencasts and some presentations by community members at events (granted they’re all employees, but that doesn’t make them any less a member of our community).
Just to show some of the ways you can watch the channel:
Banshee (out of the box openSUSE 11.0 install)
Browser (again out of the box openSUSE 11.0 install)
Miro which you can download, just look here.
As the channel is syndicated via RSS you can subscribe to it using Banshee/Miro and it will automatically download the latest episode for you (sorry I haven’t tried in KDE, but I believe it should work). You can also add the RSS feed into your preferred reader and pull the attachments from there.
I would be really keen on getting people’s feedback and also if people have content they would like to get on there.
LRL UK 08 – Not The Last
July 21st, 2008 by Andrew WafaaSo LUG Radio Live UK is over for another year, yes the event will be back next year but not the podcast. openSUSE were represented by yours truly and Roger Whittaker (also representing the Big N), and to be honest I didn’t have to get my baseball bat out once to get people to come by – I was slightly disappointed with that as knocking some sense into some of those Ubuntu zombies would have been fun 😛 Part of the reason may have been the fact that the Furry Geekos were out in force
Roger also did a sterling job of getting the new openSUSE 11.0 Live/Installable DVD into almost all the “NutSacks” (The bags attendees received when entering the event). Those that didn’t get one in there pretty quickly came over to ensure they did get one. Everyone agreed that we had the best mascot and the best swag, talking of which can anyone guess what this is?
Only a few folk were lucky enough to get one, and to be honest it is a much better one than what RedHat/Fedora were dishing out. It is of course a USB stick
Another piece of openSUSE swag that was being dished out but not by us was the Linux Magazine openSUSE 11.0 Special. This is actually quite a good issue and is a great companion for anyone new to the distro. I have a couple that I can send to people (UK/Europe preferably due to cost) if requested. The issue was created aimed predominantly at the US market where Linux Magazine is trying to get a foot hold:
Wandering around, I spoke to quite a lot of people about Linux in general and openSUSE and the feedback from people was tremendous. Those that have actually tried 11.0 really really like it, and those that haven’t were adamant that they would. So much so that one rather intimidating chap mentioned that “A friend of mine needed to re-install her machine and she was very scared of the process, I gave her a DVD of 10.3 and told her to ring me if she was stuck. She rang me a short while later and exclaimed at how easy and straight forward it was. She hasn’t looked back since!” The praise also came from a fair few die hards of other distros, which was pleasant to see and hear. There was a friendly swag exchange with RedHat and Fedora, although their offering was pretty poor in comparison but still better than Ubuntu who had nothing but a type of crummy sticker and a million and one CDs of assorted variants of the same crud 🙂 The Fedora guys took it upon themselves to try and sully the image and spirit of our beloved Geeko by hanging it by one of their lanyards
Thankfully the kind chaps from Debian rescued it, although I’m pretty sure it was for their own gains. The atmosphere was light hearted and pleasent with no trolls in sight or in earshot. This even extended to my lightning talk which was pretty well attended, around 30 people almost none of which were involved with openSUSE in any way. You can get my slides here, and there will be a video of it shortly.
All in all it was a fairly good weekend, and from an openSUSE perspective a very productive one 😉 I would like to thank Roger for his hard work in doing the stand, helping out and support as well as for the photos (some of which I used here). I would also like to thank Zonker and Novell for arranging for the brilliant swag and DVDs, without which we could have looked like dull dorks. Till next year!
Trick of the Day: Reboot as User
July 18th, 2008 by Michal Marek$ reboot -bash: reboot: command not found $ /sbin/reboot reboot: must be superuser.
In KDE / GNOME, you can just click reboot in the menu and your session sends a message to display manager, which runs as root and does the dirty job of rebooting or shutting down your machine. Unfortunately, things are not that easy if you are using a simpler window manager or want to shutdown from a script. Sure, there is sudo, but that has to be configured first to work without password. Luckily, after a couple of hours of googling (only to find helpful advice as “this can be done easily with ConsoleKit or hal”), reading documentation of dbus, {Console,Policy}Kit and hal and clicking in qdbusviewer, I finally found a way with hal+dbus:
$ dbus-send --system --dest=org.freedesktop.Hal \ --type=method_call --print-reply \ /org/freedesktop/Hal/devices/computer \ org.freedesktop.Hal.Device.SystemPowerManagement.Reboot
To shutdown, just replace Reboot with Shutdown. I’m going to add this to the default icewm configuration, so that the logout menu finally works.
openSUSE Gets the JeOS
July 16th, 2008 by Hubert MantelopenSUSE is great for the desktop, great for the server, and now it’s ready to take on appliances — and we don’t mean toasters and blenders. No, we’re talking about software appliances — virtual machine images that come pre-configured with the application you want to use, without any of the hassle normally associated with installing an application.
If you’re interested in building a virtual appliance, or have another use for a minimal operating system, read on to learn about openSUSE LimeJeOS.
What is LimeJeOS?
LimeJeOS is the openSUSE version of JeOS. The term JeOS (“Just enough Operating System”) refers to a customized operating system that precisely fits the needs of a particular application. LimeJeOS includes only the pieces of an operating system required to support a particular application and any other third-party components contained in the appliance. This makes the appliance smaller, more efficient, more secure, and offers better performance than an application running under a full, general-purpose operating system.
As the name suggests, “LimeJeOS” itself is not an appliance or an operating system; it is just the base for various possible appliances. LimeJeOS contains just the very basic parts of an operating system. The major goal is to make the system as small as possible while providing the possibility to install additional software. A LimeJeOS system itself is not very useful without additional packages. Besides an editor (a stripped version of vi) it just contains a package manager that allows the actual applications to be installed. Of course all the usual repositories can be used for that purpose; just with a regular, full-size Linux distribution.
What is the difference between SLE JeOS and LimeJeOS?
SUSE Linux Enterprise JeOS relates to LimeJeOS just like openSUSE relates to SLES. In fact, SLE JeOS is built from the latest version of SLES while LimeJeOS is built from the latest version of openSUSE. While LimeJeOS provides the latest state of the openSUSE distribution, SLE JeOS will offer all the services and support that is also available for SLES.
Which one should you use? If you’re working on a virtual appliance for a project that won’t require commercial support, and you want to track the latest in open source, openSUSE is the version for you.
If you’re working on a project that’s likely to need support, then you probably want to go with SUSE Linux Enterprise JeOS.
Where can I get LimeJeOS?
LimeJeOS is built using kiwi. The configuration files are managed via Subversion and are available at: https://forgesvn1.novell.com/svn/opensuse/trunk/distribution/images/LimeJeOS/
In the future we plan to create a regular package (RPM) and add it to the openSUSE build service, so that the latest version is always created automatically with the latest software versions in openSuSE.
How to build LimeJeOS?
Check out the current version of LimeJeOS using the following commands:
svn co https://forgesvn1.novell.com/svn/opensuse/trunk/distribution/images/LimeJeOS
Make sure you have the needed kiwi packages installed. You will need at least: kiwi, kiwi-tools and kiwi-desc-vmxboot and/or kiwi-desc-xenboot from http://download.opensuse.org/repositories/openSUSE:/Tools/. When those conditions are met, building the openJeOS images is accomplished by just running the “./build.sh” script from the LimeJeOS repository.
./build.sh
Please note that the build process will need at least twice as much diskspace as the final images, so you’ll need around 2 GB of free disk space at this time to build Lime JeOS.
After you have booted the virtual system, log in as user “root” with password “linux”.
Meeting By The Pond
July 16th, 2008 by Andrew WafaaIt’s been two weeks since our last soirée, so without further ado The next openSUSE-GNOME project meeting will take place at the official #opensuse-gnome IRC channel tomorrow Thursday: 2008/07/17 16:00 UTC (18:00 CEST)
For an overview what time this is in different timezones, use:
Topics being covered are:
- Feature review
- Policy review
- Pattern review
- Patch tagging day
- Package submission changes
Remember EVERYONE is welcome, new/old, hacker/user etc. So please come along and join the fun, fancy dress and fishing rods are optional.
Package Management Security on openSUSE
July 16th, 2008 by Andreas JaegerThere has been a report (with further information at this page and at the FAQ) looking at package management security on various distributions that IMO was rather condensed in its summary report and therefore raised some false alarms for various distributions including openSUSE.
Ludwig, one of our security experts, sent out a mail with a reaction to the report and I’d like to point out some of the things from the report and how it’s handled in the openSUSE 11.0 distribution.
Let me state first the major lines of defense that openSUSE uses:
- Package downgrade is not possible, YaST will not do this automatically and therefore many of the attacks (installing an old and vulnerable package) are not possible.
- The openSUSE download redirector serves the metadata from a known and trusted source. I advise everybody to use the download redirector via http://download.opensuse.org.
- The openSUSE updates have both cryptographically signed packages and cryptographically signed meta data – and YaST check these signatures and reject files that do not match the signature.
The described attacks are:
- “Replay Attack: Metadata Replay”: Not possible since the openSUSE download redirector serves the metadata from a central location. The only chance here would be a man-in-the-middle attack but this would not help since YaST will not do a package downgrade.
- “Replay Attack:Mirror Control”: Yes, it’s easy to become an openSUSE mirror but this will not degrade your security since the metadata comes from the download redirector and we only redirect to mirrors that contain the right version of a package – and the redirector monitors that the mirrors contain the right files. YaST is designed with mirrors going out of date or getting corrupted in mind.
- Attacks called “Extraneous Dependencies”, “Unsatisfiable Dependencies”, “Provides Everything” on the other attacks page: Let me cite the page where it mentions protection against these attack: “The easiest way is to use a package manager that signs the repository metadata (like APT or YaST)”.
- “Endless Data Attack”: This is basically a denial of service attack which the admin will soon notice and can then take appropriate action. It cannot happen for metadata since those come from the download redirector but it could happen with openSUSE for packages since we do download the complete file and do not use the file size information contained in the metadata yet. This is something we plan to address for our next release.
Note that when I speak about YaST I mean everything that uses the openSUSE package management library libzypp which includes YaST, zypper and the updater applets.
Note also that the FAQ has a question about the download redirector: “Q: What about OpenSUSE’s download redirector? Does it increase or decrease my security? A: OpenSUSE’s download redirector increases the user’s security…”. I’d like to thank Christoph Thiel, Marcus Rückert and Peter Pöml for their work over the years on the redirector. Peter is the current maintainer and did the last rewrite including the serving of metadata.
Note: if you use SUSE Linux enterprise products, then only servers owned by Novell are used via secure https connections which avoid all these attacks.
Our package management and security experts have been reviewing and improving the security aspects of the package management stack continuously – and the report shows that they were successfull.
YaST module the C++ way
July 15th, 2008 by J. Daniel SchmidtFrom May 30th to July 4th we had a YaST workshop in Nuremberg. The workshop was basically a hackshop as we wanted to work on cool and new things for YaST during this week.
There is one big change in YaST in openSUSE 11.0 – yea, we found out that there are even more colors than gray, ok – but there is one that is not really visible to the end-user. Stefan Hundhammer, maintainer our YaST UI, completely separated the UI from the rest of the YaST infrastructure. This now makes it possible to use the UI directly, from anywhere, independent from our YaST-own-language YCP. So with a team of four hackers we wanted to prove that we can write a YaST module in plain C++ using the new modularized UI directly. And here is the outcome:
We went for rewriting the registration module (well, we chose it because I know it well, as I am the maintainer, and it will change anyhow for the next release). This module is not that integrated in the overall YCP world, so it should be feasible. First we had to find an alternative way to access system configuration files, as this is done by so-called SCR agents in YCP. To make life easier (and future development faster) we had to look for a replacement of our YCP Wizard Seqencer. And of course we redesigned all dialogs to make them more intuitive.
We solved all the issues and now have
- a wrapper class for accessing different configuration files (currently only ini files)
- an automatic wizard sequencer equivalent (using the advantages of an object oriented language, btw YCP is not)
- three clear and intuitive dialogs, every user should understand
And as everybody wants to see screenshots, here they are:
The code is just a proof of concept and not yet reusable for new YaST modules but everything we wanted to show works great. We will continue to work on such kind of modules and in that process move the generic parts out into single libraries so that they can be reused and even may be exposed to scripting languages.
Writing YaST module this way has lots of advantages
- YaST modules evolved into the object oriented world and can make use of it (the automatic sequencer is the first benefit)
- the code is reusable
- a huge bunch of documentation and lots of tools exist for C++
- its a compiled language and has a better performance than an interpreted one
- we can bind automatically to the most important scripting languages and give them access to the modules logic
If you are interested in the source code, have a look at my svn repo and if you want to help join the team and contact us on our mailinglist.
LRLUK08 – Freeing The Lizard
July 14th, 2008 by Andrew WafaaYes peeps, this weekend is the penultimate LUG Radio show and event.
It is also an event where I will be speaking about the openSUSE project and its great community (yes there’ll be a bit about Novell and how good they are too 😉 ) You can see the full schedule if you want to know what’s going on or just turn up on Sunday at 1500 to hear and see yours beautifully 😀
I am planning on being helping Lord Whittaker who will be there with a Novell stand, so hopefully I can bring a dash of Green Geeko Goodness to the event. If you are planning on going, please say hello. It’d be good to meet other openSUSE users.
Atheros AR 5007 EG on openSUSE 11.0
July 14th, 2008 by Masim "Vavai" SugiantoopenSUSE 11.0 failed detect this hardware and wrong identifying the device as AR242x 802.11abg Wireless PCI Express Adapter. I usually uses madwifi driver for Atheros chipset instead of ath5k but the standard madwifi driver could not be applied for the device. After Googling for a while, I could make it works with the special AR 5007 EG madwifi driver, http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz.
How to make it works ?
- Disable or blacklist ath5k driver by add the blacklist ath5k to /etc/modprobe.d/blacklist
- Open konsole or terminal
- Install the driver
su
zypper in kernel-source make gcc gcc-c++
wget -c http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
tar -zxvf madwifi-ng-r2756+ar5007.tar.gz
cd madwifi-ng-r2756+ar5007
make
make install
modprobe ath_pci
reboot
After reboot, you should be configure the wifi from YAST | Network Devices | Network Settings