GNU screen is pretty badass

Posted in general news on October 26th, 2009 by tetujin

so i’ve been using screen for a couple years now, and i really dig it. i use it to keep tabs on my ubuntu box at home, where i run irssi on top of znc, apache, and a few other services. the only thing that bugged me up until now was that any time i needed to reboot (patches or power outages), i’d have to spend extra time interactively logging in and setting up my screen session all over again. i fixed all that this morning.  i did two things:

  • i did a little RTFM’ing of the screen man page so that i could write a custom .screenrc file (actually .screen.boot) that would start up exactly the way i wanted it to every time, and
  • i taught myself a little bit of bash so that i could write a boot script that would test for screen sessions and if none existed, would start up my custom screen for me so that it would be ready before i even logged in.  yeah, i’m a tcsh guy by nature.  i don’t know what to tell you.

first, i made a .screenrc.boot (as opposed to a normal .screenrc) to differentiate from a normal invocation of screen, because i only want this custom setup at boot time, and not every time i invoke screen.  don’t feel that you have to, but it might be a good idea.

following are some example commands to add to the end of your ~/.screenrc.boot.  check the man page for more details, or google for ‘screenrc’, there’s a lot of info out there.  thusly:

screen -t irssi 0 /home/alice/scripts/zncirssi
screen -t shell1 1 /bin/tcsh
screen -t shell2 2 /bin/tcsh
screen -t rtorrent 3 /usr/bin/rtorrent
screen -t alpine 4 /usr/bin/alpine

to explain the syntax briefly here:
screen -t title windownum process
this lets me give each window a name, and windownum is the window number i want each process to have, with the process to start at the end.

then, once i had my .screenrc.boot set up the way i liked, i created the boot script as /etc/init.d/screen-startup.   you can give it any name, really.  i cribbed my version from /etc/screen-cleanup.  don’t forget to link the finished script to /etc/rc3.d or wherever is most appropriate for your flavor of *nix, so that it actually executes at boot time.  here’s the script minus some of the irrelevant header comments:

#!/bin/sh
# Script to start screen on boot for users.
#

set -e

SCREENDIR=/var/run/screen

if [ "$(ls -A $SCREENDIR/S-alice | grep boot)" ]; then
    echo boot screen session already running for alice
else
    # -dm runs the screen detached,
    # -S lets me define a name for the session,
    # -c lets me pick my config file.
    sudo -u tonye /usr/bin/screen -dmS alice.boot -c /home/alice/.screenrc.boot
fi

exit 0

if you have multiple users who needs screens at boot time, feel free to add additional if conditionals.  i could probably set up a foreach, but i was lazy.

additionally, zncirssi is a short script that runs znc and then irssi right afterwards. if run alone, znc will fork into the background and then close the originating screen window. this way you can make sure znc forks and then once running, lets irssi run.

contents of zncirssi:

/usr/bin/znc ; /usr/bin/irssi

that’s pretty much it. i hope you find it useful.

edit: i found that the bash script didn’t launch screen the way i thought it should.  not sure why.

No comment so far

Don’t do that.

Posted in general news on August 15th, 2007 by tetujin

I’ve seen other examples where the art in question could fall into the ‘Homage or Ripoff?’ category, but today it hits closer to home than I had suspected it ever would. A good friend of mine works in the cinematics division at Blizzard, and today I got these two images in the mail from him. The first is a print ad from Vancouver Film School, in which they seem to be using some student art, and the bottom image is a still frame from the Burning Crusade cinematic (Burning Crusade being the first expansion pack for the ever-popular World of Warcraft MMO). This print ad is from the SIGGRAPH edition of Animation Magazine, no less. And you can bet your ass these images are already making the rounds at the Blizzard offices down in Irvine.

homage, or ripoff?Don’t get me wrong, I think that student homage is great and studying other people’s work is a great way to learn, but the usage in this instance is just wrong. I graduated from VFS back in 2003, and unless things have changed radically, students still need to show their source material when they’re creating their work, and plagiarism is highly frowned upon. Whether or not this instance qualifies as plagiarism could be debated, but the fact that VFS are using this work in an advertisement strikes me as really stupid and insulting. “Oh, hey Blizzard, thanks for your hard work, we’re going to use this to round up a few more students, is that okay?” except not so much with the asking or the legitimacy.

This is either the student’s fault for not disclosing all sources of inspiration like they were supposed to, or VFS’s fault for not giving a shit about who they make money off of. Let the student put it in his/her demo reel at his own risk, sure, but for christ’s sake don’t use it to make money for your school when it’s so very obviously someone else’s work.

VFS, I hope you’re listening. I really want to be proud of my vfx alma mater, but this puts you in a very poor light.

Edit: I realize that this is a strongly worded post, so I want to add that there are definitely good people working up there at VFS, but stupid things like this overshadow that good work and make the school look it doesn’t have any idea what it’s teaching or producing. Obviously something broke in the chain of events that lead to this advertisement, and whatever it is that broke (or was broken already) needs to be fixed.

1 comment - Latest by:
  • nathan king

    I have looked over this site for an hour trying to find a “contact” link. That’s why I am leaving a comment on some random post.

    I have 4 words for you:
    fireworks on the golf course.

    damn it – that was five. could have sworn golf course was a compound word.
    -nathan

    PS – the tattoo rocks!

homebrew, ho!

Posted in general news on July 9th, 2007 by tetujin

m3 ds simplyso i got my M3 DS Simply the other day, and i’ve been playing with it a lot the past week or so. here’s a summation:

i paid $90 at themodchipstore.com for the M3 and a 2gb microSD card. i bought it as a package so that i could be sure to have a microsd card that would work error-free (see Scorpei’s DS wiki online for details). if i had been more brave, i would have bought the R4 (exact same hardware as the M3) somewhere cheap ($30), and ordered the kingston 2gb card from amazon (even cheaper than the $40 i paid). however, i’d just sold a bunch of stuff i didn’t need, so it was worth it.

setup is a little arcane, since the chinese english is so terribly bad, but once you get understand what files go where, it’s very easy. i even made my own skin, since the default one is pretty stark and ugly. now that i have it all nicely configured, though…

1.) DS Games: i have all the carts that i own (and maybe a few others) on the card, and gameplay is simple and awesome. i can even cheat, thanks to the M3. online gameplay doesn’t work for everything, but for most it’s great.

2.) DS linux: boot linux, ssh to home machine, OR run any of a multitude of precompiled apps. i use dslinux to ssh to my home machine and then connect to my screened terminals. \m/ very easy install, also.

3.) homebrew apps: a very nice irc client, a good organizer app, and even an xm tracker, among other things. running apps is just like putting a game rom on your card.

4.) homebrew games: one word: lemmings. playing lemmings was never so awesome. also, check out the ports of nethack and SCUMMVM for the DS.

5.) moonshell: this is a shell that launches from the m3′s boot screen, and it handles txt, jpg, and a lot of music files (including mp3s), as well as video (if properly converted). the txt viewer is about what you’d expect, and the jpg viewer is so-so (ComicBookDS is better, IMO), but there is very little that beats listening to NES and SNES soundtracks in their original form. i’m listening to final fantasy VI right now, and it’s freaking awesome. also effortless, since the tracks auto-advance (it ignores looping).

all in all, this is one of the best purchases i’ve made in a long damn time.

1 comment - Latest by:

xfce

Posted in site news on November 9th, 2006 by tetujin

my poor old pentium4 – 1.4Ghz with 256MB currently runs about 5 websites with yer standard mySQL/php/etc backend, and doubles as my browser and testbed when my main machine is preoccupied (read: i’m playing world of warcraft). poor thing is choking on swap, but SDRAM is fucking expensive and i’m not about to lay down $300 for the ram. not yet, anyway. so i found out about xfce this morning (thanks, StumbleUpon!). my machine is already happier, and in the process, i learned all the things i ever wanted to about xterm (i had gotten used to the fatness that is konsole).

No comment so far

i should backtrack a little

Posted in software on June 6th, 2006 by tetujin

so in one post, i’m talking about gentoo vs. SuSE, and in the next one, i’m revealing how the machine is working fine with MAMEwah and XPSP2. perhaps i should explain a leetle, no?

so i didn’t get too far in the gentoo build. i realized how inane it was to build every little thing that i might need from source. i know that there’s a performance gain, but the benefit didn’t outweigh the cost for me. so i switched to ubuntu, which seemed to be generally the same thing but a much more stupid-friendly build. again, i got stuck. not for lack of trying, but at work we use SuSE, and i’ve had my head wrapped around the way novell does linux for so long that it was a real pain to try and think about things the ubuntu way. conf files are in different directories, even runlevels work differently. again, not worth it. i’m not slagging the build of either flavor; i just didn’t want to invest the time to learn a new paradigm.

so i tooled around a little bit more with advMAME, and discovered that a lot of my initial problems in SuSE with svgalib and advmame were that i hadn’t had everything installed that i needed. there was a lot of kernel rebuilding and package-installing. it was very intense, and it’s already faded from my brain, much like the few glorious days after finals are over when everything leaks right out of your ears. suffice to say that i got it all running, but then advmenu would randomly hang when advmame was done running a game, and i couldn’t get the damn frontend to come back without canceling the process and launching advmenu again. not really great for an ‘embedded’ solution inside a cabinet. so after much more tinkering and hemming and hawing, i let loose a great cry of anguish, and installed XP instead. you know something? mamewah runs great. i’m sad that i couldn’t get linux to be the toy i wanted it to be, but i’m much more happy in the end, knowing that my end solution works.

No comment so far

the sitch

Posted in software on May 16th, 2006 by tetujin

so here’s what’s happening recently:

not much.

ha! i kid. seriously, though. we’re still moving ahead, but slowly. right now i’m trying to get the right build for the box. i want a good combination of minimal overhead vs. ease of maintenance, and this is proving to be hard to set up. :) there’s an advanceCD build that boots straight off of a cd (very minimal overhead), but it would need to have to be altered by hand to look at the hard drive, etc. (and we’d have to do it again every time we decided to use a new release), which == high-maintenance.

i think we may have a possible compromise in gentoo between overhead and maintenance, but i won’t say more until i have it up and running. i spent a good chunk of time last night setting it up only to realize that i’d set up the stupid partitions wrong, and i have to do it over. :) oh well.

just so you guys know, the project isn’t dead by any stretch of the imagination.

1 comment - Latest by:

gentoo

Posted in software on May 15th, 2006 by tetujin

i gave up on svgalib under SuSE. i know it’s probably an extreme decision to switch flavors of linux merely for a build problem, but i was also having bloat issues, since we’ve only got a 20gb HDD to work with at the moment. i wasn’t able to get a minimal install to my liking without expending considerable effort to wade through pages of dependencies in YaST, so i decided to see what gentoo has to offer (i’ve noticed lots of people saying that gentoo is what they’ve used for their cabinets).

so, we’ll see what happens. i’m doing my first emerge –sync right now.
in other news, not much is happening. we’re still moving forward, though. it’s just quiet. maybe… too quiet. ;)

i know, i know. i could use AdvanceCD, but i want a little more than that, and i don’t like the potentially over-complicated upgrade path for what is essentially a static disc image. i’d have to rewire the config files every time a new disc came out, and i think it would just be ugly. plus, if i left R&H, not many people would be able to maintain the machine, which could be Bad.

No comment so far

i’m not a programmer

Posted in software on May 12th, 2006 by tetujin

yet, i’m trying to install svgalib on this box. just for advmame. i must have some kind of latent masochism or something of which i wasn’t previously aware. sigh.

No comment so far