Tag Archives: Ubuntu

Debian Jessie on Dell Latitude 6220

I guess I should’ve read my own posts comparing Linux and Windows, before raving on about Windows last time. The updates on Win7 were a nightmare, with me having to boot and reboot every other hour for a day or two until the download floodgate was shut, almost. I don’t think I’m done. I see that sign next to “Shut Down” where I’m being warned of another upcoming update.

Debian 8That aside, I did want to get my Latitude E6220 on Linux. This time, I’ve chosen to go with Debian, and since I couldn’t choose, I went for both Cinnamon and Mate desktops. Mate gives me the creeps just from the look of the Menu. Cinnamon feels more comfy that way. Next step was to get the drivers all sorted. Frankly, that was a bit easier than getting it done on Windows! You could download the drivers from http://support.dell.com but it wasn’t a clean one-time thing.  I noticed two issues on Linux from the get go:

  • WLAN not working
  • Reboots left the computer hanging

Mercifully, the Ethernet worked right away on Linux – which it did not on Windows on first install. I had to download the Ethernet drivers from Dell’s support site via another PC. So Linux scores better here! A short bit of searching brought me to this resource on the reboot issue. I went into the nearest Latitude on that list and it did mention the reboot issue. The solution was simple:

To solve the reboot issue you’ve to pass the kernel reboot=pci. You can achieve this by adding reboot=pci to GRUB_CMDLINE_LINUX="" in /etc/default/grub.

And after updating that file, I ran update-grub and suffered my final hang.

The WLAN issue was a bit less straightforward. Reading through the WiFi wiki, I identified the adaptor as BCM43228. And I’d have saved myself some time if I’d just scrolled to the end of the PCI section. The wl section covered what I needed. Chased that with a now working reboot and ta da, laptop configured. Since Linux is friendly with Windows, grub handles my dual-boot and I seem to have no issues on that front. I guess I might have issues with the clock as I did previously, but thankfully I do have my old post to help me out.

Protecting the kids from the Internet!

Teaching a kid science at Tara, I realized that they have little or no access to the internet. On asking I learnt that the problem was twofold:

  • they are donated laptops, which are pretty costly to maintain
  • they didn’t know how to ensure that pornography and other harmful material was blocked
  • wanted to prevent excessive downloads

So, seeing a technical challenge I asked them for a working machine and decided to have a go at it. They did and I got started with some research about how this could be done. My keyword was “parental control”. I looked for material on both Windows and Ubuntu. Actually, my search around Windows was half-assed and I didn’t really find much of interest there. My interest in Ubuntu was:

  • Security through obscurity – the kids were not familiar with it, nor the others, so changing settings would be hopefully not something they’d do easily.
  • Sheer amount of free software available under Linux
  • Protection from malware – lots of it is written for Windows
  • Exe files don’t execute well on Linux
  • Desire to experiment a bit
  • No license costs

So, my research turned up some interesting bits of info:

  • OpenDns has free DNS servers which can effectively block access to sites that concern parents
  • DansGuardian with a  proxy server can filter out tons of stuff based on keywords in the page and url
  • quota limits aren’t too hard on Linux – they’re almost built-in to the system

So I decided on working on two layers. I’d have OpenDNS serve dns queries as a layer 1 blocker. Then for layer 2 I’d use DansGuardian.

Configuring that was pretty easy. In the networking panel, you just set the DNS to the ones provided on the OpenDNS site and that should block pretty much all the easy sites and it’s kept up to date. I’ll probably also recommend that they set their routers to use OpenDNS as well.

DansGuardian is pretty easy to use too. Here’s a quick tutorial that shows you how to get it up and running. I used TinyProxy instead of Squid though.

XBox 360 and Ubuntu

I bought the XBox under the impression that in addition to playing games, it’d fulfill the promise of being my home media center. I’ve been a bit disappointed and perhaps a bit misled. It’s a closed box and so all fiddling is external – which may be a bit of a mercy, frankly.

So, first thing is that mediatomb doesn’t work with XBox natively. I’ve read some stuff about patches, but I decided to look for something that works. miniDLNA is one such program. It’s simple and easy to configure and I’ve gotten it to the point that I can see my server and the movies on it. Now, I’ve run into the format issue and that’s where I’m stuck for now.

How do I address this? I look for one of my formats that works, understand the encoding and then find a transcoder that’ll do the job. For example, I’d ripped a documentary DVD I bought recently into the mp4 format (with the m4v extension). And my phone can play it, XBMC can play it, but lo and behold, XBox 360 flatly refuses. Makes me want to switch to Sony, if they were any better. Annoying eh?

I’ll keep things updated here.

Handbrake on Linux

Just when you think you’re good, something bites you in the ass to let you know that it’s a tad bit early for that claim. I had that happen to me recently when I tried to install Handbrake on linux. It’s rather easy to be honest.

First you have to add the repository (where the code is) to your sources list and then you have to tell the installer to install it.

After squinting at the Ubuntu install page for a bit, I figured out what I was doing wrong in the first part.
I’d been writitng
sudo add-apt-repository ppa:launchpad.net/stebbins
and then
sudo add-apt-repository ppoa:stebbins/launchpad.net
since the syntax says:
sudo add-apt-repository ppa:user/ppa-name

Eventually, after staring at the screen for a bit, I noticed that the line
You can update your system with unsupported packages from
this untrusted PPA by adding ppa:stebbins/handbrake-releases
to your system’s Software Sources.


So, yes, I did managed to add the repository and then got stuck when I tried typing
sudo apt-get install handbrake

As you can see below, I finally figured it out, but I thought I’d spare someone the pain…
installation – How do I download and install Handbrake? – Ask Ubuntu

To add one of these to your sources, simply run:

sudo add-apt-repository ppa:stebbins/handbrake-releases

or

sudo add-apt-repository ppa:stebbins/handbrake-snapshots

depending on which you want. To install HandBrake, run:

sudo apt-get update
sudo apt-get install handbrake-gtk

PDNSD Reclaimed

!Update – In addition to the servers provided by my isp, I added Google’s and OpenNICs public dns servers. I found the links to these here.

I recently had some issues with my windows machines. At times I found that DNS lookups were taking too long – which is why I’d installed PDNSD on my Linux server in the first place.

And coincidentally a friend complained that she was unable to access “Microsoft.com” and other Microsoft websites. Odd eh? After some online research I had two probable causes, and the simplest fix was to disable the windows client DNS cache resolver. I looked up how to do it and from the command line (with admin privileges) the command is simple

sc stop dnscache

And that fixed the issue for her and for me after a restart!

After that I decided that since I hadn’t really worked on my PDNSD config for a long while, I needed to revisit it. After some poking around here’s the final version of my conf file. I’ve set the name servers of my provider here as 1.1.1.1 and my server as 192.168.1.1  for confidentiality, so you’ll have to fix these before you’re able to use this file.

Here’s the reference I used to work on my pdnsd.conf.

/* Note: this file is overridden by automatic config files when
   /etc/default/pdnsd AUTO_MODE is set and that
   /usr/share/pdnsd/pdnsd-$AUTO_MODE.conf exists
 */

global {
    perm_cache=12048;
    cache_dir="/var/cache/pdnsd";
    run_as="pdnsd";
    server_ip = 192.168.1.1;  // Use eth0 here if you want to allow other 
                // machines on your network to query pdnsd.
    status_ctl = on;
      paranoid=on;
//    query_method=tcp_udp;    // pdnsd must be compiled with tcp
                // query support for this to work.
    min_ttl=90m;       // Retain cached entries at least 15 minutes.
    max_ttl=1w;       // One week.
    neg_ttl=5;        // for bad queries
    timeout=0;        // Global timeout option (10 seconds).

        // Don't enable if you don't recurse yourself, can lead to problems
        // delegation_only="com","net";

// additional settings from archwiki https://wiki.archlinux.org/index.php/Pdnsd#Initial_preparation
    neg_rrs_pol=on;
    par_queries=1;
}


// This section is meant for resolving from root servers.
server {
    label = "my-servers";
    root_server=off;
    ip =     1.1.1.1
    ,    1.1.1.1
//    ,    192.33.4.12
//    ,    128.8.10.90
//    ,    192.203.230.10
//    ,    192.5.5.241
//    ,    192.112.36.4
//    ,    128.63.2.53
//    ,    192.36.148.17
//    ,    192.58.128.30
//    ,    193.0.14.129
//    ,    198.32.64.12
//    ,    202.12.27.33
    ;
    timeout = 600;
    uptest = query;
    interval = 30m;      // Test every half hour.
    ping_timeout = 300;  // 30 seconds.
    purge_cache = off;
    exclude = .localdomain;
    policy = included;
    preset = off;
    proxy_only=on;
}

source {
    owner=localhost;
//    serve_aliases=on;
    file="/etc/hosts";
}

rr {
    name=localhost;
    reverse=on;
    a=127.0.0.1;
    owner=localhost;
    soa=localhost,root.localhost,42,86400,900,86400,86400;
}


neg {
    name=doubleclick.net;
    types=domain;   // This will also block xxx.doubleclick.net, etc.
}

Windows vs. Ubuntu Desktop for a home server

This is a tough comparison to make, but what I’d like to do is start by coming up with a set of points that will help me frame this issue properly.

What do I want in a home server? I’ll try and answer in no particular order:

  • A backup desktop in case of crashes
  • Storage space for
    • Music & Videos (Media Server?)
    • Photos
  • Minimal fuss
  • Secure
  • Easy to use for a non-geek person

Let’s drill down some more into each of these points.

A backup desktop in case of crashes

I want to be able to browse, access my email, edit and view documents, images and download any software to fix issues on my other machines. I’d love to have some communication tool like Skype on it too. I may also want some diagnostic software to test hard drives which I may attach externally.

In effect, I want a browser, office suite, image viewing and editing apps, plus some storage space on a reasonably fast machine.

Storage space

Easily manage permissions for the storage space that I’m setting up, plus set up a server to serve media? Also some basic software to manage the media I’m serving.

Minimal fuss

Set up is a one time issue, so I’m ok with something which may not be too easy, but day to day management should be simple, plus minimal amount of reboots, if possible.

Secure

Antivirus, Firewall, and a strong system so I don’t have to keep taking it offline!

Easy to use for a non-geek person

My wife should be able to use it with minimal support from me. Also, this could be a machine our guests use – so perhaps options for privacy/profiles for guests.

I think this covers most ideas I have. Please let me know if I’m missing any.

Feature\OS Windows 7 Ubuntu 11.10
Backup machine Firefox/IE
LibreOffice & MS Office
Windows Live Image Gallery
Scandisk & Chkdsk to scan attached HDs
Skype for Windows
Firefox/others
LibreOffice/MS Office (with WINE)
Built-in viewers, plus others available from software sources
Disk Utility and generally constant built-in monitoring
Skype for Linux
Storage Space Easy to add HDs, but software RAID available on the desktop OS is simple.
Media Servers available – http://www.serviio.org/ looks good for both Linux and Windows.
Easy enough if you read some of the articles I’ve written. I think should be easy enough with Disk Utility and the software RAID can be as complex as you want it to be.
Mediatomb Media Server is simple to install and manage, but very basic with features. Serviio looks interesting
Minimal Fuss Windows 7 is easy to install.
I’m annoyed by the constant restarts and compulsory restarts though.
Ubuntu was easy to install and managing updates means just restarting the app.
Secure Security Essentials and Windows Firewall, plus minimize the number of externally used USB sticks etc. But I’m very happy with these for now.
Having ADBlock Plus on Firefox is also a big plus.
Don’t use a firewall and don’t have an AV. https://help.ubuntu.com/community/Antivirus
Easy to use Yes Yes

I’m enamored to several features in Linux; hassle free updates which never appear to require a system restart, free software packages available through a simple and easy UI, and a great ecosystem and variety of distributions and apps. However, Linux is raw in certain areas. For example, when my system disk was full, I had trouble booting and it took some time and know-how to restore my machine.

Final take: For me Linux started as an experiment. I never expected I’d have a system that was so easy to manage and play with and I’ve been surprised at how easy it has been to transition to Linux. I’d say that if you’re willing to take it on, Linux could give MS’ home machines a run for their money and sometimes even kick-ass ,e.g. with the RAID. If you plan to keep your tinkering (add/remove apps that you have no clue about) to a minimum, Ubuntu 11.10 takes my vote for a home machine.

Discovering my music with Banshee…

Banshee

Simple enough to enjoy. Powerful enough to thrill. Open source through and through.

And I agree 🙂 – well, I can’t say I love it totally, since my ID tags are all over the place, but otherwise by placing a few songs in the play queue, I’ve been enjoying some cool songs that I’ve not listened to in a while with the following selection:

Blogging with ScribeFire

I think ScribeFire may be the blogging tool for me on Linux. My key needs (off the top of my head) when blogging are the following:

  • Formatting – bullets, tables, hyperlinks, and strike-through
  • Images – screenshots that I insert into my blogs or just plain images
  • Categories & Tags – key because they help me organize the entries on my blog
  • Access to archives – to link back to previous posts

ScribeFire has formatting and cool shortcuts:

And image insertion. I can’t find a way to manage the picture formatting (text flow) like in Windows Live Writer (WLW). 

Categories and Tags are easily entered via the tabs on the right.

And the Entries tab shows you some of the previous posts.

So, for now, I can rest satisfied. I’ll need to find a better screenshot tool than the default one Ubuntu has to offer, but that can rest for now.

Adding Personal Package Archives

Packaging/PPA/InstallingSoftware – Launchpad Help

Step 1: Visit the PPA’s overview page in Launchpad and look for the heading that reads Adding this PPA to your system. Make a note of the PPA’s location, which looks like:

ppa:gwibber-daily/ppa

Step 2: Open a terminal and enter:

sudo add-apt-repository ppa:user/ppa-name

vsftpd on Ubuntu

To ease the headache of having to work using VNC on my server, I decided to use an FTP server. There were several choices, but vsftpd’s page had a strong sales pitch and I succumbed to it rather easily.

Installation was pretty easy using the Software Sources tool. I typed “ftp server” in the search box and clicked on “show technical terms” at the bottom. Once installed, I referred to the man page for specific items I wanted to add. Basically, I first made a backup copy of the vsftpd.conf file using the following command:

sudo cp /etc/vsftpd.conf /etc/vsftp.conf.original

Next, I edited the conf file using the following command:

sudo gedit /etc/vsftpd.conf &

That “&” at the end allows me to still use the same terminal window. Otherwise, it’d be locked until I close gedit. In case you find that the gedit window doesn’t launch immediately, try running it without the “&” and you’ll be prompted to enter your password.

So, simple changes to the file:

  • Uncommented the line “chown_username=myuser” and replaced myuser with a valid user. All files uploaded will now be owned on Linux by this user
  • Added the line “file_open_mode=0666” 0777 – this allows all the uploaded files to be accessed, and modified by all users

From my PC when I start FileZilla, I can browse to the folder where the files I want to work on are, or should be! Easy enough to create directories and upload files too. FileZilla has a imagecool option where you can add the current connection setting to the Site Manager.

In Site Manager, I set up the directories I want to open up automatically when I open this connection, both local and remote.

image