Install Spotify on Crunchbang 11

Installing Spotify
Next up was to install Spotify, and as I thought, there would be a hiccup due to a missing dependency. When this happens, a simple “apt-get -f install”” usually fixes it, but it turns out I needed an extra file from squeeze as Crunchbang 11 is based on Wheezy the new Debian Stable and Spotify Linux is old.

First I needed to download libssl0.9.8 from HERE and install it:

cd downloads
sudo dpkg -i libssl0.9.8_0.9.8o-4squeeze14_i386.deb

Then I had to add the Spotify Linux repo to my sources list:

sudo vim /etc/apt/sources.list

And add these lines:

## SPOTIFY
deb http://repository.spotify.com stable non-free

Next I imported the gpg key:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 94558F59

Now I just needed to update and install Spotify

sudo apt-get update
sudo apt-get install spotify-client

Speeding up wireless internet on Crunchbang 11

On a recent new install of Crunchbang 11 I was having major problems connecting to my router with a Ralink RT3370 wireless USB dongle from my main tower. After investigating and playing around, this is my list of changes which got me sorted:

1. AES vs TKIP Encryption:
Connect to the router and change the WPA2 encryption from AES to TKIP. My first suspicon about the lack of connection was the encryption method and maybe the latest RT3370 drivers and wpasupplicant. After changing to TKIP I could connect, allbeit with a slow connection due to packet loss.

2. Move Adapter from USB2 to USB3:
Moved the Dongle from the front USB2 connector to a blue USB3 connector at the back, and I noticed a slight speed increase. After these hardware changes, it was time to go for some terminal-fu and edit a few files to get some extra internet speed.

3. Firstly I edited /etc/nsswitch.conf:
sudo vim /etc/nsswitch.conf
I commented out the original line:
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
And changed it to:
hosts: files dns

4. Next I disabled ipV6 in Iceweasel:
In the address bar I typed “about:config” and changed “network.dns.disableIPv6” to “true” with a double-click.

5. Next up was to disable ipV6 system wide:
echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf

6. Adaptor Power Management:
Another thing I had heard is that sometimes powercontrol can interfere with wireless speed as well so I disabled it for the USB dongle:
sudo iwconfig wlan0 power off

7. Swap nm-applet and network-manager for a Manual Static Wireless Connection:
First I disabled nm-applet from autostarting:
sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/BKPnm-applet
Then I stopped Network Manager:
sudo /etc/init.d/network-manager stop
And completely Disabled it:
sudo echo "manual" | sudo tee /etc/init/network-manager.override

8. Just needed to add my manual network config:
sudo vim /etc/network/interfaces
Added my wifi info:
auto wlan0
iface wlan0 inet static
address 192.168.1.136
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid ROUTER_ESSID
wpa-psk MYPASSWORD

Then manually added the Google dns addresses:
sudo vim /etc/resolv.conf
And add these:
nameserver 8.8.8.8
nameserver 8.8.4.4

Rebooted into a system with awesome internet cow-power-fu speeds!!

Installing Crunchbang 11 on a Netbook with external monitor

Back on Linux at Home and Blogging again
It’s been a while since i’ve posted as a new business project has had me using Windows a lot, yeah I know, but hey, life’s like that sometimes.
I moved my main computer tower into the lounge and it now serves as our main media center, with xbmc, spotify, games etc.

Crunchbang 11 on the Netbook
This left me with a monitor, keyboard and mouse in our bedroom…. and an Asus Netbook, so I thought what the hell and set about removing Ubuntu (slow as a snail, painfully slow) and installing my trusty old friend Crunchbang (which i’m typing from now).

I downloaded the 32bit version from HERE, made a Crunchbang pendrive via Unetbootin, installed and set about configuring it to be used as a desktop.

External Monitor Resolution
The first thing I noticed was that when I changed the resolution of the monitors, the settings would be lost after reboot, so I added these xrandr commands to my autostart.sh and both get set when I login:

## Set both external monitor and netbook resolutions
xrandr –output VGA1 –mode 1920×1080
xrandr –output LVDS1 –mode 800×600

All looking nice. next up to install XBMC…..

Wireless-Only installs with Debian, Crunchbang and Kali Linux – Missing Non-Free Firmware

Wireless Network
I changed my entire network over to wireless and my router is now fixed to the wall, 25 meters away from my office, in my lounge. The wireless from my office reaches ok, and means we have a stronger signal from the lounge where we have our XBMC media center and everybody connects with their smart phones.

Wireless PCI/USB cards and Non-Free Drivers
Due to the fact that some manufacturers won’t release the source code for their drivers (Thank you Broadcom and Ralink!!) we still have a bit of a hard time, even though Linux geniuses have reverse engineered and hacked practically all of them for us so we can load wireless modules from the kernel.

Politics and Freedom
Some distros willingly provide non-free drivers right from the get-go, others are more conservative and stick to Stallmanesque non-free restrictions. Debian does this…. still…. in 2013.


Debian Live Builder
I’ve built my own Debian based distros, and like other distros which are built with this system, mainly Crunchbang and just recently Kali Linux (The New “Debian-Based” Backtrack).

Live Yes – Install No
I recently got a bit of a surprise with some Live installs, as I found that when running both Crunchbang and Kali live, my Ralink wireless USB firmware was loaded and allowed me to connect to the internet, but when I went for the install, at the network configuration step, I was told that the firmware was missing!!

Solution
When this stage happens:
1. Take a picture of the screen on the Debian Installer which tells you which files you need from /lib/firmware. In my case “rt2870.bin” and “rtl8168e-3.fw”.

2. Insert a blank USB Pendrive
3. Reboot the Live CD to get to the Live Session
4. Copy the two needed files from /lib/firmware on the Live CD to the Pendrive
5. Reboot and run the installer

The Debian Live installer will detect the firmware on the Pendrive, load it, and allow you to choose your wireless ESSID and WPA key, and continue the install.

There’s no time like now for the old adage “You learn something new every day”.

May all you fellow wireless-only users, now be able to install any Debian-based distro without being put off by this minor freenoyance.

Howto Crunchbang install proprietary Ati drivers

Installing Manually on Crunchbang Statler (32/64bit)

This method uses the latest Catalyst driver downloaded from AMD/ATI’s site.
This was tested on a virgin install with no other previous attempts at installing Ati drivers. If you have an already edited system, with other drivers installed, remove them “completely” first.
Do everything below as root, in the /root directory

Install the prerequisite packages:

apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 module-assistant

Make sure you are ready to go with Module Assistant:

m-a prepare

Download the latest Catalyst package:
This package contains both the 32-bit and 64-bit driver (if you are on a 64bit machine, install ia32-libs) 

cd ~/; mkdir catalyst11.10; cd catalyst11.10/

wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-10-x86.x86_64.run 

chmod +x ati-driver-installer-11-10-x86.x86_64.run

Launch the Ati installer and go through the motions:

./ati*run

Now reboot, don’t try glxgears or the catalyst control center, in fact don’t touch anything, just reboot.


How to install Libre Office on Debian or Crunchbang with Openbox

Current (October 2012) Final LibreOffice 3.6.3

You can find the .tar.gz packages containing 32 and 64bit .debs on the download page:
32bit Debs (Torrent)

64bit Debs (Torrent)

Download and Unpack
First download the package for your version (mine is 64bit)  to your “/downloads” directory, then unpack it:

cd downloads

ls (then copy and paste the package name after the “tar -xvf” command)

tar -xvf LibO_3.6.3_Linux_x86-64_install-deb_en-US.tar.gz


Install Libre Office 3.6.3
Change to the extracted LibO directory and install all the .deb packages in one go.

Java
**Note** If Libre Office asks for Java (and you want to install it)

sudo apt-get install sun-java6-jre


Libre Office

cd LibO (hit Tab button to complete)

cd DEBS 

sudo dpkg -i *.deb


Where is Libre Office installed?
Libre Office 3.6.3 is now installed in /opt/libreoffice3.6/ and the application launchers are stored in /opt/libreoffice3.6/program

Add Libre Office to your Openbox menu

I use scite text editor to edit my Openbox menu basically as I have the option to save in .xml format (otherwise you get xml, end of line extra character errors etc) . You can also do this with Vim, Nano etc, if you know how to do it. I prefer having Scite already setup for xml editing.

Back-up and Edit

cp .config/openbox/menu.xml .config/openbox/menu.xmlBKP

scite .config/openbox/menu.xml


Add the Office Menu where you like

        

            

                

                    /opt/libreoffice3.6/program/soffice

                

            

        

        

            

                

                    /opt/libreoffice3.6/program/swriter

                

            

        

        

            

                

                    /opt/libreoffice3.6/program/scalc

                

            

        

        

            

                

                    /opt/libreoffice3.6/program/simpress

                

            

        

        

            

                

                    /opt/libreoffice3.6/program/sdraw

                

            

        

        

            

                

                    /opt/libreoffice3.6/program/smath

                

            

        

            

            

                                

                                        /opt/libreoffice3.6/program/sbase                   

                                

                        

                


All done!
That’s it, you now have the latest Stable edition of Libre Office and you can launch everything from your Openbox menu 🙂