Archive for the ‘OpenBox Window Manager’ Category

For The Love Of………. ASCII Fish???

“Asciiquarium is an aquarium/sea animation in ASCII art.”

Being a lover of ASCII art, I was quite thrilled to have stumbled upon this wonderful little program (Asciiquarium) back in 2006/2007 or so.  At the time, after performing a very custom Gentoo build with a KDE front-end, I discovered that Asciiquarium was built into the system as a KDE screensaver.  Not being a huge fan of KDE at the time and after experimenting with other Window/Desktop managers, I found that in order to enjoy the colorful ASCII fishies, I would need to build the software from source.  At the time, there were occasional issues with installation on various systems, but now installation has become much easier…

Near the beginning of 2008, I asked if anyone knew how to port Asciiquarium to Gnome as a screensaver, but got no love in return.  I’d still like to know how to port this to Gnome, but I’d also like to make it work as a screensaver for OpenBox too, since that’s what I primarily run on my personal machines.  I always figured that if I could ever find the time that I’d start exploring how to do this on my own, as I’m sure that it would be a fun learning experience.  Still have not found or made the time for this project so I’m open to your ideas and sharing of knowledge.  For now, when I want to see my fishy friends, I simply launch them from my favorite terminal emulator with a simple command: asciiquarium

Reading the Asciiquarium-related comments in Kmandla’s post about Random Screensavers for the Console, it occurred to me that others may not know about and might benefit from the DEB packages that Dave created to make the installation a bit easier on Debian & Ubuntu systems.

For fear that one day, the things that other people have created (the things that I love most…) might disappear without warning, I sometimes tend to create archives of those things… so for our future enjoyment (yours and mine…), I have packaged Dave’s DEB files along with a README file that fills in any gaps and hopefully explains any details that you may wish to know.

When running Asciiquarium, there are no command line arguments. The, options are:

q    quit
r    redraw (will recreate all entities)
p    toggle pause

Download the tarball: http://www.hilltopyodeler.com/scripts/asciiquarium-deb.tar.gz

Open your terminal, navigate to the location where you stored the file, and extract the files by typing:

tar -xvzf asciiquarium-deb.tar.gz

First install the libterm-animation module and then install the asciiquarium module. You can open your file manager and right-click on the DEB files and select “Open with GDebi Package Installer”, or type in the following commands:

sudo gdebi libterm-animation-perl_2.4~inx3_all.deb
sudo gdebi asciiquarium_1.0~inx2_all.deb

Although I’ve been successful with installing Asciiquarium from source on a number of different Linux distributions, using the DEBs contained within this .tar archive, I have successfully installed this on the following OS’s:

  • CrunchBang Linux 9.04
  • CrunchBang Linux Statler 10, Alpha 1, 2, 20101205, 20110105, and 20110207
  • Linux Mint LMDE 201009 & 201101
  • Ubuntu Jaunty Jackalope 9.04
  • Ubuntu Lucid Lynx 10.04

Thanks goes out to Kirk Baucom for creating such a wonderful little application, to Joan Stark for creating much of the artwork, and to Dave (mystery man with no last name…) for packaging Asciiquarium for Ubuntu and Debian systems.

Open Terminal, Execute a Command, and Keep Terminal Open

A while back, someone asked me if I knew of a way to launch a terminal session from the Gnome panel, execute a command, and keep the terminal open.  The example that I will use is launching the nmap help feature.  Surely there are multiple ways to do this.  Of course you could always put the ‘&’ character after your command, but what if you wish to launch a command followed by a flag or by its own argument, such as with “nmap –help“?  Try executing the following command from your panel or menu and see if it works; it does NOT work for me.

xterm -e nmap --help &

I’ve created a very simple script called helperScript.sh.  Download it and save it to your home directory, or some other location of your choosing; rename it so that you loose the “.txt” file extension and then make the file executable (chmod 755 helperScript.sh).  In this example, I will assume that you have saved the file to your home directory.  Like I said… the script is pretty simple:

#! /bin/bash
$@
/bin/bash

This script should be called from your panel/menu launcher using a command structure that will launch your terminal emulator, then call on this shell script, and then provide an argument that is taken in by this script (“$1” or $@); this argument tells the script which command to run (for instance: nmap –help).

SYNTAX: [command] [path/to/helperScript.sh] [argument]

When launching the script from your panel or menu, please note that:
– The word “USER” should be changed to your own username
– Change “nmap –help” to whatever is specific to your needs
– Make sure that helperScript.sh is executable (chmod 755 helperScript.sh)

The command you should use in your panel/menu launcher is as follows.

Launch with gnome-terminal:

gnome-terminal -x /home/USER/helperScript.sh nmap --help

Launch with xterm:

xterm -e /home/USER/helperScript.sh nmap --help

Launch with Terminator:

terminator -x /home/USER/helperScript.sh nmap --help

Note: [-x] and [-e] are the flags for “execute”, depending on which terminal you are using.  For some reason, “terminator -x” will launch some things properly using Terminator, but not others; I’m not sure why at this time.

At the bottom of the script, the reference to /bin/bash tells the terminal to keep a bash shell open and running.

Credit is due to 13u11fr09 for coming up with the basic concept for this script; read his/her thread at http://ubuntuforums.org/archive/index.php/t-296628.html.

Dark Themes for OpenBox

Funny how time seems to just fly by.  Below is a list of themes for OpenBox that I created nearly a year ago and I’ve been meaning to post them on Box-Look.org all this time.  The one called “Studio-2” is the theme that I primarily use on a daily basis, and “Sage” comes in as my second favorite.  The other themes are not ones that I use much (if ever…), but perhaps someone might like them.

Beamin:

Download Here: http://box-look.org/content/show.php?content=133313

Coder:

Download Here: http://box-look.org/content/show.php?content=133314

Sage:

Download Here: http://box-look.org/content/show.php?content=133315

Slip:

Download Here: http://box-look.org/content/show.php?content=133316

Studio-1:

Download Here: http://box-look.org/content/show.php?content=133318

Studio-2:

Download Here: http://box-look.org/content/show.php?content=133319

Studio-3:

Download Here: http://box-look.org/content/show.php?content=133321

Making Life Easier With Scripts For Nautilus

In my previous post, I talked about how you can use Nautilus and the nautilus-image-converter as tools for resizing and rotating your images.  Although PCManFM is my preferred file manager, and I often use Thunar if I am bulk renaming files, I keep coming back to Nautilus for file management, network file browsing, image resizing/rotation, and for the ability to use custom scripts that help make life a little bit easier.  It is the latter that I wish to mention here.

Add Music Easily to the MoC Player Using Nautilus

The Nautilus script that I use most frequently is specific to the MoC (Music on Console) music player.  Credit for this one goes to Tyler “-z-” Mulligan. I’ve written in the past about the MoC Player, and of all of the music players that I’ve tried in the past, this one is by far my favorite.  So how does the script work?  Download Tyler’s script and save it in your ~/.gnome2/nautilus-scripts folder.  Change the permissions so that the file is executable.

$ chmod +x mocp.sh

Open up an instance of MoCp (the MoC player), open up Nautilus, and navigate to your music.  You can select individual files or large selections of files, then right click on the file(s), hover over the Scripts item, then select mocp.sh from the list.  This will add the file(s) to your MoCp playlist.  It’s an efficient way of loading music into your player, and is especially nice when you are looking to pick and choose only a song or two from various albums.

Mount and Unmount ISO Images Using Nautilus

Other scripts that I use on occasion are for mounting and unmounting an ISO file. Although there are other methods listed here and here, and likely even more here, I have had good luck with the mount.sh and unmount.sh files that were posted by Lori Kaufman on the Help Desk Geek website.

Save the mount.sh and unmount.sh files to your ~/.gnome2/nautilus-scripts folder, and change the permissions so that the files are executable.

$ chmod +x *.sh

Using Nautilus, navigate to your ISO file, right-click on it, then select “Scripts” from the menu; then select mount.sh to mount the file, or unmount.sh to unmount an already mounted file.

Check out Lori’s article for more screenshots and instructions.

Note to Self: Here are some other Nautilus scripts that I have not yet explored, but will put on the backburner for later.

Bulk Resizing & Rotating Images In Linux Using Nautilus

Although I’ve been meaning to share this information with you for some time, it was a comment in this post that recently prompted me to get busy writing.  Someone asked the question, why use Nautilus in OpenBox?  Gnome is the desktop manager that I use at work, and Nautilus is the file manager that I use most often on that machine; however, all of my personal machines run either OpenBox or Pekwm, and I wanted to still be able to use the scripts and features that I have grown to love that are available for Nautilus.

How to bulk resize images with Nautilus:

This is a feature that I use regularly in Nautilus.  Sure, there are likley other ways to bulk resize images, possibly with Imagemagic or some other cli tool, but the method that I am about to describe is fast and easy, and it works well for me.  First, make sure that you have installed Nautilus.

$ sudo apt-get install nautilus

Then install the nautilus-image-converter package.  If you have opened Nautilus, make sure that you close the application before installing the image converter package.

$ sudo apt-get install nautilus-image-converter

If you are a Gnome user, you may have to restart Gnome in order for the settings to take effect; if unsure, just log out and log back in. If not a Debian user and you wish to use the nautilus-image-converter application, you can find packages for other Linux distributions here:
http://www.bitron.ch/software/nautilus-image-converter.php

Open Nautilus and navigate to an image or selection of images.  Right-click on the image(s) and you will see that there are two new options listed near the bottom of your menu.  Resize Images / Rotate Images

Click on the Resize Images option.  If you have selected multiple images, this tool will bulk resize all of the images for you. Various resizing options are available to you:

  • Resize using a list of predetermined sizes
  • Scale images based on percentage of reduction
  • Specify a custom sizing scheme
  • Make a copy of the original file, resize it, and append “.resized” or some other custom wording at the end of your file names
  • Resize in place, meaning that you will be resizing your original file

If you are resizing a mass of high resolution images, go get yourself a cup of coffee and some breakfast because it’ll take a while, but far less time than if you had to resize each image individually with your favorite image editing tool.

Rotating Images With Nautilus

Of course, there are many tools that will allow you to rotate an image, and I will often times use alternate tools for image rotation (such as GPicview), but the nautilus-image-converter is a great choice if you wish to bulk rotate images, or if you have a need to maintain the integrity of your original image file and create a rotate copy.  As described above, using Nautilus, select the image or images that you wish to rotate.  Right-click on the image(s), select the Rotate Images option, and specify your desired options.  The choices are:

  • Select a preset angle (90ᵒ clockwise/counter-clockwise, or 180ᵒ)
  • Custom Angle (degrees clockwise)
  • Create a copy of the original file, rotate the copy, then append something to the file name, such as “.resized”
  • Rotate in place, which will rotate the original file

Problems/Issues for OpenBox Users

Nautilus has a tendency to take over your desktop if you are an OpenBox user.  If you are unsure of what I am saying, just launch Nautilus and you will see what I am talking about.  Your desktop wallpaper image will likely change or go away, and you will loose the ability to right-click on your desktop and obtain the beautiful menu that you are so accustomed to seeing.  Urukrama has written a very detailed guide to using OpenBox (much of which also applies to Pekwm) and he explains how to prevent Nautilus from taking over your desktop settings.

For a single-use (non-permanent) way to launch Nautilus in a way that it won’t take over your desktop settings, use:

$ nautilus --browser --no-desktop

Alternately, to make this setting more permanent (this is what I do…), type the following command into your terminal:

$ gconftool-2 --set /apps/nautilus/preferences/show_desktop --type bool False

Summary

As I stated before, there is usually more than one way to accomplish a particular task, and it’s likely that there are some lengthy and complex commands that will allow you to bulk resize images via cli, and perhaps there are some other GUI tools available.  The “best” method to accomplish a task is really a matter of individual opinion; the method that I have described is what I have found works the best for me.  If you have a bulk-image-resize procedure that works well for you, I’d love to learn about it, so please share it with us in the comments.

Latest Desktop

My Thinkpad T30 is probably the machine that I use the most, and it is running Crunchbang Linux.  Screen resolution is only 1024×768.  This screenshot shows one of my recent OpenBox themes; I call it Sage.  I’ll be posting this one along with a handful of other themes on box-look.org sometime soon.  The conky file that I am using is a modified version of Hanna’s.  The black diamond-plate graphic I believe was originally created by Zwopper, although his version had a white #! located in the center of the graphic, which I removed — it’s not that I don’t want to plug my favorite OS, but I was going for simplicity here.

Simple desktop for the T30

Running MoC audio player and htop.

Return top

-==[ Hilltop_Yodeler ]==-

Welcome to HilltopYodeler, a place where we'll do some hollerin' about Linux, OSS/FOSS, CSS/XHTML, pickin', paddlin', tinkering, snow, rock, bicycles, and other stuff that we're freaky for. Much of what will be discussed here will be related to Ubuntu Linux, Debian Linux, Crunchbang (#!) Linux, Damn Small Linux, OpenBox, PekWM, and Gnome. Grab your coffee... pick up your piolet... tuck in your whiskey nipper... have paddle in hand... grease your boards... bend some wires... plug into your lappie, mow down some sushi... and get your fool-freak yodel on!