Finely Cultured Eric Danielson's Personal Blog

13Nov/090

Mac OS X Tip: Use a solid color background of any color

I've been annoyed by the inability to easily set a solid color background since I started using OS X. Apple ships a couple "Solid background" png files, but they're without fail Not the colors I want.

Turns out, there's a nice, easy way to get a solid color background of your choice that doesn't involve making a new image for each color you want. OS X supports transparency in PNGs used as wallpaper, showing the desktop color through the transparent parts. If you use a small transparent PNG and set it to "Center", you'll get a solid color desktop, and you can change the color using the color picker next to the "Center" pull-down.

I've conveniently attached a 128x128 totally transparent png file below:

Save me and use me as wallpaper!

Right-click above me!

Save this file to your "Pictures" folder, open up System Preferences, pick Desktop & Screensaver, select the blank picture, and choose "Center" from the orientation pulldown menu. A color selection will appear to the left - click it, and select the color you want your desktop to be.

Simple, but this has been periodically bugging the hell out of me for about a decade now.

Note: This is based on a tip on MacOSXHints, found here:
http://www.macosxhints.com/article.php?story=20021002055217828

2Nov/090

Quick script: Easy passwordless SSH setup

This is a quick one - I work almost entirely on remote servers via SSH & SFTP at this point, so passwordless SSH is a huge timesaver. The setup is easy, but it's a few steps and I always forget how to do it. I threw together this bash script to make it easier - to use it, run:

./passless.sh (username) (server)

The Code:

#! /usr/bin/env bash
MINPARAMS=2
if [ $# -lt "$MINPARAMS" ]
then
  echo
  echo "This script needs at least $MINPARAMS command-line arguments!"
  exit 2
fi
USER=$1
SERVER=$2
echo "---"
echo "Step 1: Generating RSA Key - Accept the default location & don't enter a password."
echo "---"
if [ -f ~/.ssh/id_rsa ]
then
echo "RSA Key already exists."
else
ssh-keygen -t rsa
fi
echo "---"
echo "Step 2: Creating the .ssh directory on the remote server."
echo "---"
ssh ${USER}@${SERVER} mkdir -p .ssh
echo "---"
echo "Step 3: Copying the ssh key to the remote server."
echo "---"
cat .ssh/id_rsa.pub | ssh ${USER}@${SERVER} 'cat >> .ssh/authorized_keys'
echo "---"
echo "Done! You should be able to log in now."
echo "---"
Filed under: Uncategorized No Comments
   

Pages

Categories

Blogroll

Archive

Meta