I recently made some changes to the rinetd configuration on the linux development server here. Everything seemed to work fine, but a few days later I noticed the follow wharrgarbl in my syslog:
Jul 27 14:28:11 easserv rinetd[14712]: accept(0): Socket operation on non-socket
Jul 27 14:28:42 easserv last message repeated 546042 times
Jul 27 14:29:43 easserv last message repeated 1077719 times
Jul 27 14:30:21 easserv last message repeated 680478 times
After searching around, it turns out I had made a typo in one of my rules. Instead of using the currentl 10.10.10.254 address, I had this new entry:
0.0.0.0 38254 10.10.10.255 80
So having an invalid IP address in those rules, causes rinetd to have a fit. Changing the 255 to a 254 and restarting rinetd solved my problem.
Tuesday, July 27, 2010
Sunday, July 18, 2010
Adobe Lightroom 3 hangs on Import with JungleDisk
I've been playing around with the new Adobe Lightroom 3 for Windows, now that it's released. So far, it looks pretty good!
One thing I noticed right away was that its Import functionality (which is completely redesigned for LR3) appeared to hang indefinitely on my system. After quite a bit of research, I found this Adobe Forums thread that helped me solve the problem: JungleDisk drive mapping presents itself as a Removable Drive, which LR3 automatically attempts to scan.
Because the mounted JungleDisk drive connects to the Amazon S3 storage service, it is a slower WAN connection and Lightroom will probably sit there for minutes or hours trying to scan the entire drive. The solution is to configure JungleDisk to present its mounted drive as a Network Share instead:
One thing I noticed right away was that its Import functionality (which is completely redesigned for LR3) appeared to hang indefinitely on my system. After quite a bit of research, I found this Adobe Forums thread that helped me solve the problem: JungleDisk drive mapping presents itself as a Removable Drive, which LR3 automatically attempts to scan.
Because the mounted JungleDisk drive connects to the Amazon S3 storage service, it is a slower WAN connection and Lightroom will probably sit there for minutes or hours trying to scan the entire drive. The solution is to configure JungleDisk to present its mounted drive as a Network Share instead:
- Go into Jungle Disk Desktop Monitor
- Click on Configure
- Select Network Drive::Local Drive Mapping
- Make sure "Show Advanced Options" is checked at the lower-left
- Change the "Drive Type for all Online Disks" option to "Network share"
Sunday, December 6, 2009
D-Link DIR-655 and Logitech MX Mouse interference
I haev been trying to troubleshoot some performance issues between my Lenovo X200s with Intel 5300 802.11N network, and my D-Link DIR-655 routers. After trying things including updating firms, drivers, and the like, I also noticed that the performance of my desktop mouse was very choppy whenever I was doing wireless transfers.
My desktop mouse is a wireless Logitech MX Revolution, which is of course a 2.4GHz device just like 802.11. After some research, I found that the MX mouse receiver can interfere with a wireless router if it's "too close". In my case they were about 5" apart, since my USB hub is very close to the wireless router.
I moved the mouse received directly to the PC, about 20" away from the router, and all "mouse chopiness" has disappeared. I still don't know if it was ultimately the cause of my problems, but for better performance, make sure you physically separate your wireless router and wireless mouse/kb dongles!
My desktop mouse is a wireless Logitech MX Revolution, which is of course a 2.4GHz device just like 802.11. After some research, I found that the MX mouse receiver can interfere with a wireless router if it's "too close". In my case they were about 5" apart, since my USB hub is very close to the wireless router.
I moved the mouse received directly to the PC, about 20" away from the router, and all "mouse chopiness" has disappeared. I still don't know if it was ultimately the cause of my problems, but for better performance, make sure you physically separate your wireless router and wireless mouse/kb dongles!
Friday, December 4, 2009
TortoiseSVN overlay icons broken after JungleDisk 3 installed
I run TortoiseSVN as a source control tool on my desktop. As is usually, files and directories under source control have various icon overlays to indicate their control status.
After installing JungleDisk 3.0, I noticed that these TortoiseSVN overlay icons no longer worked. Following a bit of research it turns out that something else was interfering with the overlay icon settings in Windows. In this day and age, Windows apparently still has some hardcoded internal limits on this sort of thing. Geez.
In Windows, you can have at most 11 defined overlay icons. Due to the nature of source control, tools like Tortoise legitimately use up a lot of these slots. However, JungleDisk as of version 3.0 includes a feature called "Synch" which is some sort file backup scheme.
Unfortunately, JungleDisk forces installation of its own overlay icons for the Synch feature. Not only that, it rudely injects them with reference names intending to keep them at the top of the Windows list. So if that install makes the total overlay count exceed 11, the JungleDIsk install breaks the behaviour of other tools already running fine on your system -- without even asking you.
To fix this, use the registry editor to open:
I have sent a note to the JungleDisk people asking them to fix their installer.
After installing JungleDisk 3.0, I noticed that these TortoiseSVN overlay icons no longer worked. Following a bit of research it turns out that something else was interfering with the overlay icon settings in Windows. In this day and age, Windows apparently still has some hardcoded internal limits on this sort of thing. Geez.
In Windows, you can have at most 11 defined overlay icons. Due to the nature of source control, tools like Tortoise legitimately use up a lot of these slots. However, JungleDisk as of version 3.0 includes a feature called "Synch" which is some sort file backup scheme.
Unfortunately, JungleDisk forces installation of its own overlay icons for the Synch feature. Not only that, it rudely injects them with reference names intending to keep them at the top of the Windows list. So if that install makes the total overlay count exceed 11, the JungleDIsk install breaks the behaviour of other tools already running fine on your system -- without even asking you.
To fix this, use the registry editor to open:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersionAnd remove the keys installed by JungleDisk; they are the ones that start with "1Sync", "2Sync" and "3Sync". After removing them, you will need to reboot for the change to take effect.
\explorer\ShellIconOverlayIdentifiers
I have sent a note to the JungleDisk people asking them to fix their installer.
Wednesday, August 5, 2009
Automatically run a command after waking up from Sleep/Standby
I came across a situation recently where I needed to have my Windows system run a command automatically every time the system woke up from Sleep/Standby/Hibernation: a custom monitor colour calibration profile was lost and needed to be explicitly restored every time the system woke up (see previous post.)
In my quick research, by no means exhaustive, I found three ways of doing this under Windows:
In my case, the machine is running Vista so I first explored option 1. For my needs, it works very well. Under Vista only (as far as I can tell this is not possible under earlier versions of Windows) here are the steps to create a Task Scheduler entry to run when the system resumes:
Once this is done, save the task and test it by choosing "Run" with the item selected. Once this is working, test it by suspending then resuming your system, it should work!
Another alternative for all versions of Windows is Hibernate Trigger. It is a simple tool that is easy to install and configure, and doesn't require any additional information here really. Basically:
So those are a few solutions to meet the need of running tasks after system sleep. Most people don't need to do thise, but those that do it's a good trick to know.
In my quick research, by no means exhaustive, I found three ways of doing this under Windows:
- If you're (un)lucky enough to run Vista, you can set up a Task Scheduler job that reacts to a System Event
- Alternatively, you can install a Windows utility whose exact purpose in life is to run stuff whenever you suspend or resume the system.
- You can write a simple tool, service, or Windows script to respond to and process the Windows power events, and do whatever you need to to.
In my case, the machine is running Vista so I first explored option 1. For my needs, it works very well. Under Vista only (as far as I can tell this is not possible under earlier versions of Windows) here are the steps to create a Task Scheduler entry to run when the system resumes:
- Run "TASKSCHD.MSC" to bring up the Task Scheduler
- From the Task Scheduler Library actions choose "Create Task"
- Fill in the General information as needed
- Under Triggers, choose New and Begin the task "On an event"
- Set basic settings Log:System, Source:Power-Troubleshooter and Event ID:1
- Click OK and go to Actions
- Set Action:Start a program, and enter the location of your script/tool
- Review the Conditions and Settings tabs and adjust as needed
Once this is done, save the task and test it by choosing "Run" with the item selected. Once this is working, test it by suspending then resuming your system, it should work!
Another alternative for all versions of Windows is Hibernate Trigger. It is a simple tool that is easy to install and configure, and doesn't require any additional information here really. Basically:
- Create your script, e.g. C:\WAKEUP.BAT
- Install and run Hibernate Trigger
- Configure it to run C:\WAKEUP.BAT on Resume
- Old-school WIN32 programmers can process the WM_POWERBROADCAST Message (include SERVICE_ACCEPT_POWEREVENT if writing a service)
- You can also look into processing the Win32_PowerManagementEvent triggers in scripts
So those are a few solutions to meet the need of running tasks after system sleep. Most people don't need to do thise, but those that do it's a good trick to know.
Make a Spyder2express color profile "stick" after standby/sleep
I recently bought a new Thinkpad X200s and it's quite nice. One symptom that affects many notebooks, perhaps exacerbated by newer LED backlights now in frequent use, is that LCD displays have a very "cold" or "blue" tinge. Apparently this makes them look "better" in store compared to older, yellowing screens; anyway...
As any photo or design pro (which I am neither) will tell, doing any photo processing on a screen that has incorrect colors leads to bad results. For very "cool" screens, this results in garish and darkened flesh tones, and a some colour over-saturation. Since I will be on the road with this laptop and taking pictures, I decided to get a basic hardware screen colour calibrator, the Sypder2express from Datacolor which is under $100.
Now for my basic needs, this simple unit (pro units can cost hundreds or thousands) worked as advertised and as designed, and the software is kept up to date (Vista x64 support was a download away.) The problem that became apparent immediately was that the new colour settings in Windows were LOST every time the system resumed from sleep/standby.
According to Datacolor's support response (prompt, if a bit flippant) was that this is a Windows problem, not a product problem, and that they had a software workaround in, you guessed it, only in their more expensive products.
Not surprisingly, many tools out there are available that can help without a costly upgrade. The one I ended up using was xcalib, a command-line calibration tool for Windows and X. To solve my problem, I configured Windows to invoke on Resume, a script that runs the following commands (after copying xcalib.exe from the download link into my PATH):
Alternatively, you can configure the second command to run "xcalib" to apply a specific color profile. For example, to explicitly apply the Spyuder2express color setting installed into Windows, you would run:
To figure out how to configure Windows to run a script on Resume (after Sleep/Standby/Hibernate) see my next blog post. In my case, I created a "WAKEUP.BAT" system batch script and added the xcalib commands to it.
As any photo or design pro (which I am neither) will tell, doing any photo processing on a screen that has incorrect colors leads to bad results. For very "cool" screens, this results in garish and darkened flesh tones, and a some colour over-saturation. Since I will be on the road with this laptop and taking pictures, I decided to get a basic hardware screen colour calibrator, the Sypder2express from Datacolor which is under $100.
Now for my basic needs, this simple unit (pro units can cost hundreds or thousands) worked as advertised and as designed, and the software is kept up to date (Vista x64 support was a download away.) The problem that became apparent immediately was that the new colour settings in Windows were LOST every time the system resumed from sleep/standby.
According to Datacolor's support response (prompt, if a bit flippant) was that this is a Windows problem, not a product problem, and that they had a software workaround in, you guessed it, only in their more expensive products.
Not surprisingly, many tools out there are available that can help without a costly upgrade. The one I ended up using was xcalib, a command-line calibration tool for Windows and X. To solve my problem, I configured Windows to invoke on Resume, a script that runs the following commands (after copying xcalib.exe from the download link into my PATH):
- xcalib -clear
- xcalib
Alternatively, you can configure the second command to run "xcalib
- xcalib -clear
- xcalib c:\windows\system32\spool\driver\color\Spyder2express.icm
To figure out how to configure Windows to run a script on Resume (after Sleep/Standby/Hibernate) see my next blog post. In my case, I created a "WAKEUP.BAT" system batch script and added the xcalib commands to it.
Monday, June 22, 2009
Applets don't initialize until browser window displayed
Here's a problem that first solved many years ago, forgot about, and had to solve in a new bit bit of code recently. My poor documentation originally and deficient memory since then cause me to waste an hour re-fixing the problem -- at least I knew I had solved it before!
I have a utility that uses embedded browser controls that contain java applets. These browsers are launched in the background and operate without user interaction until activated by a controlling GUI interface.
Many years ago Microsoft released an IE update that, as part of their settlement with Eolas meant that embedded ActiveX controls were more of a pain to work with because of a "click to activate" policy. While this has since been resolved in a later update, an odd behaviour traced back to that initial ActiveX update remains in place causing a headache:
When I launch a process that embeds a web page containing an applet, the applet does not initialize (even though the Java Console is there) until the tool containing the browser control and embedded page is somehow displayed on the desktop.
The scenario is as simple as a Win32 app started with this general approach:
hwnd = CreateWindowEx(...);
ShowWindow(hwnd,SW_HIDE);
UpdateWindow(hwnd);
Until hwnd is somehow activated on the screen via some other method, the Java plugin for the applet included on the embedded page starts up but the applet does NOT initialize. As soon as the hwnd is displayed, the JRE initializes the applet.
To avoid this problem, it's as simple as adding in an initial hwnd activation:
hwnd = CreateWindowEx(...);
SetWindowPos(hwnd,HWND_BOTTOM,0,0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),SWP_NOACTIVATE);
ShowWindow(hwnd,SW_HIDE);
UpdateWindow(hwnd);
With this change, the hidden applet merrily initializes and does its normal startup work.
I have a utility that uses embedded browser controls that contain java applets. These browsers are launched in the background and operate without user interaction until activated by a controlling GUI interface.
Many years ago Microsoft released an IE update that, as part of their settlement with Eolas meant that embedded ActiveX controls were more of a pain to work with because of a "click to activate" policy. While this has since been resolved in a later update, an odd behaviour traced back to that initial ActiveX update remains in place causing a headache:
When I launch a process that embeds a web page containing an applet, the applet does not initialize (even though the Java Console is there) until the tool containing the browser control and embedded page is somehow displayed on the desktop.
The scenario is as simple as a Win32 app started with this general approach:
hwnd = CreateWindowEx(...);
ShowWindow(hwnd,SW_HIDE);
UpdateWindow(hwnd);
Until hwnd is somehow activated on the screen via some other method, the Java plugin for the applet included on the embedded page starts up but the applet does NOT initialize. As soon as the hwnd is displayed, the JRE initializes the applet.
To avoid this problem, it's as simple as adding in an initial hwnd activation:
hwnd = CreateWindowEx(...);
SetWindowPos(hwnd,HWND_BOTTOM,0,0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),SWP_NOACTIVATE);
ShowWindow(hwnd,SW_HIDE);
UpdateWindow(hwnd);
With this change, the hidden applet merrily initializes and does its normal startup work.
Subscribe to:
Posts (Atom)
