Home Home > Desktop
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Archive for the ‘Desktop’ Category

small Qt based mail biff

September 8th, 2008 by

Some days ago I was asked what this little button bar on my desktop is and I explained that it’s only a small program I wrote to keep track on my mail folders. I know there are many many programs out there which already does the same but for some reason he liked it and encouraged me to blog about it 🙂

qbiff runs as a server client application and is able to manage mails stored in the maildir format. The server should run on the machine which locally stores the data and the client or multiple of them can run on the desktop you have an eye on. The connection(s) between the server and the client(s) are SSL connections, even though there is no mailcontent which is transfered the information how many mails, how many new ones and what mail folders exists might be an information not everybody needs to know about… so I chose a secure connection 😉

If the file .qbiffrc exists the user can control which mail folders should be checked, if the file doesn’t exist all folders the server finds at start up will be used. Each folder is represented by a button. Whenever a new mail arrives the button changes its color and notifies the user with a tip window about the current mail situation of this folder. A click on the button runs a user defined program whereas the first parameter is the path and name of the folder. In my setup I call mutt respectively to read the mail in the folder

So it looks basically like this…

Packages can be found in my home Project at:

  • http://download.opensuse.org/repositories/home:/sax2
  1. Install the package qbiffd on your server
  2. Install the package qbiff on your client, server and client could be the same machine
  3. Edit the file /etc/sysconfig/qbiff on the server and setup at least the  QBIFF_USER which should be the same user the mails belong to and the QBIFF_FOLDER which is the base directory of your mails
  4. Run the server by calling rcqbiffd start
  5. Run the client by calling qbiff-client. The default password for the SSL certificates is “linux
  6. click on a folder button and read the note about how to setup a personal mail reader script

If you want to create your own certificates you need to check out the code at

  • svn co https://svn.berlios.de/svnroot/repos/qbiff/qbiff-head .

and run the following commands:

  1. cd cert-server && make distclean && make
  2. cd ../cert-client && make distclean && make
  3. cd ..
  4. ./.certinstall on the server and the client

HOW TO: Remove the annoying KDE error “kio_media_mounthelper” when unmounting usb device

September 6th, 2008 by

With KDE3 and with some usb sticks or drives, could happen that if you try to safely remove them, with the classic right click –> safely remove, you’ll get an error from kio_media_mounthelper.

The error say that: The device was correctly unmounted but couldn’t be ejected

This is only a really annoying warn because the media has been unmounted so we can safely remove it, but how can we remove that?

I found the fix on Mandriva bugzilla (bug #39762)

The solution is really easy, is infact enought download that script (kdeeject)

Once the script has been downloaded do the following as root:

chmod +x kdeeject
mv kdeeject /opt/kde3/bin/kdeeject

now we will get that warn no more!

Just for knowledge, that script ask to hal if the device could be ejected, if not the media is only unmounted, if yes it is ejected too.

I hopes that to be usefull for lots.

Andrea 😉

Google Chrome on openSUSE

September 4th, 2008 by

As I guess everyone notice, Google has released their own Browser called Chrome. Based on Webkit (based on KHTML of KDE fame) it is a small, fast and foremost secure webbrowser. And if you are reading this, you likely know that it does not work on Linux, but only on Windows.

But wait … we have the Windows Emulator Wine and I am one of its developers…

This also explains the first comment from a colleague on Wednesday morning was: “Why don’t you have fixed Wine to run it yet?!?” We tried together to get the online installer to run, but not successful.

Over night however some other folks found out how to do it by using the offline installer.

So how to install Chrome:

1. Get the Wine 1.1.3 from the openSUSE buildservice Emulators:Wine repository.

Its available via the Community Repositories Module in YAST2 on openSUSE 10.3 and 11.0,
after adding this repository upgrade the wine package.

This piece of code run as root will do it on openSUSE 11.0:
zypper sa http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_11.0/ Wine
zypper in wine

All other steps are done as desktop user from a regular shell.

2. Download the Chrome Offline Installer

wget http://gpdl.google.com/chrome/install/149.27/chrome_installer.exe

3. Install richedit native libraries.

While Wine contains richedit libraries they are not yet up to the task to help Chrome yet.
(This is likely to be fixed soon.)

To install them run:
winetricks riched20 riched30

3. Run Chrome Installer

wine chrome_installer.exe

This will popup a dialog where you can press return until Chrome itself starts.

Since we need to supply Chrome with some Options to make it work with current Wine, you need
to close it again. Click anyway any crash messageboxes.

4. Run Chrome itself

We need to supply Chrome with some additional commandline options to make it run with Wine,
so we need to do start it by hand (instead of clicking on the convenient Desktop Icon already there).

cd ~/.wine/drive_c/windows/profiles/*/*/*/Google/Chrome/Application
wine chrome.exe --new-http --in-process-plugins

5. Surf!

And of course the obligatory screenshot:chrome wine opensuse

Most of the funny workarounds above will actually vanish in the next Wine releases, now that the Wine developers can actively debug it.

The WineHQ Application database entry has the ongoing discussion of getting it to work and links to the Wine bugzilla entries.

Enlightenment

August 31st, 2008 by

Glad to announce the release of Enlightenment LiveCD based on OpenSUSE-11.0.

Download page
‘Welcome’ notes (PDF)
Direct link to the .iso image

Login details:

User: linux
Pass: soad

User: root
Pass: soad

A lot of people helped me to manage this. THANK YOU VERY MUCH! My deepest apologizes that I can’t mention all of you by name. But I’ll try to make it ‘in general’:

Enlightenment Development Team and Enlightenment Community
OpenSUSE Build Service Team
OpenSUSE KIWI Team (schaefi, cyberorg, pzb, cgoncalves – THANKS!)
Stalwart, thanks for the hosting!
Packman Team
Novell
Dear engineers and developers, THANKS! Using SuSE since 8.2 (Pro) Decided to contribute not so long ago…

It’s the result of my modest efforts. Hope you like it.

Regards,
sda

OpenOffice_org 3.0.0.2 available

August 29th, 2008 by

I’m happy to announce that OpenOffice.org 3.0.0.2 beta packages are available in the Build Service OpenOffice:org:UNSTABLE project.

IMPORTANT: We highly encourage anybody using the previous build 3.0.0.1 to update. It included a serious problem with saving formulas, see the bug #420314.

The package is still a beta version and might include even serious bugs. Therefore it is not intended for data-critical usage. A good practice is to archive any important data before an use, …

We kindly ask any interested beta testers to try the package and report bugs.

(more…)

Button Order in YaST: Trying to Make Peace with Both Worlds

August 28th, 2008 by

KDE and GNOME have different button orders. Like many desktop-related issues, this has been a subject of heated debates time and time again.

Where KDE uses something like this:

GNOME would use something like this:

Which one is right? Which one is wrong? There is no real answer to that; it will always be more a religious debate rather than an objective discussion.

YaST Button Order

So, which button order to choose for YaST?

For historical reasons, we used the KDE button order. But this has repeatedly started the same heated discussions as for KDE vs. GNOME, with the same results — which is, no tangible result, only something along the lines of “because we says so” (and didn’t you always hate it as a kid when mom or dad said that?).

YaST should not favour one of the major desktops over another. YaST should work well for all users. So, YaST should adapt to the environment it runs in.

YaST comes in different flavours. There is the graphical version: The YaST Qt UI (user interface) engine (Side note: The YaST Qt UI is not in any way KDE specific; Qt just happens to be a great toolkit for making graphical user interfaces, and KDE happens to use it, too. There is not one single line of KDE-specific code in the YaST Qt UI.).

There is also the text-based version, the YaST NCurses UI.

As an alternative graphical UI, there is also the YaST Gtk UI which uses the same widget toolkit (Gtk) as GNOME. That brings YaST closer to the GNOME crowd. At least, that’s the theory. Yet, that alone didn’t improve the situation in any way for this button order issue:

YaST dialogs are specified in a subset of the YaST-specific YCP scripting language. Those dialog descriptions include input fields, list boxes, headings, etc. as well as the logical arrangement of all those user interface elements (widgets, even though that term has seen a lot of misuse recently). And buttons, too, of course.

So, the arrangement of buttons was still fixed. The YaST Gtk UI couldn’t really do anything about changing that button order so it looked more GNOMEish.

This is now different. We introduced a new widget ButtonBox that abstracts exactly that. A YaST module developer now only specifies “there is a ButtonBox, this is where I put my buttons, and the ButtonBox will arrange them as appropriate”.

…for users…

So now it is possible for the first time to use the proper button order for each environment: GNOME button order for the Gtk UI, KDE button order for the Qt UI.

But there is more.

…for power users…

The Qt UI can now demonstrate the fact that it’s not KDE specific. It checks what environment it runs in and uses the appropriate button order: GNOME button order when running in GNOME and KDE button order for KDE (or other window managers).

It checks the $DESKTOP_SESSION and $WINDOWMANAGER environment variables to figure that out. But of course power users can still override that and set the $Y2_BUTTON_ORDER environment variable to “KDE” or “GNOME”.

…for YaST developers…

Of course, such a change doesn’t come over night. There is a very large amount of YaST code. I counted 69 .desktop files in my /usr/share/applications/YaST2 directory; that corresponds to 69 YaST modules. On my machine I have 432000+ lines of YCP code below /usr/share/YaST2 . Now try to figure out how many YaST dialogs that might be, and how many of them need to be converted to use that new ButtonBox mechanism.

Obviously, it’s a lot of stuff to change. So the change should not hurt the people doing the change more than it absolutely has to. Don’t forget, it’s not just working hours that have to be paid; it’s also working hours that can’t be spent on implementing other features or on fixing bugs. And any change (even more so changing code at so many places) means a possibility to introduce new bugs.

…trying to be smart…

So this ButtonBox mechanism was made to be smart, to re-use existing information (things that are already there in the code), to make good use of existing conventions.

In principle, using something like the ButtonBox means having to tell it which logical role each button has so it can be arranged according to the current button order’s conventions: Which button is the positive confirmation of a dialog (it might be “OK” or “Continue” or “Yes”, but it might also be someting like “Save” or “Print”), which one is the “safe escape” (“Cancel”, but sometimes also “No”), which one is the “Apply” button or the “Help” button, and which ones are just “other” buttons. Remember, YaST is being translated into some dozen languages, so just hard-coding the English button labels won’t do.

But we already have a mechanism that maps (translated!) button labels to function keys, and that mechanism does something similar: There is a list of commonly used button labels and what function key is to be used (in the NCurses UI) for them. For example, “OK”, “Continue”, “Yes”, “Next” all map to the F10 key, “Cancel” to F9, “Help” to F1.

Extending that thought some more, it makes sense to assume an “okButton” role for buttons that are otherwise assigned the F10 key, “cancelButton” for buttons that get the F9 key, etc.

Buttons in YCP each are assigned a widget ID. That ID is the “handle” by which a button is being referenced; this is what the YCP application receives when it is informed that the user clicked that key. When specifiying a layout with buttons, this looks (slightly simplified) like this:

UI::OpenDialog( 
    `VBox(
         `InputField(`id(`name  ), "Name" ),
         `InputField(`id(`street), "Street" ),
         ...
         `HBox(
               `PushButton(`id(`ok    ), "OK" ),
               `PushButton(`id(`apply ), "Apply" ),
               `PushButton(`id(`cancel), "Cancel" )
               )
         )
);

As shown in this example, a button with the “OK” role typically has an ID like `id(`ok), a “Cancel” button has `id(`cancel), an “Apply” button has `id(`apply). So this information is used, too, to figure out what role a button has.

Of course, there are still situations where the system needs to be explicitly told what button has which role: It’s hard to figure out in a generic way that a “Print” button or a “Save” button has the “okButton” role in a dialog. In that case, the YCP developer has to change the code to look like this:

`PushButton(`id(`print), `opt(`okButton), "Print" )

…the normal case…

But in many cases, the migration is as simple as replacing the `HBox() (the horizontal layout box) holding the buttons with `ButtonBox():

UI::OpenDialog( 
    `VBox(
         `InputField(`id(`name  ), "Name" ),
         `InputField(`id(`street), "Street" ),
         ...
         `ButtonBox(        // This is the only line that changed
               `PushButton(`id(`ok    ), "OK" ),
               `PushButton(`id(`apply ), "Apply" ),
               `PushButton(`id(`cancel), "Cancel" )
               )
         )
);

…taming the masses…

Just imagine doing only this little change in 432000+ lines of code – of course, only where such a `HBox() contains `PushButtons, not just blindly replacing all `HBoxes. And just changing it is not all there is to it; each dialog has to be tested, too. And that alone is not so trivial: A dialog might easily only be shown in very exotic cases, so the developers doing the test have to recreate each of those exotic cases just to see the dialog.

You see, masses of code are a dimension of complexity all of their own. Little things that look trivial to do gain a whole new meaning. Everybody can do this change in one or two places, but try to do it in someting as big as YaST — without introducing new bugs that would wreck other people’s system.

Yet, we do those kinds of changes, typically unnoticed by the user community. And those little things are what, if added up, make or break a system’s quality.

We don’t take such decisions lightly. But we felt that in this specific case (the button order) the gain would be worth the pain: Users should feel at home in the tools we provide. And having the buttons where you are used to is part of this feeling at home.

Further Reading

http://en.opensuse.org/YaST/Development/Misc/Button_Order

Akademy 2008

August 12th, 2008 by

In Sint-Katelijne-Waver, Belgium currently Akademy, the annual conference of the KDE project takes place. More than 300 people had a nice weekend listening to a whole bunch of very interesting talks of various topics around KDE. Over the week there will be special topics and BOFs and Hacking 🙂

While most of the topics were technically or very much related to KDE such as talks in the community track, on sunday there was a keynote from Cliff Schmidt from literacybridge.org with the title Digital Audio to Reduce Illiteracy, Poverty and Disease. Danny has already blogged about it. It was a real mind opener that a lot of our efforts are useless to people who simply can not read. Cliff and the literacybridge project has a deep insight of how that can be improved. It was a real impressing talk and hope that the success for that project continues. Please check the project out.

On monday we had the general assembly of the KDE e.V. where Cornelius and Aaron Seigo were reelected into the board of the KDE e.V. Furthermore it was decided about a Community Code of Conduct for KDE that gives some hints how to behave in our community which seems to be needed these days and some other interesting and important stuff.

Today there is the “Embedded and Mobile Day” on Akademy which started with a talk around the Maemo platform where now Qt4 is available and everybody is invited to port interesting (KDE)  applications to it. Nokia was nice enough to give lots of N810 devices to KDE developers. Very motivating 🙂

openSUSE is also very present on Akademy, not only as a sponsor. Coincidentially most of the conference speakers were standing very near to the openSUSE poster and as a result it was very prominent, but more important is that openSUSE is running on many desktops I saw…  Some people approached me and mentioned things like openSUSE 11.0 is really cool, KDE 4.1 is most easily installable with one-click-install, zypper rocks and other cool things. Nice.

Akademy is great and I enjoy some hacking on Kraft now 🙂

Trick of the Day: Reboot as User

July 18th, 2008 by
$ 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.

Meeting By The Pond

July 16th, 2008 by

It’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:

http://www.timeanddate.com/worldclock/fixedtime.html?day=17&month=07&year=2008&hour=16&min=0&sec=0&p1=0

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.

Extract and Compress Right Click Menu on KDE4

July 12th, 2008 by

One of the functional menu that make my life more easier with KDE 3 are the Compress and Extract Menu. With this function, I could make an archive or extract zip file with Konqueror without opening Ark for manually extract or compress the file. Now, I enjoy the KDE 4 on openSUSE 11.0, with Kwin desktop effect and a lot improvement in various area, but I still missing the above menu.

How to add the similar function to KDE 4 so we could compress some file or folder, or extract a zip file both in Dolphin and Konqueror ? Here is the tips :

  1. Download the plugin here :
    http://www.kde-apps.org/content/download.php?content=84206&id=1&tan=96989998
  2. Open konsole / terminal
  3. Extract the plugin
  4. Go to the extract folder
  5. Copy all of .desktop file into /usr/share/kde4/services/ServiceMenus
  6. Copy the content of script folder into /usr/bin
  7. Test with dolphin or kde4

Compress and Extract

The above tips will make a system wide configuration. If you wish to make a local changes, just execute INSTALL_1.0.sh on the extract folder.

NOTE : The programs p7zip, bunzip2, bzip2, gzip, rar, unrar, tar, zip and unzip must be installed.

I don’t know if the function will be added into KDE 4.1 by default, but I hope so 😉