copy /proc folder

Other day, I was trying to copy the proc folder with following command:

tar cvzf /tmp/proc.tgz /proc

and I found out that all the files in tar were empty. Strange it may seem but lot of people are facing this as /proc is not a regular filesystem, so I wrote a quick script to copy the proc folder. Here is the script:

cd /
mkdir /tmp/proc
[[ -z $1 ]] && exit -1
find /proc/$1/ -not -name pagemap | while read F ; do
    D=/tmp/$F
    if [[ -d $F ]]
    then
        echo "$(ls -ld $F) => Directory"
        mkdir -p $D
    fi
    if [[ -L $F ]]
    then
        echo "$(ls -ld $F) => copied"
        cp -P $F /tmp/$F
        
    elif [[ -f $F ]]
    then
        echo "$(ls -ld $F) => Cat"
        cat $F > /tmp/$F
    else
        echo "Dont know $F"
    fi
done

wallpaper manager

So, I have been looking for a wallpaper manager with some features like:

1) automatically change wallpaper from my directory list

2) Get wallpapers from internet

Possibly display time and a quote.

 

Variety does all of that. From variety website :

Variety is a wallpaper manager for Linux systems. It supports numerous desktops and wallpaper sources, including local files and online services: Flickr, Wallhaven, Unsplash, and more.

Where supported, Variety sits as a tray icon to allow easy pausing and resuming. Otherwise, its desktop entry menu provides a similar set of options.

Variety also includes a range of image effects, such as oil painting and blur, as well as options to layer quotes and a clock onto the background.

To install

dnf install variety

xev – Check the X keyboard events

xev man page

xev – print contents of X events

So other day I was checking why my play key was not working and wanted to check if it maps to one of the X default mappings for the keyboard and was stuck on how to check this. And finally found that I can try this:

 

xev -event keyboard

Pretty neat 🙂