Monday, December 31, 2012

Leafpad is a good default editor for Slackware 14.0, including for raspberry pi

The basic graphical text editor, mousepad, has recently been removed from Slackware in favor of gvim. Personally, that is not my favorite editor. I found that mousepad was actually a derivative of leafpad-- so why not use that instead? A slackbuild is available for Slackware 14.0 here. Also, of note, the same slackbuild works without modification to compile the same source for ARM architecture. The resulting package is compiled and installed using the standard drill. For example, after compiling the package directly on the raspberry pi device, install the package:

# installpkg /tmp/leafpad-0.8.18.1-arm-1_SBo.tgz

The package works natively, but the raspberry pi architecture is a bit challenged by running a full blown X. A leaner alternative is to revert to X-applications forwarded over ssh. To do that configure your ssh server to allow X-apps to be forwarded. In the file, /etc/ssh/sshd_config modify one line:

X11Forwarding yes

Then restart the daemon:

# /etc/rc.d/rc.sshd restart

You can now login from a remote host, and start leafpad:

$ ssh -Y doug@192.168.1.100

doug@rp-1:~$ leafpad &

This will allow you to edit remote files on the remote computer, the raspberry pi in this instance.

Here is a somewhat fudged screenshot.