Home Home
Sign up | Login

zypper tab-completion and some thoughts

April 26th, 2015 by

Today I spent some hours implementing nice tab-completion for zypper. There was already a lot done 6 years ago, but the part about installing/removing packages was missing.

Now the thinking part is about the speed. For the tab-completion I needed a list of installed packages and of course we have that in our RPM database (using berkeley DB as a backend). However querying the list with rpm -qa already took over a second on a modern and fast system. On my poor netbook with a cold cache, it took 25 seconds (5 secs on second try with hot cache)… And the point is that you probably do not want to wait 5 seconds for your tab-completion to react.

So to avoid this problem, I used caching via make to produce a better format (plain text). This is then post-processed with sed in a fraction of a second – a speedup factor somewhere between 15 and 150. This makes a big difference.

In the end, I still wonder why plain text is so much faster than a DB. I guess, one reason is that the DB is optimized for retrieval of single values – e.g. rpm -q bash – this is very fast (but even there an egrep “^bash-[^-]+-[^-]+$” is more than twice as fast).

I still want to optimize zypper for better speed, so that a search might some day return in under 2 seconds. One idea for that is to not parse all those config+repo files every time, but only when they change. It could use mmaped files under /var/cache/zypp* as memory to store the binary representations. Though it might become complicated, if dynamic structures such as linked lists are involved.

The future will be interesting…

Tumbleweed with KDE Plasma 5 and Kernel 4

April 26th, 2015 by

You probably know me. I’m GNOME guy. Inside openSUSE, I helped to form team Enlightenment and team MATE. I’m happy that both are in official repositories.

I’m also passionate with Tumbleweed. All my systems are Tumbleweed.
I tried to install KDE Plasma 5. After I did it, I tried to install Kernel 4. And I did it. I have to test it little bit more though.
This tutorial has 2 parts.

Part 1: Install KDE Plasma 5

* First of all, download the ISO (I prefer net install 64bit or 32bit). Install KDE.

* Open YaST and install plasma5-session.

When you press Accept, it’ll ask you if you want to uninstall KDE 4. Press OK.

Read the rest of this entry »

Using openSUSE as a reverse tunnel site for Windows 7 remote desktop

April 20th, 2015 by

If you can’t open a hole in your office / home firewall then a reverse tunnel can let you workaround the issue.  This blog post uses cygwin, ssh and autossh to create and maintain a reverse tunnel through your firewall.

You should be aware that if you follow the below steps you will punch a hole through your firewall, so be sure and consider the security issues associated with that hole.  Many organizations require security beyond a simple login and password when connectivity is allowed from outside the firewall.  In some organizations following the below instructions without authorization from your IT security team could be a firing offense.

In theory this functionality is relatively basic, but there are lots of resources on the web that only serve to complicate the matter.  The below instructions were followed in 2015 with current SSH to create an actual working reverse tunnel.

The assumed situation is you have:

– Windows 7 PC behind a firewall you want to remote desktop to (the target PC)
– A openSUSE server in the cloud that you are able to ssh into and open appropriate ports and firewall holes
– A client PC from which you want to originate Remote Desktop sessions

The instructions here borrow heavily from the below blog post, but I was unable to get the tunnels to work by following the steps described at that site:


What has worked for me so far is:

  1. On the target (destination) PC:
    1. Download Cygwin (http://www.cygwin.com/)
    2. Install Cygwin, selecting the autossh package.
    3. Start the Cygwin shell (Start -> Programs -> Cygwin).
    4. Generate a public/private key pair.
      1. At the command line, run: ssh-keygen
      2. Accept the default file locations
      3. Use an empty passphrase
    5. Copy your newly-created public key to the SSH server.
      1. scp .ssh/id_rsa.pub user@ssh.host.name:id_rsa.pub
  2. Add your public key to your list of authorized keys on the server.
    1. Login to your SSH server.
    2. mkdir .ssh
    3. cat id_rsa.pub >> .ssh/authorized_keys
  3. Tweak the sshd_config on the server
    1. By default openSUSE enables “AllowTcpForwarding” and “TCPKeepAlive”. Verify they are either commented out or set to “yes” in /etc/ssh/sshd_config
    2. Set “GatewayPorts yes” and “ClientAliveInterval 300″ in /etc/ssh/sshd_config.  Also make sure they are not commented out.
    3. restart sshd to get the config values to be re-read:    sudo systemctl restart sshd.service
  4. Test your SSH key.
    1. Logout of your SSH sever.
    2. Login to your SSH server again. This time, your key will be used for authentication and you won’t be challenged for your login credentials. If you are not logged in automatically, review the previous steps. Or contact your server administrator.
    3. Logout of your SSH server.
    4. Exit of the Cygwin shell.
  5. Test your SSH Tunnel capability
    1. Open a cmd prompt on your target PC as administrator
      1. start -> run -> cmd -> right click on “cmd” -> left click “run as administrator”
    2. C:\cygwin\bin\ssh -N -R 4489:localhost:3389 user@ssh.host.name
      1. Note that this should open an alternate port (4489) or your openSUSE server in the cloud.  openSUSE uses 3389 by default, so you need to use an alternate port on the openSUSE server end.
      2. Any connections to the alternate port should be funneled through the SSH tunnel back to the windows 7 PC on port 3389
    3. From a 3rd computer open a remote desktop connection to ssh.host.name:4489
      1. Note that remote desktop uses :4489 after the server name to designate an alternate port.
    4. If it acts like you’re not connecting at all, in all likelihood you’re not.  You probably have a firewall in place on the openSUSE server.
      1. Open port 4489 in your opensuse server firewall
        1. https://doc.opensuse.org/documentation/html/openSUSE_122/opensuse-security/cha.security.firewall.html#sec.security.firewall.SuSE.yast
        2. Or   “sudo /sbin/yast -> security and Users -> Firewall -> Allowed Services -> Advanced -> add 4489 to list of TCP Ports -> OK -> next -> finish -> quit
      2. retry remote desktop connection
    5. Once it works, from the Windows 7 command prompt kill the the ssh connection to your openSUSE server (contrl-C)
  6. Test your AutoSSH Tunnel capability
    1. C:\cygwin\bin\autossh -M 20000 -N -R 4489:localhost:3389 user@ssh.host.name
      1. Note that-M opens a monitoring port (I’m not sure how to leverage that)
    2. From a 3rd computer open a remote desktop connection to ssh.host.name:4489
      1. Make sure you terminate your remote desktop session from the 3rd computer when done testing
    3. If it worked, from the Windows 7 command prompt kill the autossh command (contrl-C)
    4. exit out of your cmd window
  • At this point you can manually invoke autossh to setup a semi-persistent tunnel

From here down is working, but reliability over days/weeks/years has not been confirmed yet.  Feedback about improvements are welcome.

  1. Install autossh as a Windows service
    1. Open a cmd prompt on your target PC as administrator
      1. start -> run -> cmd -> right click on “cmd” -> left click “run as administrator”
    2. cd C:\cygwin\bin
    3. cygrunsrv -I AutoSSH -p /bin/autossh -a “-M 20000 -N -R 4489:localhost:3389 user@ssh.host.name” -e AUTOSSH_NTSERVICE=yes
      1. If you get an error with this command, manually type the ” marks.  They may not be handled properly with cut&paste.
      2. Be very careful with the above.  A misbehaving service can be hard to remove in Windows.  It may require safe mode if the service won’t accept stop commands.
    4. Tweak Windows service settings.
      1. Open the Services management console (Administrative Tools -> Services).
      2. Edit the properties of the AutoSSH service.
      3. In the “Log On” tab, select the “This account” radio button and set the service to run as your current user.  This is very important to do before starting the service in order for the ssh certificate to be used.
      4. Change the startup mode to “Automatic (Delayed Start)”
      5. Start the service.
  2. Test your tunnel as described in 6.2 above
    1. Be sure to test after rebooting your target Windows 7 PC.
    2. I have had it working for 24 hours and used it a lot.  I’ve seen network drops.  Target PC reboots.   The tunnel just keeps working.

If all went well, congratulations you now have a persistent tunnel

You should be aware you have just punched a hole through your firewall, so be sure and consider the security issues associated with that hole.  Many organizations require security beyond a simple login and password when connectivity is provided from outside the firewall.

How to promote your conference

April 11th, 2015 by

Local open source community is bigger now and next step for you is to organise (or join) global conferences. One part of the organisation is the promotion of the conference. You want to have as many visitors as you can.

I will try to write down what I did during openSUSE global conferences and some local events.


0. Web page

There MUST be a web page and a system that accepts registration, paper submission, information etc. Write everything that visitor should know about the conference.
We use OSEM in openSUSE. Check out https://events.opensuse.org

1. Blog blog blog.

You’ll have some announcements for the conference. Dates, the place, new website, call for papers announcement, hotels that visitors can stay, schedule, keynote speakers etc. Usually, every open source project has a central blog or news site. You can write the articles there. Try to make fuzz by publishing your articles often.
Global communities can translate the announcements to their language and promote the conference locally.

Local communities are formed by members with blogs who publish on different planet sites. You can make a schedule so everyone can publish the announcement every other day. More eyes will see the announcement and will apply either as speaker or visitor.

Two things you want to have is contributors+visitors and sponsors. If your project is famous, then it’s easy. If not, then you better publish the initial announcement to magazines, newspapers, technical blogs-sites. If you don’t have access, then you better send it by e-mail or fax and then call them and ask them if they got the text. If they publish it, you’re lucky.

Translate those announcements and publish them, so local population will see that there’s a conference coming.

2. Promote to other FOSS conferences

There are plenty of FOSS conferences around the world.
* Community (local or global) has to apply for a booth and/or, if it’s possible, present why someone should attend.
* At the booth, you should have promo materials of your conference and give away to local LUGs or hackerspaces to hang posters at their places.
* Another cool thing is to have free coupons for beer at the conference. If beer isn’t the solution, then find another thing that can be found only at your conference and give free coupons.
* Wear special T-Shirts with the logo or #oSC or “Ask me for the conference”. You show people that you’re organizing something and can ask you questions.
* Finally, go to other project’s booth and invite them. You can ask them if they want to have a booth at your conference or apply for a presentation.

3. Messages to post

Create a list of messages you’ll post to social media.
First of all, you should post the announcements.
Then create a list of general messages that you should post before the conference. Content will be related to the subject of the conference or the country etc.
When you have the schedule ready, create a post with the name of the person (mention him/her on the social media), the title of the presentation (mention if it’s a famous project).
The messages can be 2-3 per day but not the same time. Try to have 4-5 hours time delay between tweets.
Read the rest of this entry »

AMD Catalyst 15.3 Beta for openSUSE – new makerpm-amd-script is available

April 8th, 2015 by

AMD has released the new AMD Catalyst 15.3 Beta. They have not yet released a public beta driver for all other distributions. It is currently available for Ubuntu. *sigh* So, it is a bit hard work to implement this in the makerpm-amd-script to replace the latest AMD Catalyst 14.12 with AMD Catalyst 15.3 Beta. So do not confused if the script downloads the AMD Catalyst 14.12. :-)

Unfortunately there is no release notes from AMD. This update can solve the issue with PowerXpress but I can not really verified this because lack of such hardware.

Another side note I have implemented a workaround in the script to get the driver works with the GNOME Displaymanager + GNOME. It is a little cruel hack but it works for the moment. Thanks to the user that they posted the article in my blog. ;-)

For GNOME user with gdm: Execute the following command as root after the installation of the AMD driver and before restart the machine:
sh makerpm-amd-15.3-beta.sh --install-gdm-fix
If you update the AMD driver, so the workaround does not work anymore. It is important that you do not delete the file /amd_xversion and is needed for the workaround.

To revert the changes:
sh makerpm-amd-15.3-beta.sh --uninstall-gdm-fix

Before I forget it: All user from openSUSE Tumbleweed can also install the driver. But remember, Tumbleweed is under heavy development. I can not guarantee that the driver works in the future yet.


Installation guide (English):

The above named installation guide is only for the stable driver but you can adapt it for the beta driver.

Bruno Friedmann will build the new RPM packages in the fglrx repository. Stay tune!

If you find any issue with the driver. Don’t hesitate to contact me. I am in contact with AMD and can forward your issue to the right place. Feedback are welcome.

A report of your system is very helpful beside your feedback. You can generate it with the script:
su -c 'sh makerpm-amd-15.3-beta.sh -ur'

Have a lot of fun!

openSUSE member / Official AMD Packaging Script Maintainer for openSUSE

German Blog: openSUSE – proprietären Grafik-Treiber AMD Catalyst 15.3 Beta als RPM installieren

UnReal World RPG and propiertary applications in linux ecosystem part SDL2 take 2

April 1st, 2015 by

My opinion is Simple Direct Layer 2  library is awesome piece of code. SDL2 delivers 99.9% what it promises. When SDL2 works it makes good habit to stay away your mind but now I want to talk about when SDL2 doesn’t work and when you want to deliver closed source application.

It seems that there is some problems with  OpenGL/DirectX and other accelerations APIs that they don’t play together without tweaking and researching ways to make them work. Okay this ain’t SDL2 fault completely this manufacturer problem again but.. you use SDL2 to get rid of hardware problems.

All those problems are solvable with current SDL2 version but again they takes lots of time and someone who is willing to debug application in non-working machine and remember this is normal stuff in development and not a big thing. But it’s big thing when you are about to releasing your new bling bling game with megalomanic blitting and your surfaces starts to blink every time you blit with some random machines. Even in not so bling bling UnReal Wolrd RPG you have problem with that but they are solved now but I builded many many Mac OS X and Linux builds before problem was traced to SDL2 related. If you are Apple people I point my finger to you. What the heck you are doing to openGL in Mac OS X??

SDL2 is what open source library but their biggest problems (in my opinion) are these: Hey Wiki is nice but have proper Doxygen or something documentation (which should be official), You have Bugzilla but there is no connection (or I just didn’t noticed) how bugs and Mercurial repository communicate each other and where/how you communicate with you users (mailinglists are so 90′ how about posting some news)?

What this leads is people post patches to Bugzilla where they get to nowhere and other one are using them because they solve their problem. This leads in situation where there is unofficial SDL2 libraries that are not compatible with each other. This is normal situation in open source world and SDL2 is under ZLib license so you can do it but what happens when they fix something that was broken to official SDL2 library and you using older one in development that is patched to work?

This is not SDL2 specific thing it’s very common situation with many open source projects (and yes they tend to have limited man power if you like to fix them you can! Learn to communicate with those people like I should with SDL2 people) but in a way SDL2 have deep connection with Valve (They use it in Linux steam client at least) and Steam ain’t small company they should but power behind this or let it go.

At the end remember this ain’t rant against SDL2 or SDL2 developers. They are doing hard work for you getting mostly nothing out of it. Because Eastern is all about pain and unhappiness so this was my contribution to that or no not really people!! Life is too short for sadness so have a lot’s of fun all eastern!

How to organize-start an open source community

March 26th, 2015 by

This is an attempt to make a list of things that someone-group of people can follow to develop a healthy community or team. This post is an overview of what I did with Kostas for the Greek openSUSE community.
A small detail is that we were only 2. So we took decisions fast. We didn’t have to vote or something.
We had an “advantage” because we have an awesome global community and we asked for something we weren’t sure how to proceed.

Let’s start:

0. Have a clear goal. What you want to do. Have a big goal that some parts aren’t “visible” when you start.
1. Web page: This is the web page-blog that will show information about community, the distro or the project. Make it visible on planets. BE CAREFUL. Don’t focus on how to make a great site-blog using personal wordpress, drupal etc. Set it up on blogger and start post articles. You want CONTENT (write an article every other day). Don’t spend time to maintain or secure your web page.
2. Mailing list: Ask the project if they can setup for you. If not, then try to find alternatives such as google groups.
3. IRC Channel
4. Forum: Prefer to ask from the project to setup a section for your language. If your project doesn’t have forum, then ask a LUG or tech forum to use their’s. Do not have your forum setup in your host for the same reasons as before. Don’t spend time to maintain or secure the forum.
Read the rest of this entry »

How to organize your trip, your project’s presence to a conference

March 26th, 2015 by

We saw some ideas about how to organize a release party for your project (we like to party!!!). Another part of marketing is to join conferences to promote your project. I write some thought from my experience. Please, if you have any idea you want to share, be my guest.

1. Read the tech news
Read the news (RSS, social networks, mailing lists). There are many conferences that you can join (some conferences are annual). Unfortunately, the organizers might skip to sent you invitation because you’re either too small project without any marketing section or they forgot you for their reasons. You should contact them and ask them to join as community-project. Most conferences have call for papers period, where you can apply for a presentation.

2. Community Meetings
Now that you made the first contact, you should sent an e-mail to your project mailing list, informing them about the conference and asking for an IRC meeting. At the kick off meeting, someone MUST be the coordinator of everything (the tasks are following). Another thing that should be clear is how many members of the community will join. You have to decide early because you can book your trip and accommodation (if the conference is quite big, there won’t be any rooms available for you). Travel as a team. If you decide early, you can ask for sponsorship, like openSUSE Travel_Support_Program or GNOME Travel sponsorship (GNOME for smaller events).

Read the rest of this entry »

How to organize a release party for a project

March 26th, 2015 by

Part of marketing and organizing a community is the party of the local community to celebrate the new release. From my experience so far, people who join a release party want to have fun. They don’t want to see a presentation of new features of the release etc. We will see the steps to organize a success release party. Please add your opinion, since there are ways to improve.


1. Find a date.
The date of your party should be during a weekend (because it’s easier for people to join, since most people work during the week). Prefer to have your party during the morning. People from outside your city want to join the party and they have to travel to your city and back home. If you discuss with the members of your community about the date, you have to find 2 alternative dates for the party since you have to find the place for the party (see below), so if the owners of the place do not allow you your first date, then use the alternative. A good tool to find common dates is http://www.doodle.com/.

Read the rest of this entry »

Install VAMOX Icons and change your Desktop Environment

March 26th, 2015 by

I was searching to add some awesome icons to GNOME. After a long search, I found out that VAMOX icons rock!!! I liked the 3D nature of them. They come to 3 different versions. Take a look:

1. Vamox MATE
2. Vamox Ceibo
3. Vamox Celeste

I thought why not try to put them to obs? Is it the right tool? I made a research and found some other cool icons there. So I started reading and testing. A lot of errors. Since I’m end user, I thought I’m not going to make it. I better quit. So I deleted everything. The next day, I tried 2-3 times and it worked (the actual error was the name of the unzipped file). I tried it on my computer and it worked fine. Then I added Fedora as another repository and with the help of my friend Tom Tryfonidis, I added Arch Linux. Let’s see the result.


If you like this result, go to vamox mate repository and choose your distro.


If you like this result, go to vamox ceibo repository and choose your distro.

VAMOX Celeste

If you like this result, go to vamox celeste repository and choose your distro.

NOTE: It’s tested on openSUSE (GNOME, XFCE and MATE) and on Arch (GNOME)