Archive for category Software

Excel 2007 opening problem

Symptom: upon double clicking an Excel document to open, Excel starts but does not open the document immediately. If you minimize the window then it will re-appear and then open the document.

Likely cause: bad addins, in my case it was PDFMaker.xla

Delete the addin from the following locations:

  • C:\Documents and Settings\USERID\Application Data\Microsoft\Excel\XLSTART
  • C:\Program Files\Microsoft Office\Office12\XLSTART

Result: Excel opens document immediately.

Tags: , , , ,

Safe reboot a crashed Linux

Originally seen here as Skinny Elephants, this sequence of keys allows you to safely reboot a Linux system that has blocked – avoiding hitting the reset button.

Raising Skinny Elephants Is Utterly Boring

Here is how you “raise the elephant”:

Alt+SysRq+r ( The LEFT Alt key ) ( SysRq is on the same button as print screen )
Alt+SysRq+s
Alt+SysRq+e
Alt+SysRq+i
Alt+SysRq+u
Alt+SysRq+b

Give a little time between keystrokes.

The r stands for put keyboard in raw mode
The s for sync the disk
The e for terminate all processes
The i for kill all processes
The u for remount all filesystems read only
The b for reboot the system

THIS IS THE VERY LAST SAVE YOUR BUTT PROCEDURE ! ONLY IF ALL ELSE FAILS !

Bruno

PS: If your filesystem is Ext3 or ReiserFS and on reboot it wants you to do a filesystem check, don’t touch any key when it asks you to press “Y” and let it recover the journal automatically.

NOTE: For the skinny elephants to work you need to have the sysrq-key enabled in the kernel. (CONFIG_MAGIC_SYSRQ)
You can check if it is enabled by typing “cat /proc/sys/kernel/sysrq”, if the command returns “1″ the sysrq-key is enabled.
If it returns “0″ you can enable it with “echo 1 > /proc/sys/kernel/sysrq”

Tags:

PowerPoint vs OpenOffice

Comparing PowerPoint 2007 vs OpenOffice 3.1.0 vs GoOo 3.1-10.

There is one crucial feature I use in PowerPoint that has prevented me from switching to OpenOffice: the Presenter View.

Microsoft PowerPoint

PowerPoint 2007 has further improved the presenter view from previous versions: it can now no longer hogs your primary display and can even be resized. This allows for even easier access to the main program window while a slideshow is running.

Why would you want that you may ask? Realtime edits. You can edit your slideshow while you are showing it. From adding new slides, rearranging slides, and editing slide contents – changes are updated immediately.

Editing the current live slide is also possible – with changes appearing AS YOU TYPE. It is also very easy to annotate slides, with various pen and marking tools.

OpenOffice Impress

OOo Impress does not currently include a presentation manager of any description. Well at least that’s what I can tell from the documentation and options. Worse still, this version of OOo crashes every time I attempt to run a slideshow. So at this point I gave up and decided to look at an alternative build named Go-oo.

There is a Presenter Screen plugin for OOo 3.0, but had no luck getting it to work with current builds of OOo.

Go-oo Impress

Go-oo Impress already includes the Presenter Console plugin so I was finally able to test it. Lets see how it compares to PowerPoint 2007.

PowerPoint OpenOffice
Presenter Views Single view with resizable panes: Slide scroller, Notes, and Current slide Pre-set views: Notes/Slides/Current Slide
Presenter Window Resizable Locked Fullscreen
Live Edit Yes, changes are immediate No, program interface completely locked
Go-to Slide Yes No
Annotation Yes, Pens, Hi-lighters, etc No
Blank screen Yes, Black/white screen options No

Both contain a timer and simple back/forward navigation.

This comparison reflects the features I use regularly in PowerPoint, and as you can see Impress is still rather unimpressive in this regard. I have hope that OpenOffice will continue to improve, but by the time it catches up to where PowerPoint is today the goalposts will have already moved.

Tags: , ,

Windows shutdown mindnumbingly slow

It seemed that shutdown in WindowsXP was taking excessively long, with it taking several minutes at the “Saving Your Settings” screen.

Surprisingly(?) I found a tool at Microsoft that provides a solution to get shutdown times back to only a few seconds:
User Profile Hive Cleanup Service

The User Profile Hive Cleanup service helps to ensure user sessions are completely terminated when a user logs off. System processes and applications occasionally maintain connections to registry keys in the user profile after a user logs off. In those cases the user session is prevented from completely ending. This can result in problems when using Roaming User Profiles in a server environment or when using locked profiles as implemented through the Shared Computer Toolkit for Windows XP.

Tags: ,

Firefox’s XML Slowdown

For many months a buglet had been niggling at me. Anytime I opened an XML document in Firefox the entire browser would freeze for several seconds. If I was trying to debug a RSS feed or an XML settings file this would quickly become extremely annoying.

Today I fixed it.

First I tried a few of the obvious things. I already knew that this was not a core Firefox bug because this did not happen on any other PCs – it had to be something related to my PC. I checked the default profile with all addons disabled – still froze. I tried using a profile in another user’s account – still froze.

Then I had an idea how to find the culprit: I fired up regmon. After a few tests I quickly narrowed it that the freeze was happening right after loading the key HKCR\feed\shell\open\command\(Default)

I checked the contents of that key and I saw immediately what the problem was. The key was pointing to a program on a shared folder – so every time Firefox loaded XML it would attempt to mount this shared folder and this was the cause of the freeze.

After deleting the registry key my Firefox is back to being speedier than ever!

Tags: , ,

PHP/IDE Comparison 2009

Eclipse

PHP Development Tools all-in-one edition, Version 2.0

Pros:

Show Syntax Errors/Warnings in a Tab
Show “Tasks” in a Tab (matches @TODO texts)
Subversion plugin includes repository browser

Cons:

Slow
No visual editor for HTML
Slow
No wordwrap
Slow
Cannot disable code folding
Slow
Syntax Errors/warnings cannot be customised or disabled for specific files

NetBeans

PHP Edition, Version 6.5

Pros:

Subversion support is built-in
(I love the inline Visual changes: coloured tags for add/change/delete blocks of code)
Show “Tasks” in a Tab (matches @TODO texts)

Cons:

No visual editor for HTML
No wordwrap

Notepad++

Notepad++, Version 5.1.1

Pros:

Really Fast (well this is more a text-editor than a fully featured IDE, so this is to be expected)

Cons:

Opened file tabs difficult to use (use Window Manager plugin instead)
Cannot fine-tune workspace components (eg. cannot have both Function List and Window Manager on the RHS)
Instead of “Projects” have “Sessions” and “Favourites”
Cannot disable Code Folding

Tags: , , ,

Default Interface for Multicast on Windows (IPTV)

Third time lucky, as the saying goes.

Having given up trying to get IPTV to work twice before I didn’t hold much hope for a third and final attempt. Again I had no luck on my desktop PC, however I fired up a browser on a different PC and to my surprise it worked immediately.

This confirmed that it was not a problem with my router or the ISP. I quickly realised it could be a problem with the routing of multicast packets (required for IPTV, but rarely used otherwise) and as my main PC had dual NICs there could be a configuration issue.

For IPTV to work the default multicast interface must be the same interface that routes to the internet. For some unknown reason WindowsXP had decided to set the default multicast route to the private LAN, despite the fact that the default route for all other packets was the router.

The quick fix is to update the metrics (priorities) for the multicast routes. Do a route print to see the current table, then update each multicast route such that the Internet gateway IP has the lowest metric:

route add 224.0.0.0 MASK 240.0.0.0 <gateway IP> METRIC 10 -p

This will update the metric to “10″ for the given gateway IP, -p means persistent, so it should remain the same after a reboot.

References

Default Interface for Multicast on Windows
How to change the binding order of network adapters in Windows XP and in Windows 2000

Tags: , ,

Your Media Library is broken

The Media Library was a great addition to Winamp. It allows you to track stats such as last played and number of plays as well as rating tracks.

However the one failing that breaks all this for me is it does not track when a file is renamed or moved – such that if you rename a directory, all details for files that were in that directory are lost.

Tracking a file purely on path is flaky at best, but there are alternatives.

You can’t rely on the CRC or Hash of the file data, because modifying the id3 (metadata) will alter the file, but it is possible to overcome that problem by using a Hash of only the audio-data (ignoring the metadata).

Furthermore as personal computers get more powerful we are also getting closer to achieving personal software that can recognise similar media (graphics, audio, or video).

Graphics software, such as XnView, is already able to do “intelligent” matching of images based on the perceived content. Audio and Video may be more computationally difficult, but it is inevitable that this will become generally available.

When this comes around I look forward to much more intelligent “Media Library” systems, that can actually find your files for you.

Tags: ,

How to fullscreen Letterboxed video

If you ever try to watch letterboxed video on a widescreen monitor you are given the worst experience possible: black bars on all four sides and a tiny video area.

The trick here is to stretch the video to fit the width of the screen, and allowing the top and bottom black-bars of the video to be cropped.

I couldn’t find an automatic method for achieving this, however the manual method is doable if you have a few minutes to spare. It goes as such (instructions are specific to ZoomPlayer but the method should work with any player):

Open the video in fullscreen as you would normally. Expand the video vertically until the sides of the video just touch the edges of your screen (Key: Alt-Up/Down arrows). Save this to a size preset (Ctr-0..9).

Now exit out of fullscreen and open the preset editing menu (Ctr-P). You should see the preset you just saved. Now you want to center the video vertically. Calculate the difference between the height of the preset video, and your monitor’s resolution – divide this number by two and put in the Y-Offset field as a negative value.

Return to fullscreen mode and apply the preset (0..9). Your video will now fill the full width of your screen and keep the correct aspect ratio.

Tags: ,

Linux open file limit

I discovered some error logs that indicated I was hitting the limit for concurrent open files. Increasing the limit is actually very easy.

Check the current system-wide limit:

$ cat /proc/sys/fs/file-max

To increase this to 65535 we would do (as root):

$ echo "65535" > /proc/sys/fs/file-max

If you want this new value to survive across reboots you can add it to /etc/sysctl.conf:

# Maximum number of open files permited
fs.file-max = 65535

That’s it for system limits, however you should also check user limits:

$ ulimit -n
1024

(use ulimit -a to see all user limits)

To increase this to 65535 for all users (as root), edit /etc/security/limits.conf, and modify or add “nofile” (number of file) entries – note that a userid can be used in place of an asterisk (*)

*                soft    nofile          65535
*                hard    nofile          65535

References

Fix ‘Too many open files’ error on Linux by increasing filehandles
Linux: Increasing the number of open file descriptors
Maximum Number of open files and file descriptors in Linux

Tags: ,