Monday, January 5, 2009

Kdm3 in openSUSE 11.1

The KDE3 desktop installation for openSUSE 11.1 installs, by default, kdm4 or the kde display manager from the kde4 desktop.

Anyone who uses kde3 and finds the switch user options for 'start a new session' and 'Lock current and start new session' particularly useful, installing kdm3 will give you these options back.

For getting kdm3 back, install kdebase3-kdm.

sudo zypper in kdebase3-kdm


Then goto YaST2->System->/etc/sysconfig Editor.

In the tree listing on the left, go into Desktop->Display manager->DISPLAYMANAGER and change its setting from 'kdm4' to 'kdm' (Note: Don't use kdm3).

Save the changes (Click OK Button) and reboot. Kdm3 will now be used instead of Kdm4.

And on a side note, just noticed a lot of new visitors coming from tuxmachines.org. Welcome to my blog everyone!

Sunday, January 4, 2009

Kima in openSUSE 11.1

Just realized that openSUSE 11.1 does not have kima packaged in the KDE community repository. Going through the build service repository, it seems that the build fails on suse 11.1 because of a few additional rpm checks which the build service has added.

A little bit of digging into the new checks and a small patch to the spec file and voila! Kima builds successfully for 11.1!

Get your kima from my home project repository here.

YaST Software Management module in openSUSE 11.1

For anyone who does not like automatically closing behavior of YaST Software Management module (or sw_single) in openSUSE 11.1, I have made a modified package (yast2-packager) which does not close automatically. Get it from my build service home project repository here.

I do not like the self closing behavior myself. No other package manager in any distribution does this. Even add/remove programs in Windows does not do this either. In 10.3, YaST used to ask if we want to install more packages or not, using a popup window. But as people find this popup irritating, the developers removed it. But I don't think whoever who wanted this also wanted the module to automatically close either. In terms of the user, I think the user will find both these things irritating: 1) Popups and 2) Windows which abruptly close without warning. A proper design would be where the number of clicks a user has to perform is least without experiencing the two behaviors described above. Now consider three use cases: 1) Popup removed and window closes automatically 2) Popup removed but the module does not quit. 3) Popup present.

For the first case, if a user does not want to do any futher software changes -> 0 clicks, or if YaST is open too, 1 click to close YaST. Let's give an average of 0.5 clicks.
If user want to make software changes -> if YaST is open, click software module (1 click); or go to openSUSE kickoff menu and click 'Install Software' (1 click); or go to openSUSE menu and click YaST, then click Software Management (2 clicks); All these can increase by one click if the user has the traditional KDE menu or the 'open on hover' feature does not work correctly for the buttons in the kickoff menu. Lets give this case an average of 1.25 clicks. (Note that making the user go through the menu again is not good design).

For the second use case, if a user does not want to do any further software changes-> 1 click to close the module, 2 clicks to close both the module and YaST if open. Let's give this one an average of 1.5 clicks.
If user wants to make software changes-> 0 clicks (module is already open).

For the third use case, if a user wants to make any software changes, click yes when popup is displayed (1 click).
If user does not want to make any changes, click no when popup is displayed (1 click).

Now, lets assign a fixed number of clicks (say 1 click each) to both popup and a self-closing window. So the first case will now have 1 click contribution from the abruptly closing window, the second case will have no contribution and the third case will have 1 click contribution from the popup (Here we are not counting the window closing as the user should be expecting the window to close when he says no).

On tabulating and averaging the clicks for the three cases, you can see that the second case has the lowest number of clicks.


Case 1 Case 2 Case 3
No software changes0.51.51
Software changes1.2501
Popups/closing window101
Average0.920.51


Some more observations: If for the first case, we reduce the clicks for 'more software changes' condition to 1, the average no of clicks will be 0.83 which is still larger than 0.5 for the second case. Further, if we reduce the number of clicks for software changes for the first case and then assume that the user gets accustomed to the window closing on its own, then making the contribution from it zero, the average number of clicks then matches the second case.

Some people may argue that they need something to tell them that software installation was successful or not at the end of the installation process. But then, if something does go wrong, the module does pop up more notifications/warnings than needed already!

In any case, I feel that its best to trust the developers to make the appropriate decision. Since openSUSE is open source free software, we can always make our own customized packages. Feel free to use the package in my repository but remember that its at your own risk!

Wednesday, December 31, 2008

Linux and Vista Hibernation problems

Are you experiencing problems hibernating Windows Vista when you have linux installed in a dual boot setting? Does Vista log you out and show you the login/welcome screen when you try to hibernate your computer? The following may be the cause of your problem.

Vista needs the Windows partition to be marked as the active partition in order to hibernate successfully. To do this, you can use cfdisk utility available on most linux distributions. If you want to use Vista to do this, see the update at the end of the post.

For Ubuntu,
sudo apt-get install cfdisk
My openSUSE already had this installed by default. So fire up the terminal/konsole and sudo/su to cfdisk.


Be very careful with this. Do not make changes you do not understand as if you corrupt the partition table, you might lose all your data, along with the OSs. Be sure to backup your important files.


Look at the partitions and change the 'Boot' flag from the linux partition to the Windows partition. Then select 'Write' to change the partition table. cfdisk may give a message that re-reading the partition table failed. This is normal so don't worry about this.

Reboot to Vista and test hibernation.

Cheers!

Update: Much simpler and easier method using Vista, thanks to Marco:
  1. Boot to Vista
  2. Go to Start menu, right click Computer and select Manage to get the Computer Management window.
  3. Select Disk Management under the Storage category. Your partitions will be shown at the right.
  4. Right click on your Vista partition and choose "Mark Partition as Active". Your Vista partition will most probably be an NTFS partition and will be labelled 'C:'
It's that simple! Now why can't we have something like this in YaST2?

A word of caution: If you have grub setup to boot from the boot partition, this method will cause grub to be skipped while booting and Vista will get booted directly. If this happens to you, use a live cd and restore the boot flags for partitions. Set grub to boot from the master boot record to avoid this from happening.

Friday, December 26, 2008

It works! Broadcom Official Wireless driver (wl) with hidden networks!

If you are using the official Broadcom hybrid wireless driver, either manually compiled or downloaded the one available for openSUSE from Packman, here is a quick fix you can try if you are experiencing problems connecting to hidden wireless networks.

I have a Broadcom Corporation BCM4312 802.11b/g.
You can find which one you have using
/sbin/lspci | grep Broadcom

My wireless network uses WPA2 (WPA-PSK) with hidden SSID. My kernel is 2.6.27 and Network Manager 0.7. A description of the bug (or what I think is the bug) follows:

Description of the bug:

After spending long hours going through the source code for Network Manager, wpa_supplicant and the Broadcom driver itself, I have narrowed down the buggy part to the driver. The problem seems to lie in Broadcom's driver. It does not support 'scan_capa'. So to add this support, you can recompile the driver from the source RPM from Packman along with this additional patch.

diff -uNr hybrid-portsrc-x86-32_5_10_27_11/src/wl/sys/wl_iw.c hybrid-portsrc-x86-32_5_10_27_11_new/src/wl/sys/wl_iw.c
--- hybrid-portsrc-x86-32_5_10_27_11/src/wl/sys/wl_iw.c 2008-12-05 14:41:46.000000000 -0500
+++ hybrid-portsrc-x86-32_5_10_27_11_new/src/wl/sys/wl_iw.c 2008-12-26 11:34:11.000000000 -0500
@@ -580,6 +580,7 @@
range->enc_capa |= IW_ENC_CAPA_CIPHER_TKIP;
range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
range->enc_capa |= IW_ENC_CAPA_WPA2;
+ range->scan_capa = IW_SCAN_CAPA_ESSID;
#endif

return 0;

If you are manually compiling, just make the changes specified by the patch i.e. add this line 'range->scan_capa = IW_SCAN_CAPA_ESSID;' to 'src/wl/sys/wl_iw.c' at the specified place.

Network Manager now uses AP_SCAN 1 for the wl driver, as the driver now reports that it supports SSID scans (scan_capa 0x01). This seems to work for me and Network manager now connects easily to my hidden network without failing 10 times before connecting, like it used to do before. In fact, using AP_SCAN 2, the original wl driver should not even have connected but association is successful even though the connection fails. Network manager caches the SSID of the network and recognizes it next time for which then it uses AP_SCAN 1. Hence the driver sometimes connects successfully after a lot of unsuccessful attempts.

Please let me know if this patch works for you. If something is wrong with this patch or if you want to suggest changes or have anything to say, please feel free to leave a comment.

Thursday, December 25, 2008

Change YaST2 Fonts

Don't like the default fonts in YaST2 modules? Here's how to change them. Just use su to get root access and then use 'qtconfig' to change the fonts.


Qt Configuration with openSUSE default settings

I prefer DejaVu fonts with size 10. You can use these or any other fonts you like.

Qt Configuration after changing font and font size

See the difference between the old and new YaST2 modules! Much more better on the eyes, I think you will agree.

YaST2 Software Management Module (Before)

YaST2 Software Management Module (After)

Wednesday, November 19, 2008

The best looking XP theme for linux/gnome ever..

Among all the XP themes for gnome I have seen so far, this theme really looks very close to Windows XP. Plus it’s very easy to install than other themes. Just unpack the theme and run the “InstallXpGnome.sh” file.

Kudos to whoever who made this theme. It must have taken a good amount of work to get the theme and installer properly finished and working.

Although some people might just ask ‘Why?’, themes like this help people who are new to Linux get adjusted to the new user interface easily. This theme makes them feel comfortable since it resembles an environment which they are already used to (namely Windows).

Beware: This theme does not have an uninstaller! You have to do it manually!

Tip: Ubuntu 8.10 (Intrepid Ibex) users have the option of switching to the guest user account rather than their normal account in order to try this theme and see if they like it or not..