Saturday, February 20, 2016

Remote Desktop from Surface or High DPI Devices

So, I'm loving my new Surface 3 that I bought for my sister.  As soon as I see a good deal on the Surface Pro 4 I'm buying it for myself and I'll finally send this off to her.  In the mean time, the one problem I really had was how tiny everything was when I would log into my workstation at work (Yeah, it has 32 GB RAM, NBD).

Supposedly, this is taken care of according to this Microsoft blog post.  I may have to email him, because I didn't find this very helpful at all.

I did however find a workaround for my issue, because I can't code when the text is too small.  You have to scroll down in this discussion, but I'll copy and paste the comment I found very useful from JohnKovalcik.

Hi John,
I had to reply to your agreement here - with some thoughts.  I researched the heck out of this - as I bought one for one of the executives in our co. (I manage the I.T.).  and wanted to find a solution for the issue to expedite my own acquisition of one of these!  Well - didn't find a 'true' fix - but picked up an SP3 anyway as I found a work around that I've deemed "acceptable" - for me anyway - not ideal.  Basically - we access a couple applications through rdp - WHEN I want to use these on the SP3 - I just change the resolution of the desktop to 1366 X 768 or 1360 x 768.   Then the remote screen is 'normal' - of course exiting you get desktop icons the size of volkswagon beetles and need to change it back to the awesome high resolution of the device.  Anyway - just a thought.  I like the SP3 enough to do that - it's speed, power, features and sleek design in my opinion really is a plausible replacement for a business grade laptop.    It would benefit MSFT to provide an update that would handle this though - as many businesses run rdp applications - shame they can't render the display to whatever the remote server hosting the remote app is.  BTW - another thought - I had a second screen plugged into the SP3 USB port -  and the rdp display mirrored the second display - normal size fonts - but then again - would you really carry around a second display?!  However if you are working in an office/home office - perhaps that's an option - just plug it in and work away.  Hope this helps some.

Windows PowerShell Run Command in Background

I've been really playing around in the Windows world for my development environment, and I'm pleased with a lot of the enhancements since my XP days.  One of the things I've been trying to do is get emacs with ElPy installed in it to use the appropriate anaconda version.  I figured the best way to do that would be similar to how I do it on OS X and GNU/Linux.  Enter my new adventures in PowerShell.

When I launch emacs from PowerShell, however, I can't use the handy "&" as in *NIX systems.  Enter this discussion on how to run commands in the background.

So, once I figure out the configuration files for the PowerShell, I'll be sure to create this as an alias:

function bg() {Start-Process -NoNewWindow @args}

So, apparently the virtual environments in Anaconda aren't behaving well in PowerShell, so I have to go back to the command prompt.  So, per this conversation, I can just run a command in the background that way by using:

START "" <emacs.exe>

I should probably look at "help start" to tweak it to behave as I want.

Saturday, September 19, 2015

Setting up ssh keys

UPDATE (15/09/2024):  Just found an even cleaner shell command on Ubuntu Documentation:

By default, the public key is saved in the file ~/.ssh/id_rsa.pub, while ~/.ssh/id_rsa is the private key. Now copy the id_rsa.pub file to the remote host and append it to ~/.ssh/authorized_keys by running:

ssh-copy-id username@remotehost

I keep forgetting this quick one-liner, so I thought I'd add it to my list of useful tricks.  I usually just Google it, but How-To Geek is an awesome resource (link)

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'


Thursday, April 9, 2015

Python Debugging Notes

So I had a great stackexchange comment that I referred left open in my Chromium tab forever, and I just realized that I lost it somehow.  I've searched my history and everything, it's gone in the many clicks of reddit, barstoolsports, etc.  So this is just going to be my ongoing blog post for debugging notes as I come across them as I need them.  So here goes:

Scipy Lecture on Debugging

Boltons

Starting Debugging on Error Discussion

Python Cookbook Discussion

The comment I lost, was someone explaining their process of navigating the Traceback using the commands:
list
up
down
Sorry, I can't find the comment so that I can cite his help.

This blog is an ongoing note for my own reference, so expect it to be updated here and there.

EDIT: And now I found the stackexchange comment, here:
http://stackoverflow.com/questions/16131500/py2app-error-in-find-needed-modules-typeerror-nonetype-object-has-no-attribu