A little corner of the Empire on the web.

Showing posts with label mozilla. Show all posts
Showing posts with label mozilla. Show all posts

29 April, 2010

Mozilla Weave Minimal Server Setup on Windows

So I've been following Mozilla's Weave project for while, and kept meaning to have a play with it. It's one of their experimental labs projects which recently came out of beta with a 1.0 release. Essentially it's a Firefox add-in that syncs and backs up a whole load of your settings and data back to a central server, including your bookmarks (and I have a lot!), saved passwords, preferences, history and open tabs. If, like me, you use more than one PC in more than one location then it's great knowing that Firefox is always setup how you like it wherever you are.

There are two parts to Weave; the Weave Firefox add-on (Weave is also available as an add-on for Mozilla's Fennec mobile browser), and the Weave server.

Most people install the add-on and sync their data back to Mozilla's Weave server, there's nothing wrong with that, all of your data is encrypted on your PC before it's sent to Mozilla's web server, so it's all secure and they have no way to access your private information. However you can also download the code for the Weave server and set it up on your own machine. Now, being that I have my own Windows Home Server* that's on 24/7 and accessible both within my home network and across the world via the internet I didn't really see the point in using someone else's server!

So I looked into it, and there are two options for installing your own Weave server there's the full server, which is a complex install and has all sorts of components that are only needed if you're going to act as a Weave server for many thousands of clients, or there's the Minimal Weave server, which has an incredibly simple server install (provided your machine already has all of the pre-reqs) and yet still implements the full Weave 1.0 API. Linux PCs are very likely already going to have most of the pre-reqs already installed (Apache web server and PHP for the Minimal server), Windows machines very likely won't.

I decided that as my Weave server is only ever going to be used by me, and possibly a few family members in the future, the simple install option sounded best! Particularly after I'd looked into it, and seen just how much effort was needed to install a full Weave server on a WHS box!

(Instructions on how to install an older version of the full Weave server on WHS are available on WeGotServed's wiki. note that this is for an outdated Weave version and won't SSL encrypt your traffic)

* A great little Tranquil PC SQA-5H series 1 server running MS Windows Home Server.


Stage 1: Setting up Weave Minimal server on Windows Vista

I don't like to mess up my server too much, it has a job to do, and does it well. I have a number of WHS add-ins installed, but have done the minimal amount of messing around on the server directly (and as a Microsoft certified server admin, this is against my nature ;). So to work it out, step one was to set Weave up on my Vista desktop, which luckily already happened to have a copy of Apache running, and I really don't care if this box gets messed up in the process!
Step by step instructions for how I did it are below.

Installing and configuring all required software for the Weave Minimal server:

  1. Download and install the Apache 2.2 web server (I cheated here as I already had Apache set up and working on my PC, stage 2 coming in a few days will have more detail for this step). Apache download page.
  2. Test Apache, point your web browser at http://localhost/ and make sure that you can see the Apache welcome page.
  3. Stop the Apache server -
    • Either using the Stop item in your Start menu under Apache HTTP Server -> Control Apache Server
    • Or by double-clicking the Apache 'feather' icon in your Windows system tray and clicking the Stop button in the Apache Service Monitor window that appears.
  4. Download and install PHP 5.2. Go to the PHP for Windows Download page scroll down to PHP 5.2 and click the Installer link under the VC6 x86 Thread Safe link. Run the installer, it will ask you the following questions after you Accept the licensing agreement:
    • Where to install PHP to, just accept the default that it offers you.
    • Select the web server you wish to setup: Select Apache 2.2.x Module.
    • Apache Configuration Directory, click Browse and go to C:\Program Files\Apache Software Foundation\Apache2.2\conf\
    • Ensure that the following Extensions are selected:
      • Extensions -> Multi-Byte Strings
      • Extensions -> PDO -> SQLite
      • Extensions -> SQLite
  5. Download the Weave Minimal server files from tobyelliott.wordpress.com/2009/09/11/weave-minimal-server/ unzip them using Winzip (or any other similar tool, Windows' built-in unzip tool can't unzip .tgz files) into a new folder called weave_minimal in the following folder: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
  6. Open Apache's configuration file via Start -> All Programs -> Apache HTTP Server... -> Configure Apache Server -> Edit the Apache httpd.conf... and add the following line to it at the bottom:
    Alias /weave "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\weave_minimal\index.php"
  7. Start Apache
    • Either using the Start item in your Start menu under Apache HTTP Server -> Control Apache Server
    • Or by double-clicking the Apache 'feather' icon in your Windows system tray and clicking the Start button in the Apache Service Monitor window that appears.
  8. In Firefox go to http://localhost/weave/1.0/blah/info/collection if everything has worked you should see an "Authentication Required" box pop up, enter "blah" for the username and type anything as the password. The box will pop up again, just click Cancel, don't worry about this. You'll see a "File not found" web page, don't worry this is normal. Now if you go to the weave_minimal folder that you created earlier you should see a new file called weave_db this means that you now have your very own, working Weave server - well done!
  9. All that remains now is to create your user account(s) on the server and set up Firefox to talk to the server!

Setting up user accounts on the Weave server

Go to your weave_minimal folder that you created earlier in Windows Explorer, hold down the shift key and click the right-mouse button on a blank bit of the window, you should see a menu entry that says "Open Command Window Here" select that. Copy and paste the following line into the new window (Right-click -> Paste):

"C:\Program Files\PHP\php.exe" create_user

You can then press "c" to create your user and enter the desired username and password. Repeat for any further user accounts that you want to set up on your server.

Setting up Weave in Firefox to sync with your new server

  1. Install the Weave Browser SyncFirefox add-on from the Firefox add-ons website.
  2. Restart Firefox
  3. When Firefox starts up again it should take you straight to the Weave settings screen in Firefox's Options. Select Use a custom server from the drop-down menu. Fill out the boxes as below:
    • Server URL: http://localhost/weave/
    • User Name: The username you created earlier
    • Password: The password you created earlier
    • Click Sign In
  4. You'll be asked to type in a secret passphrase, you need to make a not of and remember this, it is a bit like a second password and is used to encrypt your data in Firefox before it is sent to the Weave server. You'll need to enter this and your user name and password when you set another copy of Firefox to sync with your Weave.
  5. If everything went well you should get a successful login and the Weave status at the bottom of your Firefox windows should show that it is successfully syncing
  6. Well done!
Next Steps

The server that we set up above is OK as a test server but is only accessible by Firefox on your one PC (or by other copies of Firefox on your home network if you enter the Server URL Weave's settings as your http://yourPCname/weave/ but it's not accessible over the internet at all. That's deliberate, the Minimal server doesn't encrypt your username and password as you login to Weave, these are sent over the network in clear text, not something you want to do over the internet.

Next time I'll be setting up Weave on my Windows Home Server box and taking advantage of the free dynamic domain name and free SSL encrypted connection that you get with WHS to allow me to connect to my Weave server over the internet using an SSL encrypted connection, so that my username and password are encrypted as they travel across the internet, and safe from anyone snooping.


Music that got me through this: The Orb - "The Orb's Adventures Beyond the Ultraworld, deluxe edition" playing on my Logitech Squeezebox Boom, classic, calming ambient house - just what I need.


Edited 16/5/2010 to correct the PHP version used.

20 December, 2006

ServiceCenter/Firefox Printing Redux

Some may remember this post from back in July when I was having trouble printing from a web app after upgrading from Firefox 1.0x to Firefox 1.5. Wherein I laid out a way to fix the problem using a custom usercontent.css file, and also logged a bug on the Mozilla Bugzilla system.

Well it looks like its come to an end! Not with today's Firefox 2.0.0.1 update, as you might imagine. But the latest 'Minefield' (Firefox 3 alpha) builds have the new "reflow" changes (from Dbaron's bug 30030) in them.

And it works!!

So now we just need to wait for Firefox 3's release and the whole world can feel the love!

27 July, 2006

Unisys ServiceCenter Firefox printing fix

For anyone still living in Unisys-land (aren't I glad they're not filling out my wage slip any more smile ), and for anyone else forced to use their "idiosyncratic" (read shite) web tools here's a little something.

If you've been forced to use the web (ie HTML not Java) version of their (Peregrine-based) ServiceCenter tool, you'll notice that its dog-slow if you're using IE and has a whole myriad of intermittent problems. The obvious, and really quite effective, solution is to use Firefox. This speeds up ServiceCenter measurably and seems to get around most of the other problems.

Or at least it used to. Firefox v1.0 to v1.08 all work absolutely perfectly, but Firefox 1.5 introduced one teeny-weeny and yet show-stopping printing bug that stops you from being able to print any useful info from ServiceCenter (technical details here in Mozilla bug 326162 if you're interested). Unfortunately according to the recent Firefox 2 beta release it doesn't look like it'll be fixed in Firefox 2 when that's released , and checking Firefox trunk (the ongoing work to create the not even alpha yet Firefox 3) the bug actually looks even worse at the moment.

So after reading this page on creating your own "user stylesheets" in Mozilla and this page that mentions a new experimental CSS rule, I put two and two together and actually came up with four for once!

So here's how to get Unisys ServiceCenter printing correctly in Firefox versions 1.5 and newer:

  • Download a recent version of Firefox
  • Run it
  • Close it
  • Find your Firefox profile folder (see here if you can't find your profile folder, and bear in mind that your profile may be in a Windows network roaming profile, or may be on your C drive).
  • Inside your Firefox profile folder look in the "Chrome" folder
  • Do you have a file in there called "userContent.css"? If so, open that file in Notepad, if not create a new text file with that name and then open it in Notepad.
  • Paste the following text into the "userContent.css" file:
    
    /* Fix b0rked ServiceCenter printing in Firefox 1.5+
    see Mozilla Bug 326162 https://bugzilla.mozilla.org/show_bug.cgi?id=326162 */
    
    @-moz-document domain(www.sc-ps.unisys.com){
    div.labl, div.val { overflow:visible !important; } }
    
  • Save the file
  • Open Firefox
  • Re-visit ServiceCenter and try printing a ticket out
  • Send me thanks, adoration, first-born children, money or just leave me a comment below saying how it worked out for you (actually forget the first-born children I wouldn't have a clue what to do with them).

One final note, Unisys have been known to change the server these web apps are on periodically, if so you need to edit the bit that says domain(www.sc-ps.unisys.com) to reflect the new server name. This may or may not work for other company's Peregrine web interfaces, may be broken at some point in the future by an upgrade to the website or to FIrefox, YMMV). Also this Mozilla bug may be fixed at some point in the future, so at that point you can safely delete the above lines from Firefox's userContent.css.

22 October, 2003

Extensions I have browsed

A follow up to a previous post on my favourite Mozilla (and other Gecko browser) extensions.

Just put Mozilla Firebird 0.7 on my laptop, and I've noticed that the style sheet switcher that I used to add in as an extension is now included by default. Excellent! Hopefully this will encourage a few more web sites to take advantage of alternative styles, and show us what they can do.

So now that I don't have to install that any more, what extensions should I use? Well I took a quick trip over to the Mozilla Firebird Extensions page to have a look around.

So what have I installed now?

  • Well first had to be the Link Toolbar that restores (and enhances) the link toolbar found in the main Mozilla suite.
  • Second, the Live HTTP Headers, a great tool for anyone who writes server side web applications, because they don't always work perfectly and this is just the best and easiest way to debug so many problems.
  • I've been getting into RSS quite a bit lately, and until I get around to writing my own web-based RSS reader, then the RSS Reader Panel is simply the most convenient way to keep up with events.
  • Text Links is great for extracting URLS from so many different places where people don't bother linking them, or mess it up (a couple of forums I visit and a couple of email newsletters I get).

And I think that's my lot for the moment, all installed and ready for action!

19 April, 2003

Do I look like a construction industry recruitment specialist?

No?

Well stop sending me your CVs.

Further to my earlier email concerning the above, I attach my 
CV for your evaluation.
I have five years East Africa experience and several years 
experience with overseas water utilities. My experience has 
covered Zoning , Water meters, bye-laws , water legislation 
and related activities.
I am currently in Thailand on holiday.I can be reached 
through this email.

Regards,

or

Dear  Mr.Xxxxxx  Xxxxxxxx,
      I  write in response to your recent advertisement for "chief operating officer" in Tanzania.
      I would like to be considered for the employment and would welcome an early interview.
      I have attached my recent c.v. and look forward to an early and favorable reply.
      I wish to highlight my broad experience in Tanzania and Africa in general as seen in my c.v..
      Thankful and grateful for your kind cooperation and response,hoping you would kindly consider my c.v. for any other position would fit me in future.
      Thank you for your time.
      Kind  regards. 

(The above reproduced complete with all spelling and grammatical errors. "X"s inserted to protect the [mostly] innocent)

And quite a few more in the same vein.

After a little investigation found out that there is a company called Jared (nasty colour scheme, pointless Flash menu, massively invalid code). They publish some of their jobs on a site called "Careers in Construction", they even have their own special page, the problem is that page links to lots of pages full of jobs, many of which have the wrong contact details: remember "Jared" is only one letter different from "jard".

Well being the good netizen that I am, I've replied to each of the applicants letting them know about their mistakes, and sent a letter to one of the HR people asking them to update their contact details, but, given that this is the middle of a double bank holiday weekend (wahoo, four day weekend!) I'm expecting that I'll be receiving these until at least Wednesday.

Ho, hum, guess I'd better have ago at exercising Mozilla Mail's rules filters.

16 April, 2003

Wow, just had Mozilla crash on me. What a shock!

I'm running Mozilla 1.3 at the moment and this is the first time I can remember Mozilla crashing since I had a corrupt plugin install back when I was using Mozilla 1.1!

I'd completely forgotten about the feedback agent, so it was a real shock when that appeared.

Still I guess that's a fairly decent MTBF: two major milestone releases!

26 March, 2003

It's true, I really can't browse with any other web browser any more. I've tried I really have. I've tried to wean myself off Mozilla and its Gecko-powered siblings, but I really can't do it. I know I need to lose this feeling of absolute power and control before it goes to my head, I know I need to watch this feeling of safety and contented happiness and redevelop my healthy sense of paranoia.

What it boils down to is this Mozilla just does what I want it to, what I expect it to and doesn't do anything unexpected or unwanted. I haven't yet found any other browser that creates this euphoric feeling in me.

What brought all this on? I've been spending a bit of time creating an all CSS layout for a web site that I'm redeveloping at the moment. Now one important phase of this is testing the effect in other web browsers.

Installed on this PC I have Mozilla 1.3 (plus a couple of more recent Mozilla nightly builds) , Phoenix 0.5, Opera 6.05 & Interenet Explorer 5.01 SP3. Other PCs within a (long) arm's reach also have Netscape 4.7x, some recent Phoenix nightly builds, Internet Explorer 6.x and Opera 7.03 installed.

I've been spending time flicking between some of these browsers checking what things look like, checking the different pages still hang together and that the end result is still readable and usable in all of the above (even if it looks a bit plain in some of the older browsers).

The big problem is that I'm just so used to Mozilla's features and its many power user features that I just plain have trouble navigating around the web without them any more. I can't count the number oftimes that I've clicked the middle-mouse button over a link in Opera or IE and been surprised when something odd happens (Opera) or nothig at all happens (IE) rather than opening a page into a background tab like my muscle-memory expects.

Or I want to jump straight from a sub-page to its parent whilst the page's nav menu is offscreen, easy in Mozilla (and assuming a well designed web site) you just move the mouse up to the Site Navigation Bar and click the "Up" arrow. No other browser I've seen implements this most useful of features (although I've heard that iCab on the Mac might have a subset of this). (if you can't see the Site Nav Bar in Mozilla then click the View menu and select Show/Hide -> Site Navigation Bar and pick your setting, I use Show Only As Needed).

However the worst problems come with something as simple as dragging and dropping links. Opera just seems to have no concept of drag and dropping links whatsoever, you can't drag into it, and you absolutely can't do any draging for any purpose whatsoever within it. IE scores one better, you can drag links from one window, drop them into another and it opens the linked page, you can also drag from other browsers (such as Moz) into IE, but you can't drag out of IE into other browsers (just other MS apps). Mozilla, of course is the most drag-and-drop friendly letting you drag between windows, to other browsers (as long as they'll accept d'n'd) and from other browsers, you can also drag and drop into most other apps and it does what you expect it to (either pasting the link in plain text apps, pasting hyperlinked text in capable apps).

Last, but by no means least we have to mention Mozilla's stylesheet switcher controls (View menu -> Use Style) I can't over-emphasise just how useful it is to be able to quickly and easily swap betwen two or three different style sheets or even temporarily disable them entirely. (This is available as an XPInstall add-on for Phoenix from the Phoenix Extensions page).

And that's all without going into the major failings of the other browsers, that's a subject for another time!

07 March, 2003

I always love it when someone new discovers and learns to love something that I've loved for ages, and Mozilla is definitely one of those things that I've managed to evangelize friends to in the past.

So it's great to see someone else not only discover and learn to love Mozilla but also write a great page evangelizing Mozilla for bloggers.

13 February, 2003

Things that wind me up, today:

  1. Forms on web sites that don't use the label tag, especially with radio buttons and checkboxes. Why should I be forced to aim my mouse pointer at some tiny, little target just because you so-called professional web developer can't be arsed to learn and utilise some incredibly easy part of the HTML spec. It's not even as if it's difficult to use:
    <label for="control_id">Some text<label>

    And as an added bonus it means the form is easier to understand for anyone using a screenreader (eg the visually impaired) and it makes the form far easier to go through and debug using something like Mozilla's Page Info dialog screen.

  2. Why can't I search for entries in a Livejournal blog such as jwz's? All I want to do is track down a link he posted about a month ago, how do I do something that simple?

(And yes I do seem to be in a bit of a mood for using the different HTML list tags today)

09 December, 2002

My default web browsers at the moment are all Gecko based. On my new WinXP Pro machine at work I'm using Phoenix 0.5 (very cool), at home on my Win2k box Mozilla 1.2.1 and Phoenix 0.5 are currently fighting it out to see who' ends up the dominant browser (at the moment my money's on Moz, as I do use it to pick up my POP mail on that machine). The XP Home laptop is still running Phoenix 0.4, mainly because that's got everything I need on it at the moment and I haven't got round to upgrading it yet.

To be honest Mozilla is my favourite internet application suite, it does have nearly everything I ever need for surfing the web, checking my email and testing my web applications. Phoenix is smaller, faster and prettier and so is great for general web browsing but is still missing a few features for the more advanced web stuff, it's great that they've got the Javascript console back in again, but currently my big Phoenix wants are the "Links Toolbar" (see below for more on this) and the "Style sheet switcher" from Mozilla, but then I guess I'm not your average user so I'm not going to moan.

Great stuff that has recently been added both to Phoenix and Mozilla includes the new Type Ahead Find it is such a time saver on large pages (although it's default mode only searches links, whereas I mainly use it to search through all text on the page, and I'm looking forward to daring to try out the new "Bayesian" intelligent, learning spam filters on my mail accounts (although I do still feel worried about trusting my main email accounts to what is currently pre-alpha level code, although I may give Moz 1.3alpha a quick spin when it comes out just to try this).

Standard add-ons that I install without fail are: for Phoenix Alternate Stylesheet Switcher (to emulate Mozilla's CSS stylesheet switching options) and Text Links both available from David Tenser's Phoenix Help site. For Mozilla the only extension that I regularly install is Tobias L�fgren's minirot13 from http://www.pinkroom.biz/owl/minirot13/