10 Jul 2017, 5:12pm

leave a comment

  • Anzeige
  • Rendering problem with Kdenlive

    I really enjoy using the Kden­live video edi­tor. I think it’s a sim­ple, straight for­ward, and yet pow­er­ful tool.

    But just dur­ing the last few days, I had trou­bles for the first time and could not find a solu­tion. When ren­der­ing my project, it kept fail­ing with max_analyze_duration 5000000 reached at 5000000. I searched online, the error might be related to the size of the audio (>1h) Still, the project ren­dered at first, but after the final cut — with lots and lots of cuts — I started get­ting this error, thus, out of a sud­den, I was not able to get my final video file out any­more. Was I threat­ened to hav­ing to do the entire work again or what??

    Finally, today I found a solu­tion! Bet­ter, a workaround.

    I split up the file by adding guides — in my case three, but the num­ber might depend on the project size — and then used the ren­der fea­ture “Guide zone” (at the bot­tom of the ren­der dia­log). So, I ren­dered three parts and used melt to put them together like this:

    melt input*.mp4 -consumer avformat:result.mp4 acodec=aac ab=160k vcodec=libx264 vb=3000k

    I’m using x.264 and AAC here — but you can also drop all those para­me­ters and let melt fig­ure every­thing out — it’s pretty capa­ble, give it a try.

    melt input*.mp4 -consumer avformat:result.mp4

    If you have ffmpeg on your sys­tem, you can merge the files using the copy mode, so no qual­ity gets lost — see details here. But even when using melt and thus re-encoding the video, you will not notice that it has been ren­dered in three parts and “melted” later. So I’m happy! Still a bit sur­pris­ing that I could not find a solu­tion online. So hey, hope this approach works for you too! :)

    16 Apr 2015, 8:15pm

    leave a comment

  • Anzeige
  • Recover deleted photos

    Shit hap­pens… but for Linux users, there is a power tool straight from the US Air Force called “fore­most” to help you recover (aka undelete) your pho­tos eas­ily!
    Note: you’ll need sudo rights to install this soft­ware tool.

    But most impor­tantly: do not write any new data to your device (SD card, flash drive or what­ever)! Oth­er­wise, you’ll over­write what is still there and lose your pho­tos forever.

    The steps:
    Remove or unplug the media/drive/card from your comupter.
    Open a ter­mi­nal window.

    Install the recov­ery software.

    sudo apt-get install foremost

    Cre­ate a folder to put the recov­ered pho­tos in. Impor­tant: don’t put this for­ler on the drive where you want to recover pho­tos from! See above…

    mkdir recovered-photos && cd recovered-photos

    Find the device: copy the fol­low­ing com­mand to your ter­mi­nal and press the [Tab] key twice

    foremost -v -t jpg /dev/sd

    It will say some­thing like this

    sda   sda1  sda2  sda3  sda4  sda5  sda6  sdb

    Now, plug in your drive/card/medium and press [Tab] again, twice.
    It should change to some­thing like this

    sda   sda1  sda2  sda3  sda4  sda5  sda6  sdb  sdc  sdc1

    In my case sdc and scd1 showed up. Thus, sdc1 is the par­ti­tion on the device to recover from. Thus, I my case the full com­mand would be (You need to replace sdc1 with what­ever showed up pre­vi­ously on your own terminal!)

    foremost -v -t jpg /dev/sdc1

    … press return and see the magic hap­pen! Your pho­tos will show up in a sub­folder of recovered-photos. :)

    25 Sep 2014, 7:10pm

    leave a comment

  • Anzeige
  • Setting up a linux server to forward all incoming mails

    Typ­i­cal thing when hav­ing a new site up: you want to get whatever@yourdomain.com to end up in you nor­mal inbox, say Gmail.

    Here are the steps!
    Note: If you are logged in as root, you do not need to use “sudo” in front of each command.


    It’s rec­om­mended to have a user account to receive the mail other than root.
    So either choose a user you have cre­ated already or cre­ate a new one:

    sudo adduser [username]

    Does your provider require you to use an SMTP relay? (check the doc­u­men­ta­tion, or ask). You need to know this to continue.

    Install post­fix

    Post­fix is a soft­ware pack­age, a MTA, it han­dles incom­ing mail and forwarding.

    sudo apt-get install postfix

    And answer all con­fig­u­ra­tion ques­tions as below:
    Server con­fig­u­ra­tion type: If you use an SMTP relay, choose “Inter­net with smarthost”, oth­er­wise “Inter­net“
    Sys­tem mail name: [yourdomain.com] (no sub­do­main)
    SMTP relay host: [smtp.yourprivider.com] (only show­ing if you chose “Inter­net with smarthost”)
    Root and post­mas­ter mail recip­i­ent: The created/chosen before (not root)
    Other des­ti­na­tions to accept mail for: keep the sug­gested defaults and add in front [yourdomain.com] and a space
    Force syn­chro­nous updates on mail queue: no
    Local net­works: keep sug­gested
    Use proc­mail for local deliv­ery?: yes
    Mail­box size limit: 0
    Local address exten­sion char­ac­ter: +
    Inter­net pro­to­cols to use: all

    Man­ual configuration

    All edits with sudo if you not logged in as root.
    Edit /etc/postfix/main.cf add fol­low­ing two lines to the end

    virtual_alias_domains = [yourdomain.com]
    virtual_alias_maps = hash:/etc/postfix/virtual

    Create/edit /etc/postfix/virtual and add

    @[yourdomain.com]    [your.email.address@somewhere.com]

    Finally, after edit­ing this file call

    sudo postmap /etc/postfix/virtual

    so that postmap actu­ally applies your changes.


    If you for­ward to Gmail, do not use the same address to send test mails that the mails will be for­warded to — Gmail will silently ignore/delete mail where the sender and recip­i­ent are the same and you will think the for­ward­ing does not work.

    26 Dec 2013, 12:25pm

    leave a comment

  • Anzeige
  • Scale images for the web — quickly

    Start­ing Gimp just to scale down some pho­tos to send them by mail? Meh.
    How about mark them, right-click, “Send To” -> “Scale for web”?
    No prob­lemo:
    First, get a tool to scale images:

    sudo apt-get install imagemagick

    Now, cre­ate a script that takes a list of images as input, scales them down, and stores them with a pre­fixed file name. Go!

    pwd > ~/f0.txt
    echo "$@" > ~/f1.txt
    for file in $@
    	convert "$file" -quality 50 -resize 1024x768 "${file%/*}/web-${file##*/}"

    Make sure we chmod +x the script file we just cre­ated.
    Next, let’s inte­grate it into “Send To”. (This is an exam­ple for Thu­nar)
    Cre­ate a .desktop file in the sendto folder, e.g. /usr/share/Thunar/sendto/scale-for-web.desktop with fol­low­ing content:

    # Scale images for the web
    [Desktop Entry]
    Exec=scale-for-web %F
    Name=Scale for the web

    Replace both scale-for-web with the name you gave to your script file. Is the script’s folder in $PATH? No idea? Then just put the entire path+filename.
    Now, open Thu­nar, select some images (Jpeg or Png), right-click, “Send To” -> “Scale for the web”, wait a few sec­onds and you’ll see web-....jpg files appear­ing in the same folder. :)

    Ref­er­ences: how to scale images with imageMag­ick, extract path seg­ments, more details on string manipulation

    14 May 2012, 8:27pm
    linux recommendations:


  • Anzeige
  • Missing Digikam Themes w/t KDE

    Digikam is a great tool to man­age and work on pho­tos — my per­sonal favorite for some years already. But it’s made for KDE and uses a lot of KDE-related libs and stuff, there­fore, installing it in Gnome, Xfce, Lxde and the like will cost about 1gb because of the depene­den­cies.
    Nev­er­the­less, worth it. But it comes with a bright default skin ren­der­ing it com­pletely unus­able for work­ing seri­ously on light and color set­tings of photos.

    To add themes, you will have to install an extra pack­age (as decribed here) like this:
    sudo apt-get install kde-workspace-data
    Yes, this will add more data to your disk, but only 10mb this time. ;)

    Happy photo-tweaking!

    14 Feb 2011, 9:48pm

    leave a comment

  • Anzeige
  • Flickering Screen with ATI Radeon X1400 and Ubuntu

    EDIT: ATI Radeon X1400 seems to work fine again since Ubuntu 11.04.

    There is another fix to the “well known” issues with the ATI Radeon X1400 and Ubuntu 10.04 to 10.10 besides the one posted about one year ago (see here).
    The pre­vi­ous fix kept the graph­ics card work­ing nor­mally but harmed the over­all oper­at­ing system’s sta­bil­ity, so here is another fix based on dis­abling all 3D fea­tures of the device to get rid of the flick­er­ing screen.

    It’s up to you to choose what you are able to live with­out
    a) The desk­top set­tings panel and “Seg­men­ta­tion fault” errors now and then, or
    b) 3D accel­er­a­tion (does not harm video play­back or any other basic OS functionalities)

    For solu­tion a) see this.
    For b) cre­ate this file: /etc/modprobe.d/radeon-kms.conf — and add fol­low­ing content

    options radeon modeset=0

    Solu­tion found here (in German).

    14 Feb 2011, 9:26pm

    leave a comment

  • Anzeige
  • Logitech Communicator STX Webcam vs. Ubuntu (64bit) & Skype 2.1

    There are many tuto­ri­als out there solv­ing the prob­lem by mak­ing Skype use Video for Linux ver­sion 1 dri­vers instead of ver­sion 2, as that par­tic­u­lar web­cam does not seem to get along with the newer ver­sion. It boils down to the fol­low­ing lines:

    Cre­ate a file in /usr/local/bin/skype and insert

    LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

    Finally, make it exe­cutable by sudo chmod a+x /usr/local/bin/skype
    Use this file to start Skype from now on. Done.

    But not for me. Skype refused to eat it: ERROR: ld.so: object '/usr/lib/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.
    Until I finally found this one here.

    Just to cut a long story short, here is why: all the other solu­tions work for 32bit Linux only — but hey, I do not have any of my old laptop’s poten­tial to be wasted — I am run­ning 64bit Ubuntu (tested with ver­sion 9.10 and 10.10 64bit). And with a minor tweak, the fix will work for you, too. :)

    Install the video4linux libraries:

     sudo apt-get install lib32v4l-0

    And change /usr/local/bin/skype to

    LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype

    Its just about the “32” — and one good exam­ple more of why you should put mean­ing­ful error mes­sages in what­ever software!

    Thanks Eoin Mur­phy.

    8 May 2010, 11:25am

    leave a comment

  • Anzeige
  • Resizing System or Home Partion

    A very con­ve­nient tool for cre­at­ing, mov­ing, and resiz­ing par­ti­tions is GParted. I use it for all my partition-changing-needs — it is really pow­er­ful and yet easy to use! :)

    But it is not pos­si­ble to resize sys­tem rel­e­vant par­ti­tions while the sys­tem is run­ning — makes sense, right? ;)

    But you can down­load GParted as LiveCD ISO file and burn it on a CD. After that, restart your com­puter with the CD in your drive and a small linux will start up directly from CD includ­ing GParted, thus allow­ing you to mod­ify any drive and par­ti­tion there is. :) Do all required changes, click the exit but­ton and you are done. In my case, the com­puter did not reboot auto­mat­i­cally, instead I ended up with a com­mand line inter­face — use the com­mand “sudo reboot” to restart the sys­tem your­self if that happens.

    And just by the way, GParted does also han­dle Win­dows par­ti­tions eas­ily — so there is no need to buy or “get” Par­ti­tion Magic from some­where. But never for­get to backup your data first.

    Yet another hint: GParted works most reli­able if you do one step at a time. So for exam­ple, there are par­ti­tions A and B (A is in front of B) and you wish to give some of the free space in A to B. You need to do fol­low­ing steps: Shrink A, move B left and finally grow B. From my expe­ri­ence, GParted works best if you really do all those steps sep­a­rately, apply each of then, and go for the next one if the last one fin­ished successfully.

    30 Apr 2010, 11:04pm

    leave a comment

  • Anzeige
  • Flickering Screen After Upgrade to Kubuntu 10.04

    First of all, I was amazed how smoothly the upgrade went. (K)Ubuntu and I guess other dis­tri­b­u­tions as well have gone quite a far way to become plat­forms for every­body — with a lot of soft­ware but even more tools, helpers and auto­matic back­ground ser­vices — like the nice upgrade service.

    There was only one prob­lem I ran into and I want to share the solution.

    I am run­ning Kubuntu 10.04 (just upgraded today) on a Lenovo IBM ThinkPad R60 (Yes, one of those with both brands on them ;) ) with an ATI Radeon X1400 graph­ics device. But since upgraded, my dis­play started flick­er­ing — not per­ma­nently but unbearable.

    The solu­tion that worked for me (at least par­tially — see below — and this is of cause depend­ing on the graph­ics device type) was to install the pro­pri­etary ATI dri­vers. I know, it is not a good solu­tion, I do not like to use them nei­ther and if any­one out there is read­ing this with a bet­ter solu­tion in mind, let me know it!! :)
    Edit 2011-02-14: Added a new post with an addi­tional, alter­na­tive solu­tion here.

    So what you need to do is  to get your favorite pack­age man­age­ment tool (e.g. Synap­tic or KPack­ageKit) — just hit Alt+F2 and type “pack­age” and pick KPack­ageKit from the list (it will ask you for the super user pass­word). Then, search for “fglrx”. In KPack­ageKit, you will find a result titled “Video dri­ver for the ATI graph­ics accel­er­a­tor”, and some­thing below the title like “fglrx — 2:8.723.1-0ubuntu3” but the ver­sion num­ber should not mat­ter. Click the arrow to the right, hit “Apply” and after reboot­ing, every­thing should per­fectly with­out any configuration.

    Good luck. ;)

    Prob­lems noticed so far: The dri­ver causes “Seg­men­ta­tion Fault” error mes­sages, e.g. when try­ing to open up the dis­play set­tings. That’s ugly, I know. But you can read in sev­eral forum and blog posts, that the sup­port for the for­mer nicely work­ing dri­ver for the ATI X1400 has been dis­con­tin­ued since 10.04, hence, it’s just good luck that the fglrx works some­how — good to know *after* upgrad­ing, right. But still, the flick­er­ing was unbear­able for me, thus, I accept the issues for now. I will keep my eyes peeled hop­ing for a proper solu­tion in the future.

    26 Apr 2010, 9:34pm

    leave a comment

  • Anzeige
  • Change hotkey of Kubuntu’s Quick Launch Tool KRunner

    First of all: I love those quick launch tools aka key­stroke launch­ers, they are real time savers — every­one should have one!

    [For those with­out a glue what a key­stroke launcher is:] It is THE tool for launch­ing any kind of soft­ware or even open­ing doc­u­ments. Instead of mov­ing your mouse to you appli­ca­tions menu, click it, search the pro­gram, move the mouse there, maybe pick a sub-folder, move mouse again and finally click — unless you acci­den­tally moved a lit­tle but to far and the menu close again, com­pletely. :( But it is easy to put an end to this (as described below). Instead of doing all that click­ing, you hit a spe­cial key com­bi­na­tion, by default [Alt] and [Space], this will make a small input box show up, now, you only enter the first let­ters of the pro­gram — e.g. “f” will do after a few uses to start Fire­fox (the pro­gram learned that you use it a lot). It might save only a few sec­onds each time, but the sum up and, hey, it is very con­ve­nient, too!

    So here is what you need to do:
    Mac OS: It is already built-in — Just hit Alt+Space and type the name of the pro­gram you want to start (or files or what­ever).
    Win­dows: Get/install Launchy and use it as explained above.
    Kubuntu: built-in as well, BUUUT you have to hit Alt+F2 instead.

    And there it is, some­thing that kept annoy­ing me about Kubuntu for quite a bit. I was hop­ing to get used to it but for what rea­son? Alt+F2 is really not handy com­pared to Alt+Space.
    Finally, based on this old forum post and a few adjust­ments to fit nowa­days Kubuntu, all you need to do is this:

    1. Go to “Set­tings” -> “Key­board and mouse”
    2. Select “Global Key­board Shortcuts”
    3. Pick from the select box “KDE com­po­nent” at the top “Run Com­mand Interface”
    4. Now, you can access “Run Com­mand” — Change it to what­ever you like :)
    28 Feb 2010, 2:05pm

    leave a comment

  • Anzeige
  • Moving home to it’s own partion (Ubuntu)

    We are going to move all accounts includ­ing their per­sonal data on a dis­tinct par­ti­tion. This rec­om­mended in case of sys­tem fail­ure to not loose any data.
    I have no idea, why the Ubuntu instal­la­tion wiz­ard does not do this by default — it should!

    This post is based on an arti­cle in Ger­man — I will mainly trans­late it, strip some plush and add some stuff to make life eas­ier and to reduce the risk of data loss. But be aware: to per­form any of those fol­low­ing things, you will need super user rights and you should feel some­what comfy with using the com­mand line. And of course, it might be pos­si­ble in cir­cum­stances unfore­seen, that you lose all your per­sonal data — but there are a lot of backup steps included below.

    Here we go: (con­sole input or state­ments are writ­ten in ital­ics)

    1. Prepa­ra­tion
      1. Cre­ate a backup: rsync –avx –progress /home <your backup destination>
      2. If you do not have a free par­ti­tion yet, I rec­om­mend GParted to cre­ate one (use sudo apt-get install gparted). I rec­om­mend ext3 for com­pat­i­bil­ity issues — but if you use Linux only, you can go for ext4 (please change ext3 to ext4 in step 1.6 in case) — make sure your new par­ti­tion is big enough for your home folder! Try to remem­ber the size (get size: du –sh /home) of /home, you can use it later on to ver­ify your new home location.
      3. Get par­tion name sudo fdisk –l /dev/sda — e.g. /dev/sda7 — I will refer to this name as (name)
      4. Copy your cur­rent file sys­tem con­fig­u­ra­tion: sudo cp /etc/fstab /etc/fstab.new
      5. Get par­tion UUID of new par­ti­tion: sudo blkid — you will find a line about (name) stat­ing a UUID (quite a long hex string), I will refer to it as (uuid) — copy it.
      6. Edit /etc/fstab.new, add a new line at the end as fol­lows (the lay­out should fol­low pre­vi­ous lines — sim­ply copy one and adjust it):
        UUID=(UUID)  /home                ext3         defaults                    0 2
    2. Copy
      1. Sign off / Log out
      2. Switch to con­sole mode by press­ing Ctrl+Alt+F1
      3. Cre­ate a mount point for the new par­ti­tion: sudo mkdir /mnt/tmp
      4. Add par­tion: sudo mount (name) /mnt/tmp
      5. Copy home from the old loca­tion to the new par­ti­tion: sudo rsync –avx –progress /home/ /mnt/tmp
      • Test
          1. Mount copy of home as new home: sudo mount (name) /home
          2. Check size of home folder — should be the same as in step 1.: du –sh /home
          3. Check mount­ing worked: sudo mount| grep /home should print out some­thing like
            (name) on /home
          • Switch
              1. yet another home backup: sudo mv /home /home.bak
              2. cre­ate new home mount point: sudo mkdir /home
              3. cre­ate a backup of fstab: sudo mv /etc/fstab /etc/fstab.bak
              4. put updated ver­sion in place: sudo mv /etc/fstab.new /etc/fstab
              5. reboot and you should be done: sudo reboot

              Ok, that’s that. If every­thing works fine, you can delete the backup home sudo rm –rf /home.bak and the fstab backup sudo rm /etc/fstab.bak. Hope you found it use­ful and I did not put in a mis­take or typo. Gimme feed­back! :)

              7 Feb 2010, 10:52pm

              leave a comment

            • Anzeige
            • KDE vs. Gnome

              Now, my deci­sion is final: KDE rules (though I actu­ally pre­fer the look of Gnome :( ).

              Sim­ple rea­son: Gnome does not sup­port drag-and-drop in com­bi­na­tion with alt+tab (see bug tracker), but there might be hope with the upcom­ing Gnome 3.

              [Edit 2011-06-14: Indeed, drag-and-drop + alt-tab works since since Ubuntu 11.04 (did not try with 10.10). One major dif­fer­ence remains: Do you need a lot of con­fig­u­ra­tion and cus­tomiza­tion options? And are you will to accept com­plex, maybe not that self-explaining menu struc­tures for that? If yes, KDE is your choice, oth­er­wise Gnome might make your life eas­ier. See also this page for more details and screenshots.]

              In more detail: using drag-and-drop together with alt+tab key com­bi­na­tion allows to work very effi­ciently. For exam­ple, while order­ing my pho­tos, I want to work on one of them — as I do this reg­u­larly, Gimp is opened already, but in the back­ground — so what I do using KDE or MS Win­dows is, I grab the pic­ture, switch to Gimp by using alt+tab and imme­di­ately drop the pic­ture with­out mov­ing the mouse at all — I am quite con­fi­dent that this is the fastest way of open­ing a pic­ture for edit­ing. Some peo­ple advice to set Gimp as default appli­ca­tion to open JPEGs, but I am not always edit­ing pic­tures, most of the times I just want to view them.

              Using “Open With” on a JPEG file for sure is the com­mon approach — but let’s com­pare it:

              • Drag-and-drop & alt+tab
                • Actions to be per­formed: mouse down + key down + key up + mouse up
                • In total: four fast steps
              • Open With” solu­tion (hold­ing mouse down as improvement)
                • Actions to be performed:mouse down + mov­ing to “Open With” + wait for sub-menu to open + move to sub-menu + mouse up
                • In total: two fast, three slow steps