Displaying articles with tag sysadmin
Posted by hank,
Thu Jul 19 15:55:00 UTC 2007
Zeroinstall is my new friend. It’s a package manager that’s decentralized, and can be used on machines where users need applications, but don’t know how to compile (or are unwilling to). Installing applications happens in the home directory, and once a program is run once, it is stored in the home directory for later use. All packages can be signed with GPG keys, and the packaging GUI is amazingly awesome.
Check out my 0install repository. You can run things like this:
sudo apt-get install zeroinstall-injector
0launch http://modzer0.cs.uaf.edu/repos/hank/0install/Processing.xml
There’s packages for all the popular distributions. Get it now! It’s awesome.
Tags: sysadmin
Posted by hank,
Sun Jul 15 00:17:00 UTC 2007
I use GNU Screen. A lot. I found an article linked from DIgg today that showed me how to use a setting called hardstatus to set the little bar at the bottom to my liking. I decided to mess around with it a bit, and I ended up with this:

It shows my hostname, IP, uptime, screen window number and name, date and time, and load averages. Pretty cool, huh?
This is how you do it:
- First, create a
.screenrc file and dump this in there:
hardstatus alwayslastline
backtick 1 60 60 /home/hank/.screen_hardstatus
hardstatus string "%{Gk}%H: %{+s y}%1` | %=%n: %t%= | %m/%d %c | %{+b}%l"
- Now, see the line that starts with backtick? That tells screen what program to run for assigning output to
%1` in the hardstatus string. Let’s make the .screen_hardstatus file as well (make it in your own home directory).
#!/bin/bash
# Script to get run by hardstatus in screen.
# Prints customized single-line system stats
IP=`ifconfig eth0 | grep Mask | cut -d: -f2 | cut -d " " -f1`
UPTIME=`perl -pe 's/^(\d+).*/sprintf("%d", ($1\/(24*3600)))." days"/e' /proc/uptime`
echo -n "$IP | Up: $UPTIME"
I cheated and used perl, but all of this could safely be converted to sed/awk easily. All this does is print my raw dotted quad IP address, a pipe, and then the current uptime in days rounded down.
- Now, just run
screen. You should see something similar to the first picture. I used this page a lot to customize the colors, etc.
Tags: sysadmin
Posted by hardwarehank,
Thu Oct 26 20:16:15 UTC 2006
I have been having a problem getting .Xdefaults to be loaded in X. This
is a major issue for me since I like my fonts to be a certain size in aterm,
but I don’t want to hack up my runline in fluxbox to reflect all the custom
settings. Therefore, I have all my settings defined in the .Xdefaults
file. So, tonight, after I upgraded to Edgy Eft, I decided that this needed
to be fixed. After a quick google google I found that all I had to do was
run:
xrdb -merge ~/.Xdefaults
And all my problems were solved. A quick insert into .fluxbox/startup and
I was in business.
In other news, Edgy Eft Rocks. Just customized the default GDM theme so it
looks better. I think I might want to get a MacBook or a nice Powerbook G4
for my next laptop. Apparently, in Linux, you can make the touchpad act like
Synaptics with a driver hack to put it in raw mode. As far as I can tell,
this is merged in the newest Linux kernels. This allows for the kind of tap
clicking I like (1 finger for left button, 2 for middle, 3 for right), and
thanks to a broken left touchpad button on the Asus M6N I have, I’ve gotten
used to this style of clicking, and I like it now.
Tags: sysadmin
Posted by hardwarehank,
Mon Aug 14 03:07:56 UTC 2006
This makes it so the user has to change their password on login:
# chage -M 1 <user>
# chage -d 1 <user>
Make sure to set -M back to normal afterwards
# chage -M 99999 <user>
This makes it so easy. Too bad it’s named like saying ”’change”’ with a cold…
Tags: sysadmin
Posted by hardwarehank,
Thu Aug 10 03:14:52 UTC 2006
Thanks to this page, I found what I was looking for:
Option "XkbOptions" "ctrl:nocaps"
Tags: sysadmin
Posted by hardwarehank,
Sun Aug 06 15:37:52 UTC 2006
Have you ever wanted to batch remove some Subversion files? Try this on for size:
svn rm `svn stat | grep ! | sed -e 's/^\!\s\+//;s/$/ /' | tr -d '\n'`
That will remove all the entries from svn stat that start with !. Very handy. Took a few minutes to write (sed wouldn’t get rid of my newline, so I used *tr* …), but it’s worth it.
Tags: sysadmin
Posted by hardwarehank,
Thu Jul 13 22:01:03 UTC 2006
I installed Ubuntu Dapper Drake on the ole’ laptop today, and needed ruby, but it wouldn’t compile correctly. Luckily, the internet saved me again. Here’s how to compile it without getting errors on Gem Setup
Tags: sysadmin