Posts tagged ‘Windows’

July 13th, 2010

Zero to Synergy+ in 5 minutes

Synergy+ is most easily described as a software KVM. In reality, it is much more than that. It is more like having multiple monitors, except each monitor is actually attached to its own computer. Synergy+ is a fork of the original project, which hasn’t been updated since 2006.

Enough with the chit-chat, lets get it up and running on Windows in no time.

Install

Install – Done.

Configure – Server side

This is the confusing part. I will take you through the GUI, which doesn’t exist for the Mac or Linux as far as I could tell.

Start Synergy and select the Share this computer’s keyboard and mouse (server) option. Then click Configure.

From there, the next step is adding the screens, which represent the different computers you want connected. Click the + to get going.

First, enter your local computer information. Seems weird that it didn’t add it by default, but it doesn’t. Basically, all you need to enter is your computers name (which can be found/changed on the Synergy Info button on the main configuration screen).

Next, enter in the client computer’s names that you will be connecting.

From there you need to create links. Links tell Synergy how one screen should be linked to another (seems obvious huh). In our example we have two screens, so we need two links. One link will connect Screen 1 to Screen 2, while the other does the reverse.

Configuring the link is a mind trip, so much so that I can’t even describe how to do it. I suggest ignoring the size percentages, and create a sentence like left of Screen 1 of Screen 2. Then click +. After this, it becomes more obvious what you did (just trust me please).

Then the reverse.

Now just Start the server and your server config is basically done.

Configure – Client

The client really doesn’t require any configuration. Just select the Use another computer’s keyboard and mouse (client) option, then enter the server name and click Start

And now for my super sweet home-made video.

Next Steps

Read through the Synergy wiki, which will help you on more complicated setups on Mac and Linux.

I also noticed a couple things that didn’t work too well.

  • Mouse is sometimes laggy – I think this may be because my server is actually my oldest computer. The lagginess isn’t bad enough for me to not use it however.
  • Print Screen didn’t work too well, which made the capturing of the above screen shots a little cumbersome
  • If your computer locks automatically after a certain time and it isn’t the server, synergy can’t be used to unlock it.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

May 11th, 2010

Why the hell can’t I delete that folder?

The other day I heard a coworker cussing about the fact he couldn’t delete a folder. To give him credit, he dual boots Linux and Windows, and has just recently realized Windows is much better. But, Windows doesn’t have sudo rm -f (ignoring chattr +i which I didn’t know about until today).

The problem is easy to solve though.

  • Search for the path of the folder, and you see the process/executable holding onto the file.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Tags:
August 22nd, 2009

Using Windows Live Writer to publish this post

I downloaded Windows Live Writer today and am using it to publish this post.

Why Live Writer and not the WordPress interface?  No real reason.  The nice thing about live writer is I get the benefits of using a desktop app instead of a web app.  It is faster, can work offline, and HTML editing is a bit easier (yes, I am a web developer but it is nice to work a layer above HTML sometimes). 

8-22-2009 11-17-08 AM

Some of the really cool things are it is pulling almost all my data from WordPress.  All my categories, tags, settings are here, which is nice. 

My only question is how is uploading this picture going to work?  If you are reading this, you already know whether it worked or not, unfortunately, I have no clue what is going to happen.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

March 7th, 2009

Why UAC sucks?

User Access Control is a good feature. Prohibiting implicit changes to administrative settings is good. Linux has done this for a long time with sudo. But Vista made a good thing annoying.

You have to click Ok every time instead of it realizing you know what your doing. Sudo can remember for a certain amount of time. Although I complain, I can actually live with this downside.

It is ugly and slow. I have a year old machine, that I think is fairly beefy. Even still, my entire screen turns black for a second while the UAC dialog loads. Very annoying.

Elevation is a pain. If I am running a program that needs to do administrative tasks, I usually have to restart. Yes, certain applications elevate easily, but Powershell and Visual Studio don’t. Why should I have to run them as an admin? Can’t I just elevate permissions as necessary?

I think that UAC solves a security problem but fails in the usability department. I love the concept. I love Vista. I haven’t had a chance to play with Windows 7, but I really hope they improve on some of these areas. Preventing malicious activity is a great thing, it just can’t hinder normal activity.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Tags:
February 21st, 2009

System.ArgumentOutOfRangeException at System.Web.HttpCachePolicy.UtcSetLastModified (DateTime utcDate)

I spent most of yesterday configuring a server, then delving into the aforementioned error with a few other devs. Here is basically what we did to figure it out, and what the cause was.

The error

The day started by setting up a new server, and getting our ASP.NET application up and running. At first, the error wasn’t apparent. It was when we started seeing javascript errors on different pages. It looked as though one javascript includes was causing the error, /WebResource.axd?d=KadOK03KouGAGUGwjTWw4w2&t=633707613869062500.

When pulling up the included javascript file directly in the browser, the full error was seen.

       Type : System.ArgumentOutOfRangeException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
       Message : Specified argument was out of the range of valid values.
Parameter name: utcDate
       Source : System.Web
       Help link :
       ActualValue :
       ParamName : utcDate
       Data : System.Collections.ListDictionaryInternal
       TargetSite : Void UtcSetLastModified(System.DateTime)
       Stack Trace :    at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
          at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
          at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
          at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The problem

Google quickly helped me figured out what was causing it, some assemblies were dated in the future.

I was a little confused as to why though. I looked at the timestamp portion of the request, to see what its value was, /WebResource.axd?d=KadOK03KouGAGUGwjTWw4w2&t=633707613869062500.

PS C:\> new-object DateTime 633707613869062500
 
Friday, February 20, 2009 9:16:26 PM
 
PS C:\> [DateTime]::Now
 
Friday, February 20, 2009 1:21:22 PM

So the assembly trying to be loaded is ~8 hours in the future, not good.

Who is causing the problem?

Now I know what the problem is, but looking through all the DLL’s for timestamp problems could take forever. Powershell to the rescue.

gci -recurse | where { $_.LastWriteTime -gt [DateTime]::Now }

I ran this on the application directory, then C:\Windows\Microsoft.NET, then C:\Windows\assemblies.

Bam. The problem was in C:\Windows\Microsoft.NET and C:\Windows\assemblies.

(Side note: Smarty pants Lamar showed this could be done with just Windows search and ordering by the date column.)

My first idea

Can I change the LastWriteTime of a file?

PS C:\> gi c:\ | get-member LastWriteTime
 
   TypeName: System.IO.DirectoryInfo
 
Name          MemberType Definition
----          ---------- ----------
LastWriteTime Property   System.DateTime LastWriteTime {get;set;}

Yes, there is a setter!

gci -recurse | 
  where { $_.LastWriteTime -gt [DateTime]::Now } | 
  %{ $_.LastWriteTime = [DateTime]::Now }

Well, that worked for C:\Windows\Microsoft.NET, but not C:\Windows\assemblies since all the DLLs in there are in use.

The final solution

Reinstall .NET framework, entirely. I know, you were expecting something amazing, and I failed you. Well, sorry. I was annoyed too, but it was the easiest way I could think accomplish the task. What is important is how I was able to use Powershell to test out different scenarios and possible solutions. If I would have had to write a command line program in Visual Studio to figure out what different timestamp values actually were, I wouldn’t have done it.

The other question you might have is why were times so off? Well, the server was a fresh install and the time wasn’t set properly for some reason. .NET was installed before checking the time that was set. This would have been fine, but the server was added to the AD domain, which quickly changed the time to the correct time.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit