Posts Tagged ‘linux’

Script to proxy git and svn protocols via http proxy

Monday, August 31st, 2009

In work I’ve discovered a number of problems when accessing open source code repositories that are using SVN or GIT. Attempts to access a number of repositories just fails with a connection failed message.

After some time of getting these, and finding some repositories working, I noticed that the common attribute for those repo’s that were accessible, was that they were via http. Now that might be fine, but there is a reason for the repositories to have their own protocols, in that they are tuned to be more efficient at transferring the necessary information. In addition not all sites make the repositories available over http in additional to the native format.

Obviously the core problem here is with the corporate firewall blocking outbound requests over certain ports. Perfectly understandable, but sometimes just a little unhelpful when you need to be able to access various upstream repositories when working with open source to check for bug fixes in the code.

After several problems in accessing some git repos that didn’t have http equivalents I did some searching and found the following website http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/ which described how you could use socat to create a tunnel that allowed access to git repositories without having to find one that permitted access over http.

(more…)

stoping vim from autoindenting pasted text

Wednesday, March 5th, 2008

Vim has been my editor of choice for a while now. I’m not going to get into the whole emacs v’s vi debate, just take it that I prefer a modal text editor and vim suits my needs. So I’ve never seen a need to go and learn emacs.

Once of the little problems that has annoyed me for a while, but I’ve never gotten around to trying to do anything to solve it, is where when copy and pasting code from one file to another, vim automatically increases the indent on each line. Turning something that is nicely formatted with various tabing/spacing set into an unreadable mess.

Of course I kept meaning to have a look at this, since I was sure there was an easy fix. The problem reared its head on the wine-users list recently http://www.winehq.org/pipermail/wine-users/2008-March/029545.html, for which I decided to find the fix.

It was very simple in the end, http://vim.sourceforge.net/tips/tip.php?tip_id=330 and definitely a site that I will bookmark for future reference. :)

the dog’s config

Wednesday, January 30th, 2008

Spend a little time over the last few days trying to sort out my email client. I wanted it to show me when I had new email in the various folders. Why? Because I use procmail to sort my mail when it arrives into various folders, otherwise I would never be able to keep as much as I do :) .

There were also other problems that I felt that using imap would fix, such as locking so that if I open the mail folder using another client using imap, it would detect that it was already being accessed. This used to bug me when using the web interface horde/imp for email and when mutt was doing direct file access. Accessing the mailbox over imap in imp, even if it was just a search would result in the mailbox going read only, so any changes made by mutt were discarded.

Thankfully that’s all taken care of by switching to using imap with mutt. It also means that I can use mutt from my home PC to directly read email on the mail server, rather than having to open a shell first and start mutt remotely.

Mutts documentation on how to use imap is available via the following url http://mutt.sourceforge.net/imap/.

Anyway, here’s the low down on my current config, it might be useful to you or even me if I lose the files :)

(more…)

Time for Hibernation

Tuesday, November 27th, 2007

Well after that post yesterday, I decided to try testing the suspend/hibernation functionality using the Open Source drivers rather than nVidia’s proprietary ones. Low and behold it worked!

Success, or maybe not, since I’m not happy that I lose a fair bit of screen real estate in the switch to the other drivers, not to mention the lack of ability to play games that require hardware accelerated graphics. Now the graphics card in this machine is much to write home about, but without using NVIDIA’s drivers, its basically impossible to play just about anything that uses graphics. Unless I’m going to stick to something like Falcon’s Eye.

So the search goes on for the solution with NVIDIA’s video drivers. Obviously that is the main culprit in not being able to resume from hibernation.

In Suspence!

Monday, November 26th, 2007

One of the things that has been driving me absolutely nuts recently with my parents box, has been problems with suspend and hibernate. Basically they don’t work.

I’ve gone through the BIOS of the Epox 8K3A+ motherboard adjusting the power management settings to see if I could get it going. So far the, I can get the machine to hibernate just fine. It’s the resuming part that is proving to be tricky :( . I suspect the same problem exists with the suspend as well, but I haven’t tested that extensively yet. I figured once I could resume from one correctly, the other shouldn’t be so hard.

Q. So what’s proving to be the problem?

A. The video card doesn’t appear to re-initialize correctly and just displays a blank screen.

It’s clear that the monitor is receiving a signal since it the green light on the front of it changes to flashing orange once the video signal disappears. But I’m still left with the problem as to what’s not setup correctly with the video card, which incidentally is a nVidia Ti4200 Geforce4, most likely something in the xorg config file needs to be set so the proprietary video driver configures the graphics card to resume correctly. I had previously believed that when booting from hibernation, the video BIOS would reinitialise automatically, but that apparently doesn’t happen.

Now I guess I should come clean and admit that it’s actually Ubuntu that is installed on my parents machine, and which I would use mostly. However Windows XP also had problems with this functionality before. Since the recent changes to the system BIOS I haven’t checked to see if Windows XP is now capable of suspending/resuming the machine correctly. Even though it’s a dual boot system, I generally don’t find enough reason to even boot Windows, but I’ll keep that rant for another time! :P

Coding for Wine

Monday, November 26th, 2007

Last week I decided it was time to bite the bullet and try and dig into the code for wine , something I’ve been putting off for a while because I felt I didn’t understand the code well enough to do anything. Well I decided the only way I was ever going to understand it, was to try and fix a bug.

So I tackled my first wine bug :)

Bug 9628 was my first target. If for no other reason except that I’ve prior experience working with msi’s, and I felt at least I had a basic understanding of how the windows installer should work. Even if I don’t quite follow the mountain of code that is behind all of it.

Anyway as luck would have it, it appears that this bug occurred because someone reverted a change that had been made previously to use the standard command line parsing code instead of custom code. The reason? Because going to the standard code broken the Excel Viewer 2003 installer! Hmm, really, that seemed very odd, since it appeared to be parsing the command line of the RPG Maker just fine. A little testing later and I discover that it appears that the command line chunking to deal with the different arguments when Excel Viewer is being installed is an absolute mess, and the reason why? Well the command line arguments get completely messed up in being passed to wine’s msiexec in the first place.

I really had to wonder why this was never looked at closely before? Guess no one really had the time or really cared, but at least it left a nice easy bug for me to start with, or so I thought. Apparently the bug is somewhere between the function call CreateProcessW, which is used to kick off any exe called in wine (well in windows too, since wine is just another implementation of the windows API), and msiexec receiving the command line. Right now this is proving beyond my abilities to debug, basically because I haven’t worked out how the code works, and I know that since this is down in the server part of the code for wine, it tends to be a bit more challenging to grasp due to amount of things going on in one place.

Right now I’ve had to settle for emailing the devel list and hoping someone can help prod me in the right direction. In the mean time I think its time to move on and try the next bug :) . Besides I’ve already given them a decent bit of investigation which should help someone more experienced in that area to fix the bug.

Roll on the next bug, just maybe I’ll be able to actually fix that one…

Wine Is Not an Emulator

Friday, November 16th, 2007

If you’re a linux user, and you still want to use windows software, you will most likely have already come across this piece of software. I’ve been following its progress via the devel mailing list for the last couple of years, although I’ve yet to contribute anything more than the odd bug report or adding entries to its application compatibility database. Still its progress has been very impressive and it is getting to the stage that I almost expect that most windows software I find should have a decent chance of working with it. The exceptions of course being recent games which can just put too much of a strain on system resources to be of any real enjoyment.

That all said, I would like to try and get more involved with the coding, since it would be easy to then fix the bugs that bug me. It’s such a vast project that it seems almost impossible unless you have a great deal of experience to be able to work out what is likely to be a simple bug to get started with.