Fluxbox feature request: NextWindow cycles through iconified windows as well

That’s one of the few things fluxbox is missing…NextWindow (usually alt+tab) does not cycle through iconified windows. It should at least “hightlight” them while they are on the iconbar and be able to raise them back to normal if you want somehow.

Please support this request here:

NextWindow: Include Iconified Option

Changing resolution to a TFT monitor connected with DVI

I had a slight problem with my new TFT monitor (LG L1970H-BF). When connected with a DVI cable I couldn’t get refresh rates of more than 60Hz. The monitor specifically says that it support up to 1280×1024@75Hz. But my xorg.conf refused to work, the resolution was stuck on 1280×1024 @ 60Hz…that’s what the monitor showed whatever I tweaked in xorg.conf.

Then I found this very very usefull utility: gtf. What this does small utility does is create proper Modelines for your xorg.conf because DDC is sometimes problematic in it’s automatic mode detection. This utility though managed to create a perfect modeline for my monitor.

Now with this line:

Modeline "1280x1024_75.00" 138.54 1280 1368 1504 1728 1024 1025 1028 1069 -HSync +Vsync

I have the resolution that I want. Me and my monitor are a lot happier now 🙂

Btw, the following lines might be helpfull too for some others:

Option "NoDDC" "1"
Option "IgnoreEDID" "on"
Option "MergedFB" "off"

Cheers 🙂

Popup of current song playing in xmms

I am a regular user of xmms. I like it because the interface is so simple, because it has tons of plugins for almost anything one can imagine, and because you can control it from the command line.

What I wanted to do was make it able to display the current song on the screen, but only when I want it to. I know there’s an xosd plugin that can display various information on the screen, but it does it every time the song changes. I want that to appear only when I press some key combination.

So I started checking out what I could do. I ended up with gtkdialog, which is a very nice and VERY easy to use programmable interface for displaying custom gtkwindows. It was a matter of 1 minute to create a simple popup with a simple Label and an “OK” button to clear the popup.
Then I needed a program to be able to manipulate and display info about current song in xmms. That was xmmsctrl.

Now time to combine them together with a simple bash script named gtk-xmms-title:


#! /bin/bash
TITLE=`xmmsctrl print "%T (%m of %M)%n"`
export MAIN_DIALOG='
<vbox>
<text>
<label>'$TITLE' </label>
</text>
<hbox>
<button ok></button>
</hbox>
'
gtkdialog --program MAIN_DIALOG

Then I made the script executable and moved it to /usr/bin/. The final touch was to add a keyboard shortcut to my .fluxbox/keys


Mod1 F12 :ExecCommand gtk-xmms-title

Activating Mail/Home/Search buttons in fluxbox

I am an owner of a Microsoft Basic Keyboard Black. Yes, I know it’s not the best…but it’s pretty ok for it’s money. As soon as I find some decent amount of money I am going to get this beauty: Cherry CyMotion Master Linux 🙂

Anyway…as you can see my MS keyboard has three buttons in the top…Mail, Web/Home and Search. I was looking forward to using them in linux too, so I started searching. Gentoo Wiki was again the source for what I was looking…
So check this out: http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys

After setting up .xmodmap, it was time to make fluxbox use them. And here’s my part of .fluxboys/keys referring to those 3 “new” keys.


None XF86Mail :ExecCommand mrxvt --loginShell
None XF86HomePage :ExecCommand /usr/bin/firefox -P test
None XF86Search :ExecCommand nedit
Mod4 XF86Mail :ExecCommand xmms --rew
Mod4 XF86HomePage :ExecCommand xmms --play-pause
Mod4 XF86Search :ExecCommand xmms --fwd
Mod1 XF86Mail :ExecCommand amixer sset PCM 2-
Mod1 XF86HomePage :ExecCommand amixer sset "Audigy Analog/Digital Output Jack" toggle
Mod1 XF86Search :ExecCommand amixer sset PCM 2+

I am now able to lauch applications, jump forward and backward tunes in xmms and control the volume of my Audigy2.
Unfortunately I couldn’t find a switch to mute Audigy2 and the only “hack”I cound find was to toggle the digital output switch. Since I don’t have digital and analog output together, if I change the switch the sound get muted.

Have fun with your keys 🙂

my experience with the rule-project.org

Rule-Project is about running current linux distributions on old machines. I was invited to this excellent project by the current president of HELLUG, mr Richard Kweskin.

Using the old laptop I blogged sometime ago about using it for some wireless networking, mr Richard started the installation of Fedora Core 5 using the special script that the rule-project distributes. Using the normal installer of fedora, the installation aborted immediately by the system notifying me of not having more than 128Mb of RAM. The slinky script of the rule project though was able to finish the installation and provide me a console. Then came most difficult part. Setting up X windows. Rule-project uses kdrive in replacement for X.org. Kdrive is a set of lightweight X servers with minimal set of features that are pretty fast and are not taking up a lot of RAM.

I am now very happy to have finished setting up kdrive with blackbox window manager. I provide you some pictures of the ancient laptop running Fedora Core 5 with kdrive 🙂

enjoy!

Acrobat Reader Enterpise in Gentoo, bye bye Yahoo toolbar

Following a post found on Digg about downloading the Enterprise version of Acrobat Reader I decided to install that on my Gentoo box.

First step was to download the tar.gz Linux version of Acrobat Reader Enterprise edition. Then extract it someplace. You will also need to extract the 2 new tars inside that directory as well. Now login as root (su -, probably) and make a backup of your old /opt/Acrobat7. Now go to the directory where you had the previous tars extracted and find a directory called Reader. Replace all files inside /opt/Acrobat7/Reader with the new ones. Do the same with the /opt/Acrobat7/Resource dir as well.

Now, if you don’t have openldap support in your box, go to /opt/Acrobat7/Reader/intellinux/plug_ins dir and do a chmod -x PPKLite.api. That will save you from an error message when acroread starts.

That’s it. Say bye bye to Yahoo Toolbar…

I am not responsible if following what I say here makes you do illegal stuff , violate Licenses or burn down your linux box.

broken rox-filler in gentoo with gtk+ 2.8.12

Rox-filler is an excellent(for me) file manager that I use under my favorite wm…fluxbox (of course).

The latest emerge world broke my rox-filler. Rox-filler 2.2.0 has a known bug that makes it crash with gtk+ versions 2.8.11, 2.8.12, etc. Until now I had gtk+ 2.8.8 version and the latest emerge world updated it to 2.8.12 which had became “stable” in portage. Unfortunately rox-base/rox inside portage is not up to date with the latest rox-filler version (2.4.X) that fixes the bug…so it just crashes.
There is an open bug about it inside gentoo’s bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=123675

For now I downgraded gtk+ to 2.8.8. I might create a custom ebuild for the latest rox-filler, as someone in bugzilla says, to circumvent the problem..but I am not really fond of that solution. I’d prefer if the rox-base/rox maintainer created a new ebuild….. sooner or later.

who said wireless networking in linux is hard ?

I had for over 2 months a friend’s left over laptop at my house. It’s an old amd K6 333Mhz with 64Mb RAM. Useless ? maybe yes maybe not…I just wanted to see what I coulld do with it…

I’ve booted it with DSL and I had a nice desktop to work on…now what ? A few days ago I had started preparing a new linux based access point for our local wireless network in the city I study. It had 2 Winstron CM9 802.11a/b/g cards and one netgear MA311 802.11.b card. I also happen to have an orinoco gold 802.11a/b/g pcmcia card I was given some time ago as a gift (even though I don’t own a laptop, yet). So why not mess with these two ? I plugged in the pcmcia in the laptop and it was instantly recognized. Then I just added through ifconfig the IP that I wanted the wireless card to have…and wow! I was associated instantly with the remote linux based AP in the next room. That was easy 🙂 It’s probably a good time now to install dhcp to that AP too so I won’t even need to add an IP manually 🙂

So all I had to do was give an IP…no drivers…nothing. The card was automatically recognized, and here’s the lsmod part about it:

root@ttyp0[root]# lsmod | grep ath
ath_pci 31508 1
wlan 48520 1 [ath_pci]
ath_hal 111792 1 [ath_pci]

By the way…this card is NOT recognized in windows XP without drivers. And if you happen to forgot the drivers cd while travelling…you are probably doomed.

Good job linux people 🙂

USB Corsair Flash Voyager and udev rules

I had some problems making my new Corsair Flash Voyager 1Gb work under udev. Until now I used the SYSFS{serial}= part from udevinfo to distinguish my usb devices. Corsair Flash Voyager doesn’t have one. So I put the following line in /etc/udev/rules.d/10-local.rules to make it work:


KERNEL="sd*", SYSFS{vendor}="Corsair", SYSFS{model}="Flash*Voyager*", NAME{all_partitions}="corsair%n", GROUP="disk"

The first partition of the usb stick is now recognized as /dev/corsair1, and if I had more they would be named /dev/corsair2, /dev/corsair3, etc

Disk cataloging on linux

We all have nowdays pile of cds and dvds with thousands of files inside. The big problem is…you know that you have the files somewhere…but where ? In which cd/dvd ?
A solution to this is a cataloging application like Disksearch. It is very simple, has an easy to use gui, it’s written in python and can be used in both Linux and Windows. It even has regular expression support for searching files.
I’m giving it a try and I hope it won’t let me down.

Just a thought:
sqlite support wouldn’t be bad, it’s sometimes more usefull to have an sql database than a simple index text file…but then you might lose compatibility with windows. A patch could be handy though. Any programmers to look into it ? 🙂

intracom netroute, asterisk and sipdiscount

I own a netroute2 and I have an asterisk at home to serve me as a pbx. I use it primarily for testing, and I only have a working sipdiscount trunk on it so far. What I wanted to do was plug a normal phone on the netroute and set it up so that I can call land lines in Greece for free through asterisk, using a sip trunk with sipdiscount.

  • Asterisk configuration
  • add to your /etc/asterisk/sip.conf

    [sipdiscount]
    type=peer
    host=sip1.sipdiscount.com
    dtmfmode=inband
    ;allow-g726
    canreinvite=no
    fromdomain=stun.sipdiscount.com
    username=USERNAME
    fromuser=USERNAME
    secret=PASSWORD
    ;qualify=yes
    [5000]
    ; netroute
    type=friend
    regexten=5000
    callerid="netroute2" <5000>
    host=dynamic ; This device needs to register
    secret=PASSWORD
    allow=ulaw
    allow=alaw

    add to your /etc/asterisk/extensions.conf

    exten => 5000,1,Dial(SIP/5000,30,rm)
    exten => _7.,1,Dial(SIP/${EXTEN:1}@sipdiscount,30,rm)
    exten => _7.,2,Congestion
    exten => _7.,3,Busy

  • Netroute Configuration
  • Netroute is more complicated than asterisk. Why ? because there is no documentation at all. So it’s a trial and error kind of thing. My current working solution IS very very crude and NOT thoroughly tested.

    Edit your /etc/call_route.conf and comment out the line that says:
    plugin load gr

    Also, make sure your last lines of this file look like these:
    # default routes
    route_pattern add default/@ gr filt_last rl_rg_sip0
    # note: default route is required
    route_pattern add default/! default filt_last rl_rg_sip0

    Now go to the web interface of netroute and in the voip section add asterisk’s sip domain/realm and IP settings and the settings you entered in the section [5000] of asterisk’s sip.conf. You might even want to lower the registration interval, if netroute and asterisk is in the same lan the extra traffic is insignificant. Then go to dialplan configuration and click on “+Add pattern”. In the Pattern field add 7X and don’t tick any of the other boxes. In the Prefix field just add 7.
    When finished, do a
    /etc/init.d/checkpoint
    /etc/init.d/rc-voip restart

    Now pick up a handset plugged into the first netroute’s FXS port and dial a string such as: 700302101234567
    7 in the beggining is used by asterisk to send the call to sipdiscount trunk and 0030 is used by sipdiscount to call Greece. So in order to call 2101234567 we need to dial 700302101234567 from the netroute.
    If you just want to dial Greek land line though sipdiscount change

    exten => _7.,1,Dial(SIP/${EXTEN:1}@sipdiscount,30,rm)

    with

    exten => _7.,1,Dial(SIP/0030${EXTEN:1}@sipdiscount,30,rm)

    Then you would only need to call 72101234567 from netroute.

    Check asterisk’s log file for errors. A successful call should look like this:
    Executing Dial("SIP/5000-49ab", "SIP/00302101234567@sipdiscount|30|rm") in new stack

    🙂

    Debian vs Gentoo

    Before I begin let me state my opinion. I am a big fan of Gentoo. I have installed gentoo more times and in more machines than I had installed win98 🙂

    I am currently making an effort, oh and I mean it..it IS a effort, to install and configure a debian system. I want to use primarily as an Access Point/Client with 3 wireless cards. Sounds hard ? maybe…but debian makes it harder.
    First of all…the damn development branches. Debian has stable, testing and unstable branches. I understand what stable is…but why should a decent distro have more than one branches in testing mode? The packages in stable branch are older than my grandmother. So most people actually use…the testing branch, and everyone on the net says it is “stable” enough to use it. So it’s more like debian has the stable-old-like-my-grandma, the testing-people-say-I-am-stable-enough and the unstable-don’t-use-me-I-will-crash your box branches. Gentoo just gives you arch and ~arch. Stable and unstable. Nice and easy.
    Next…aptitude interface sucks. It just sucks. It so not user friendly…you actually get lost if you don’t learn all the keyboard shortcuts by heart. Yes, Gentoo’s emerge is a bit complicated too, but at least it is sane enough not to provide a crappy ncurses based gui. It’s better to stay command line only than having an awful gui. Maybe when you only have a few packages to update it might be a bit easier to distinguish what’s going on…but having more than 20-30 packages to update, like when you have just finished a fresh install and want to update,then it’s more like a killer task. It’s almost impossible to identify a blocking package unless you know the keyboard shortcuts. But then again…if you are experienced enough…why do you need a gui since everyone knows tasks made by guis are done slower ? Aptitude’s ncurses gui needs a drastic redesign if it ever wants to become user friendly and not a tool for the lazy admins that are just fond of blue and purple colors.
    What I liked ? Updates did not hurt any of my conf files, yet. That’s where gentoo sucks. etc-update really really really sucks. dispatch-conf is a lot better…but it could have been a bit more optimized, especially when it replaces just headers and comments from files.

    Answers to questions never asked

    Question #1: My windows XP system suddenly throws a “When trying to update a password the return status indicates that the value provided as the current password is not correct” error message…what do I do ?
    Answer: Did you not format your windows installation this week ? Well, now you certainly have to.

    Question #2: What is the safest way to change the boot partition from a windows xp installation cd ?
    Answer: You just boot with a linux live cd and change it using fdisk/cfdisk. It can probably be done with DOS fdisk ..using the recovery console. But…do you trust it ?

    Question #3: I can’t get bwbar to compile, I keep getting errors about png functions like
    undefined reference to `png_create_info_struct' , undefined reference to `png_init_io', etc

    Answer: Make sure you have installed libpng. Then open the Makefile with a text editor and change the line LIBS = -lz with this: LIBS = -lz -lpng -lm. Don’t ask my why -lpng never gets inside the Makefile using the configure script. It just doesn’t.

    Google to offer e-mail hosting services ?

    Well it looks like google is going to offer massive storage for e-mail accounts on any domain… just check this page: https://www.google.com/hosted/Home

    Very interesting, and simple…you probably just need to change the MX record of your domain to a server IP that they will send you.

    If only the interface was a bit better…if it had encryption support…if … if…if they could be trusted not to make your e-mails searchable in public one day in the future…

    Open Source has not many uses

    That’s what the Greek Minister of Economics said. If don’t believe me…well you can read what was said in the Greek Parliament discussing the deal between the Greek Government and Microsoft.

    Quote from: http://www.parliament.gr/ergasies/showfile.asp?file=syne060209.txt

    ΓΕΩΡΓΙΟΣ ΑΛΟΓΟΣΚΟΥΦΗΣ (Υπουργός Οικονομίας και Οικονομικών):

    Επίσης, νομίζω ότι πίσω από αυτές τις απόψεις σας κρύβεται και μια αντίληψη η οποία αν υιοθετηθεί, θα καταδικάσει τη χώρα στην ψηφιακή υπανάπτυξη για πάρα πολλά χρόνια, διότι όλοι ξέρουμε ότι το ελεύθερο λογισμικό έχει πολύ περιορισμένες εφαρμογές και δεν μπορεί να χρησιμοποιηθεί τόσο ευρέως όσο άλλο λογισμικό.

    Translation by me:

    GEORGIOS ALOGOSKOUFIS (Minister of Economy and Economics):

    I also think that behind these views of yours (he’s talking about someone who asked him a question about open source) hides a perception that if inherited, will deem the country to digital “underdevelopement” for many years, because we all know that the open source has limited applications and cannot be used as widely as other software can.

    Go Go Greece!! Long live the stupidity! Sometimes it’s better to shut up than speak in public and say bullshit. Shame on them for undermining the potentials of this country.