Feb 2

Perpetual Screen Part Deux

Category: Computers, Linux

So, I’ve figured out how to add in a “fail-safe” to the perpetual screen, so that if you want to ssh without starting screen you can.  And it’s pretty easy.  First add the following to your sshd_config and restart ssh

AcceptEnv NO_SCREEN

Then add the following to the bottom of you .bashrc:   (Note: I named my screen ‘main’ you can name yours whatever you want)

NO_SCREEN=`echo "."$NO_SCREEN`
# Hack to get around if the variable is not set

if [ $TERM = "screen" ]
# If we are already in a screen do nothing
then
     echo -n ""
elif [ $TERM = "dumb" ]
# If we are using scp do nothing
then
     echo -n ""
elif [ $NO_SCREEN = ".true" ]
# Our fail safe to ssh w/o screen
then
     echo -n ""
else
# Startup screen
     screen -Rd main && exit
fi

Then, you can either ssh like normal to start the screen, or do the following to login without screen starting

export NO_SCREEN=”true”

ssh -o “SendEnv NO_SCREEN” user@host

Works like a champ

No comments

Jan 15

Steam + Windows = FAIL!

Category: mutt

I understand that operating systems crash.  This happens, I know.  However, the frequency in which my Windows installation crashes is just sad.  This usually only causes annoyance when it crashes in the middle of a game.  I can deal with that.  However, when I am updating an application, such as, I don’t know….Left 4 Dead and Windows crashes, I have 30 minutes of pain, and an hour+ of waiting.  I assumed that steam would do like it does when it installs a game.  If you shut down the system, it pauses the download, and then resumes it.  But when my system crashed it ate the update, and it wouldn’t launch.

Then I tried to remove and then reinstall via steam.  This failed.  Then I tried to remove the game files.  This failed.  After seaching I found a page that talked about removing the client blob file.  That failed.  I eventually had to remove all the files but the steam.exe and the steamApps folder.  But I did have to remove any files that talked about L4D.

So, after about 1 hour of downloading I should have a ready to play game.  Sigh.  If only the other peices, like the game verification, game removal or update worked I would have this hassle.

No comments

Jan 6

Combining pdf with linux via the command-line

Category: Linux

I’ve always found a need for this, and with some digging, I’ve found a couple of ways to do this.  The simplist is with ImageMagik, but I’ve found the default values leave the quality a little lacking.  However, I’ve found an article that uses GhostScript to do it, and it does a wonderful job.

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf input1.pdf input2.pdf

They suggest putting it in an alias, but I’ve gone a step further and just put it in a bash script in ~/bin/combinepdf

#!/bin/bash

if [ $# -le 1 ]
then
     echo "usage: combinepdf output.pdf input1.pdf ... inputN.pdf"
exit -1
fi

OUTPUT=$1

if [ -e $OUTPUT ]
then
     echo "Output file \"$OUTPUT\" exists"
exit -1
fi

fnum=2

INPUT="$2"
ARGV=( $@ )

while [ $fnum -lt $# ]
do
     INPUT=`echo $INPUT" "${ARGV[$fnum]}`
     let "fnum += 1"
done

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$OUTPUT $INPUT

Then chmod a+x ~/bin/combinepdf and then run it.

No comments

Dec 29

Perpetual Screen

Category: Linux

So, I’ve been tossing around the idea for the past while to make is so that screen starts up every time I ssh into my box at the house.  Well, I finally broke down and did it, and it wasn’t that bad at all.  I’ve named my screen session main you can call it whatever you want.  Just add the following to the end or your .bashrc If you don’t put it at the end, you the rest of your .bashrc won’t get evaluated.

if [ $TERM == "screen" ]
# If we are already in a screen do nothing
then
     echo -n ""
elif [ $TERM == "dumb" ]
# If we are using scp do nothing
then
     echo -n ""
else
# Startup screen
screen -Rd main && exit
fi

It works so far with everything I’ve had to do, but we’ll see if I run across any other problems.

No comments

Dec 15

When security becomes too much.

Category: Uncategorized

I’m all for security.  I believe that in a time like now, you have to be sure that the data you are getting, storing or sending has to be verifiable.  However, there is a time when this is not the case.  When security become a hindrance to everyday work, that’s when it is a problem.  Imagine having to stop your work every 5 minutes to swipe your finger or type your password to prove that you are using the computer, and that someone didn’t tie you up and throw you under your desk.  I know that it seems a bit too much, but the same thing could be said for encrypting every email you send.  I don’t think an email about cats doing something funny needs to be encrypted.  The same holds true for other things that verifying the source doesn’t truly matter.  If I send an email to someone scheduling a meeting, I don’t care if it’s really them sending an email back saying they’ll be there.  It’s not like an axe murder is going to take their place, and if they had encrypted their email, I wouldn’t get killed.  Oh well, looks like I’ll keep having to type my ridiculously long GPG password just to decrypt an email saying ‘ok’. </rant>

No comments

Dec 12

Mutt and gnupg

Category: Linux

Part of my job has now required me to actually start using my gpg key for more than just goofing off, or the occasional one-off.  So, as part of that I wanted to make sure I have all of my work mail clients configured to work with gnupg.  As a I talked about in a previous post this is pretty easy in thunderbird and firefox (for gmail).  And I thought it would be difficult for mutt.  But it’s not.  Pretty much the first link in a google search for ‘gnupg mutt’ lead me to this page.  Which has everything you need.  Then I realized that I already had it in my .muttrc, but it was commented out.  So I’ve updated my .muttrc on dotfiles.org The only thing that wasn’t explained in the documents is how you ecrypt or sign if auto-sign is off.  After commiting the email, before hitting y to send the email, hit p to bring up the gpg.  It’s pretty straight forward from there

No comments

Dec 7

Running Boxee on Ubuntu

Category: Linux

First,  I know I’m going to hell for using Ubuntu.  But, I’m too lazy to compile xbmc and boxee on Fedora.  So, now that it’s out of the way.  Here’s the step-by-step:

  1. Install Ubuntu 10.4
  2. Add the extra boxee repo based on the instructions on boxee.tv
  3. Install mingetty and rcconf
    apt-get install mingetty rcconf
  4. Disable gdm with rcconf
  5. Add a boxee user with and add them to the “admin” and “audio” group
    useradd -G admin,audio -d /home/boxee boxee
  6. Add a .bashrc to /home/boxee
    case "`tty`" in
    /dev/tty1) startx
    esac
  7. Add .xinitrc to /home/boxee
    #!/bin/bash
    while [ 1 ]
    do
    exec /opt/boxee/Boxee --standalone
    done
  8. Make it executable
    chmod a+x .xinitrc
  9. Edit line in /etc/event.d/tty1
    #exec /sbin/getty 38400 tty1
    exec /sbin/mingetty --autologin boxee tty1
  10. Reboot and pray
No comments

Jul 22

Installation, Upgradation and Such

Category: Uncategorized

I’ve spent the past couple of days reinstalling both my laptop, and my wife’s laptop.  With that said, I Hate installing windows.  It’s horrible.  While I’ll be the first to admit the installation procedure has come a long way from from 20 some-odd 3.5 floppy discs, the installation time is still ridiculus.  Some things I have learned from this whole escapade is to have a backup of all the drivers from the manufacturer, write down your serial numbers and/or store them somewhere they won’t get lost/deleted and just because you have a compsci degree doesn’t mean you won’t forget to backup files on you laptop, and loose ~2 days of web work.

These are the approximate install times that I’ve had to deal with over the past days

  • Windows – Failed twice after 45 minutes – Successfully installed after 90 minutes
  • OSX – Clean install after 80 minutes
  • Fedora 9 – Clean install after 30 minutes
  • RHEL 5 – Clean install 15 minutes (@base)

I’m going to update my list of apps that I’ve found after redoing my mac sometime soon.

1 comment

Jul 5

My Favorite Apps

Category: Uncategorized

I’ve gone ahead and started a list of my “must have apps” for the three platforms I use the most.  Linux, Palm, and Mac.  (I didn’t include Windows, because the only apps that I use on there other than games, everybody already knows).  I intentionally left the programs that everybody and their sister already uses.  I also put this together, because I couldn’t find a good list of the “Must have palm apps”.  If there’s something you use and think I should check out, lemme know.  And I’ll try it out and add it to the list.

http://deadlypenguin.com/apps.php

No comments

Jun 27

Firefox, gpg, gmail and other security stuff

Category: Linux

So, I’ve started listening to a couple of podcasts:

TWiT – This Week in Tech

Security Now

And the later one has rekindled my love for security and whatnot.  It’s definitely made me put back on my tinfoil hat.  Because of this, I wanted to set back up my GPG stuff for email and whatnot.  It’s super easy in Thunderbird, by installing the Enigmail plugin (just make sure you pick the right arch and OS).  However, since I use google’s hosted mail for my personal mail, I was in a bit of a pickle.  Luckly, somebody else out there had the same idea and wrote FireGPG that will allow you to sign, encrypt or decrypt and GPG signed stuff on the web (such as the body of an email from gmail)

Just thought I’d plug those plugins and the podcasts.

No comments

« Previous PageNext Page »