Categories: Slackware

Linux: use a file as an encrypted partition with cryptsetup

Categories: Linux, Slackware
Published on: December 28, 2011

I’ve decided to move my encrypted /home partition from losetup to cryptsetup.
Instead of using a device (a disk partition) i used a 1o GB file and to do this i’ve upgraded cryptsetup to version 1.3.1 since Slackware 13.37 has the 1.2.0 one.
I just compiled the new version using the 1.2.0 SlackBuild, it works.
I’m following the README_CRYPT.TXT Slackware howto.
First, let’s create the crypted file that will “host” our new /home:

dd if=/dev/urandom of=/crypt_home bs=1M count=10000

Now prepare the partition for encryption (choose a good password!):

cryptsetup -s 256 -y luksFormat /crypt_home 

WARNING!
========
This will overwrite data on /crypt_home irrevocably.

Are you sure? (Type uppercase yes): YES
Enter LUKS passphrase:
Verify passphrase:

We’ll call our mapped device “crypthome”, just like in the Slackware howto:

cryptsetup luksOpen /crypt_home crypthome

Create an ext4 filesystem (just for example):

mkfs.ext4 -j /dev/mapper/crypthome

I’ve add in my /etc/rc.d/rc.local:

echo  "MOUNTING CRYPTED HOME.."
cryptsetup luksOpen /crypt_home crypthome
mount /dev/mapper/crypthome /home/simplex

That’s all.

HP-2137sl volume bar configuration

Categories: Linux, Slackware
Published on: July 6, 2011

Like described in the previous post, find both codes for increase/decrease volume with xev:

KeyPress event, serial 34, synthetic NO, window 0x3400001,
root 0x15d, subw 0x0, time 979988, (423,-222), root:(1017,104),
state 0x10, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x3400001,
root 0x15d, subw 0x0, time 978476, (423,-222), root:(1017,104),
state 0x10, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

Add those codes to ~/.xmodmaprc file:

keycode 121 = F24
keycode 122 = F25
keycode 123 = F26

And the corrispondent commands to ~/.xbindkeysrc:

# Muto
"amixer -c 0 sset Speaker,0 toggle"
m:0x10 + c:121
Mod2 + F24

# Abbassa volume
"amixer -c 0 sset Master 5%-"
m:0x10 + c:122
Mod2 + F25

# Alza volume
"amixer -c 0 sset Master 5%+"
m:0x10 + c:123
Mod2 + F26

I’ve added this command at the end of ~/.bashrc to have the key bindings loaded when X start:

xbindkeys -f /home/simplex/.xbindkeysrc

That’s all.

Audio mute/unmute hotkey on HP DV6-2137sl with Slackware/Linux

Categories: Linux, Slackware
Published on: July 6, 2011

It could be useful sometimes, so…
Use xev to know the code generate by the button, type xev in a terminal and after a bit of some unnecessary codes, press the audio button, you will see something like this:

KeyRelease event, serial 34, synthetic NO, window 0x3800001,
root 0x15d, subw 0x0, time 7145078, (-71,-326), root:(523,0),
state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

The important part is keycode 121, in my case.
Create the file ~/.xmodmaprc and put in it:

keycode 121 = F24

F24 is an arbitrary code chosen by me, you can use whatever you want but i suggest F+number, greater than 12.
Now install xbindkeysrc, you can find it at slackbuilds.org, compile and install.
Then do

xbindkeys --defaults > /home/simplex/.xbindkeysrc

to create the default configuration.
Add the part for audio mute/unmute at the bottom:

# Muto
"amixer -c 0 sset Speaker,0 toggle"
m:0x10 + c:121
Mod2 + F24

Replace the 121 and F24 with your codes, the part in “” is the command that you want to run when the button is pressed, in this case the mute/unmute of our notebook speakers.
Next time, the volume bar!

The sepulchral voice intones, “The cave is now closed.”

Categories: Slackware
Tags: ,
Published on: April 23, 2011


bash-4.1$ cat /etc/slackware-version
Slackware 13.37.0

Get yourself ready for the upgrade, the l33t version is coming!
What will we find in the stable?
The kernel is Linux-2.6.37.6, with 2.6.38.4 in testing/, GNU C Library 2.13, gcc 4.5.2, plus KDE 4.5.5, Xfce 4.6.2, Xorg 1.9.5 and more..
Let’s wait for the official announce, stay tuned!

RELEASED!
You can find the torrents here too:
13.37
13.37 64 bit

Google Chrome 10 is out

Categories: Interwebz, Linux, Slackware
Published on: March 10, 2011

23 security fix, javascript performance improved, GPU acceleration and more…
I’ve just upgraded it in my Slackware (thanks to slackbuilds.org) and.. WOW! It’s faster than ever!
Plus, i like the new setting interface tab, instead of the popup window.
I think they could add a search bar in the password manager, too…
A disappointing thing: There’s still the upload image bug, chrome crash when you click on an image to upload it.
WTF, It’s a bug know from a year or so… and they don’t do anything. ok.
You can avoid the crash by submitting the path to the image instead of directly click on it.

page 1 of 3»
Please support our sponsors ;)
Welcome , today is Wednesday, February 8, 2012