Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Linux: how to label swap partition w/o losing swap UUID

    16th July 2010

    In short: sudo mkswap -L new_swap_label -U old_swap_UUID /dev/sd_swap_device.
    If you don’t care about the UUID: just sudo mkswap -L new_swap_label /dev/sd_swap_device.

    Step-by-step:
    Read the rest of this entry »

    Share

    Posted in *nix, how-to | No Comments »

    The list of Linux music players with CUE sheet support

    30th April 2010

    Last updated: 2011-12-13

    • Clementine music player
    • DeaDBeeF (as in 0xDEADBEEF) is an audio player for GNU/Linux systems with X11 (though now it also runs in plain console without X, in FreeBSD, and in OpenSolaris) with CUE sheets support
    • AudioPlayer51 is a free, open-source, cross-platform audio player written to handle FLAC files and CUE sheets (exclusively). If you don’t use FLAC files and CUE sheets, you won’t find AudioPlayer51 very useful.
    • Amarok: only for WAV+CUE, doesn’t currently support FLAC+CUE; version 2.3.1 is promised to fully support CUE sheets
    • Audacious (through the .cue plugin)
    • QMMP (haven’t tested this one)
    • XMMS through mp3cue (also untested)
    • foobnix (untested, suggested in this comment)
    • cueplay

    Some extra links:

    Share

    Posted in *nix, Links, Software | 8 Comments »

    screen mastery with only 3 keyboard shortcuts

    1st March 2010

    screen is a must-use for anyone familiar with SSH sessions; it saves your time by keeping your console apps running even after (an unexpected) disconnect from the remote session.

    The easiest way to start with screen is screenie – an interface to screen. To use it, you only need to memorize a single keyboard shortcut: C-a d (Ctrl+a, d). This shortcut detaches (hides) your current screen session, allowing to resume later – either with the help of screenie, or by issuing screen -r command.

    After a while, with increased screen (and screenie) usage, you will find it inconvenient detaching every time you need a new screen session. Here comes the second keyboard shortcut: C-a c (Ctrl+a, c), which creates a new window within a current screen session, and switches to it.

    Finally, you will find it tiresome detaching to then re-attach to a different screen. C-a “ (Ctrl+a, Shift+’) will display a list of screen windows for you to select and switch to.

    Screenie, an excellent beginner’s interface to screen, is no longer needed after you memorize these 3 keyboard shortcuts.

    Many will say that this is a bare minimum, and also there is much more to screen than what you present here, and that will be true. However, these 3 shortcuts are sufficient for simple but convenient everyday screen sessions management.

    Share

    Posted in *nix, Software | 2 Comments »

    ntfstruncate binary for Debian (resetting NTFS bad clusters counter)

    1st March 2010

    There is an excellent step-by-step instruction on resetting the bad clusters counter of an NTFS partition with linux-ntfs tools. I’ve checked – it works as expected:

    1. Back up important data from partition just in case
    2. Find out size of ‘$Bad’ attribute in $Badclus using ntfsinfo -i 8 partition (partition is for example /dev/sda1). It will be the “Allocated size” value in the “Dumping attribute $DATA (0x80)” (there will be two 0x80 attributes. Only one has an “Allocated size” line). Let us write down (remember) this size as ntfs_size.
    3. Use ntfstruncate partition 8 0x80 ‘$Bad’ 0 to set $Bad’s attribute length to zero.
    4. Use ntfstruncate partition 8 0x80 ‘$Bad’ ntfs_size to set $Bad’s attribute length back to proper value ntfs_size which was recorded in step 2.
    5. Boot into Windows and run chkdsk -f diskname. It will find errors and should fix them.

    However, Debian’s ntfsprogs package does not have the ntfstruncate binary.

    Here’s how you can easily build one yourself (you may need a few extra packages with build tools for that):
    Read the rest of this entry »

    Share

    Posted in *nix, how-to, Software | 3 Comments »

    Chandler 1.0.3 package for Debian testing amd64

    25th January 2010

    Recently, I have come across the Chandler project. Chandler is a sophisticated organizer, including tasks, calendar, appointments, invitations, and many more.

    The project does provide a 64-bit package for Ubuntu 8.10 “Intrepid Ibex”, but it has a dependency on python-zope-interface – which in Debian testing is a virtual package, currently provided by python-zope.interface. That single dependency made my aptitude complain all the time, so I edited the .deb-file, renaming depends/python-zope-interface to depends/python-zope.interface (following nice and simple instructions). After that – no more aptitude complaints, and Chandler works fine.

    Download the modified Chandler 1.0.3 Debian testing amd64 package (md5: 239071715977bea2eb75f3bb54491a02).

    Share

    Posted in *nix, Software | 1 Comment »

    R under Debian testing/i386: permanently set pdfviewer option

    21st October 2009

    If you get this message when opening vignettes:

    Error in openPDF(vif) :
    getOption(‘pdfviewer’) is ”; please use ‘options(pdfviewer=…)’

    and you are tired of running this command every time:

    > options(pdfviewer=”okular”)

    then you should check if your system-wide Renviron file has proper PDF viewer set:
    Read the rest of this entry »

    Share

    Posted in *nix, how-to, Notepad, Software | No Comments »

    Convenient design and debugging of regular expressions under Linux

    10th October 2009

    redet-supported languagesRegular expressions (regexps) are powerful indeed. But debugging non-trivial regexps is a burden even if you understand how regexps work, and remember most (if not all) regexp syntax.

    Miscellaneous tools exist to ease this task. This post was inspired by redet’s comparison of regexp helper tools – it could be sufficient to read only that, if you’re going to try the mentioned tools yourself. Otherwise, read on.
    Read the rest of this entry »

    Share

    Posted in *nix, Notepad, Programming, Software | No Comments »