Terminal Services on Microsoft Surface Pro 4

Microsoft Surface Pro 4 is an amazing device. Having used Thinkpad T430 for years, I consider myself as a power user with productivity at the first priority and Surface Pro has not disappointed me. It’s Not exactly as productive as T430 is, but this comes closest .

Now imagine my disappointment when I tried to use microsoft terminal services client (mstsc) with this device, only to see a huge desktop shrinked to fit a small screen with extremely small font size and small icons. In short, I saw a high DPI on a small screen.

Changing the resolution won’t help , it only gives you a smaller windows at the same DPI. The solution is to use the open source connection manager like mRemoteNG.

What mRemoteNG does it automatically adjusts DPI for you. The only problem is that you can’t “Pin it” to the taskbar. There may be other remote connection managers out there that may do the job, but I am sticking to the open source mRemoteNG

Crawl your site and find all broken links using Scrapy

Scrapy is an extremely efficient framework to write web spiders.  With just 30 lines of codes, you can write a crawler that can go through each link in your website and report each link , with HTTP status and the link from where it is linked.

I use this spider to detect broken links on my site. It can also be used to see how many links actually exist on your site and later make a sitemap.

My website is very small with under 10K links, so I set the CONCURRENT_REQUESTS_PER_DOMAIN to 2 in my spider settings so that the website is not overloaded.

 Python | 
 
 copy code |
?

1

2
CONCURRENT_REQUESTS_PER_DOMAIN = 2
3

If you have a large website, you can have more concurrent connections to the site by increasing this number. With more concurrent connections, the crawler is faster but the site has more load.

Run the spider and let it dump the data into a csv.

 Python | 
 
 copy code |
?

1

2
scrapy crawl brokenlink -t csv -o broken.csv
3

or alternatively if you want to run it in batches, pause and resume, you can run it with -s

 Python | 
 
 copy code |
?

1

2
scrapy crawl brokenlink -s JOBDIR=crawls/broken -t csv -o broken.csv
3

Here is the spider coding

 Python | 
 
 copy code |
?

01

02
 
03
from scrapy.spiders import CrawlSpider, Rule
04
from scrapy.linkextractors import LinkExtractor
05
from scrapy.selector import Selector
06
from scrapy.item import Item, Field
07
 
08
class myitems(Item):
09
    referer =Field()
10
    status = Field()
11
    response= Field()
12
 
13
class maspider(CrawlSpider):
14
    name = "brokenlink"
15
    allowed_domains = ["yourdomain.com"]
16
    start_urls = ['http://www.yourdomain.com']
17
    handle_httpstatus_list = [404,410,301,500] # only 200 by default. you can add more status to list
18
    rules = ( 
19
            Rule ( LinkExtractor(allow=(''),deny=('pattern_not_to_be_crawled'),unique=('Yes')), callback='parse_my_url', follow='True'),
20
       ) 
21
 
22
    def parse_my_url(self, response):
23
        sel = Selector(response)
24
        item= myitems()
25
        item['referer'] = response.request.headers.get('Referer', None)
26
        item['status'] = response.status
27
        item['response']= response.url
28
        yield item
29

/media/nextend/cache – 77,000 files

I use nextend Smart Slider 2 for my joomla website. Its a great component that lets you create the responsive sliders, with CSS animation.

However I noticed exceptionally large numbers of files , close to 77K . The total number of files on this joomla installation was 96K – 80% was Nextend.  Deleting the cache from frontend didn’t work.

Finally I renamed the old cache directory and created another one with the same name. Didn’t have any trouble with the sliders , though I quickly saw 39 files were created in the new cache folder.

So ,I am going to keep an eye on this folder and occasionally clean it too. Hope this post will help someone who uses Nextend Slider with Joomla.

VDI with NComputing vSpace & L300 Zero Client

First thing first – I work for Datacare, the Distributor of NComputing in UAE.

NComputing has been making news as they have become the World’s third largest desktop virtualization company after Dell and HP with an impressive YOY growth and a huge install base in Education sector.

What’s unique about NComputing . 

Numberwise, NComputing is the world’s fastest growing desktop virtualization company, but numbers apart , they really have an advantage that no other virtulization hardware vendor does .

NComputing is the only end device vendor that doesn’t only provide an end device, but gives you a total solution including Virtulization application, so you don’t have to go to Vmware, Citrix or Hypervisor for your virulization layer.  NComputing’s vSpace server is the virtulization application that runs on the host OS and handles the session virtualization.

Real Strength of vSpace 

Apart from the fact that you don’t have to buy vSpace server ( its free and each NComputing device has a the client license built in the device), there are some technical advantages of using vSpace

First, its extremely lightweight and doesn’t demand your server to a very high specification. There are users running 25-30 desktop on a consumer i5 desktop with 16GB Ram. Even your old desktop computers can be re designated as the server.

Second, setting up and adding users is extremely easy. You don’t create multiple Virtual machines, but create only multiple users that run multiple simultaneous sessions.  This is why the system overhead is so low, all the core windows binaries are only loaded once.  They virtulize sessions. Think of session virtulization like running a docker or container instead of the whole VM.

Third, vSpace doesn’t only virtualize. It lets you manage your devices, view the sessions, upgrade end device firmware, optimize devices for bandwidth etc .

The potential for vSpace server is huge with compatibility from windows XP to Server 2012.

The Flagship L300 

NComputing L series L300 is the flagship product that has been running for over 6 years. All you need for L300 deployment is a VGA monitor, USB keyboard and mouse and an Ethernet connection to connect to server .  There are 3.5 mm MIC and Speaker jacks and 2 USB 2.0 ports in addition to KB and Mouse ports.

L300 is an end device that’s very well planned and well through. It does exactly what its supposed to do, no more and no less. Again like vSpace, this has some unique advantages

First, L300  is future proof .  It has been running for almost 6 years. Apart from the firmware upgrades and minor hardware tweaks , its the same product. In a tech world of planned obsolescence it gives you the obvious advantage – Your end device is future proof. Just upgrade your server and reuse the same end devices.

Second L300 is not a Zero Zero client, it does some Video and graphics processing locally, saving both bandwidth and server resources, still keeping the power consumption below 7W. Its a great division of labor, you don’t push everything onto server for processing, but don’t become a fat client either.  The advantage is that you can have a full screen hd video streaming on a 10MBPS network . It also has a flash memory to save the firmware version and the configuration .

Third, UXP ( the vSpace server protocol) clients licenses are built in each device.  That means Licensing is dead simple. Download the free vSpace server and install on your host. Now connect as many L300s as you want to the network and configure them to be connected to the discovered vSpace servers. You get firmware and software upgrades for Free. This is a big advantage as the solution becomes extremely simple .

There is no license management required. Connect your L300 device to a network on which you have a vSpace server, and it discovers all your servers. The User experience can be further enhanced by configuring L300 to display the windows login screen on bootup , so the first screen the user sees is the familiar windows login screen – much like the desktop.

Deployment

NComputing L300 is probably the easiest VDI ( or Session Virtualization ) you would come across.

First Download the vSpace server and install on your Host server. The host server could be anything , even an i5 system with 16GB RAM. The real server configuration would depend on the use case.

Just like Terminal Services, you would have to make those users a part of RDP group that you want to provide access to. All the programs that are installed on the windows host become automatically available to all the remote users.

Adding a new client is as easy as plugging in an L300 to your LAN. The device will get an IP address from your DHCP server, and will  show all the discovered vSpace servers on the local LAN. You can configure it to automatically connect to a vSpace server ( or to a group of servers so it connects to second one if the first one is not available ) If you configure it this way, the user is taken straight to the windows login screen on bootup.

The 2 USB 2.0 ports can be used to connect peripherals like printers, flash drives, webcams or barcode scanners to the L300.

Management on the server  is through nc-console .  you can see all the connected devices, their firmware version, current sessions etc in the console.

Desktops : An Evergreen Market

The Dektop computers are the workhorse and are nowhere near obsolescence as many believe.  Smartphone and tablets are good and have their own utility, just as the desktops have theirs.

Here is what I have always thought and maintained – Tablets are for consuming content and Desktops are for content creation. Think about creating a spreadsheet of 300 columns on your tablet, or writing an essay of 2,000 words on your smartphone.

This is where Desktops rule – for creating content , and this is the market NComputing is targeting – a Desktop for everyone.

Summary

NComputing VDI solutions are

– Future Proof : Just update your server, keep the same end point device.
– End to End : Only Solution in the market that offers both End point device and Free Virtualization application
– Works on Session Virtualization : Extremely light weight and undemanding on server.
– No complicated Licensing
– Much easier to deploy compared to VDI

Qnap Virtualization Station and Container Station

Qnap first brought the Virtualization technology to their NAS with the Virtualiation station. Virtualization station was based on KVM – Kernel based Virtual Machine which is an open source alternative of Virtualbox /VMWare.  It was a great leap for a NAS server as the Qnap NAS could now act as a virtulization server – run your Linux, windows or Android ON your NAS.
Offcourse Virtualization station was limited to some models as you would have to have intel-VT processor that supported virtulzation.
The Next step as everyone would have anticipated would be to add LXC and Docker support.
Why Another Virtualization technology , Is Virtualization station not good enough ?
Though the KVM based Virtualization station does everything, there is a catch – the CPU and memory overhead. Every additional VM that you run, loads into the memory and need its share of systemm resources.
I own a Qnap TS-470 Pro with 16GB RAM and I can comforably run 1 windows and 1 Ubuntu VM. However as I try to run more VMs, the performance is going to suffer.
LXC is a Lightweight Virtual machine 
LXC behaves like a regular VM, but shares the same kernel of the Host OS. Qnap QTS is already running on Linux, so you don’t need to load another kernel into memory.  Advtange of LXC is that it takes very little system resouces, smaller in size and very easy to deploy. You can move Container across the systems too very easily.
How about windows on LXC 
Windows OS can not run in a container since you don’t have a windows Kernel running on Qnap which can be shared with a Windows Container. If you want to run Windows on qnap you have to use Virtulzation station only.
 
What can I use LXC and Dockers for ?
LXC can let you have the entire Linux OS ( they have an image of Ubuntu which is just 250MB).  Dockers has a great marketplace that can let you download the individual applications.
GUI ?
Qnap doesn’t have a Linux Dekstop, so I couldn’t run an LXC application with full GUI.  What am i using it for ? Scrapy with selenium and phantomJS. Now I can leave my scraper running on Qnap all night, while there is another windows VM running on it doing trans-coding.