-   Linux - Software (
-   -   Looking for a Terminal Emulator that's fun to use? Try out this program I wrote! (

yanom 05-12-2011 10:41 PM

Looking for a Terminal Emulator that's fun to use? Try out this program I wrote!
Here is a short Python program I wrote. It's a wrapper over XTerm.

It's called RCXTerm, short for Random Colored X Terminal. It arose out of my inability to choose a text color for my terminal. I then wrote this to randomly choose a color for me each time I open it.

To run it, copy the source code below into a file, name it rcxterm, and make it executable ($ chmod +x rcxterm works for this), and run it. You can edit the third and fourth lines of text to change the available colors and the font size. Once you're done, you can copy it into the /usr/bin directory and all system users can open it with the rcxterm command (but not edit it).

You can pass (most) arguments to rcxterm like you might pass them to xterm, so long as those arguments are enclosed in quotes.

For example, running rcxterm "-geom 20x20" would be the same as running xterm -geom 20x20 . For some reason, certain arguments like -title are a bit buggy on RCXTerm.

import sys

available_colors = ["magenta","yellow", "white", "green", "cyan", "orange", "purple"]
fontsize = 19

import random
import os

if (len(sys.argv) > 1):
    argstring = sys.argv[1]
    argstring = "" #nothing.

color = random.choice(available_colors)
font = "-*-courier 10 pitch-*-r-*-*-" + str(fontsize) + "-*-*-*-*-*-*-*"

command = 'xterm -font \"' + font + '\" -bg black' + ' -fg ' + color + ' ' + argstring



xzcallaway 05-13-2011 03:04 PM

That is very pretty.

yanom 05-23-2011 06:03 PM

Oh, by the way, this does not appear to work on Macs. Despite these being UNIX-based and having xterm installed, rcxterm wouldn't start on my friend's mac.

EdGr 05-23-2011 11:28 PM

Sometime around 1990, my employer bought Unix workstations that, for the first time, had color displays. The previous workstations we used had monochrome displays.

To celebrate, I wrote a shell script to open a bunch of xterms all in different colors, and did all my work that way for several years. My screen looked like a tie-dye shirt.

My co-workers thought it was nutty.

Fun times. :D

yanom 05-29-2011 11:11 AM

New feature added: pass arguments to rcxterm that you could pass to xterm. See the Original Post for more.

All times are GMT -5. The time now is 10:35 AM.