Thursday, October 15, 2009

A solution that pointed to the cause

Me: "Cannot add a task to Scheduled tasks?? Why? Are you too f****ing busy to do one more thing?"

This was one of the more perplexing problems I faced.... until I found the solution.
First the problem: Click on add scheduled task, go through the motions of selecting the script I wanted to run, and click finish, only to have Windows tell me that it cannot add a task.

Google told me about service packs and other innumerable fixes and all except one did not apply.

To solution was to check the ACLs on the Tasks folder. You cannot do that through explorer.
Fire up the command line! Run "cacls Tasks"; then, since you don't understand what you're seeing, run "cacls /?" and RTFM.

The root cause still eludes me though - how the hell did anything manage to put the read-only attribute on Tasks?

Tuesday, September 15, 2009

VmWare Workstation tweaks

I regularly run 5-6 VMs in Wrokstation on my beefy Ubuntu host.
When the VMs are up and running, all is good. But when I let the VMs sit idle for hours, and then try to use them, its like wading through thick tree sap as my disk thrashes.

I havent come up with a fix yet, but these two forum chats and this might hold the answer.

Will post back once I get confirmation.

Friday, June 5, 2009

Update me!

I love my Nvidia GTX 260 card and want treat it to the latest Linux drivers.
However, Ubuntu public repositories provide only the "stable" versions of everything.

In the case of nvidia binary packages, newer releases are almost always more stable than the previous ones. Its in your best interests to use the latest binary packages.

The "loop F5" way of doing this is to keep an eye out for the latest driver releases.

In this case, you have to do all the hard work yourself: Download, kill gdm, install package, reboot, and so on.

Any kernel update from Canonical and you have to re-install the whole thing once again.

Wouldn't it be good if there was a repository that would just do all this for you?

Presenting: Launchpad X Updates PPA!
Obey.

Sunday, May 3, 2009

Vee Dee Pow for Em Player

When I heard that Jaunty would have support for Nvidia cards and VDPAU as well, I thought it meant all out media players would be able to play 1080p without eating up sizable processor time on all 4 cores of my Q9550.

Beeep wrong!

But, since it's Ubuntu, we have the oh-so-magical Ubuntu forums to get a fix.

The shortened summary is:

$sudo apt-get install build-essential subversion nvidia-180-libvdpau-dev
$sudo apt-get build-dep mplayer
$svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
$cd mplayer
$./configure
$make
$./mplayer -vo vdpau -vc ffh264vdpau /path/to/file

Wednesday, April 8, 2009

RealVNC server in Vista

I have installed the free RealVNC on almost all of my machines - real of virtual.

Unfortunately with Vista, the VNC server service does not work. Its not possible to connect to it at all. I disabled UAC and shut off the firewall... but no luck.

The way to fix it is to not fix it. Stop and disable the winvnc4 service. Do NOT use it.
Once its stopped and out of the way, start the VNC server in user mode: Start -> Programs -> RealVNC -> VNC Server (User Mode) -> Run VNC server.
You may want to copy this shortcut on to your desktop.

Now for the why:
Services in Vista run at full privilege and therefore its considered a security risk for them to access the logged in users session. All administrative applications (such as services) can attach only to "Session0".
This means that when winvnc4.exe runs as a service it will serve Session0 - and this is forbidden.
What we did in the instructions above was to make winvnc4.exe run as a normal user - without any special privileges. As a result, winvnc4 connected to the session of the currently logged in user. And since I had (and hopefully so had you) set winvnc4 as an exception in the firewall rules, incoming connections were not blocked and winvnc4 did its job as it should have.

The downside? Cannot use VNC before logging in.

I am considering switching over to UltraVNC - they claim to have a free Vista capable VNC server and mirror driver.

Vista kernel debugging

We all know the excellent Lord of the Ring0 site that was the one stop for figuring out all the setting to get kernel debugging work on any Windows OS prior to Vista.

With Vista life got a little interesting: There is no boot.ini in the retail builds of Vista. So how do you add the "command line options" to the kernel to enable debugging?

Here's how: Enable kernel debugging in Vista.

Then to start the debug messages, check out another hole in my head and Hector's memo.

Happy hacking!!

Tuesday, February 10, 2009

Nvidia annoyances

After the latest kernel upgrade from Ubuntu, my nvidia card drivers suddenly stopped working and I was back to native 640x480 and couldnt get out. Why? BEcause at 640x480 the "Screen resolution" window height is larger than the viewport!
I had to use the tab controls and "guess" which button would be "Apply". Hooray for brain dead GUI errors.

After setting resolution to a respectable 1024x768, I googled to get the envy package to get my nvidia fix. Envy worked like a charm installing the nvidia drivers... But then I realized that none of my applications could detect the nvidia drivers.

Since I wasnt intent on playing games at that time, I let the issue rest for almost 2 weeks.. During that time, VmWare Workstation refused to permit direct3d rendering in any guest. This in itself didnt matter much - I typically prefer to RDP / VNC into the guest anyways.

Today however, I had the urge to play UT and it crashed saying no display device (!).

After reinstalling various flavors of nvidia drivers, I eventually stumbled upon the realization that glxgears complained about not being able to open /dev/nvidiactl unless it was run as root.

It turned out to be a f***ing permissions issue.

Long story short, on the next Ubuntu kernel upgrade that breaks the nvidia drivers, reinstall nvidia driver, dont bother with EnvyNG and make sure you "chmod g+r,g+w,a+r,a+w /dev/nvidiactl".

... and then bask in the awesomeness of your Nvidia card and the hackety hack that brought it back to life!

Monday, February 9, 2009

Oh-so-happy economics... NOT!

First, a history lesson that we have been cursed to repeat: PBS documentary about the stock market crash preceding the Great Depression of 1929.

Then, the highly technical, yet layman friendly Failure to deliver (FTD).

The dot com bust of 2001 spawned this blistering site that first predicted, then chronicled failed businesses. Its a beautiful mix of pessimism and schadenfreude, but dont be fooled into thinking that what they are stating isnt true or that it never happened. It is true. It did happen. There is a downside.

Wednesday, January 21, 2009

VmWare Workstation annoyances on Linux

Linux sound is excellent - sound mixing works almost flawlessly expect for some troublesome applications.
I was able to watch youtube as well as see media on vlc with the sound mixing automatically. No unnecessary exclusive access to sound.
VmWare Workstation on the other hand is a spoilsport before the sweet hack.
On that page, all that I actually needed to do was to create the shell script that would call the real vmware-vmx using padsp.
After that, I needed to make the virtual machine guests sound card use /dev/dsp and only after that was I able to hear sounds from the guest.

Another crib about Workstation - every once in a while, Workstation screws up bad and its not possible to have any keyboard input sent to the host. In such cases, it helps to ssh in and kill vmware-vmx.
Unfortunately once you do that, the keyboard start acting weird - the Shift, control and Alt keys stop working and multiple keystrokes are not registered (press and hold 'a' and only one key is emitted, instead of multiple).
There is a workaround - just run 'setxkbmap'.
This isn't a full fix though, the only way to really fix the keyboard is to restart X.

And now for my final annoyance: I wanted to run multiple Windows guests on the Ubuntu host and kernel debug them using either kd or windbg running under wine.
I am able to run windbg and kd with wine, I was also able to convert the UDS that Workstation creates as the virtual serial port into a real named pipe using socat... but I had no luck connecting kd/windbg to the guest vm across that pipe.

Maybe someone in VmWare can help?