22/07/2008

lshw: a pretty useful system analysis tool...

...which is not included in the openSuSE distribution. Get the sources from ezix.org.
Untar, run make, if you want the GUI, run also make gui (cf. the README file).
The lshw command-line tool is in the src subdir, the GUI (gtk-lshw) in src/gui. If you want to use both systemwide, copy lshw to /usr/bin and create a shell script in /usr/bin:
#!/bin/bash
kdesu <location of gtk-lshw>
Make it executable.
There is even a 10.3 rpm here. In case the sources don't compile - it also seems to work OK on 11.0.

Talking of compile bugs - I got a compile error on 11.0 with lshw-B.02.13 (apparenty yet again caused by the switch to GCC 4.3)
abi.cc: In function ‘bool scan_abi(hwNode&)’:
abi.cc:39: error: ‘free’ was not declared in this scope

Just add a #include <cstdlib> statement in <lshw source dir>/src/core/abi.cc.
dev.ezix.org had the solution and also a diff file.

HowTo configure an SSH tunnel via PuTTY

Not really OpenSuSE-related, well somewhat: how to tunnel to a ssh box from a Windows Machine using PuTTY

  1. Start PuTTY
  2. Enter the Host Name or IP address of the machine you want to connect in the appropriate field
  3. Change to Connection --> SSH --> Tunnel
  4. Enter the LOCAL Port Number in "Source Port"
  5. Enter the REMOTE host and port in the form: remotehost.tld:PortNumber in "Destination"
  6. Double Check whether "Local" and "Auto" is marked in the settings
  7. Click "Add"
  8. Something like "L12345 remotehost.tdl:23456" should appear in the "Forwarded Ports" box
  9. Go back to "Session" and save the session in order to keep the settings for the next start of PuTTY
  10. Connect to your machine - the terminal needs to stay open as long as you want to use the SSH-Tunnel
BTW: if you want to start PuTTY from the command line easily, just copy putty.exe into the /Windows/system32/ folder and rename it to ssh.exe, then you can start it by commanding ssh on a console or in the "run" dialog.

When Amarok doesn't play audio CDs…

Amarok 1.x is quite unreliable with audio CDs. Apparently this has to do partly with configuration bugs, so the following tricks might help - or not. Depending on the engine you use, you get different error messages - "No suitable input plugin" (xine) or "could not open cd device for reading" (yauap). On the other hand, Amarok2 does not play audio CDs at all.
BTW, Amarok comes without xine plugin in openSuSE 11.0, so install the amarok-xine package to use the engine.
Possible solutions:

21/07/2008

OpenSuSE 11, kdesu and sudo ;-)

Hardly more than a quick comment to daWuzzzz's last post:
Note that in 11.0 they switched from sudo to su behind kdesu. Starting YaST or KControl, you will still be prompted for the root password, even if you are a sudoer. Ben Kevan's blog has some recipe for that.
E.g. for KDE3, edit ~/.kde/share/config/kdesurc (or create that file).
[Passwords]
Keep=false

[super-user-command]
super-user-command=sudo
For KDE4, take the ~/.kde4/... equivalent (did it only on KDE3 myself). Of course, you can also switch kdesu to su on openSuSE 10.3 with the same method.

OpenSuSE 11 and Sudo

Just to let you know again: in order to add a user to the sudoers, adding the user to the group "trusted" and configuring it in the Yast Module Sudo is NOT sufficient. What avocadohead has already pointed out in this article posted in this blog is valid as well for OpenSUSE 11, i.e. manually configuring the /etc/sudoers file and commenting out the lines indicated in the commented file.

18/07/2008

ATI, OpenSuSE 11 and Compiz

Apparently the drivers in the openSuSE ATI repo are recent enough to support a reasonable AIGLX/Compiz performance, so no fiddling with the xorg.conf any more, just install the drivers and run sax2.
Compiz can replace KDM at startup: Control Centre -> KDE Components -> Session Manager. Here, you have a choice of window managers. "Compiz" will only work if compiz runs on your systems without extra options (e.g. --no-libg-fallback), which usually isn't the case. I prefer the "Compiz custom" option. To make that work, create a file "compiz-kde-launcher" in /usr/bin/, ~/bin or wherever your system can find it:
#!/bin/bash
sleep 3
wait
compiz --replace --no-libgl-fallback --ignore-desktop-hints ccp & #or whatever options work for you
sleep 1
emerald --replace &
exit 0

The sleep and wait statements are there to ensure that tray apps etc. have enough time to start up and emerald doesn't fire up before compiz is ready. Feel free to remove/change them.
Make the script executable:
# chmod a+x /usr/bin/compiz-kde-launcher
That's it.

Compiz and desktop shortcuts

One slightly annoying thing about Compiz is that it grabs control of some global shortcuts - I heavily depend on Katapult (default Alt+Space), the run dialog (Alt+F2) and the occasional XKill (Strg+Alt+Esc).
Fix:
1) Go to CCSM->General Options->Commands tab
2) Under "Commands", you can define up to 12 entries.
Katapult:katapult
Run dialog:dcop kdesktop KDesktopIface popupExecuteCommand
XKill:xkill
3) Associate any keyboard shortcuts you want under "Key bindings". If there is a conflict, compiz will notify you. Compiz had already set Run dialog for Alt+F2 before, but for some reason the shortcut didn't work this time. Also shortcuts containing Esc will not work, you have to choose a different one for XKill.

Global shortcut conflicts (Amarok example, most KDE programs work analogously):
Amarok shortcuts seem to be generally window-manager-independent, however, conflicts are resolved in favour of compiz. This usually affects Win (Super) + C (Enhanced Zoom/Group and Tab Windows) and Win + Z (Put Windows).
The easiest way is to change your Amarok shortcuts: Amarok->Settings->Configure Global Shortcuts…
If you want to keep the Amarok shortcuts and to know exactly which compiz plugin is blocking your shortcut, do a grep (found here) in /etc/gconf/schemas:
grep -A 2 '&lt;Super&gt;c' /etc/gconf/schemas/*.schemas
(XML file, so use HTML string notation. Example for <Super>C, adapt if necessary). Either change the shortcut directly in the affected .schemas file (check whether the plugin is active), or use the CCSM GUI.

KDE 4
Global shortcuts are managed in the Personal Settings manager (Keyboard & Mouse) for all KDE4 applications.

09/07/2008

X(anthippe)-Files Part 2: The "Clean" Install

First little joyful fact: SuSE 11.0 replaced the Ubuntu and not the SuSE 10.3 GRUB; took me a while to realise that, and a GRUB crashing at stage 1.5 or failing to read the system partition is not a pretty thing. Also, even the working version completely ignores the Windoze and Ubuntu installs. Still, one can fix that.

Secondly: SuSE boots, X doesn't start. At least I had a root shell and a network connection. xorg.conf had no mention of AIGLX options, so I started the console yast (old and staunch friend), added the ATI repositories, did an update, installed the fglrx driver and ran sax2. rcxdm restart resulted in a graphical login screen. Phew!

Thirdly: no users. I could have sworn I imported the old ones during installation. I logged in as root, created the users again in yast and gave them their old home directories, which remained unchanged, thank God.

Maybe it's Xanthippe, the little bitch, and her ATI Radeon X1300, or I was just extremely tired and stupid during install, but this could really have gone more smoothly (cf. Persephone).