Cool, Fun, and Mostly Useless Things to do with Linux, V2
=========================================================
:author: Aaron Ball
:email: nullspoon@oper.io


It's been almost exactly two and a half years since I wrote my first
post,"link:?p=Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux[Cool, Fun,
and Mostly Useless Things to do with Linux] ". Since then, so much has changed
in the open source world, that I think it might be time to write a new post
detailing a few more ideas I have had for weekend projects.

&lt;obligatory-marketing-lead-in>

Do you often find yourself on the weekend bored out of your mind, hoping the
Linux/open source community provided something of real value to you? Do you
wish to be closer to Richard Stallman or Linus Torvalds (but not at the same
time - they don't like each other) in the hope that some of their knowledge
will rub off on you?

Well look no further. This post will have you using several of their products,
putzing around with their source code and causing general confusion in both
your personal and your professional life!

&lt;/obligatory-marketing-lead-in>


Okay, now that the opening is out of the way, let's get to the ideas.


* <<linux-general, Linux general>>
* <<linux-as-a-server, Linux as a Server>>
* <<linux-as-a-desktop, Linux as a Desktop>>
* <<linux-development, Linux Development>>



[[linux-general]]
Linux General
-------------

Not all of these projects require a "Linux server" or a "Linux desktop".
Most of these are quite doable with either category.

* Learn all about systemd, its scheduler, networking manager, init "scripts",
  logger, socket manager, etc. [line-through]#so you know why you shouldn't be
  using it#.

* Learn to version control your scripts with link:https://git-scm.com/[git].

** This is a tremendously helpful tool that will run on any desktop os really.
   I use git for versioning not only my source code (bash, perl, c, etc), but
   my link:https://oper.io/src/nullspoon/oper.io.git/[website content], my
   link:https://oper.io/src/nullspoon/resume.git/[resume], and my
   link:https://oper.io/src/nullspoon/ports.git/[crux ports].

* Build a git server with web ui for the previously mentioned git knowledge
  using link:https://git.zx2c4.com/cgit/about/[cgit] with cgi and the webserver
  of your choice (I use lighttpd).

* Learn how to write
  link:https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks[git hooks],
  specifically post-receive server-side hooks, for push style automation
  triggers.

** As mentioned in the previous item, I use git for my website content, resume,
   and crux ports, amongst other things. With my blog, a post-receive executes
   a script that parses asciidoc and writes an html file to my web root
   directory.  My resume git repo is pretty bland, but my crux ports
   post-receive triggers a synchronize of my port files and a re-update of the
   index. The possibilities are endless.

* Build a bi-directional sync and backup server using
  https://syncthing.net[Syncthing]. Bonus points for using it to back up your
  smartphone!

* Learn link:https://www.qemu.org/[Qemu] (with
  link:https://libvirt.org/[libvirt]) to virtualize systems for testing,
  development, and serving.

** I use this one on a daily basis for virtualize my Windows system at work.  I
   also use it often to test out new code being developed, or to replicate an
   environment for troubleshooting. A very good tool to have.

** This is useful on desktop and on servers. I use it mostly for desktop
   purposes, but on a server, you could virtualize an application server for
   secure isolation, virtualize multiple servers on powerful hardware to make
   the best use of it, etc.



[[linux-as-a-server]]
Linux as a Server
-----------------

This category we can safely say requires a server with a static ip address (or
at least dynamic dns), and will be running most of the time, hence the server
category.

* Build an XMPP/jabber server for chatting with [line-through]#your GMail
  friends# anyone else using xmpp. My recommendations include
  http://www.ejabberd.im/[ejabberd] (this is the one I use) and
  http://jabberd2.org/[Jabberd2].

** Google
   https://gsuiteupdates.googleblog.com/2017/03/updates-in-g-suite-to-streamline-hangouts-and-gmail.html[is
   discontinuing support] for external xmpp clients as well as federation with
   external services (eg: your non-Google xmpp server) on June 26, 2017.


[[linux-as-a-desktop]]
Linux as a Desktop
------------------

* Store, encrypt with GPG, and version your password database with git using
  link:https://www.passwordstore.org/[pass], "the standard unix password
  manager".

* link:https://oper.io/index.php?p=linux_desktop:password_management[Script
  your password management] using link:https://www.passwordstore.org/[pass] and
  link:https://www.semicomplete.com/projects/xdotool[xdotool].


* Download all of your email locally using
  http://isync.sourceforge.net/[isync/mbsync] and set up command line mail
  using http://www.mutt.org/[mutt].
+
NOTE: This is a duplicate from the last version of this page, but this one uses
      mbsync and the old one suggested offlineimap.

* Encrypt a partition, a full system, or just a USB stick using
  https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt[dmcrypt with
  cryptsetup]

* Learn to install and run a source-based Linux distribution, like
  https://crux.nu/[Crux Linux].

** Several years ago I converted to a source based distro. It was so
   enlightening, that I went down the rabbit hole further and converted to
   something just a few steps up (Crux) from
   http://www.linuxfromscratch.org/[Linux from Scratch]. If you need to really
   learn Linux, I think there aren't many better ways than running a
   source-based distriution.


[[linux-development]]
Linux Development
-----------------

* Script a basic IRC bot

** This can be particularly useful for sending server status updates such as
   "<timestamp> going down for restart", "my ip just changed from $old to
   $new", etc.

* Write a standard logging framework for bash scripts with standardized,
  timestamped output and log levels.

* Learn how to write a preprocessed website using your scripting language of
  choice combined with cgi (you could be using bash instead of Java to program
  that website!)  :)

* Learn how to https://oper.io/?p=bash:waitpid_function[write a waitpid
  function] in bash, or perl, or python, or ruby, or c, or c\++, or even
  binary! The possibilities are endless!


[role="datelastedit"]
Last edited: {docdate} {doctime}
