14 августа 2018 г.

Leafpad: lightweight GUI text editor for rox-filer on Openbox / Raspberry PI

I needed a lightweight file manager for an Openbox machine. rox-filer seemed like a decent option. But in order to look for and manage some config files, I needed the ability to quickly view their contents, so rox-filer alone wasn't enough, I needed a lightweight file editor too. Looking through the officially suggested options, I found leafpad. I ran most of those suggestions against apt-get install --no-install-recommends, and even with the no-recommends flag there were about 50MB of required dependencies. However, leafpad (as well as rox-filer itself) required no additional packages to be installed.

apt-get install --no-install-recommends -y rox-filer leafpad

Then go to $HOME/.config/rox.sourceforge.net/MIME-types/text and put the following inside:

#!/bin/sh
LEAFPAD="$(which leafpad)"
"${LEAFPAD}" "$@"
Then you can right click pretty much any file, then choose "File 'example'" and then "Open As Text".

Комментариев нет: