Can’t login using PowerShell to Raspberry Pi running Windows IoT [SOLVED]

0

Posted by Cynic | Posted in .NET, C#, Software, Solutions to Problems, Windows | Posted on 03-10-2015

Tags: , , ,

I’ve seen a few people having problems using PowerShell to log into their Raspberry Pi 2 that’s running Windows IoT. If you’re here, you’re already frustrated, so here’s what worked for me…

Restart WinRM using these 2 commands:

net stop winrm

net start winrm

Next, instead of using the device name for your Raspberry Pi 2, use the IP address like this in PowerShell:

Enter-PsSession -ComputerName 192.168.10.111 -Credential 192.168.10.111\Administrator

And yes… I understand that it sounds stupid, but I tried everything else and nothing worked. The above worked for me. YMMV. Good luck!

Oh, also, it took a minute or two to complete, so just be patient. If it fails, my only other advice is to find a baseball bat. 🙂

Code Completion Quirk with Stetic and GTK# in MonoDevelop

0

Posted by Cynic | Posted in C#, Software, Windows | Posted on 02-07-2012

Tags: , ,

I just noticed in MonoDevelop an odd quirk with code completion and Stetic. If you add a widget then go and try to refer to it in code, it doesn’t show up in code completion until you build the project. So, simply add the widget, build the project, then go into the code and you’ll have code completion for the new widget available.

Bizarre, but whatever. It’s just one of those little quirks that you need to get used to.

Cheers,

Ryan

 

Spanning Columns in a GTK# Table

0

Posted by Cynic | Posted in C#, Software, Solutions to Problems, Windows | Posted on 02-07-2012

Tags: ,

Coming from working on WinForms, GTK# is a very, very different paradigm for layout. I struggled to figure out just how to span columns in a table as searching for information didn’t really work out very well.

Instead of setting properties on the table, you set the properties on the widget as it inherits a “Table Child Layout”. The ***Attach properties are where you can then force a widget to span several columns.

GTK Attach Column Spanning

There I set the “RightAttach” on a label to 2 so that it would span 2 columns.

The language used in GTK is radically different from that used in Windows Forms, so it takes some getting used to.

OpenTK, GTK#, GLControl, and GLWidget

2

Posted by Cynic | Posted in .NET, C#, Linux, Software, Solutions to Problems, Windows | Posted on 30-06-2012

Sigh… So I’m banging my head against the wall trying to get a GLControl working in a GTK# project in MonoDevelop… Not gonna work.

The GLControl inherits from System.Windows.Forms.UserControl, so you basically end up resorting to exactly what you wanted to avoid in the first place by using GTK#, i.e. Windows Forms. Here’s an image of the error (click to enlarge):

OpenTK GLControl error

Instead, you need to use a GLWidget with GTK#.

http://www.opentk.com/project/glwidget

Anyways, hopefully that will help someone from having a bloody forehead.

I’d been trying to add a reference to OpenTK.GLControl.dll and trying to get it to work in the visual designer (stetic) with no luck. I searched around for answers, and didn’t get any. I then simply tried to add it manually. And that was it. The error.

People have complained about OpenTK not really having the best documentation, but I’m going to stick with it for a while longer and hope that I can fudge my way through it enough to finally get to that stage where I can be productive. It seems like with things like this, the ramp up time and effort that it takes to get started is the most painful part. From past experience, I’m expecting things to finally smooth out in the very near future.

So, on to OpenTK with GTK# and MonoDevelop!

Cheers,

Ryan

Infinite Disappointment in Bill Gates

0

Posted by Cynic | Posted in Cynicism, Money, Philosophy, Windows | Posted on 08-01-2012

Tags: ,

Bio-warfare I used to think that Bill Gates was a philanthropist and humanitarian. He’s anything but that. The Bill and Melinda Gates Foundation just bought 500,000 shares in Monsanto.

Here’s a mainstream media link:

http://www.guardian.co.uk/global-development/poverty-matters/2010/sep/29/gates-foundation-gm-monsanto

And something probably a bit more reliable and honest:

http://www.truthistreason.net/bill-gates-foundation-buys-500000-shares-of-biotech-terrorist-monsanto

Monsanto is an utterly evil corporation that creates bio-weapons, patents them, then passes them off as food. Their bio-weapons are toxic to animals, toxic to humans, and toxic to the environment. Do a few searches to find out just how evil they are.

I will be working to extricate myself from the Microsoft world as soon as possible and in every way that I possibly can.

Cheers,

Ryan

MIME Type vs. Actual Type

0

Posted by Cynic | Posted in Internet, Logic, Solutions to Problems, Windows | Posted on 21-03-2011

A while back I posted Internet Explorer Download Problem: “Unable to open this Internet Site” about how Internet Explorer doesn’t behave properly if the MIME type is set properly. Shortly after I upgraded Firefox and discovered that they had changed the behaviour for Firefox and things broke.

I was serving up an EXE with a ZIP MIME type, “application/zip”, however, Firefox began renaming the file with a “.zip” file extension.

I reported it as a bug in the Mozilla bug tracker, which it technically is, but they will not change the behaviour and cite it as a security feature.

Matthias Versen (Matti) 2011-03-20 09:14:48 PDT

I think this report is invalid. Changing the extension is a security feature.
You can either use the user agent sniffing or use a unused content type like
application/x-ms-download.

[reply] [-] Comment 5 Boris Zbarsky (:bz) 2011-03-20 19:13:49 PDT

Yep.  On Windows, if the filename has a “dangerous” extension, we make sure the
extension matches the type it was served with.  Anything else would be really
bad security-wise.

It’s not really worth debating whether or not it should be fixed. It’s their software and they get to decide what gets fixed and what the “proper” behaviour is.

But it is interesting to look at.

File contents are not determined by their file extension. File extensions are by convention, with no necessary connection to the file content. The new Microsoft Office formats, e.g. XSLX, DOCX, PPTX, etc., are all ZIP files with a different file extension. Inside the zip container are the actual files that contain the MS Office documents.

MIME types should be correct though. The IE problem is just kind of wonky, though I can see their security issue, just as the Mozilla have their security issue. They just solve it differently.

.NET Controls Constructed Off-Screen Display Black

1

Posted by Cynic | Posted in .NET, Solutions to Problems, Windows | Posted on 02-01-2011

Tags:

ToolStripStatusLabel Goes BlackWhile working on Duplicate Photo Finder, I discovered a very odd thing: the ToolStripStatusLabel displays solid black if it is constructed off-screen, and it cannot be recovered. You can see in the upper-right screenshot how the labels are solid black.

I suppose that it would be possible to entirely construct a new control then replace the “old” one, but that’s a bit of a pain.

Instead, you can make certain that the form is drawn inside of the screen’s view port (on the monitor) by setting the Form.StartPosition to Manual and the Form.Location to 0, 0 (the upper left corner of the screen). i.e.

this.StartPosition = FormStartPosition.Manual

It’s better to set it in the designer though.

It’s interesting that it doesn’t affect the entire StatusStrip or the ToolStripProgressBars. Not sure why, and not too worried about it. Got the solution. Happy with that. 🙂

I spent a bit of time searching for an answer and never found one or anything remotely related. Hopefully this will help someone.

Save As Dialog Disappears on Multiple Monitors

0

Posted by Cynic | Posted in Solutions to Problems, Windows | Posted on 01-01-2011

Tags:

Change Screen ResolutionOccasionally when you add a new monitor, or shift them around, the Save As dialog (or other modal dialogs like Find & Replace) gets lost outside of the viewing port. It’s usually sitting just above your smallest monitor or something similar.

To fix the situation in Windows, you can open up the Screen Resolution applet from the Control Panel and move a monitor up relative to the others then click Apply. You should then be able to it then.

Another thing you can do is to switch the primary monitor from one to another. Check the “Make this my main display” checkbox then click Apply. You can reverse it later.

It’s an annoyance for certain. However, the root cause is a “damned if you do and damned if you don’t” situation.

Windows allows you as a developer to put things off the screen. There are valid reasons for this, but when it interferes with normal computing, it’s a major pain, and one that most people simply can’t solve.

Still, the cases where you’d want to do it for a modal dialog are pretty bizarre.

What prompted this? Adobe Photoshop. 😉

Disable Windows 2008 R2 Password Expiry

0

Posted by Cynic | Posted in Windows | Posted on 27-12-2010

Tags: ,

Well, god knows changing passwords can be a PITA, and I got messages that my password would expire. A search for it only turned up information on Active Directory, which is not really useful for me.

Anyways, you can do it here:

Start > Administrative Tasks > Local Users and Groups > Users > <user>

Then just check the “Password never expires” checkbox.

You won’t find anything for it under the user account management in the Control Panel.