Big Trev
Django setup - Part 1

I’m going to have a bash at building me a webpage using Django.  

On the tin it says it’s a “high-level Python Web framework that encourages rapid development and clean, pragmatic design.”

Rapid = good.  And although my experience is limited (close to nil really), Python = good in my books too.  Plenty of folks will argue otherwise, but for a beginner apparently Python is The Business, and I like the way it rolls.  And I like Monty Python, after which the language is named.

This is a bit of a build log for getting a Django server up and running.  I’ve picked my usual poison, which is Ubuntu Server (10.04) running on a VMWare 2 VM.

I’ve left my Ubuntu install clean, with the exception of OpenSSH Server in the setup part (so I can connect and do stuff).

I’ve got some instructions from a couple of sources, but a good one is this: http://jeffbaier.com/articles/installing-django-on-an-ubuntu-linux-server/

Python should be installed by default, to check, open a terminal and type

python

You should be rewarded with the prompt

»>

If not, figure out how to install it.

Now install the web frameworks:

sudo apt-get install apache2 libapache2-mod-python

sudo apt-get install mysql-server python-mysqldb

Now to install the Django framework.  I’m downloading the latest Official version from here (1.2.1).  Download the file, extract, and I’ve popped it into my home folder.

Open the new folder, and run

python setup.py install

It should install the files into /usr/local/lib/python2.6/dist-packages/django

Check that you can run django-admin.py from any path, if not you’ll probably need to add a symbolic link to it (it lives in /usr/local/lib/python2.6/dist-packages/django/bin)

Multi-monitor madness on Mint

Well, madness may be overstating it.  Maybe “Slight inconvenience”?  Doesn’t start with M though…

I’ve got around to rolling my main desktop onto Linux Mint (from Ubuntu) after running it on my laptop for a few weeks - definitely a nice little distro, works a lot more “out of box” than Ubuntu (which is what it says on the tin).

Anyway, the madness of which I speak is that I’m running a dual monitor setup - a nice-ish 22in Samsung LCD, and an old 17in CRT that I picked out of a dumpster.  Hence, most of my work is done on the LCD.  Mint seems intent on wanting the 17in to be the “main” monitor - firstly when I changed it to a dual monitor setup from clone (in the monitor settings), it still had the taskbar on the 17in. 

Did a search online, couldn’t find much about how to move the taskbar, or whatever it’s called, is this a Windows term?  (Microsoft TaskBar?)  Saw something mentioned about dragging it around while holding down Ctrl, however it did work with Alt - Just hold Alt, hold left-click on the mouse and drag it to where-ever your heart desires.

Applications List

I’m hopeless at remembering applications I’ve used, for those little things that you only have to do every 6 months or so.  So I’ve started a Handy Apps list, and I’ll try and remember to pop up any apps I use and might want to come back to.

The first entry is Anti-Twin, which is de-duplication for files/folders.  Seems pretty good - I’m using it to sort through all the duplicates of my photos.

Ubuntu - Absolute Begineer Command Line Reference

Came across this little gem.  Found it mentioned on a forum (the address of which I’ve now lost!), but it’s linked to here.  I’ll need to upload it somewhere so it’s not hotlinked (and in case that link disappears).

 (edit) - Here’s the link on my webspace.

VMWare borked

Hmmm.  I chucked on some stuff from Ubuntu Studio (in order to get something to join MP3s together - but that’s a story for another time).

I think is has stuffed my kernel and now VMWare console won’t start any more.

Following the destructions here where a bloke has a similar problem when running through vmware-config.pl, I’m going to have to muddle my way around and see how I go.  First off, I’m going to UNINSTALL all of these apps which got installed with the Studio package:  I was going to take a screenshot and post it up, but that eludes me currently and I’ll need to figure that out later….

Once I’ve got rid of some of that crap, I need to find out how to unbork my install…

BASH

Hmmm. Methinks it’s time to start delving into the scary world of the Command Line.

I’ve downloaded a quick-reference thing from here, direct link to the pdf here.

Time to start command-linin’

I’m scared, hold me….

Forced upgrade

Well, I had the crappy old hard drive I was running Ubuntu off crap itself yesterday.  I can barely remember the last time one of my drive shit itself - was it 5 years ago?  Maybe more - I think it was about a 20 or 40 gigger….

Anyway, this has necessitated a new (used) hard drive for a new install of Ubuntu.  Yep, I’m persisting, you won’t get rid of me that easy!  Which has also meant that I’ve given Hardy Heron another crack. 

I’m pleased to say that so far it’s been a pretty good experience; some stuff which didn’t “just work” under Gutsy works in this (such as the extra buttons on my mouse), and it appears that whatever the bug with SMB shares on 2003 servers was has been fixed.  I’ve managed to connect to my server easily, and so far it’s working just like a bought one.

Problem is that now I have to go back and re-install everything I had installed before.

One other thing which I was running is Mobloquer, which apart from the queer-sounding French name is quite a serviceable and easy to use Linux version ofPeer Guardian.  After a mate got a nasty letter from his ISP about file sharing, I think it’s time I put the tinfoil hat on…. 

Now I just need to keep going with getting things setup on this desktop again…. 

Evolution upgrade (part 1 of ?)

I’m running MS Exhange for mail, and Evolution 2.12.1 on the desktop.  I’ve found it actually works OK (I already had OWA enabled) but the Calendar functions don’t seem to work (I can read appointments, but new ones I add through Evolution don’t appear).

Getting used to this whole repository thing (from the GUI though!) I had a look to see what the latest version of Evolution is in the repositories, and it’s what I’m already running.  But on this site, the latest is 2.22.2, but I need to install it manually.

I’m running through this walkthrough to help me install the *.tar.bz2 files.

First snag - it says to change the owner of /usr/local/src to me, but sudo chown username /usr/local/src isn’t working….  It just does a carriage return, no error or confirmation, and when I go to the folder permissions in the file browser, I get:

 

 However, when I opened up the file browser from the terminal using “sudo nautilus”, it looks OK.

Next step: Successfully copied the tar.bz2 files into the src folder, and extracted them (using the gui - yep, I’m still hooked!)

Upon running the ./configure command for Evolution, I get “configure: error: You need bison to build Evolution”.  I hit google again, found this thread (from a n00b like me!) who was trying to do a similar thing.

Installed bison from Synaptic Package Manager, then I got this

“checking for intltool >= 0.35.5… ./configure: line 6531: intltool-update: command not found
 found
configure: error: Your intltool is too old.  You need intltool 0.35.5 or later. “

Another search in Synaptic, and found a newer intltool, and installed that.

Next, I get this:

“checking for GNOME_PLATFORM… configure: error: Package requirements (glib-2.0 >= 2.15.3
         gtk+-2.0 >= 2.12.0
         gconf-2.0 >= 2.0.0
         gnome-vfs-2.0 >= 2.4.0
         libbonobo-2.0 >= 2.20.3
         libbonoboui-2.0 >= 2.4.2
         libglade-2.0 >= 2.0.0
         libgnomecanvas-2.0 >= 2.0.0
         libgnomeui-2.0 >= 2.0.0
         libxml-2.0 >= 2.0.0) were not met:

No package ‘glib-2.0′ found
No package ‘gtk+-2.0′ found
No package ‘gconf-2.0′ found
No package ‘gnome-vfs-2.0′ found
No package ‘libbonobo-2.0′ found
No package ‘libbonoboui-2.0′ found
No package ‘libglade-2.0′ found
No package ‘libgnomecanvas-2.0′ found
No package ‘libgnomeui-2.0′ found
No package ‘libxml-2.0′ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GNOME_PLATFORM_CFLAGS
and GNOME_PLATFORM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.”

Helpful….

It’s about this point I pack up, and go to bed.  This can wait for another day…

Evolution upgrade - part 2

OK, no bed for me, yet.

I should have read this earlier (link off the first link I found) -  Build Evolution from Source Made Simple.

Duh

Hopefully it does what it says on the tin…. 

 
I’m trying his makefile, and got the following:

 No packages found matching ccache.
No packages found matching evolution-dev.
No packages found matching gnome-common.
No packages found matching gtk-doc-tools.
No packages found matching libldap2-dev.
No packages found matching libnss3-dev.
No packages found matching libsoup2.4-dev.
Package flex not installed (state un)
Package libenchant-dev not installed (state un)

Not all prerequisites are installed!
Use ‘aptitude install …’ on the above missing packages.

make: *** [check-prereqs-hardy] Error 1

Now I’m doing as directed and installing the packages…

But going to bed now - that can wait til tomorrow….  

Plodding along

OK.  So I’ve given up for the moment doing anything fancy with connecting to the Exchange server.  I tend to receive email on my PDA anyway, more so than on the PC, and OWA is sort of functional on Firefox.

So far, I’ve been using this PC more than I have been for a while (ie, when I had Windows on it!).  It’s been an interesting experience, as I’ve gone from having used Windows for longer than I care to remember and knowing it pretty much inside out, to now having to “think” about how I do even the most basic stuff (ie. installing software etc).

I’m a GUI junkie at heart, so I haven’t been getting into the terminal much, but that suits me for the moment.  

Today I’ve setup Azureus, and I’m starting to d/l a couple of TV shows ad stuff.  I’d recently moved from uTorrent to Azureus, which was fortuitous since I don’t think uTorrent seems to be available for *nix.

On the topic of installing software, I must say it’s a bit of a trip how software gets installed on Ubuntu, and I’ve got to say I like it!  I’ve been using Synaptic Package Manager (the GUI again!), and it’s odd to be able to go in and search for software, and then get a menu of piles of different stuff back.   

 In other news, I had a test ride of a new Triumph Sprint ST today.  I wanted one before I rode it, now I REALLY want one.  Will have to figure out how to increase my disposable income massively - I don’t need both these kidneys do I?

Running Outlook under Ubuntu (part 2)

OK.  Change of plans - I’ve had a tinker with running VirtualBox, and started to do a Windows install, but some further reading today has me thinking that I’m going to give WINE a try.

After trawling through threads and stuff, I think I’m happy enough with accessing Outlook via OWA in Firefox (it’s just functional), or maybe work on getting IE6 on using Wine.

Running Outlook under Ubuntu (part 1)

First up, I’m going to try running through the instructions on this site to try this thing called Virtualbox (sounds impressive).  I’m not going to even try and go through the instructions here, but I’ll put in any extra little snippets which I’ve had to tweak to get the thing to work.  I’ll be using Outlook 2003…

To install it, I’ll use the installer in Add/Remove programs (I’m still not comfortable in the command line!).  It shows up in the repositories, but having a look at it, I’m not sure if it’s a late enough version….

Crap, no it isn’t.  It’s version 1.50, which I uninstalled and grabbed the latest version after finding my way here.

Did the changes to the network binding per the instructions, which hosed my network connection as promised, so I rebooted.  Then more fun started….   

My hosed PC

Upon rebooting (see previous), the bugger then decided it no longer wanted to boot. On recovery mode, I was getting errors along the lines of: ata3.00:failed to set xfermode (err_mask=0x40) Turns out (after a bit of googling on the lappy) that this is something to do with hard drives not being recognised properly. There’s a bit of to and fro in this thread which I found. Anyhoo, I unplugged my SATA drive (the one with Windows on it, so my umbilical cord is officially cut!), and disabled the “extra” IDE ports (this is one of those motherboards with an extra controller on it - I think it’s a P35 mobo), and set something to do with “compatibililty mode” in BIOS, and it’s booted OK. Lets see how it goes now….

Hello Ubuntu

I’m a lazy kinda guy.  If something’s just working, I’m happy to leave it there.  Like my previous Wordpress blog, which is sitting on my home server still, and still running, but hasn’t been updated for about 18 months.  I’ll have to transfer what’s worth transferring over to here - this utopia of it being Someone Else’s Problem to ensure that software is updated, webservers are running et al.

Given that I’m lazy, why am I trying Ubuntu?  I’m a (recovering) Windows admin, who still works in IT but in the business space more than the techical.  But, I still tinker.  And tend to get distracted easily…

Which, somehow, brings me to answering why I’m trying Ubuntu?  I’m not in any way an early adopter - an ex-collegue/current-friend of my has a masochistic streak a mile wide, and was an early beta tester of Vista, on a laptop no less!  I’ve used Vista for a total of about 30 mins - got it on a recently-purchased Dell lappy recently, and spent half an hour trying to figure out why the network wouldn’t work and why I couldn’t find any of the settings, and then threw XP onto it.  Upon giving up on the GUI and resorting to the command line, I couldn’t even do an ipconfig /release without having it pop up asking me for permission!  (just like on the Mac adds, which incidentally, give me the shits as well).

This all got me to thinkin’.  I figure I can’t run XP forever, and if I’m going to be forced to learn how to use a new OS, why learn Vista?  I’ve seen the amount of penetration into the back end of enterprise networks (a crapload of the stuff at work is on RedHat, and more is going that way), so it’s probably only a matter of time before it starts hitting the desktops as well.  

Even if it doesn’t, maybe it will be a bit of fun along the way.

Basically, this blog is going to cover some of my (mis-)adventures with setting up Ubuntu at home.  I’ve still got my old XP install sitting on a separate drive, and I can fall back onto the lappy for some stuff, but I want to give this thing a bit of a go.

My setup is still Windows-based, which is why I had the first problem of my adventure.  I initially tried 8.04 Hardy Heron, but had all sorts of drama with opening my Windows file shares (some would work, others would crap out with “Insert useless error message here”).  Turns out there’s issues with accessing SMB shares in Heron, so I’ve instead gone backwards into Gutsy Gibbon (7.10), which seems to be running OK - I’m working on it right now. 

I hope to impart a little bit of knowledge as a Windows-head and *nix-n00b, and also provide something of a record for me to go back and re-do the stuff I’ve done if it all goes pear-shaped! 

Unable to resolve Windows Server names

Here’s one of the things I had to setup on my Ubuntu install to allow me to use Terminal Client (RDP) to connect to my server(s):

This is unashamed stolen from one of the most plain-English posts I’ve seen on a Linux forum :)  

http://ubuntuforums.org/showthread.php?t=88206 

Can’t resolve hostnames for Terminal Services etc:

Let me start with a little background info. I manage a computer lab with 85 workstations. I ocassionally use either RDP or VNC to do some maintenance. I have no problem doing this from windows, but I wanted my lonely Ubuntu workstation to be able to do the same thing. After about a week of research I am finally able to ping my windows workstations via their Netbios names. Woohoo!!

All you have to do is:

edit /etc/nsswitch.conf

change the line that says

hosts: files dns

to this:

hosts: files dns wins 


finally, you need to install winbind

Code:

sudo apt-get install winbind
that’s all that it took for me.

now ping <hostname> works great. And I can finally use the built-in terminal server client with hostnames instead of IP addresses.