April 29, 2012: Episode 7x14
PLAY:
Ogg 7x14 |
Speex 7x14
Klaatu interviews ScottL, maintainer of the Ubuntu Studio project.
- MD5sums:
- ogg 8bd50107e4035b0cf3a9abe52255117e
- spx 6f2f80e830b5219fea599a44079e53a1
- Important Links:
- Ubuntu Studio
- another gnu+linux multimedia solution based on slackware
March 31, 2012: Episode 7x13
PLAY:
Ogg 7x13 |
Speex 7x13
Klaatu sets up a git server, reviews listener feedback, including the GNU World Manifesto by (whether he knows it or not) Kristian-from-London, and relates JessiJames's tip on how to set up and use encrypted thumbdrives seamlessly on Linux. No April Fools jokes in this one; didn't quite plan that far in advance :)
Updated Shownotes
Ken Fallon emailed and demanded shownotes, and when Ken
Fallon demands something, you don't ignore him. So:
Git Server
Setting up a git server is easy! Klaatu does this on a local
server; if you intend to do it on a world-facing server, you
should probably look into increased security. Either way, the
simplicity and ease is pretty much the same:
On the server:
First, configure your git environment:
$ git config --global user.name "Klaatu von Schlacker"
$ git config --global user.email
klaatu@haackerpubllcradlo.0rg
-
Then make a new directory where your files will be
stored. It's not a bad idea to append it with .git, just because everyone else
(gitorious, github, etc) seems to do it that way.
$ mkdir
gnuworldorder.git
-
Then cd into the new directory
and initialize it as a bare (yes, bare. empty. void.) git
directory.
$ cd !$
$ git --bare init
$ pwd
That's all you need to do. It's set up. You're done. No,
seriously, it is.
Of course you'll want to now use it. Here's how.
On the client:
-
First clone the empty repository.
$ git clone 192.168.168.192:/home/klaatu/gnuworldorder.git
Git will cheerfully warn you
that you've just cloned an empty repository. That's not a
problem.
-
Next, cd into your new
directory:
-
Now you can start putting files into it. You can cd or mv
stuff into it, or just create new files with GNU Emacs or whatever.
$ echo "Gort, Klaatu
barada nikto." > qotd.txt
-
Now you've got a new file. See its status with:
This will reveal that yes, the file qotd.txt exists, but that it is untracked, meaning that git is not
(yet) keeping track of the file or whether it has
changed or not. We should fix that.
-
To add the file into git
proper, use:
The command is obvious. We use a dot at the end to mean
"add everything in this current directory that has been
modified or has changed".
-
If you're sure you want this file added into git, then
you should commit it. If you suddenly have a change of
heart, you can use git reset...but let's assume you want to commit:
An editor will open, and you should type in some kind of
commit message that will be meaninful to yourself and
others. Save the file, quit.
-
Now you can push the change to your git server. Since
this is the first time you're ever pushing to this
heretofore empty repository, you must use:
Once your initial commit is made, you can just use:
-
Curious about the history of your commits? use git log
Git in action
OK, so let's say that you do something crazy like:
$ echo 1 > qotd.txt
$ cat qotd.txt
1
You've just erased your entire qotd.txt file! What do?
Well, git can help:
$ git checkout qotd.txt
$ cat qotd.txt
Gort, Klaatu barada nikto.
Saved by git!
Encrypted thumbdrives with luksFormat
Jessijames in IRC taught Klaatu this trick. If you are on
freenode.net and happen to see Jessijames wandering around, thank
him for the lesson!
-
First, plug in your thumbdrive and make darned sure you
know where it is:
$ su -c 'dmesg | tail'
[1689579.379113] sdc: sdc1
[1689579.381433] sd 27:0:0:0: [sdc] No Caching mode page
present
[1689579.381435] sd 27:0:0:0: [sdc] Assuming drive cache:
write through
In the case above, my thumbdrive is clearly attached to
sdc and has one partition (sdc1) on
it.
-
If your drive has no partition on it, or too many, or you
just feel you need to reset it, you can make a new partition
table with cfdisk or fdisk or whatever. Also, we'll become root
so we can manipulate devices and mount them and so on:
$ su
# parted /dev/sdc
(parted) mktable
New disk label type? msdos
(parted) quit
-
Now to set up an encrypted container in which we can house
our secret filesystem.
# cryptsetup luksFormat
/dev/sdc1
You'll be asked to confirm this action, and you'll be asked
to create a passphrase. You should do those things.
-
Next, it's time to mount the drive. Keep in mind it doesn't
actually contain a filesystem yet; but we need to decrypt and
mount the container so we can make a filesystem in it.
# cryptsetup luksOpen
/dev/sdc1 zippy
# mkfs.ext2
/dev/mapper/zippy
-
Now we've got an encrypted container with an ext2
filesystem inside of it, located as an LVM volume at
/dev/mapper/zippy
Big deal. Now we have to mount
the filesystem so we can read and write to and from it.
In order to find out where the filesystem exists, we list
the /dev/mapper:
# ls -lh
/dev/mapper
brw-rw---- sdc1 -> dm-0
Ergo, my drive's mountable filesystem has a link to some
place called /dev/dm-0 (the decrypted version of the filesystem)
-
Mount the decrypted filesystem as you would any regular
drive:
# mount /dev/dm-0
/mnt/zip
cd into /mnt/zip and
make a directory for your normal user, and start using it!
When finished, umount as usual.
-
For bonus points, the next time you go to use the
thumbdrive, try it in the GUI (a "GUI" is kind of
like the Linux shell, but with wobbly windows). At least on
KDE, the thumbdrive's encryption is recognized and I'm
prompted to enter the password, and then it mounts as normal
in Dolphin. It's truly magical.
The GNU World Order Manifesto
By Kristian
-
Almost all people have the capacity to understand basic
logic/reasoning and given how obvious it is that there is terrible
suffering in the world, there is a morale imperative to seek to
understand and mitigate problems. This is basically the hacker ethic.
-
A little bit of knowledge significantly lowers the barriers of entry
for many computer uses, especially small server/website, multimedia
production, and even word processing. The user only gains this
knowledge by using simple approaches (ie, I don't have a computer science
degree but...)
-
There is no level of automated protection that can mitigate every
human error. If you install binaries on your pc without being certain
of their provenance you can never claim to be secure. In a networked
world the problem increases exponentiality. (The T0nid0 plug defaults
to serve your personal data to the world over an unencrypted
connection using an unsupported ubuntu install that runs entirely as
root-given that T0nid0 would never state this in their marketing or
the user manual, I had to rely on my self taught gnu/linux knowdedge
to understand my t0nid0 plug and never switch it on again!)
-
Introduction of code for no purpose involves taking risks with no
possible benefit (Many websites need 2 mb of html on a static page, but
run 30mb of php with all kinds of plugins that the user doesn't
understand or need.)
-
It is inevitable that a computer user will need to intervene when
something doesn't work. The problem is that if the user knows nothing,
they end up going onto the Ubuntu forum and cutting and pasting sudo
rm -rf / into a terminal thinking that it will install mscorefonts.
That's it! Thanks for reading the shownotes.
- MD5sums:
- ogg 032281a617ca6cde528301e26896f2e4
- spx 8ccfa4878b09f1f3042501a91741030e
- Important Links:
- Join The Game by becoming a card carrying KDE party member!
- Bill von Hagen's Git article
- the Git Community Book
- Slackermedia