Archive

Author Archive

Bash PS1 tricks
1 star2 stars3 stars4 stars5 stars
(votes: 1, avg: 5.00)
Loading ... Loading ...

June 8th, 2011 3 comments

Many of you know already about this feature, but some of you don’t so I wanted to share it with you. I just changed mine PS1 configuration in ~/.bashrc to look like this:

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export PS1='\[\033[1;37m\][\[\033[1;32m\]\u\[\033[0m\]@\h\[\033[0m\] $? \[\033[1;34m\]\w\[\033[0;35m\]$(__git_ps1 " %s")\[\033[1;37m\]]\[\033[0m\] '

Take a look at the following picture to see how it works:

or check the video on youtube.

The number between user@host and the current working directory is the exit status of the most recently executed command (or pipeline). This is great because you don’t have to type echo $? everytime you want to find it out. The __git_ps1 magic will print git branch name if you are inside of the git repository. Furthermore it will add special characters indicating the state of the repo: % – untracked files present, + – new files added, * – some tracked files changed, $ – there is something in the stash (see git stash --help). Pretty cool, right?

openSUSE Spacebus
1 star2 stars3 stars4 stars5 stars
(votes: 1, avg: 5.00)
Loading ... Loading ...

May 25th, 2011 1 comment

Yesterday we were replacing old chairs in our Prague SUSE office with the brand new ones. We got a wicked idea to stack the older ones into the Boosters’ Office and have a virtual bus ride for a few minutes. Our colleague Michal Kubecek and his camera were ready as usual so he quickly took a photo of us enjoying the ride:

Later I had some time to practice my 1337 GIMP skillz and created a motivational poster for your viewing pleasure. After Geeko Bus and Geeko Tram I give you without further ado the “openSUSE Spacebus!”:

Credits: bus photo CC BY-NC by yewenyi, space photo CC-BY by Sweetie187, spacebus photo CC BY-NC by me

Adding YaST menuitem to GNOME 3 status menu
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

May 2nd, 2011 4 comments

This blogpost is now obsolete.

Please go to GNOME-Shell Extension: YaST (item in) Status Menu.

I read a blogpost from Nelson Marques about adding YaST modules icon to GNOME Shell. I kind of liked the idea of YaST integration into GNOME Shell, but I had to share Julian Aloofi’s worries in comments. He came up with a simple idea to just add the YaST menuitem to status menu in the top-right corner. This was very easy to implement because most of the GNOME Shell features are written in Javascript. I created the following simple hack and ended up with this:

GNOME 3 status menu with YaST menuitem

If you want to add the YaST menuitem as well, just follow these simple steps (as root):

cd /
wget https://gist.github.com/raw/8d0d7d756e18b8a1da21/131a6caae2556edaa045f9cc3f13c573e12f2d31/gnome3-statusmenu-yast.patch
patch -p1 < gnome3-statusmenu-yast.patch
rm gnome3-statusmenu-yast.patch

Now you have to restart GNOME Shell (press Alt+F2 and enter “r” command) and you can enjoy the new menu item. :-) Remember, the changes will be lost next time you reinstall the gnome-shell package.

I already contacted Frederic and Vincent about the patch and they are still looking for the best way how to integrate YaST with the rest of the system, so stay tuned. :-)

PS: Andy found an interesting bug. For him, the item was added but clicking on it did nothing. Solution was found by Frederic – just install the missing gnome-menus-branding-openSUSE package.

Tags: , ,

openSUSE 11.4 Release Party – Prague
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

March 29th, 2011 1 comment

Last Friday we held an openSUSE 11.4 Release Party in Prague, more particularly in the first Czech hackerspace called brmlab. We decided to go with later date and not doing the party immediately after the release, so we could have promo materials available. This included openSUSE posters, DVD media, T-shirts but also openSUSE beer! Thanks Michal and Klaas for delivering them to Prague. In the beginning we had 100 promo DVDs and we ended with slightly more than 10, so I think the event was a huge success!

We planned to start the event with a talk from Martin about changes in YaST and WebYaST and his plans to reincarnate the “classic” YaST using Ruby, but Martin got ill, so we had to improvise. Fortunately, we had a lot of new faces in the audience, so I could reuse my presentation from the last release party called openSUSE from A to Z. Most of the things mentioned there are still valid now anyway. :-)

Next on program was a talk from Kendy about LibreOffice. He explained the reasons for forking, some new features available in version 3.3, but also ways how one can contribute to the project. For example, there is a list of easy hacks which includes things like translating German source comments into English or removing unused code. More advanced programmers can participate in Google Summer of Code by solving one of the ideas (btw, this also applies for openSUSE: ideas to grab are here).

The official part continued with my talk about changes in openSUSE. I talked about our desktop environments shipping with the latest 11.4 release (KDE, GNOME, Xfce and LXDE), about applications like Firefox and other browsers or LibreOffice. I also mentioned changes under the hood like Linux kernel, Xorg + Mesa or systemd. At the end I mentioned other changes in the project like Tumbleweed initiative, split of Packman repositories, SUSE Studio and virtualization in general and our web infrastructure: more precisely Build Service and Connect.

The last talk was given by Miro. He is an editor-in-chief of the Czech Linux magazine called LinuxExpres. While doing interviews in our offices a week ago, we asked him if he’d be willing to do a talk at our release party about Xfce 4.8 which is available in 11.4. To our delight he agreed, although he uses Xfce in Debian, but he wanted to see how 4.8 looks like. In fact, openSUSE is the first major distro to have Xfce 4.8 in its stable release!

After the Xfce talk we had pizzas for dinner and continued with free discussions, playing with KDE 4.6 and GNOME 3 on our touchscreen, simply having a lot of fun! Thanks Alena and the whole Prague SUSE office for sponsoring food and drinks!

All photos taken by Michal Kubecek, thanks!

IBM Watson runs on SUSE Linux Enterprise
1 star2 stars3 stars4 stars5 stars
(votes: 2, avg: 5.00)
Loading ... Loading ...

February 17th, 2011 5 comments

I am sure that most of you already saw (or at least heard about) how Watson from IBM competed on the TV quiz show Jeopardy. The software runs on supercomputer which consists of 10 racks of IBM POWER 750 servers (making it a cluster of 90 servers, each having 32 cores with 4 hardware threads) . The much lesser known fact is that this machine is using SUSE Linux Enterprise as its operating system. Except Linux it can also run on AIX and IBM i, but IBM has chosen SLES (probably because it has the best performance on IBM POWER7 among these options), which makes it even more cool! I wonder why Novell marketing isn’t using this great success story more!

Update: I just found this – it seems that Novell IS promoting this great success story afterall! Cool!

For those who didn’t watch the videos I include here all parts together so you can see them now (and you should!).

Novell Hackweek #6 / Game Jam Prague 2011
1 star2 stars3 stars4 stars5 stars
(votes: 1, avg: 5.00)
Loading ... Loading ...

February 4th, 2011 No comments

Last week we had a Hackweek at Novell. I decided to do something rather unusual for me – to hack a device. I bought one of these nifty LiveView devices made by Sony Ericsson, which are basically an intelligent watch that can connect to your mobile phone using Bluetooth. Unfortunately, it turned out to be rather unusable with Android devices (lots of Bluetooth disconnects), but supposedly a firmware update is on its way. After I saw that, I was somehow disappointed but I thought there must be a way how to reverse engineer a protocol and try to connect the device to my computer. I started to look around on the Internet and found a great blog by Andrew de Quincey. What was even more cool was that Andrew already did most of the job and wrote some code in Python. All I had to do is to wrap it into classes to make it more general and thus customizable. So what’s next? My dream is to create a custom open-source firmware and flash the device. I hope I can achieve this with help of hardware wizards from our Prague hackerspace. The source code is available from gitorious as usual. Do you think that Hackweek lasted only until Friday for me? Well, not really, keep reading … :-)


When I was last time in Germany, Leinir told me about an event called Global Game Jam. I liked its idea very much – 48-hour game coding marathon. I was amused when a couple of days later (just one day before the event took place) my friends Split, Lokiman and Frem told me about the Prague chapter called Game Jam Prague and invited me to join them. We decided to go there under the name they already used for a couple of their projects – Hyperbolic Magnetism aka @hypmag.

The event started on Friday evening. When we arrived, the place was already full of other teams preparing their stuff. This was very different from other (mostly open-source related) events I attend where I usually know at least a few people. Here, I knew no one except my team! :-) At around 6pm we were given a topic that should be somehow present in our game – Extinction. I was very surprised that we were able to brainstorm over 15 ideas in less than half an hour. Later we discarded most of them (because they were too obvious or too complex) and we ended up with two.

We agreed that for idea one to be successful we would need to create nice graphics and because none of us was confident enough, we decided to pick the another one where simple graphics would suffice. So we started to work on a game with the working title “Nations”. The idea was really simple: you have a couple of nations, represented by triangles (people) moving inside the circle (border). Each nation expands in time and when the circles start to overlap, triangles inside the intersection start to fight together. Moreover, if the nation is big enough, it starts to produce A-bombs which are then launched at other nations. Your task is to maintain balance between the nations, so none of them is completely destroyed. This is achieved by applying positive or negative force on some places of the game area. Positive force causes affected triangles to reproduce more, negative force causes the affected triangles to disappear. We implemented basic behaviour of the game mechanics and went to sleep on Saturday morning.

We met again on Saturday evening and we coded and tweaked and coded and tweaked … It was a long way, but at some point (I guess it must have been something around Sunday 4AM) we realised we want to change the whole game logic completely. How about we had only two types of nations – green controlled by the user and cyan ones by AI? What if player could decide to split the nation into two halves or join two nations into a bigger one? Bigger nation of course produces A-bombs faster, but is also easier to target. We replaced most of the code and I started to work on an AI, which suddenly became necessary. We worked until Sunday noon when we were finally satisfied with the result. In the meanwhile Split composed a great music track and we quickly hacked game menu, intro screen and other cosmetic stuff. That’s how it looked in the end:

I’ll attach the gameplay video to give you even better idea how the game is played:

At the end of the event all contestants judged the produced games and the first three places were announced – check the list for all other games and the result. The first team also got a very nice pacman-themed cake (which was also very tasty, thanks for sharing!). Although we didn’t make it into the Top 3, I think it was a great success for us. We tried something completely new and we also met a lot of interesting people (one of them being Antonin, author of the legendary TotalFinder). I also hope that we’d be able to finish the game and publish it into Apple App Store (and probably later into Android Market).

Finally I present you the photo of amazing Hyperbolic Magnetism shortly after we submitted our game at the end of the 48-hour session. :-)


See you next year!

GNOME Python Hackfest, AppInstaller Meeting and Bretzn Hackfest
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

January 24th, 2011 No comments

What a cool and productive week! But let me start from the beginning …

A couple of months ago we decided to start a hackerspace in Prague called brmlab. Most of the members deal with hardware, but there are also couple of software guys like me. At the end of November we were contacted by Tomeu and he asked if they can organize GNOME Python Hackfest in our hackerspace. I was more than delighted about the idea, so we agreed and started to plan things. In the end we had 9 FOSS hackers working on GNOME and Python and I think they enjoyed their time in Prague. Hackerspace is a great concept, because these folks didn’t have to spend extra money on renting some place and our members had opportunity to meet foreign FOSS developers and try exotic hardware like OLPC XO-1.

Blogposts from Tomeu, J5 and Martin about the event.


I had to leave the guys on Tuesday evening, because I spent the rest of the week in SUSE office in Nuernberg. The first three days were dedicated to Cross-distribution meeting about application installer organized by Vincent. It went more than well, we discussed and agreed on many things, which is great and in the end we were able to give a presentation + we also created a nice AppStream wikipage as a starting point for any future work.

Vincent wrote a summary for openSUSE News and a blogpost.


This meeting was immediately followed by Bretzn hackfest organized by Frank. The main focus of it was implementing some of the things we agreed on previous meeting from the KDE/Qt perspective and porting MeeGo Garage to openSUSE. During it I was mainly dealing with appdata.xml format we described in the AppStream meeting – I created an XML schema so we can validate it and also developed a proof-of-concept generator of this piece of metadata in Python. (git repo) Hope we can get it in createrepo and dpkg-scan* utilities soon.

Frank wrote a summary for openSUSE News and a blogpost.


I would like to thank GNOME Foundation and Collabora for sponsoring the GNOME Python Hackfest, Novell for sponsoring the Bretzn Hackfest and Canonical, Debian, Mageia, Novell and Red Hat for sending their people to AppInstaller Meeting! It’s really nice and encouraging to see folks from various companies working on one common goal.

And yeah,
I am going to FOSDEM 2011
so see you there!

Making a delicious coffee cake with openSUSE
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

November 11th, 2010 3 comments

What we need for our delicious openSUSE coffee cake:

  • 300g Eclipse1
  • 200g IntelliJ Idea2
  • 150g ground NetBeans3
  • 1 baking Maven4
  • 1/2 spoon Groovy5
  • 1 cup of cold Java6
  • 3 eggs
  • 80g drawn butter
  • 100g chocolate icing

1 flour, 2 sugar, 3 walnuts, 4 powder, 5 cinnamon, 6 coffee

Instructions:

  1. Mix powdery ingredients in a bowl.
  2. Add liquid ones as well and stir around well.
  3. Bake in the oven and check regularly.
  4. When ready take out the cake and let it cool down.
  5. Put chocolate icing on the top and add some openSUSE magic.
  6. Enjoy!

Oh no, wait!

There are some ingredients missing in our kitchen, ahem, I meant Factory. Currently we only have NetBeans and today I learned from Michal that it will be probably dropped as well, because some of its parts started to depend on Eclipse.

So my question is: is there anyone from our great openSUSE community who is willing to help with Java packaging? We have various related packages (Eclipse, IntelliJ Idea + their dependencies like Groovy or Maven) spread around various places in the Build Service (e.g. home:lkundrak:IDEA, Java:eclipse:Devel), but we would like to have them fixed and pushed to our devel project for Factory – Java:packages. This is the first and necessary step for including these tools into you beloved distribution. Some of the packages are probably obsolete so it might be better to get inspiration directly at our Fedora friends (you can use this package list and a little helper script to peek how do they do it). If you are interested in this, please do so! We will try to help you on opensuse-java mailing list or #opensuse-java IRC channel on Freenode.

Oh, I almost forgot one thing. The most active Java packager will get an openSUSE coffee cake done by yours truly and the openSUSE Boosters! :-)

Why is pkg-config the best thing since sliced bread
1 star2 stars3 stars4 stars5 stars
(votes: 3, avg: 3.33)
Loading ... Loading ...

October 22nd, 2010 7 comments

For those of you who haven’t met pkg-config yet a short introduction from its project page:

pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.c `pkg-config --libs --cflags glib-2.0` for instance, rather than hard-coding values on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance.

More and more projects are using pkg-config already, but there is still a very high number of projects that don’t. This post tries to describe why using pkg-config is a good idea.

We try to build software packages for all major Linux distributions in the Build Service. Unfortunately there are lots differences in package names. Let’s take a look at KDE 4 development library for example:

  • libkde4-devel (openSUSE)
  • kdelibs-devel (Fedora)
  • kdelibs4-devel (Mandriva)
  • kdelibs5-dev (Debian/Ubuntu)

Confusing, right? When I want to build a KDE application in the Build Service for all these distributions I have to use conditionals, which clutters the spec file. What’s even worse is that I have to actually find out these names, which is not always an easy task.

RPM has a nice feature: if a file /usr/lib/pkgconfig/foo.pc or /usr/share/pkgconfig/foo.pc exists in the package, rpmbuild adds a pkgconfig(foo) provides symbol. But what does that mean effectively?

We don’t have to require a particular package name in the list of build requirements. We just specify pkgconfig symbol instead. Once we have replaced all of these … Crash, boom, bang – cross-distro packaging made easy! What’s even more great is that it would be possible to write tools that are able to auto-generate build requirements in the spec files by simple detection of pkgconfig symbols in configure, qmake, cmake, whatever build scripts.

The most packaging headaches are caused by libraries, but often we use some utilities during the build as well. Fortunately, they tend to have the same name across distributions – e.g. desktop-file-utils, so it probably does not make sense to use pkgconfig everywhere.

I talked with lots of people at the openSUSE Conference and all are in favor of pkg-config usage. I would like to encourage everyone in the FOSS community to include pkgconfig files in their releases and even help others doing so! For example, the distribution package maintainers could create these files and send them to upstream. I will try to push a new rpmlint check into openSUSE, which will print warning (if the package contains a library without pkgconfig file) and a link how to add a proper one to the package.

FrOSCamp, FUDCon Zurich and CERN
1 star2 stars3 stars4 stars5 stars
(no votes yet)
Loading ... Loading ...

September 22nd, 2010 2 comments

After a very long journey home I’m finally back in Prague from Switzerland. The whole trip was just awesome! Michal and I left Prague on Thursday around 11 PM, shortly after our Fedora friends from Brno arrived. To book a shared van for 9 people proved to be a great idea! Btw, motto for the upcoming openSUSE Conference is “Collaboration across Borders” so we definitively stick to that! :-)

FrOSCamp

We arrived to Zurich the following morning around 7 AM and went directly to conference venue at ETH Zurich. The whole place was still empty with the exception of two booths – Fedora one occupied by Bert and FreeBSD one with Salvatore (who turned out to be a very funny guy and his trolls like “1, 1, 1, 1, 1, Debian random number generator” or “Bugs, bugs, bugs, that’s you!” to Debian people sitting next to him became unforgetabble :-) ). Together with Michal we set our HP touchscreen up and shortly after that Bruno, Gnokii and Alexander appeared. Our openSUSE booth was now complete! Wait, I should write openSUSE/GNOME booth, because GNOME had no presence at FrOSCamp, but Gnokii saved the day and offered help to Stormy. She was more than happy to accept the offer and we run a mixed booth. Bruno even made a really nice GNOME poster and because Michal is using GNOME 3 since LinuxTag, he was able to answer most of the tricky questions. (I started to use GNOME 3 on one of my notebooks after the event as well. :-) ) The venue started to fill up with other projects as well and soon it was full by presenters. Sadly, this could not be said about visitors – their count was rather low, but this was just the first year of this conference, so I hope it will get better and better in time. At least people from various FOSS projects had more time to talk among each other which is a good thing. :-)

You can look at photos by Bruno to get the idea how the event looked like.

FUDCon

Parallel to FrOSCamp there was FUDCon happening. It is Fedora conference, which is almost never standalone, but attached to some other FOSS Conference. They had a separate talk track, so visitors could choose those talks as well. The most interesting for me was the 3rd day of FUDCon, which was organized as “unconference” or BarCamp and it offered a lots of opportunities to talk about openSUSE and Fedora relationship. Also meeting new people (for example, the new Fedora Project Leader – Jared Smith and crazy Romanians Nicu and Adrian) was very nice.

Nicu has a good set of photos mapping FUDCon.

Zivilschutzbunker!

A very good thing about the conference was the accommodation. We were allowed to enter the premises of atomic bunker under the university and stay there during the nights. It offered a great post-apocalyptic atmosphere. There was even an internet connection so we were able to organize a small hackathon :-)

During the last night Zurich was attacked by aliens, but fortunately our CTJB Emergency Team from the van was present in the bunker and we were able to repel the invasion and save the world from the disaster! Meet the heroes:

Cpl. Pyxel

Maj. Kraken

Cpt. Miska

Spc. Arius

Pte. Ksyz

1Lt. Rdvn

2Lt. Stick

Sgt. Soc

Col. Mifo

Photos by xyzz

CERN

The last day of the event was dedicated to CERN visit. Journey to Geneve was long and extended our way back home to more than 10 hours, but it was totally worth it! Let the pictures speak for themselves:













I would like to thank Marcus Moeller and the whole ETH staff for driving both conferences and things related to that and I am already looking forward for the next year’s edition!