Skip navigation.

Log in | Sign up

Sweden

Anna and Gerald in Linköping

Kubuntu 9.10 fails to start correctly after upgrade

, , , ...

After a recent upgrade, both Xubuntu and Kubuntu don't start anymore (if certain backports are activated). The symptoms are a blank screen after the bootsplash, usually no access to the virtual consoles and a non-working synaptics touchpad. With certain boot options it's possible to access the virtual consoles or even get a failsafe X session in low-resolution mode. The problem was caused by the introduction of a failsafe mode that gets triggered whenever GDM fails to start, though through a bug this behavior gets triggered also when GDM is deactivated because KDM or XDM are in use.

Read more...

Kubuntu 9.10 external display/ dual monitors

, , , ...

Alas, the options available in the "Display" configuration of KDE 4.3.3 do not (always) allow the correct configuration of external monitors. If, for example, you want to attach an external LCD monitor with HDMI to your laptop screen, it is possible to clone it, but not to extend the display. This can be rather easily fixed by either tweaking your xorg.conf for a static configuration (see man intel for intel graphics devices) or using xrandr.

Read more...

More time for friends

As you might have heard, my second thesis is successfully completed now... I'm honestly sorry that I didn't actively keep the contact with so many of my friends in the last few months b/c I had been too busy w/ work and college at the same time. That's gonna change now, and I'm looking forward to having more contact with YOU - be it personal, by phone or at least by email. :cheers:

Vacation Pictures

With a huge delay Anna and I just finished uploading our vacation pictures. The first set is taken in Nynäshamn, the other during our vacation in Ireland. Enjoy :smile:

Going Home...

Anna and I recently booked our flight tickets to go back home to Graz for Christmas. For those interested - we'll fly from Stockholm Arlanda via Munich directly to Graz and will arrive on December, 22nd at 1pm. We'll stay until the 28th and will fly from Graz at 7:05pm via Frankfurt back to Stockholm.

We're looking forward to hanging out with all of our friends who might be in town at that time. This is the first time we're having vacation back home, so there'll be plenty of room for cool stuff. Just get in touch with us if you have any proposals... :cheers:

Logging in Django applications

If you need to create log files from within a Django application, there are many options. One of them is to use the Python logging module to create a separate file for views.py and other files involved. Of course, two files can also share the same log file using this technique. The configuration below will also enable log rotation which happens every day at midnight (as soon as a new entry is written).

First, create the file logconfig.py inside your application and add the following content
import logging
import logging.handlers
from django.conf import settings

logs = ('views','some_other_module')

def init():
    for log in logs:
        filename = settings.LOGGING_DIRECTORY + log
        logger = logging.getLogger(log)
        logger.setLevel(logging.DEBUG) # log ~everything
        handler = logging.handlers.TimedRotatingFileHandler(filename, when = 'midnight', backupCount=9)
        formatter = logging.Formatter("%(asctime)s %(levelname)-8s %(message)s")
        handler.setFormatter(formatter)
        if needRollover(filename):
            # triggers a rollover when the server is started
            handler.doRollover()
        logger.addHandler(handler)
        logger.debug("logging for %s initialized", log)

def needRollover(filename):
    today = date.today()
    return not exists("%s.%s" % (filename, str(today)))

initialized = False
if not initialized:
    init()
    initialized = True

The above initializes the loggers and relies to having settings.py define the variable LOGGING_DIRECTORY. Note that the web server needs write access to this directory in order to write the logs. Now, for all the source files you want to have logging, it is necessary to import the logging module and the above one to configure the loggers. Then you need to fetch an instance of a logger that you can use throughout the file (the argument to getLogger can be any string defined in the logs variable in the above file).
# other imports...
import logconfig, logging
log = logging.getLogger('views')

The last step is to actually do some logging
def anyView(request):
    # do stuff
    log.debug("this is a debug message")
    # do some more stuff
    log.error("an error occurred")

You can use the default log levels debug, info, warning, error and critical. In case you want only the warnings or more severe conditions to be logged, the sole thing you need to change is the log level in logconfig.py. Have a lot of fun :smile:

Circular Scrolling in newer (>=8.10) (K)ubuntu versions

, , , ...

Up to now, I edited /etc/X11/xorg.conf to get circular scrolling for my Synaptics touchpad. I didn't see much of a point in using tools like gsynaptics since I still had to set the option "SHMConfig" to "true" in that file. Now, to get circular scrolling, it's basically necessary to create xorg.conf from scratch since the whole mechanism relying on it is quite different by now. If you don't want to do this, there's another option: create/ edit the file /etc/hal/fdi/policy/shmconfig.fdi to contain the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
  </match>
 </device>
</deviceinfo>

Then, install gsynaptics
sudo aptitude install gsynaptics

and after restarting your X server, you can nicely configure circular scrolling and other options for your touchpad :D. The main downside of this approach is that you cannot use gsynaptics to configure all of the cool features a synaptics touchpad offers (like two finger scrolling etc).

I read about this approach on http://www.helsinki.fi/~rantalai/synaptics/

Finally more new Pictures

Intel Drivers for Kubuntu Jaunty (9.04)

After whining about how horrible ATI drivers etc. are I finally bought a fairly cheap new laptop with an Intel GMA 4500M HD graphic chip. The performance seemed a tad better, but not all that great either. Some googling found the solution:
Jaunty Intel Graphics Performance Guide
This basically consists of updating your X.org configuration, downloading new drivers and a new kernel. Sounds tough, but really isn't all that hard. One thing is missing in the guide though... which is an explanation for Kubuntu users who generally use the KDM (KDE Display Manager). Since it is required to use GDM's PostLogin mechanism, the whole thing will not perfectly work on KDM machines. However, I couldn't find a replacement for PostLogin that works with KDM, thus the only solution that seems painless is to just use GDM.
$ sudo aptitude install gdm
In case you already have gdm installed but not activated, that's quite easy as well
$ sudo dpkg-reconfigure gdm
and then select gdm. Hooray for Intel, they seem to be the vendor of choice for anybody using Linux for office work.

Team Building


New QA technique we study in Poland: motivation by club.
December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31