Skip to content

2007

Create a DVD with growisofs

#!/bin/sh

# Create an AUDIO_TS subdirectory if it does not exist
[ ! -d AUDIO_TS ] && mkdir AUDIO_TS

chown -R root:root AUDIO_TS VIDEO_TS
chmod 500 AUDIO_TS VIDEO_TS
chmod 400 VIDEO_TS/*

growisofs -dvd-compat -Z /dev/dvd -R -J -dvd-video .

Mount iso

mount -t iso9660 -o ro,loop=/dev/loop0 /var/tmp/some.iso /mnt/cdrom

encrypt

#!/usr/bin/perl

# Shows your encrypted password

print "Enter your password: ";
chomp($password = );
$salt = sprintf("%02x",($$^time^rand)&0xFF);
print "Your encrypted password is: ".crypt($password,$salt)."\n";

xsu

#!/bin/sh

# Program to run X-programs as root
# (when you get the "**WARNING** cannot open display" message)

su - -c "exec env DISPLAY='$DISPLAY'
XAUTHORITY='${XAUTHORITY-$HOME/.Xauthority}'
"'"$SHELL"'" -c '$*'"