Recently in linux Category

GIMP Plugin (update 2)

| | Comments (0) | TrackBacks (0)

Once again, here is an update to my gimp plugin. NVIDIA released the first beta for CUDA 3.0 a few weeks ago and I updated the plugin for this version. Mainly the SDK layout changed a lot and the way the SDK is incorporated needed some updates. I hope I didn’t break any backward compatibility ;)

The plugin is still here available for download. It should work with any CUDA version from 2.0 up to 3.0 on GNU Linux and Mac OS X.

Since I have to update my templates after each upgrade of Movable Type, I decided to list them here in order to find them again the next time :)


Navigation Bar

To get a navigation bar, we need to change two things. Firstly, in the Banner Header add after the blogname description the navigation bar, e.g.

<div id="custom_nav" class="custom_nav">
    <a href="http://www.richproductions.de/lunix">LUNIX</a> |
    <a href="http://www.richproductions.de/nz">New Zealand</a> |
    <a href="contact.html">Contact</a>
</div>

Secondly, we add some css to the Stylesheet, e.g. to get separation lines above and below of the navigation bar:

#custom_nav {
    border-top: 2px solid #6699CC; /* d8e8f5 */
    padding: 7px 0;
    text-transform: uppercase;
    border-bottom: 2px solid #6699CC;
}

.custom_nav a:hover {
    color: #000000;
}

That’s it, rebuild your page and you should see the navigation bar!


Copyright Note

To have your copyright at the bottom of the page, add the following to the Banner Footer template at the appropriate place (which updates the year automatically btw):

&nbsp;&copy; 2002 - <MTDate format="%Y"> richproductions


Justify Blog Entries

In order to justify the blog entries, add to the Stylesheet the following lines:

.asset-content {
    text-align: justify;
}


Pagination

Get Pagination, follow the instructions and install it. After that I got the following error when accessing pages of my blog:

The requested URL /~ritschi/~ritschi/text was not found on this server.

To get it working, you have to allow symbolic links in the apache configuration for the directory of you blog, e.g.

<Directory "/srv/www/mt">
    Options +FollowSymLinks
</Directory>

GIMP Plugin (update)

| | Comments (0) | TrackBacks (0)

After installing CUDA on my new MacBook I tried to get also my GIMP plugin to work. I installed the latest version of GIMP from MacPorts and to my surprise the plugin just compiled and installed without any modifications. However, when I chose the plugin from the GIMP menu only the CPU version worked. Some weeks later I stumbled across a post in the NVIDIA forums, which mentioned that the toolkit installer doesn’t install the kernel extension by default. That is why CUDA didn’t work! After I installed the missing kext manually, also the plugin worked flawlessly :)

The plugin can be still downloaded here. In the meanwhile it has been also tested and reported to work on some more Linux distributions and with CUDA 2.1.

CUDA Challenge

| | Comments (0) | TrackBacks (0)

Finally the winners of the NVIDIA’s CUDA Challenge Europe have been announced and I’m proud to be chosen as the first prize winner (official announcement, German version, Press Release of University). So according to the official announcement I’m “the most innovative graphics processing unit (GPU) programmer” :)

The plugin I wrote for GIMP applies the multiresolution filter I investigated in my diploma thesis to grayscale images. The filter smooths an image while it preserves the details of interest. The filter was implemented using CUDA and runs on the GPU. Compared to a fully parallelized CPU version on a Xeon Quad Core a speedup of 25-35 can be achieved on a graphics card like a GeForce 8800 GTS. For normal CPUs the speedup is even higher. As seen in the screenshot below the size of the filter can be adjusted (geometric spread) and also a threshold value, which determines up to which level details of the images get smoothed (photometric spread):

gimp_plugin.png

The source of the plugin can be downloaded here and requires at least CUDA 2.0, the CUDA SDK, as well as gimp and its development libraries. Since kernel templates are currently not supported anymore in CUDA 2.0 I changed the code and use function overloading now, so don’t blame me for the bloated code ;) Tomorrow I will also upload the plugin to the CUDA Zone and to my homepage at work.

HowTo convert jpg to pdf

| | Comments (0) | TrackBacks (0)

Recently I had to convert some scans to pdf. Unfortunately the scaned documents were only available as jpg, so I was looking for a way to convert these (huge) images into one pdf. First I thought ok, let’s use convert (which is part of ImageMagick, however it turned out that the output pdf got either bloated (700kbyte -> 11Mbyte!!!) or had poor quality when the images where previously scaled down.

After trying heaps of tools with unsatisfying results, I finally found a package called leptonica-progs, which provides a tool called converttops to convert images directly into ps files while preserving good quality and holding down the file size.

Install leptonica-progs:

aptitude install leptonica-progs

preprocess images to reduce filesize:

convert input.jpg - resize 50% output.jpg

convert jpg to ps:

/usr/bin/leptonica/converttops input.jpg output.ps

convert ps to pdf:

ps2pdf *ps

join the pdf files into a single one:

pdfjoin *pdf

transparent hardstatus in screenrc

| | Comments (0) | TrackBacks (0)

After fiddling about with the hardstatus of screen, which is btw a great tool developed here in Erlangen at the Friedrich-Alexander University, I managed to get a transparent hardstatus:

hardstatus alwayslastline
hardstatus string ‘%{= 9g}[ %{G}%H %{= 9g}][%= %{= 9w}%?%-Lw%?%{= 9R}(%{W}%n*%f %t%?(%u)%?%{= 9R})%{= 9w}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{= C}[ %m/%d/%y %c ]%{W}’

This gives you a transparent status bar at the bottom of your screen session showing the hostname of your box, active and open sessions as well as date and load. For more examples, have a look at gentoo wiki’s TIP on using screen.

transparent_screen_hardstatus.png

I had also some trouble getting bash’s profile sourced in Leopard when using screen, because no login shell was started by default. However adding the following line to my .screenrc solved this issue:

shell -/bin/bash

About this Archive

This page is a archive of recent entries in the linux category.

gentoo is the previous category.

Find recent content on the main index or look in the archives to find all content.