Debian

From Organic Design wiki
Revision as of 16:35, 2 September 2014 by Nad (talk | contribs) (Addons: Image Block - useful for slow connections now that the prefs option has been removed)
Debian-logo.svg

Debian is a free operating system using the Linux kernel, but most of the basic OS tools come from the GNU project; hence the name GNU/Linux. At Organic Design we install Debian on our servers using the install a new server procedure, and have been using it for over ten years.

As of June 2013 we decided to change from Ubuntu to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and compulsory spyware riddled throughout system.

As of early 2024 we've changed to Linux Mint for our workstation machines, mainly due to the fact that they're very up to date with their choice of Linux kernel version which allowed me to use my touch-screen on my Samsung ATIV Smart PC Pro (XE700T1C) and fixed a long-standing bug on Beth's Lenovo Ideapad S10-3 which prevented it from resuming from standby.

Installation

Bad Windows and Ubuntu.svg

Installation is covered here and for our typical situation involves downloading the first of the amd64 DVD iso images and copying it onto a memory stick using the following commands from a root shell where X is the number of the device that the USB stick is on which can be obtained from dmesg or df etc. Note that the numbers on the end of devices such as /dev/sda1 refer to the partitions within the device, but the boot record is outside of any specific partition, so the number must be excluded in the command to refer to the device as a whole.

<bash>

umount /dev/sdX cp debian.iso /dev/sdX sync </bash>

Required utilities and libraries

<bash>apt-get install build-essential autoconf libtool subversion git python-qt4</bash>

Post install checklist

This is my personal checklist of items I do after a fresh installation of Debian 7 to get everything I use running and to get it looking the way I like it :-)

  • Advanced settings (then add all buttons to windows from shell menu, also fonts, see below)
  • Keyboard (add US, Alternative International and then fix the Cedilla)
  • Geany (the local page shows context-action, colour and line-spacing tweaks)
  • VLC
  • Pidgin (with OTR and plugin pack and copy backed up .purple after install)
  • Icedove (Thunderbird - apt-get install icedove enigmail)
  • Skype (details on installation from the i386 .deb with MultiArch here - note it says sound crashing needs libpulse0:i386 too, or try libasound2-plugins:i386 if still crashing)
  • World clock (zones in ~/.tzlist, use custom format %H:%M (%A) - the annoying window-size bug is not present in Debian)
  • Go to details in system settings and set the default programs
  • Bitmessage (needs python-qt4 and install the local email client support)
  • Fonts - all the fonts looked a bit ugly, in advanced settings I changed them to plain DejeVu Sans Semi-condensed, reduced to 10pt and changed the hinting to "slight", and the monospace font to Liberation Mono 9pt.
  • Icons (gnome-brave-icon-theme, then set in advanced settings/theme)
  • Transmission (apt-get install transmission-qt)

After that checklist is done here's what it looks like:

Debian7 desktop.png

SSD optimisation

I've had one too many mechanical disk failures and have finally decided to move over to SSD. They still have a long way to go as a technology since they still suffer from the major problem of flash technology in general which is that each memory bit can only be written to a thousand times (3 thousand on the most recent technology). So I'm just going to get a small cheap one initially and hopefully in six months or so they'll be longer lasting and more practical sizes. I've started with a 120GB Samgsung 840 series, for these reasons. Most of the following optimisation tips are taken from SSD optimisation in the Debian wiki, and another good artile here in the Arch Linux wiki.

Iceweasel (Firefox)

Mozilla's conditions for use of their trademarked names require that distro's using their products clear any patches with them first, but in Debians view this compromised their own strict seurity measures so rather than this they opted to hange the branding of the products. Debian's fork of Firefox is Iceweasel.

Language: Install the en_GB languages and if en_US keeps re-establishing itself as the default, you can forcefully remove the en_US* files from /usr/lib/xulrunner-*/dictionaries/.

Addons

  • Download Helper - download videos from youtube and other online video content sites
  • Firebug
  • DoNotTrackMe (from here) or Ghostery (from here)
  • Flash player (apt-get install flashplugin-nonfree)
  • Image Block - useful for slow connections now that the prefs option has been removed

Disable page prefetching

Firefox downloads webpages from links it thinks you may click. This may make the experience seem faster but really it just bogs down Firefox and your netbook. Type about:config in the address bar, then set network.prefetch-next to false.

Centrino Wireless-N 1030

This driver is not included in the Debian installation or on-line repositories so has to be manually installed afterwards. See also Set up a wifi hotspot

<bash>

echo "deb http://http.debian.net/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list apt-get update apt-get install firmware-iwlwifi modprobe -r iwlwifi ; modprobe iwlwifi </bash>

Bluetooth

I found that I couldn't get any of my bluetooth devices to pair in the default install of Debian 7. The devices would show up in the detected list and the pairing process would initiate properly, but would then fail to complete. Using the bluez tools from the terminal worked though with the following procedure I found here. Strangely, after I got the first thing (my mouse) working with this process, then my phone was able to pair from the GUI as normal even though it had failed prior to getting the mouse to work.

<bash>hcitool scan</bash>

This process gives you the MAC address of your device which you can then begin the pairing process with as follows. This will ask you for the pin which you type in to your device etc or use 0000 if it's a device like a mouse or headset.

<bash>bluez-simple-agent hci0 12:34:56:78:9A:BC</bash>


You then make the device trusted so that it can automatically connect in future:

<bash>bluez-test-device trusted 12:34:56:78:9A:BC yes</bash>


And then finally, connect to the device:

<bash>bluez-test-input connect 12:34:56:78:9A:BC</bash>


It should now be shown as normal in the bluetooth menus and settings window and should connect automatically when the session starts.

DVD::Rip

We like to use DVD::Rip for converting DVDs into a single video file for simpler viewing and transportation. Detailed information about the first time setup and optimal settings is in our DVD format conversion article, but here is some specific information for what I needed to do to install it on Debian 7 as there were no sources available for using APT.

I needed to compile it from source, so I needed to install the make tools, and also the required dependency transcode was not installed by default on the system.

<bash>apt-get install build-essential transcode</bash>

Also I was unable to use libdvdcss from VideoLAN, but found that libdvdcss2 worked which is available from the deb-multimedia.org software source.

<bash>

echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list apt-get update apt-get install libdvdcss2 </bash>


When I first tried to build it I came across a missing Perl dependency called Locale::TextDomain so I installed this with CPAN as follows:

perl -MCPAN -e shell
> install Locale::TextDomain

Then cd into the downloaded and unpacked dvdrip source directory and build it as follows:

<bash>perl Makefile.PL

make make test make install</bash>

Finally you can modify the example .desktop file that comes with the source to point the Exec field to the bin/dvdrip file and the Icon field to point to the nice SVG icon that comes with the source, then copy it into your .local/share/applications directory as usual.

Then go to the DVD format conversion article for instructions on first time setup and best ripping settings and practices.

Distribution upgrade

To upgrade Debian, first ensure that there are no conflicting or held back packages. If there are, these issues are best sorted out first.

<bash>dpkg --audit

dpkg --get-selections

Then run aptitude and press "g" and only carry on when you have the message "No packages are scheduled to be installed, removed or upgraded".

Next change all your sources over in /etc/apt/sources.list from the old distro name such as squeeze to the new one such as wheezy. And then do the upgrade in two steps, first upgrade the packages and then do the dist-upgrade as follows:

<bash>apt-get update

apt-get upgrade apt-get dist-upgrade</bash>

It's best to use the package maintainer's version of any updated configuration files it mentions. You can have a second shell window open so you can check the changed parts of the configuration that have changed and back them up or copy them across to the freshly created version.

See also