Cleaning up Ubuntu
1st June 2008Uninstalling software still leaves any dependencies that came with them in place, so a quick way to get rid of any detritus is always useful. Here's a command that achieves this in a painless manner:
apt-get autoremove
Just say yes to what it suggests, to allow it on its way.
Some nice things coming through...
22nd May 2008While everyone is making good use of WordPress 2.5.x, development continues apace for future releases of the popular blogging platform and there are some goodies coming through on the functionality front. Google Gears are being brought into play for speeding up the administration dashboard; this started out being more prominent before being made more unobtrusive. The other big change has been an overhaul of the theme gallery and, if the theme is compatible, an overview facility has been added too. So WordPress is being tweaked and improved in the background to make 2.6 an interesting release.
A reasonable requirement of an IDE
20th May 2008I have been having a play with NetBeans IDE Early Access for PHP and, while it has a lot to offer, one impression remains uppermost in my mind: it is so slow. While I might have a project with many files in it, start-up takes an age because of project checking. Other functionality such as text searching is far from speedy either. The sluggishness probably arises from this release being very early in its life cycle, and it reminds me of how slow older versions of the Java IDE were, even if this is slower. For PHP development, I'll be giving NetBeans a while to mature before taking another look at it.
On a similar note, I recently dispatched Quanta Plus from my system for sluggish start-ups and will not return to it because other alternatives such as Bluefish and Eclipse PDT fit my needs much better. I like my editors to be slick and responsive, and Quanta has been around long enough for any slowness to be knocked out of it. However, I get the feeling that the extras have added bloat, while I expect any additional functionality that I never use not to get in my way. It is for the latter reason that I was always able to get on with Dreamweaver and even run it on Ubuntu using the WINE library. If I really wanted a stripped out yet functional editor, Gedit would do most of what I need - it colour-codes syntax for a variety of languages for a start - but it's always handy to have a file system explorer window incorporated and I value any syntax checking and auto-completion as well. So, it looks as if Eclipse and Bluefish could be serving my needs for a while to come, alongside so use Dreamweaver for online editing of website files.
VMware Workstation in full screen mode hobbles my keyboard
14th May 2008Recently, I have encountered an odd situation following my recent upgrade to Ubuntu 8.04: when I use VMware Workstation to run Windows XP in full screen mode, the keyboard no longer acts as it should. For instance, the Caps Lock and Num Lock keys stop working, as does the Shift key. Logging out and back in again is the least that's needed to set things right, but there has to be a better way to resolve the problem. While I am not saying that it's limited to the scenario where I saw it happen, it's still very odd behaviour. If you have a solution, please let me know. Of course, I'll keep you posted if I find one. Meanwhile, I'll be avoiding full screen mode with VMware as much as I can.
Update 1:
I have done a spot of digging on this one since and gained the impression that there might be a conflict between VMware and the version of X.org Server that comes with Ubuntu. A restorative trick that I have seen suggested is to issue the following command in a terminal, replacing "gb"
with your own locale, but I have yet to see if it works:
setxkbmap -rules xorg -layout "gb"
In any case, it looks as if it is not a permanent fix but just a way to keep working without resorting to system restarts, logging off and back on, etc.
Update 2:
I can now verify that the command quoted above works for me. Of course, it would better to find a permanent fix and even better for the behaviour never to occur at all. For now, though, any fix is better than none whatsoever.
System error codes for Windows
9th May 2008Windows system error codes can be indecipherable, so it's useful to have a list. Microsoft has one on its Microsoft Learn website that may help. However, the decodes may not as explicit as I would like, but they're better than nothing when you don't get anything other than the number.
A change in appearance
7th May 2008Over the course of its short history, this blog has had four different themes, the latest of which being a self-customised variant of Dezzain's Zoxengen. Its predecessors have included Andreas04, Andreas09 and Prosumer. While I have tinkered with all of these to varying degrees, each has offered me a certain something before I set about my tweaks.
Zoxengen is no different, and its clean lines and Web 2.0 feel attracted my attention. Other little features like seeing related posts listing on a post's comments page or listing the tags associated with a post under its title line are, I hope, useful little extras. Correcting English (I may be digging a hole for myself here) and removing advertising slots (for me, this blogging business is a hobby so you'll find no ads on any of my blogs) both seem to be necessary tasks when implementing themes these times, but the really major change was to make the design more flexible when it comes to different screen sizes, something that I hope to have achieved by allowing it to fill more of the browser window. There may be further refinements, hopefully small, but I hope that you find the result as pleasing on the eye as I do.
Update: The blog's current theme came with a lot of text that was written in poor English. While I should have got rid of all of it from the theme by now, there may be some still lurking here somewhere. If I find any more, it'll get sorted. If something has escaped my notice for whatever reason, please let me know.
Finding out what kernel version is running
5th May 2008Here's the command that does the deed for me on Ubuntu:
uname -a
Usually, I only need it to find out what header files I need for any VMware repeat installations or reconfigurations.
Getting VMware Workstation working on Ubuntu 8.04
28th April 2008With every change of kernel, a re-installation of VMware becomes necessary, and my move to Ubuntu "Hardy Heron" 8.04 was punctuated by the same activity. However, the advent of the 2.6.24.x kernel meant that my usual means were no longer successful, so a new approach was needed.
That involved the mysteriously named vmware-any-any
patch, and version 116 of this seemed to set things to rights for me. Stopping the installation before vmware-config.pl
runs is the best course of action, since it will only fail anyway. Downloading vmware-any-any-update-116.tgz
, extracting from the archive and running runme.pl using sudo continues the process.
While it seemed to have worked for me, I must wonder at why VMware seems unbothered by the idea of keeping up with Linux kernels and C compilers. It would certainly have removed the need for the user community needing to do anything about the problems that others and I keep seeing; it's a very unusual arrangement.
The dangers of overriding JavaScript onload event handlers
17th April 2008Recently, I gave myself a right old fright while tinkering with my hillwalking and photo gallery website. The problem stemmed from my use of window.onload
to set up behaviours for web pages in a visitor information directory on the site. A lapse of concentration allowed me to associate an onload
event handler with the body tags of the pages using a common header PHP script; another lapse also meant that my mistake was on public view for all to see because I uploaded files before I spotted the problem.
The result was that I was left wondering why the window.onload
pieces weren't working at all, something that seriously broke the pages. The mists of panic and bewilderment were cleared in good time by the realisation of what had happened: the body tag onload
had overridden the window onload
and rendered it inactive. I don't know from where the thought arrived, but it was the one that resolved the problems that I was seeing; it might be that I might have met it before in the dim and not-so-distance past.
Having your pages degrade gracefully for when a visitor has not enabled JavaScript or when you are foolish enough to break something like I did is definitely an asset, a point brought home to me by my salutary experience. I am not sure why I was willing to run the risk that I did, but it now looks as if I need to include the task of adding improved graceful degradation to the to-do list.
Automating FTP II: Windows
15th April 2008Having thought about automating command line FTP on UNIX/Linux, the same idea came to me for Windows too, and you can achieve much the same results, even if the way of getting there is slightly different. The first route to consider is running a script file with the ftp command at the command prompt (you may need %windir%system32ftp.exe to call the right FTP program in some cases):
ftp -s:script.txt
The contents of the script are something like the following:
open ftp.server.host
user
password
lcd destination_directory
cd source_directory
prompt
get filename
bye
It doesn't take much to turn your script into a batch file that takes the username as its first input and your password as its second for the sake of enhanced security and deletes any record thereof for the same reason:
echo open ftp.server.host > script.txt
echo %1 >> script.txt
echo %2 >> script.txt
echo cd htdocs >> script.txt
echo prompt >> script.txt
echo mget * >> script.txt
echo bye >> script.txt
%windir%system32ftp.exe -s:script.txt
del script.txt
The feel of the Windows command line (in Windows 2000, it feels very primitive, but Windows XP is better and there's PowerShell now too) can leave a lot to be desired by someone accustomed to its UNIX/Linux counterpart, yet there's still a lot of tweaking that you can do to the above, given a bit of knowledge of the Windows batch scripting language. Any escape from a total dependence on pointing and clicking can only be an advance.