Mozilla Firefox ActiveX Control

December 15th, 2010

Well, as I said a few days back, I started on writing a small concept-browser.

First run at it was using TEmbbededWB from bsalsa. IE-based obviously (6.0 in my case). I ran the test project switching tabs and the applications memory kept raising and raising … ok, so we know IE sucks but this is ridiculous.

Then, I rememberd a mozilla project long ago (mozdev) but it seems they’ve gone dead for the past 5 years so … google-ing brought me to : http://www.iol.ie/~locka/mozilla/control.htm

Now, there’s an IEPatch application there that supposidly converts it from using IE to using mozilla. Take it from me, at least with tembeddedwb, it doesn’t work. It will crash like crazy.

Now, after getting everything to work and removing the tembeddedwb stuff (including address bar) and rewriting the test project to suit the new control, things work fine. Well, almost fine because neither TWebBrowser nor TMozillaBrowser support changing the user agent (other than in the navigate method, but once you click on a link in the page, bye-bye). Aside from that, I started doing the memory test. AAAAAAnd it still leaks. Not as ugly as IE but still, about 1 MB per page load.

Ok, so this still suck.

Now, let’s find alternatives. D-Gecko on sourceforge.. dead for 2 years, no release.  TGeckoBrowser on sourceforge (based on d-gecko). dead for a year, one release. Has compilation issues (mainly caused by code used for debug, not ansi compatible (in D7)). After that’s fixed, it will compile and install in the IDE.

then, for whatever reason, they inlcuded the FastMM_FullDebugMode.dll in the project. Uhm … I’m pretty sure that somehow breaks the license of fastmm but that’s another story. The main issue is: did you people never heard of conditional defines?

Loading the first sample app: ChromeWin complains of not being able to find a unit referenced. duuh, improper path on the included pas file. It’s actually in the parent directory. Once that is fixed, an AV is thrown when opening the form.

Well, so much for today.

Conclusion: it all sucks and it’s back to IE. Or the mozilla activex control. at least they’re compatible and if the mozzila activex is less memory leaky than ie, then I’ll stick with it. And maybe fix the leaks too.

Related posts

Garfield and Kevin & Kell comics on email

December 11th, 2010

Uhm… ok, so this is probably not for the general audience as not everybody can actually implement this but since I searched and couldn’t find a free way for getting it done, I made it myself (yes, the guys provide paid subscription but that’s not to my liking)

So, how I did it (as I do have my very own personal dedicated server about 1.5 m from my desk):

– I created a new subdomain to hold the below script (not available for public yet. well, you get an error if you access it 😛 )

– I installed a mail list script (phplist popped up in my google searches. mailman might also do it but since I am thinking about the future when I’d probably integrate it with automatic notifications on my site, it’s a good choice for me)

– I configured a list and a user (me) to get the daily email (comics in this case)

– I wrote a script that parses out the actual comic strips from the pages to include in the daily mail (it’s actually a wget piped with grep and sed, no big deal)

– I modified the above script to use phplist command line script to send the message to my list and then process the queue (basically sending the email to … me)

– I created a cron job that runs the above script a bit after the comics update

And now, I get a daily email with the comic strips mentioned in the header.

I *might* make this “newsletter” available for public (open or restricted) but only if other people are interested AND I get the consent from the comic strip authors (in which case I could probably get a direct url from the authors so to drop the wget parsing).

Related posts

WordPress upgrade issues: could not create directory

December 5th, 2010

For a good few weeks all of my automatic upgrades stopped working. Meaning that they were working fine and then the next upgrade (which so happened to be for aplugin) didn’t work. I thought it was a WP 3.0.1 issue so I waited for 3.0.2 to come out and bummer. I was still getting: could not create directory wp-content/upgrade/wordpress-3.tmp/wordpress

So here I was google-ing the net for a solution, not finding one since everyone kept saying it’s a directory permission issue, which I eliminated like 3 times (including recreating the “upgrade” directory, then something hit me: I was reading in a few posts that people de-activated all plugins. I said, let’s try that. And you know, it worked.

So obviously I tried to track down the culprit and obviously I did: AskApache Password Protect plugin. Don’t ask me when that got broke or how but thing is, that one killed the upgrades.

So, I’ve done what any “sane” sysadmin would do: I deactivated the plugin and added the ap-admin with a directory apache restriction based on my local IP (which works fine since I only administer from home). Other people can add all their used IP’s (unless you’re behind a dynamic IP in case you should probably usea dyndns service)

Related posts

Reset root password on VMWare ESX/ESXi v4

November 30th, 2010

It so happened that we received a server with ESX on it and some settings; like the IP address to connect to it. Which was wrong. Then the user/password to connect to it which, you guessed, was wrong as well.

So, here I was unable to use the machine because some folks could not remember what password they set on the machine. And then comes google-ing to figure out how to reset it. There’s the vmware KB article that explains it along with some others and all of them mention the grub loader screen. Well, bad luck because on our esxi version 4, there’s syslinux as bootloader. Of course I figured this out after installing knoppix on a usb drive and booting from it (because the server came with no cd/dvd drive). Then came the second issue, of mounting the filesystems as explained in most of the articles on the net about resetting the root password (because as explained, we couldn’t edit the bootloader config to enter single user mode). Well, the issue was that some of the partitions on the disk were vmfs which might be something vmware related, I haven’t digged to find out since the issue was present: I couldn’t mount and hence was unable to read/write to those partitions.

Then, I figured I could play around with the syslinux boot config file to try to force it to enter single user mode. And since there was the syslinux.cfg and a couple of boot.cfg on some other partitions, I modified them all. But to no avail, for some reason I couldn’t guess what the kernel was so the boot failed. Better said, and I quite: “Kernel panic”. I love that message 😀

Back to the issue at hand, finally :P, I noticed some tgz files out of which 2 had current date. I immediately thought that they might contain some stuff about current things (ambiguous, I know) so I jumped with MC (midgnight commander) in them. To my surprise, the state.tgz file contained a local.tgz which contained the /etc directory which contained, among other things, the shadow file. Someone screamed bingo? 🙂 I know I almost did.

So what I did was to extract everything out (since MC does not support saving changes into archives, or at least not with that knoppix version), edited the shadow file and removed the roots password hash (as explained in a lot of articles on the net) and then I tar-ed the /etc in local.tar, then I gzip-ed that into local.tgz then I tar-ed that into state.tar and then gzip-ed that into state.tgz, every time making sure to chmod 700 on the tgz files (as on the original file), and wrote that to the mounted partition overwriting the existing one. And voila, root password got reset.

Phew, that issue took a few hours to solve. Well, enjoy 😉

Related posts

Time flies, software changes… or not!

November 26th, 2010

I’ve been a long time user of Zone Alarm free firewall (and pro when there were free promotions).

However, during this time, every time I had internet issue,s ZA freezed my system (well, the applications that needed internet access verification, anyway). Why in the world does it have to timeout after a few minutes if there is no internet connection and why it doesn’t cache the information instead, is beyond me. I’ve even opened cases with their support on the issue but of course to no avail. So, just as with moving from opera to firefox, I switched from zonealarm to outpost firewall, but I disabled the firewall in outpost (something impossible to do in zonealarm) as I don’t really need the firewall part, only the application control, because I am behind a linux firewall and truth be told, nothing get’s passed that. And even if I wouldn’t be, I strongly recommend a hardware firewall instead of a software one, because the software one always needs updates and consumes a huge amount of system resources and let’s be honest: the firewall part is really no big deal and doesn’t really need updating. Iptables is “old”, in the sense that I use the exact same rules in it that I wrote over 5 years ago with minor additions/tweaks to support development in the system and the internal network and services provided.

And today my free AVG antivirus wants me to upgrade and their site mentions that software updates are not included in the free version. Well, boys and girls from AVG, I’ve been with you from a very long time and promoted you everywhere but now … I switched to avast. Just because they’re still free with updates. As I always say: Your AV is only good until it’s properly updated. Bye-bye.

Now, onto firefox. As some of you might remember and some don’t, I wrote a little while ago about how I ditched opera and moved to FF. However, that hasn’t become a much better experience as I initially hoped for and that’s because even though I now use “only” about 50 or so tabs open (compared to 120 in my tests) it still eats up almost 600 mb of memory (ram+disk). Not to mention that it takes a few minutes to close it down which obviously has a huge impact on the time needed to both close the PC and startup FF.

Now, there is something I really cannot understand. Why in the world are todays software such huge resource hogs? Really, if I install 5 such software they will all need a total of over 4 GB ram, including OS and that is about the average user programs somebody will have running at a given time. Are todays programmers really that stupid? Why the fuck (sorry) do I have to keep buying new hardware to meet the resource necessity of new software? Seriously, I only use a browser, email client, some IM programs and software development stuff. Not counting the last ones, all those are fairly the same in principle as 20 years ago, but their resource consumption is trough the roof. Where the hell is the progress if during these 20 years, I never ended up having a faster machine ? The OS should start in under 10 seconds, any application should fully load in less than 3 seconds. Everything should work like “snap”. And still, we’re not better at this than we were 20 years ago.

Where is the progress?

My needs haven’t changed in the past 20n years. I want to be able to communicate with somebody, (IM & email), and get some information off the internet (browser) all this in a simple OS that manages just that.

Instead, I get a load of crap. Over 80% of the services installed on my system are disabled, as I don’t use them. From whatever is left, I’d disable almost all if it weren’t for my system to become unstable as I don’t need them either. Of all the features the OS provides, I probably don’t need even 90% of it. And I’m thinking as a general user, begin somebody who installed PC’s for a lot of “average” people. Same thing goes for applications.

Current hardware is so fast, that the user cannot notice a significant difference between loading 20 MB of data off the hard drive or from RAM . And I’m not talking about raw data, which obviously is hundreds of times faster loaded from RAM than disk, but for the dump of a web browsers content in a tab. That is, a webpage. So why the fuck (sorry again) do you browser developers have to keep all that shit in memory instead of keeping it on disk. Do you really think that I give a fuck (sry) that when I switch tabs I have to wait about 1 second for it to load from disk? Seriously, 1-2 seconds are not even enough to notice that.

I’m thinking of re-writing firefox to behave like that. Too bad it’s in C++ and I’m a delphi/pascal punk.

I think for starters I’ll just create a new browser based on IE, although IE sucks; but I’ll just use that for rendering pages so that I can implement my theory and prove that it’s usable.

But since I’m scarce on time and hence don’t want to work in vain, anybody interested in this project? IE users will probably be 🙂

Related posts

[SOLVED] Diablo 2 CPU usage 50%/100%

November 12th, 2010

(for those who don’t like reading, solution is at the end of the article 🙂 )

I’m not going into the details but it seems that it is known that diablo 2 has a bug in it’s engine that makes it use the entire available CPU, which on single cores results in a 100% CPU usage and on dual cores in a 50% CPU usage of one core.

I’ve tried a lot of solutions, one of which was a process priority program, after which I’ve found out the actual cause which obviously explained why that method didn’t work.

So I figured I could solve this by running the game in a virtual machine. False. Then I figured I could try to use vmware ESX and run in a virtual machine under that for the only reason as ESX allows controlling the resources, mainly I can tell it what amount of the CPU to use for the VM. I spent a week trying to get that to work (I installed ESXi in vmware player, so yes, it works (don’t forget to enable virtualization if you don’t have it enabled in the BIOS)). After some terrible results running the copied VMs I installed a new one from scratch, put diablo on it but, it was again using full CPU however not to run diablo but to run the vm WITH diablo. And beside this, diablo wasn’t even playable. The lag was huge on the menu alone, the game itself was suicide to play.

So I dropped this version and went on to searching which now produce a pretty good result: http://mion.faireal.net/BES/

This little thing will actually get the process to sleep for a little bit, thus resulting in the process using less CPU. And since diablo doesn’t need that much CPU, this is all nice and dandy. THIS really works. Now I’m off to playing diablo, wihout causing my CPU to spit smoke hehehe.

Related posts

Copy files to VMWare ESX/ESXi

November 11th, 2010

I’ve been playing with vmware esx running in vmware player (ha, you didn’t know that was possible, did you? just google it up, there are quite a few articles on the subject). And as many, my first impuls was to copy an existing vmware machine. So, I searched how to do that and in another article (again, google as I didn’t save the link) I found that I can use winscp over ssh. I first had to enable ssh and keep in mind that you CAN connect with the default root user at least from 4.1 (the article mostly say you can’t and invite you to create a new user for it, which btw in my cases I couldn’t get working for some reason). I then eventually connected through the console (yeah, you can do that to in 4.x without any other gimmicks, just press alt+f1 for the console).

Long stroy short, this is the article I finally decided to link to:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2082

basically, it’s a real tip for winscp users which in most if not all cases configure their winscp to resume transfers (which is a natural thing to do) but in case of ESX this is not a good idea because some renaming is done in the background which esx doesn’t like.

Related posts

Finally happy with the forum anti-spam

September 24th, 2010

I am finally happy with the akismet anti-spam solution I installed on the forum. Even though the idiot spammers succeed to register and post, their posts don’t show up.

A+ for this akismet thing. Great stuff indeed.

Related posts

Concrete5: form block with serverside validation

September 19th, 2010

I just finished writing it a little while ago for my contact page. Get all needed info from here:

http://www.concrete5.org/community/forums/customizing_c5/serverside-validating-form-block/

Related posts

Jurnalul meu ne-bun

September 8th, 2010

Simplu si la obiect: http://jurnal.ciuly.com

Related posts