Updating iPhone 3G to iOS 4 Using VirtualBox

I decided to update my iPhone version to 4.0 and see what they actually have to offer. Of course, I also conducted the jailbreak process so that I could keep the extra features I have already obtained. It really wasn’t that hard to do, and believe it or not, Redsn0w actually worked in a VirtualBox environment. At the time of the update, I was running VirtualBox version 3.2.2 r62298 with Windows XP SP2. I installed iTunes 9.2, downloaded my firmware here, and manually restored my phone to the iOS 4. Once the process was done, I simply executed Redsn0w, and everything went smoothly.

There have been a couple of problems with the dbus and amarok recognising the iPhone, so I decided to update and see if there was more to offer on that level. I know that I posted an article about this, and there are a few questions, however, I hope to have the answers soon and have the solution.

Looking for Bloggers

I am looking for Gentoo users that would like to blog on Geekbin.net. I have become very busy at work, and instead of watching my website fall to the waist, I would like to see keep moving forward. If anyone is interested, please email me at bloggers@geekbin.net. I don’t offer much aside from a place to store your thoughts about or experiences. Additionally, you will have limited ftp access, file and photo storage and a Geekbin email address.

- Will

(0)

Conky in kde 4.4.4

Yep, it works! and it looks great too. I pulled the latest version of conky and made some minor tweaks to get it working properly.

[ebuild   R   ] app-admin/conky-1.8.0  USE="X curl imlib ncurses portmon rss truetype wifi -apcupsd -audacious -debug -eve -hddtemp -iostats -lua -lua-cairo -lua-imlib -math -moc -mpd -nano-syntax -nvidia -thinkpad -vim-syntax -weather-metar -weather-xoap" 0 kB

As for your conf file, just edit ‘/etc/conky/conky.conf and make this your top section before the ‘TEXT’ area…

background yes
use_xft yes
xftfont Trebuchet MS:size=8
xftalpha 0.9
update_interval 1.0
total_run_times 0
out_to_consoleu no
out_to_x yes
own_window yes
own_window_type override
own_window_transparent yes
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 300 10
maximum_width 300
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color black
alignment bottom_right
gap_x 12
gap_y 30
no_buffers no
uppercase no
cpu_avg_samples 2
override_utf8_locale no

Enjoy!! (if you want to my conky scripts, just ask and I can post them)

Syncing iPhone 3.1.2 with Amarok 2.3.1 in Gentoo (Updated)

With all of the new changes coming out in reference to amarok, kde and the iPhone, I noticed that the guide I had was outdated, so I decided to update yet again. There has been a lot of new development, especially with the new libimobiledevice and the ‘iphone’ use flag for gtkpod. Follow the steps below and you should be able to get your device working properly.

Obviously, you are going to have to setup a few packages first, and then emerge some prerequisites before amarok will detect your device. To make things a little easier, I am just going to flow with it, if there are any questions, please post comments and I can explain.

# emerge -va layman
# layman -a rion
# layman -S
# echo `PORTDIR_OVERLAY="/usr/local/portage/layman/rion"` >> /etc/make.conf
# env-update
# eix-update
# echo "dev-libs/libusb debug doc" >> /etc/portage/package.use
# echo "dev-util/gtk-doc debug doc emacs -test" >> /etc/portage/package.use
# echo "app-pda/libimobiledevice python" >> /etc/portage/package.use
# echo "media-libs/libgpod gtk iphone python udev" >> /etc/portage/package.use
# echo "media-sound/amarok daap embedded ipod lastfm mp3tunes opengl"  >> /etc/portage/package.use
# emerge -va =app-pda/libplist-9999 =dev-libs/libusb-1.0.3 =app-pda/usbmuxd-9999 =dev-util/gtk-doc-1.13-r2  =app-pda/libimobiledevice-1.0.1  =media-libs/libgpod-0.7.93  =app-pda/ifuse-1.0.0
# useradd -G usb,plugdev,wheel -s /bin/bash usbmux
# gpasswd [YOURUSER] -a usbmux
# echo "user_allow_other" >> /etc/fuse.conf
# env-update && source /etc/profile

Now is a good time to go ahead and edit your usbmux file. You need to test out and make sure that your iphone is being registered when it connects. First you will have to modify the udev rules so that you can see the output. Increase the syslog debug level by editing “/lib/udev/rules.d/85-usbmuxd.rules” and adding “-v -v” flags to the end of both RUN statements. Now you can run dmesg and see if usbmuxd is seeing your iphone. A reboot might be required for all of the changes to take effect.

After your reboot, check dmesg to make sure that your device is being seen. Then, mount the device, create some required folders, and get your UUID. Since you now have ifuse, you can easily mount your device, but in order to do this, it is required to be in a specific location. Additionally, if you want your users (not root) to also have ifuse privileges, you will need to edit the config files to do that. (This step might not be required anymore, however, I am still doing it just in case).

# echo "user_allow_other" >> /etc/fuse.conf
# mkdir /mnt/ipod
# chmod 777 /mnt/ipod
# ifuse /mnt/ipod
# mkdir /mnt/ipod/iTunes_Control/Device
# lsusb -v | grep -i iSerial
# ipod-read-sysinfo-extended YOUR_UUID /mnt/ipod

Now, everything should be good to go. All you need to do now is emerge amarok and test your phone out.

# emerge -va =media-sound/amarok-2.3.1 =media-sound/amarok-utils-2.3.1

If all goes as planned, your good to go yet again. If you have found that some of the steps are no longer required, please let me know and I will make the changes.

DNS-321 Added to My Collection

As I said earlier this weekend, I recently obtained an NAS drive. I was having problems streaming HD movies over my wireless network, and was seeking another solution. After reading some reviews about this drive, I was shocked to find out how it operated. Most of the cons that swayed me to purchase it was;

one, it basically (as in fully) runs a small linux OS
two, it streams uPnP by default
three, it can be modified (hacked) to allow more options (ssh, web server, MediaTomb, package manager for more goodies, etc)
finally, which is obvious from the first reason, it doesn’t use NTFS or FAT for it’s partition, it uses EXT2 or EXT3.

Out of the box, I loaded it with all of my music and movies, and boom, it was sharing. I later found that it supported NFS so that I could mount it locally, and transfer even faster than ftp. All around, this was a GREAT purchase.

Not being satisfied, I ventured out a little, and started looking for modifications, after all, it isn’t perfect. I stumbled across fun_plug. This allows some great new features to be activated, and unlocks a lot of features that are locked otherwise. To sum it up, you interrupt the boot process, and obtain access to the core. This allows you to start ssh and unlock other features on the drive. This can be down with a few steps, download and copy the files over, reboot, and punch in a couple of commands.

A walkthrough will be under-way soon!

Mplayer, Dumpfile, and AVI

Well, it has been some time since I posted anything and since I got a few new toys to play with, I figured I would let everyone know about my findings. I recently got a PS3 slim, but since I found out that you can’t stream HD over a wireless network, I invested in the DNS-321 NAS drive. Two great purchases! Talk about these systems will come with time, but for now, I wanted to share my new findings on how to get your DVD’s to AVI without any crazy scripting or code. two simple lines, and you have a nice video that can stream from an NAS to a PS3 or Xbox 360 (believe it or not, no matter what encryption you use, file name is VERY important).

First you need the DVD or the ISO of the DVD. From an older article, I talked about using vlc to do this, but updates have seemed to make this process useless, so now we just use the command line.

Simply:

mplayer dvd://1 -dumpstream

or

mplayer dvd:// -dvd-device DVD.ISO -dumpstream

After this, you have a “stream.dump” file. All you have to do is…

mplayer stream.dump -dumpstream -dumpfile MOVIE.avi

(I do this is two steps to demonstrate that if you had a bunch of stream.dump files, you can easily convert them)

The size of this file is going to be big, but you have a DVD quality file with no extra encryption b.s. to mess with.

FYI, I tested this file out on my NAS and it streams perfect.

Creating a 32 Bit Chroot with Funtoo Sources (For Wine)

Since I can’t seem to get wine to work properly on the 64 bit build, I decided to break down and stop fighting the system. Just create a damn 32bit chroot so that everything works fine. The following (modified from the official gentoo site) were the steps that I took, and everything seemed to build fine with no problems. I put this is script format so if anyone wants to save 15 minutes of time, then they can just cut/paste this into vim, chmod it, and execute it. If you decide to be lazy like me, make sure that you review what you are stuffing into your make.conf file. It might not be what you wanted.

#!/bin/bash
mkdir /mnt/gentoo32
wget http://distro.ibiblio.org/pub/linux/distributions/funtoo/funtoo/x86/stage3-x86-current.tar.bz2
tar -xvjpf stage3-x86-current.tar.bz2
cp -L /etc/resolv.conf /mnt/gentoo32/etc/resolv.conf
cp -L /etc/passwd /mnt/gentoo32/etc/passwd
rm /mnt/gentoo32/etc/make.conf
echo "CFLAGS=\"-O2 -march=native -msse2 -pipe -fomit-frame-pointer\"" >> /mnt/gentoo32/etc/make.conf
echo "CHOST=\"i686-pc-linux-gnu\"" >> /mnt/gentoo32/etc/make.conf
echo "CXXFLAGS=\"${CFLAGS}\"" >> /mnt/gentoo32/etc/make.conf
echo "MAKEOPTS=\"-j2\"" >> /mnt/gentoo32/etc/make.conf
mount -o bind /dev /mnt/gentoo32/dev
mount -o bind /dev/pts /mnt/gentoo32/dev/pts
mount -o bind /dev/shm /mnt/gentoo32/dev/shm
mount -o bind /proc /mnt/gentoo32/proc
mount -o bind /proc/bus/usb /mnt/gentoo32/proc/bus/usb
mount -o bind /sys /mnt/gentoo32/sys
mkdir -p /mnt/gentoo32/usr/portage/
mount -o bind /usr/portage /mnt/gentoo32/usr/portage/
mount -o bind /tmp /mnt/gentoo32/tmp
emerge --noreplace sys-apps/util-linux
echo
echo /##################################################\
echo
echo NOW RUN THE FOLLOWING:    
echo # linux32 chroot /mnt/gentoo32 /bin/bash  
echo # source /etc/profile 
echo # env-update  
echo # emerge -vauND world
echo
echo \##################################################/

Sync the iPhone 3x in Amarok on Gentoo Linux

This was partially error on my part, and lack of documentation else where. The iPhone 3x (jailbroken or not) can finally sync with Amarok. A few packages are needed, but the process is automated. You no longer need to use ifuse to manually mount and use gtkpod to transfer music. However, I have not found a way to tranfer pictures or video yet, so I don’t recommend completely removing them. The following packages are needed to complete this, and a few things are needed before you install Amarok.

Prerequisite Packages Needed with the Proper USE Flags:

=dev-libs/libusb-0.1.12-r7 debug doc
=dev-libs/libusb-1.0.3 debug doc
=app-pda/libplist-9999
=app-pda/libiphone-9999
=app-pda/ifuse-9999
=app-pda/usbmuxd-9999

After these are installed, you need to remove both media-sound/amarok and media-sound/amarok-utils. Once these are removed, you need to reinstall both of the newest packages with the following USE flags.

Before the installation, you need to remove the Amarok folders in your home directory. You will have to reconfigure your music collection’s location, but this will clear all of the problems that might stop your phone from mounting in Amarok. (I removed all the folders vice each file inside)

Locations of Amarok Configurations:

~/.kde4/share/apps/amarok/
~/.kde4/share/config/amarok

…and here are the new Amarok packages you need.

Amarok and Amarok Utilities with Proper USE Flags:

=media-sound/amarok-2.2.2.90 daap embedded ipod lastfm mp3tunes opengl
=media-sound/amarok-utilites-2.2.2.90 -debug

Once you have done all of this, plug your phone in, and it should mount in Amarok automatically.

Screenshot:

CAC Reader Support in Gentoo

This might not be new, but it was defiantly new to me.  I found a package in portage that grants the ability to install your own CAC card reader, integrate it with Firefox and use your certificates to log into government sites that you have the proper access to.  It’s great for people who don’t want to use a virtual machine alternative solution, and additionally, you don’t have to purchase any additional software like ActivCard Gold.

Simply emerge the following, start the init script, and install the additional certificates into Firefox, and your CAC should work.

app-crypt/ccid
sys-apps/pcsc-lite
app-crypt/coolkey

… and for the init script

# /etc/init.d/pcscd start
# rc-update add pcscd default

Lastly, installing the DoD Certificates:

The Certs:

The easiest way to install the certificates is by visitinghttp://dodpki.c3pki.chamb.disa.mil/rootca.html and clicking on each one.

Alternatively, you can download them and install them by hand.

All of the certificates are located at the following links:

Sadly, there is no quick way to manually add the certs, and I had to load all 45 certs by hand. It shouldn’t take more than 10 minutes, however, you have to load each one, click Okay, and then start the new one, you can’t just load all of them before clicking Okay.

To add the certs manually, simply go to Edit >> Preferences. Once the window appears, go to the Advanced tab, and then the Encryption sub tab. Click on the View Certificates button. Go to the Authorities tab, and click the import button. Navigate to the first certificate, and then add it. Click okay, then repeat the steps starting at the Import button again.

After you have loaded all of the certs, and before you can use your card, you have to point Firefox to the CAC reader. Firefox considers your reader to be a “Security Device.” To add it, simply go to Edit >> Preferences. Once the window appears, go to the Advanced tab, and then the Encryption sub tab. Click on the Security Devices button. You need to select CAC Module and add the path to libcoolkeypk11.so. You can either slocate it on your system, or if you have a 64bit, then point it to /usr/lib64/pkcs11/libcoolkeypk11.so. You should be prompted for your password and after that you are set.

MAKE SURE YOU DO NOT ENTER YOUR PASSWORD WRONG 3 TIMES OR IT WILL LOCK YOUR CARD, AND YOU WILL HAVE TO GET YOUR CARD PROVIDER TO UNLOCK IT!

Updates for Ruby

So, portage must really be behind the updates or someone in charge of ruby is slacking. As of now, portage only recognizes =dev-lang/ruby-1.8.7-p174, which the file doesn’t exist in any repository. What does exist however is =dev-lang/ruby-1.8.7-p249. The downfall is that it relies on =app-admin/eselect-ruby-20091225 which… doesn’t exist. You have to love updates!!

For convenience, I just added both into the /usr/local/portage tree, and digested these. Hopefully in the next day or two this problem will be fixed.

http://www.gentoo-portage.com/dev-lang/ruby

http://www.gentoo-portage.com/app-admin/eselect-ruby