On my Linux desktop, I combine its graphical user interface (GUI) and command line interface (CLI).

The shell script collect-files.sh is on my path and used for collecting filenames.

It can be used from the command line:

$ collect-files.sh add /home/user/IMG_4453.JPG /home/user/IMG_4455.JPG

But, using the XFCE desktop environment with its Thunar file manager, I have added this script as a custom action.

By selecting files and choosing "Collect filenames" in the context menu I can preview files before I choose to collect them:

Thunar context menu with a custom action

Using Thunar I can navigate into many folders and collect the files I need. When done, I can se what was collected:

$ collect-files.sh list
/home/user/IMG_4453.JPG
/home/user/IMG_4455.JPG

With this output, I can do anything with the collected filenames by using command line tools.

If I wanted to share copies of the collected files with other users, I would use the following one-liner:

$ collect-files.sh list | while read filename; do cp -v "$filename" /home/user/Public/; done

If you are interested, the script is available for download. Store it in $HOME/bin or any other folder on your $PATH. When added as a Thunar custom action its command line should be collect-files.sh add %F.


Securing Dropwizard with Apache Shiro

Sun 29 December 2013 by Stig Inge Lea Bjørnsen

Using Apache Shiro for securing browser facing REST APIs based on Dropwizard.

read more

A missing command line tool for the Unix desktop

Sun 23 June 2013 by Stig Inge Lea Bjørnsen

A missing command line tool for the Unix desktop that writes its arguments to stdout.

read more