linux black desktop

It’s a bug which affects only one user and not the whole graphical desktop, but only the “desktop” in a narrow sense.

A workaround can be to rename the .config folder (to something like .config.old) so that you can get anew your whole graphical desktop and then maybe you could copy (prudently) one by one your config files (from .config.old to the new .config folder).

rename identical files (with different names) in different devices

You can use a zsh script (let we call “rename-identical-files.bash”) with a code like the following

#! /bin/zsh -
zmodload zsh/stat || exit
typeset -A size_to_name
model_folder=${1?}

CDPATH= cd -P -- "$model_folder" || exit
for f in *(ND.); do
  stat -LA size +size -- $f &&
    size_to_name[$size]=$f &&
    print -r "# File of size $size should be named ${(q)f}"
done

cd $OLDPWD || exit
for f in *(ND.); do
  stat -LA size +size -- $f &&
    (($+size_to_name[$size])) &&
    [[ $f != $size_to_name[$size] ]] &&
    print -r mv -i -- ${(qq)f} ${(qq)size_to_name[$size]}
done
#usage:  that-script /model-folder-path

then you can go to the folder where you want rename the files and do this terminal command:

~/rename-identical-files.bash /path/to/model/folder

in this way, before executing the command, you can see what could happen afterwards. If it’s all ok, do the command:

~/rename-identical-files.bash /path/to/model/folder | sh

windows issues

In KDE Linux it could happen some issues with windows:

  1. rules not memorized: to fix it check if configurations files (tipically in ./config/ kwinrc and kwinrulesrc) have the right permissions (avoid: non access).
  2. new window below others already active: such as Clementine’s window, called from system tray, going below other windows; to fix this you have to set Focus stealing prevention in Window Behavior (the first tab of Window management in System settings) to none, as you can see in the image

    la regola da impostare.

disk full in linux

It may happen that your partition is almost full. So you can try to see where are too big files: probably as cache files or log ones, in particular in /var.

You can delete useless (f.e. old) cache files and empty log files, these last with this command:

cat /dev/null > filename.log

ricordi del passato (informatico)

Il mio primo PC è stato un Olivetti 086, con 20 mb di disco fisso e meno di 1 mega di ram (non ricordo più esattamente). Con windows 3.1 e una versione di MS Word che non era mica da buttar via, con il suo file normal.dot che conteneva sia i fogli di stile sia le macro.

Installare windows richiedeva una quindicina di floppy disks. Non c’erano CD, e men che meno DVD.

Fondamentali erano i files di configurazione: config.sys e autoexec.bat, caricati all’avvio. In autoexec.bat alla fine c’era il comando per far partire windows.

E la stampante? Ovviamente ad aghi: lenta e rumorosa, oltre che enorme.

Che tempi!

symlinks on linux decoder

You need to have a relative symlink (like “../../folder/file” or “folder/folder/file”), not an absolute one /(like “/mnt/your-path/file”): this latter indeed is effectual only in your computer, not on decoder (or in whatever other device).

problems with “locale”

In case of problems with locale (i.g. autokey not starting, or a file with non-latin characters not opening) you can try these commands

  • export LC_ALL=”en_US.UTF-8″
  • export LC_CTYPE=”en_US.UTF-8
  • sudo dpkg-reconfigure locales

symlinks on fat32 devices

You can use posixovl:

  • install posixovl (i.g. via synaptic);
  • rename /sbin/mount-posixovl -> mount-posixovl.orig;
  • create a new mount-posixovl in sbin:

#!/bin/bash
# wrapper for mount.posixovl to conform with common mount syntax
# with this wrapper posixovl can be used in fstab

# location of the original mount.posixovl
origposixovl="/sbin/mount.posixovl.orig"

# gather inputs
while [ $# -gt 0 ]; do
        if [[ "$1" == -* ]]; then
                # var is an input switch
                # we can only use the -o or -F switches
                if [[ "$1" == *F* ]]; then
                        optsF="-F"
                else
                        optsF=""
                fi
                if [[ "$1" == *o* ]]; then
                        shift
                        optsfuse="-- -o $1"
                else
                        optsfuse=""
                fi
                shift
        else
                # var is a main argument
                sourcedir="$1"
                shift
                if [[ "$1" != -* ]]; then
                        targetdir="$1"
                        shift
                else
                        targetdir="$sourcedir"
                fi
        fi
done

# verify inputs
if [ "$sourcedir" == "" ]; then
        echo "no source specified"
        exit 1
fi
if [ "$targetdir" == "" ]; then
        echo "no target specified"
        exit 1
fi

# build mount.posixovl command
"$origposixovl" $optsF -S "$sourcedir" "$targetdir" $optsfuse

  • add to /etc/fstab something like this (depending on the name of your device):

LABEL=Basic402 /media/duns/basic2 vfat user,rw,noauto,uid=1000,gid=1000,iocharset=iso8859-1,shortname=mixed,showexec,utf8 1 2
/media/duns/basic2 /mnt/e-reader posixovl noauto 0 0

  • create a script, like this:

#!/bin/bash
wmctrl -c mount.posixovl.orig
mount /media/duns/basic2
mount.posixovl -F /media/duns/basic2 /mnt/e-reader
krusader --left /mnt/e-reader/ebooks --right /mnt/zippati/eBooks

done!