Index ¦ Archives ¦ RSS > Tag: en

Edited skype messages in BitlBee

Estimated read time: 1 minutes

A user reported on #bitlbee that in case someone edits an already sent message using the Skype GUI client, BitlBee does not report the change. This used to work for about 2,5 years ago, but now I checked and true, it was broken. When I fixed it I realised that it would be nice to prefix the updated message with something to be aware that it's an edited message, not a new one. The result is pushed out to the git repo and a screenshot is available as well. ;)

samba, gentoo

Estimated read time: 2 minutes

Sorry, I'm continuing the story of uninteresting challenges I had in the last two days. Or if they look like interesting ones, please continue. ;)

Two days ago we (at work) had to repair a samba installation after a 3.0.x -> 3.2.x upgrade. There were 3 problems:

  • the firewall config had to be updated, to allow incoming tcp connections on port 445
  • somehow smbd was listening on ipv6 only, just listing all network interfaces in the config was enough to make it listen on ipv4 as well
  • for another strange reason it no longer accepted hostnames on its whitelist, using ip addresses directly did the trick

The other story from yesterday was fix up the firewall configuration at a small office. The problem was that till now they had a PPPoE connection and the firewall used NAT to share the internet access to the desktop machines, but now they switched to a radio-based access, they got a new modem which did not support PPPoE. Of course in short I just got the usual "the internet does not work!" bugreport. ;)

I must note that I'm not a sysadmin at this office, I just stepped in as the local sysadmin was a SPoF in the system and he (temporally?) disappeared and they asked me beause of "the hours is burning" effect. :)

So all I had to do is to alter the server configuration, which was running Gentoo. I never touched such a machine before, and it's configuration is (of course, since I'm used to our netconfig) weird, but at least the off-line documentation was enough. So after RTFM, I just had to turn off pppoe, set the dns and the default gateway to the address of the new router and all was fine. One notable interesting fact was that there was no damn vi on the server. Given that emerge takes a lot of time, I had to suck with mcedit. :P

Conclusion: yet another example why offline documentation is important, even in case nowadays "there is internet everywhere". ;)


gcalsync #3, vmware, xrandr

Estimated read time: 2 minutes

First, I wasted a few more hours with my never-ending "sync events form my Nokia S40 phone to Google Calendar" project. The result: it's not a daemon, it checks if the last sync was more than a day ago, if it can ping google.com, and if both, but it can't reach the phone via bluetooth, then it raises a kde4 notification, and it also notifies me when (and how) the sync was done, so that I switch bluetooth off on the phone after the sync. As usual, available here.

Second, I managed to fix two annoying bugs when installing Frugalware under VMware: dhcpcd did not update /etc/resolv.conf in the installer properly, now that I changed from dhcpcd to busybox's udhcpc, it seems to be fine. (And udhcpc still works fine in qemu as well.). The other vmware-related improvement is that the newport xorg driver somehow locked up the whole virtual machine, now it's moved to extra, so xconfig does not freeze the VM on a default install.

Third, today finally I managed to figure out how to enable the external output on my netbook, using the openchrome driver. It's just about a single line in xorg.conf:

Option     "ActiveDevice"               "LCD,CRT"

This won't do more than just cloning the output, but it's far enough for me, who just uses the external output for presentation only.

(There is a binary driver which locks up the whole machine about 5-8 times a day, which has a bit better external video support, but stability is far more important for me, and the openchrome driver _is_ stable.)

Partly related, when I connected the external output to a projector, I had to set the screen resolution to 1024x768, and later back to 1280x800. 5 years earlier you had to edit xorg.conf and restart X to do this, now you can do this with xrandr:

$ xrandr --output default --mode 1024x768

and then to switch back:

$ xrandr --output default --mode 1280x800

OK, enough entries for today. :)


Memory upgrade to 3G

Estimated read time: 1 minutes

So my netbook had 1G of ram so far and I was happy with it. Then I started to play with virtual machines and it turned out that the bottleneck of it is the small memory I have. So I just bought a 2G ram module, and at this point things started to be weird. Given that the system booted up and almost everything worked properly, I did not really had an idea. I thought it's a SW problem, so I did a clean Frugalware install on a separate partition as well, and there bash segfaulted in konsole as well sometimes. This ringed a bell, memtest!

After about 15 mins, memtest found numerous errors, then I rode back to the shop where I bought it and I asked for an other module. The interesting points were:

  • Actually the good ram was cheaper than the bad one they gave me the first time.
  • When I inserted the 2G module, the original 1G ram wasn't anymore used as the 0-1G range, but it shown up as 2G-3G.

Now I hope next time I have to increase my ram amount, x86_64 will be mainstream so that I won't have to suck again with a 'custom' architecture. ;)


Sparse checkout example in git 1.7.0

Estimated read time: 1 minutes

Sparse checkout is now part of git-1.7.0. See here on what it is in general. Basically something what svn already knew for years and git did not. And of course git now does it better, since this way it's possible to checkout multiple sub-directories, not just a single one, what svn allows.

Here is a short example:

$ git clone ~/git/git
$ cd git
$ ls|wc -l
361
$ git config core.sparsecheckout true
$ echo ppc/ > .git/info/sparse-checkout
$ echo perl/ >> .git/info/sparse-checkout
$ git read-tree -m -u HEAD
$ ls
perl/  ppc/

Enjoy! :)

Update: see the comments, as it has been pointed out the "And of course git now does it better, since this way it's possible to checkout multiple sub-directories, not just a single one, what svn allows." sentence is incorrect; but of course having a similar feature in a distributed VCS is still an improvement. ;)


pptp client howto on linux on console

Estimated read time: 1 minutes

So I saw a few howtos on how to set up ms pptp client on linux, but they're mostly about how to click on networkmanager or other guis, so basically they hide the real detail, IOW what config files are actually used.

First install the necessary packages:

# pacman-g2 -S ppp pptp

Here is what I have under /etc/ppp:

# cat chap-secrets # Secrets for authentication using CHAP # client server secret IP addresses $user PPTP $secret *

# cat options lock

# cat options.pptp lock noauth nobsdcomp nodeflate

# cat peers/$network pty "/usr/sbin/pptp $server --nolaunchpppd" name "$user" file /etc/ppp/options.pptp remotename PPTP require-mppe-128 refuse-eap ipparam $network

And to bring up ppp0:

# pon $network debug dump logfd 2 nodetach

If it works fine, you can just use:

# pon $network

(Obviously replace $user, $secret, $server and $network with real values.)

One thing I did not figure out is how to configure it to set the default gateway as well. Right now I use the debug mode, then in the output I see the remote address, finally:

# route add default gw $remoteaddr

Other than that, it works fine - without any damn gui! :)


darcs import on repo.or.cz

Estimated read time: 1 minutes

I've contributed a patch to repo.or.cz to allow darcs imports, but and I recently got a reply for it from the maintainer. So we worked together a bit more and now the patches are in, repo.or.cz just imported the source of darcsweb.

I also created a test project and tested that incremental imports work properly as well. \o/

NB: It uses my darcs-fast-export tool, that's why I started to work on this. ;)


Lenovo Ideapad S12

Estimated read time: 3 minutes

I bought this netbook about a week ago (the one with the Via card).

Actually it costed 106 kHUF (~$550) instead of the advertised $400, but that probably due shipment costs, etc.

Here are what requirements I had:

  • I wanted a simple video card, it's much more important for me that I don't have to use external kernel modules than the actualy 3D performance. So NVidia is clearly an overkill for me. I wanted Intel or similar.
  • 12"-sized LCD - my iBook had it and I loved it. I agree that it's too small when we're watching films with 5 other friends or playing games, but I don't do either regularly.
  • Touchpad. I don't like trackpoint.

Here is what I got:

  • The Via card is so far OK, the openchrome driver has a nice community and at least 2D acceleration works fine, and they are working on the 3D one as well. (Other card types have 3D support, too - This type is just too new ATM.)
  • The LCD size is what I want - looks like you can't easily buy a 12" notebook, but a 12" netbook counts as a high-end one.
  • Of course it has touchpad.

Let's see what extra does it have:

  • VGA output (iBook had some custom output and I never got a VGA converter cable.)
  • Bluetooth
  • SD-Card reader
  • Webcam
  • KVM support
  • HW mpeg2/4 and dm-crypt support

What's wrong with it:

  • The cover is shiny, the mark of the fingers are left there when you grab it.
  • No optical driver, but hey, it's a netbook!

Let's see Linux support: First, the machine is shipped with Windows XP. The bios updater is windows-only, so I updated the bios before I rm -rfed the whole preinstalled contents.

What works:

  • Via Nano CPU: works fine.
  • Via card: after installing the opencrome driver a simple 'xconfig' from frugalwareutils did its job, no other tricks were necessary.
  • SATA controller works fine.
  • Wired ethernet works fine.
  • Wireless: the in-tree b43 works for WPA APs but not with unsecure ones. The binary bcmwl driver works in the later case as well.
  • SD-Card reader works out of the box.
  • Sound is fine.
  • The webcam works with mplayer using the "mplayer -tv driver=v4l2:device=/dev/video0 tv://" command.
  • Bluetooth is fine.
  • KVM support (vmx flag) is there in the CPU.
  • dm-crypt has HW support, so copying to a truecrypt volue isn't slower (~40mb/s) than copying to an unencrypted one.

What does not work with Linux:

  • There is no ideapad-acpi module to turn on or off wifi/bluetooth in the Embedded Controller (EC) of the ideapad. In my case I enabled wifi only when I updated the settings of the EC back in Windows, so Bluetooth is disabled. Feel free to post in commends if you have ideas how to set the EC from Linux. ;)
  • The 3d and mpeg2/4 decoding HW support of the graphics card doesn't work.
  • Hibernation is broken due to the weakness of the openchrome driver.

I think that's all. As always, it's possible that these limitations can be avoided in the future, who knows. ;)

Ah and the battery works for 5 hours with wifi enabled, I think that's nice. (And probably it's due to the LED-powered LCD.)

In case of questions, please post them in the comments and I'll try to reply.

PS: It doesn't really belong here, but if I was at it, I also switched (compared to iBook):

  • to x86_64 from ppc
  • to ext4 from ext3
  • to kde4 from kde3

Update: I did a backup about the config files, reinstalled Windows XP, enabled the bluetooth in EC, and installed i686 for now. So the changes are:

  • Bluetooth is now working perfectly
  • 2D acceleration is stable (ie. if you start mplayer -vo xv the second time, it won't freeze)
  • Suspend to disk works fine, as it was expected.

\o/


mails

Estimated read time: 1 minutes

Say you have two servers, the first is just a mail proxy, the second is a real mail server. So the MX record points to the first box and you usually just read your mail on the second one.

We use this system at frugalware.org as well to make the service a bit more robust: if genesis (the "second" box) goes down, the proxy machine(s) can just queue up the input and in case one of the proxy machines go down, then the sender will just try an other proxy.

The problem occurs when the "second" box goes down and you need to read your mail ASAP. Let's say you have access to the first box. You see in the output of 'mailq' that there are messages in the queue but how to read those mails?

'mailq' gives the ID of each message, and then the following script (I call it 'mails' - s for show) can generate mbox format from it, which means you can read it with for example 'mutt -f foo.mbox'.

The script itself is fairly easy:

#!/bin/sh

echo 'From news@gmane.org Tue Mar 04 03:33:20 2003' |sed '1,/^\*\*\* MESSAGE CONTENTS/d;/^\*\*\* HEADER EXTRACTED/,$ d'

(And of course it's possible there is a better tool to do the job, but I use this for months now.)


New firefox profile

Estimated read time: 2 minutes

I’m continously upgrading my Frugalware installation, IIRC I installed 0.2 on this Clevo machine and I never saw any reason to reinstall. Sadly the situation is not that easy with applications, for example firefox’s profile tends to grow from 20M over 100M and the only way to really get rid of all the junk it has is to start over.

Given that in the last month I did not really have time for such minor problems, now I decided to solve this by doing an mv ~/.mozilla{,.orig}.

I must note that I’m not a typical firefox user, given that I store my passwords in cpm, bookmarks in git (as I use multiple machines and I trust those applications more than firefox), and finally all the extensions I use are installed via Frugalware firefox-$extname packages.

Now I thought that this way the new profile usage will be easy enough, though there are still a few things to note:

  • The bookmarklets (allowing fast search in various bugtrackers) should be installed again.

  • The searchbar autosizer addon has bad defaults, I like to have the search bar with a fixed 203px size (355px on 1280x800) — though nowadays this regressed, see moz#253331.

  • Finally I forgot I have a custom userChrome.css (also obsolete nowadays):

.tabs-newtab-button { display: none; } /* remove New Tab button */
  • Change browser.backspace_action to 0 to make backspace to a back (as on Windows).

Other than that, no changes were necessary.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.