Deadpan Sincerity

April 27, 2008

Configuring Apache for clean URLs on Ubuntu

Filed under: The Internet — Tags: , , , — David Miller @ 5:43 pm

Have just finished making the relevant changes to Apache so that Drupal can generate clean URLs. Didn’t find anything anywhere that contained everything needed and worked for me, so here is what did work:

Check to see if the rewrite_module is enabled:

apache2ctl -M

Which generates a list of the modules. If rewrite isn’t there, enable it:

sudo a2enmod rewrite

I then changed the permission for rewrite in the apache sites-available file. Which was located at /etc/www/apache2/sites-available/default

In that file, I inserted the following:

<Directory /var/www/drupal>

AllowOverride All

</directory>

Where /var/www/drupal is the location of the folder containing my drupal installation, and within which all drupal sites will be stored.

Then restart apache

sudo /etc/init.d/apache2 restart

I then logged in to the drupal site as the administrator and navigated to Administer => Site Configuration => Clean URLs and enabled the option.

After which the url rewriting worked.

This worked for my setup which was Ubuntu 7.10, Apache 2.2.4, PHP 5.2.3-1ubuntu6 Drupal 6.2

Progress>Hegel?

Filed under: The Internet, Ubuntu — Tags: , , — David Miller @ 5:09 pm

This week has been an interesting one, full of nice little discoveries that make things ever-so-slightly better.

Firstly I’ve been getting to grips with the Gnome-terminal and using it a lot more. The really useful thing has been the ability to open files in programs while granting them temporary superuser privileges. Which I learnt how to do this week:

sudo bluefish /etc/apache2/sites-available/default

Not only that, but I’ve simply been using it a lot more to do everything, and making sure to look up commands that i don’t understand when I read them in howto guides on the net. Slowly, the point of doing things this way becomes clear. Certainly for playing with things on the Apache server I’ve got running on the PC it’s very useful.

Meanwhile I’ve installed Drupal to play about with it. The instant power of the bundled modules is apparent right from the start, but I suspect that there is quite a lot to learn with regards to getting right down into editing both the themes and the back-of-house that would have to be done to get it to be actually useful. Until then, it’s simply quite ugly.

This week’s other development was to begin learning python. Which is going relatively well, although thinking in it is still a long way off, I’m at least now able to read it and understand what’s going on. More to follow I suspect.

April 17, 2008

The sound of keyboards

Filed under: The Internet, Ubuntu — Tags: , , , , — David Miller @ 3:58 pm

After half an hour of intense stupidity I eventually got the jMP3 plugin working properly without having bulky embed object code at every line, which was nice. Turns out that yes, it works exactly like it says on the instructions page, but I was forgetting to change the # to . to attribute the player to a class rather than a div. Never mind, at least now I know.

What has been changing the way I use the internet is discovering all the keyboard shortcuts for Firefox. It started with me trying to fix the backspace button so that I could go to the previous page rather than scroll up through anchors. This seems to be an issue with Ubuntu, and is fixed by going to about:config, and then changing the browser.backspace_action value to 0. I learned this from a blog somewhere that I’ve forgotten, I’ll edit a link here when I find it.

This then led me to search for a way to jump to the URL bar using the keyboard, which is something that I’ve always wanted to do but didn’t know how. That led me to this article which has all sorts of useful keyboard shortcuts for Firefox.

Which has somewhat changed my browsing experience. I now use these all the time:

alt+d - jump to url bar
‘(string) - to find link text on a page
ctrl+g - jump to the next instance of find
ctrl+enter - open link in new tab
ctrl+shift+enter - open link in new tab and give focus
alt+left - back button
alt+right - forwards button
ctrl+w - close current tab

In conjunction with the Gnome desktop shortcuts:

alt+ctrl+arrowkey - switch workspace
alt+f2 - open application..
alt+f1 - applications menu.
alt+f9 - minimise window
alt+f10 - maximise window
ctrl+alt+shift+arrow - move current window to different workspace

I now rarely use the mouse at all. Which possibly makes things quicker, but certainly means that I don’t have to keep raising my arm. After all, wasn’t doing everything by typing the point of Linux?

April 13, 2008

Slow Nudges to the Midriff of Style

Filed under: The Internet, java-script — Tags: , , , , — David Miller @ 1:48 pm

A busy week in terms of developing. The site went through a complete redesign which lightened the whole thing and began to make it look halfway decently designed. Only half, but still, an improvement.

Having looked around for a solution to creating rounded corners, I eventually settled on this method largely because it gives me the ability to not bother creating any background graphics. There seem to be three million rounded corners methods out there, none of them that I’ve found to be particularly satisfying.

What has been particularly useful is Walter Zorn’s jQuery based tooltip which has very well annotated script, is very easy to customize and lightweight. Which has been very useful for displaying album titles above thumbnails of covers on Something Else

Meanwhile we went live with streaming audio using Sean O’s jMP3 which is a very nice slim flash music player. As ever, function beat down style for the minute, and the thing works, but I’m embedding the player again and again, which I don’t think is actually needed.

The other big discovery was Bluefish - a web focused text editor with a whole bunch of very useful features for writing code. It’s very quick, very nice, very clean, and has all of the features I was wanting from the Ubuntu standard text editor: a directory tree in the same program for switching files, working keyboard shortcuts for switching tabs, decent find & replace functionality.

What’s more, it also contains a built in syntax library for CSS2, HTML, Python and PHP, which is just a brilliant feature to have displayed in a side panel next to your file.

Next up, sorting out the jMP3 code, tweaking the graphics, and perhaps actually releasing a record!

April 8, 2008

Post Ubuntu - Humanity Towards Machines

Filed under: The Internet — Tags: , , — David Miller @ 10:48 pm

I’ve just this week switched to work completely in Ubuntu7 from XP, which has had all sorts of knock-on effects all over the place. So far, a mixed bag, at least until I iron out what I assume will be creases that allow themselves to be ironed. That’s the whole linux thing right? You don’t like it, change it.

The good things though, are great. Workspaces are a revelation, allows you to navigate those times when you have eight windows open, four of them with multiple tabs themselves. It’s the first time I’ve done anything more than just play about with them for the novelty factor, and already I growl at the Windows PCs at work for being so desperately backwards.

The availability, ease of access and so-far the quality of the software available is also brilliant. Want some software? ten minutes, fully operational, free, and not something that you’ll get to know only to find that the triall has disabled save and export.

Have been playing with Ardour http://ardour.org/ a digital audio workstation, which looks like it could offer all kinds of possibilities that I am yet to properly explore. Lovely to have that software naivety featuring in creative processes again though.

The other big difference is in having a sensible text editor to play with after spending the last few weeks hand-coding with notepad in xp. Automatic recognition of css js and html syntax and automatic coloration is a godsend as is tabbed editing. Dramatically cuts down on open windows and is simply a very good idea.

On the negative side, it does seem to have broken the web. If this is what the IE development people are struggling to avoid, then I have at last some sympathy. Having used firefox on xp, it’s never really been an issue, but the first forays into the outside world using ubuntu were rather painful. The main issue was lack of fonts - what with the web being built on verdana arial and times, but that was relatively easily rectifiable.

The larger, and as of now unresolved issue lies somewhere around the screen resolution, which insists on rendering pages with incredibly small font size. Which in turn means that yuo have to adjust up to beyond normally reasonable levels to read anything, which, on most sites means that design goes mostly out of the window. Any time images get heavily involved the results are horrible. An experience to use as a lesson perhaps. Also there seem to be only two resolutions available by default, one far too high, the other far too low. There must be a way to solve this. The next challenge.

Overall though, brilliant and free.

Blog at WordPress.com.