​
Showing posts with label OSS. Show all posts
Showing posts with label OSS. Show all posts

Tuesday, June 06, 2017

Setup Remote Desktop for Raspberry Pi with no need for an external display

Hi,

If you are thinking about how to setup remote desktop to raspberry pi, this article is for you. I will show a walk-through to install required packages so that you are able to remote desktop from your windows machine or any other remote machine.

Steps to configure remote desktop on raspberry pi:

1) Connect to your Raspberry Pi using Putty.
2) Open a terminal window.
3) We are going to install XRDP package to configure RDP on the Pi. Before installing xrdp, we must first install the tightvncserver package.  The tightvncserver installation will also remove the RealVNC server software that ships with newer versions of Raspbian OS since tightvncserver (xrdp) will not work if RealVNC is installed. 

$ sudo apt install -y tightvncserver
$ sudo apt install -y xrdp

3) Now, Just install Samba package that provides a GUI when accessing a Pi using RDP.

$ sudo apt install -y samba

4) Open up the remote desktop tool in windows or your host OS and set the name or IP of your Pi and hit connect.



With that, we can connect to any remote Pi or Linux based IoT device from your computer; therefore no need to connect an IoT device to an external screen.


[Update 03/16/2018]

If you have a newer version of Raspbia Jessie or above, You can remote desktop without the need to install XRDP since Raspbian now has built in "VNC Server" which we can use to remote desktop to any Raspberry PI. To enable remote desktop, follow these steps:

1) From the terminal window, execute the following:

sudo rasp-config

2) This will open up a graphical interface, select "Interfacing Options".
3) Then select "VNC Server" to enable VNC server.
4) This will install all VNC components on the PI, after about 30 seconds, you will be prompted that the VNC server is enable.
5) Hit enter to hit Ok button.
6) Scroll down to Finish and hit enter.
7) Reboot the PI.
8) Download VNC Client on your machine (Windows, Mac or Linux) from here.
9) Open VNC client viewer, type the hostname or the ip of your pi.
10) You are in!





Enjoy!

Wednesday, March 16, 2016

TypeScript Jump Start

Hi All,

I had the pleasure to present "Type Script jump start" to one of our local communities. In this session i covered why do we need TypeScript? and how to integrate it in existing projects using different text editors such as: Sublime and VisualStudio Code.

The presentation covered the most needed benefits/features of TypeScript in creating: classes, interfaces, inheritance, generics, modules and compile time checking.

If you have not had a chance to use TypeScript in Sublime, i have posted a blog post on how to get this setup on your machine:
http://www.mostafaelzoghbi.com/2016/03/how-to-use-typescript-in-sublime-text.html 

Channel 9 video:



Here is my presentation for this talk:



Enjoy.


Monday, March 14, 2016

How to use TypeScript in Sublime Text Editor

Hi All,


If you are trying to use TypeScript features in Sublime Text 3. This blog post describes step by step on how to start coding and utilize TypeScript features including intelliSense, compile time checking, validation...etc in Sublime.

Follow this walkthrough:

1) You need to have Package Control in Sublime, if you do not have it follow below steps. otherwise, continue reading step 2.

  • Open sublime text console by clicking on the top menu: View --> Show Console

  • Upon opening the console, you will see the console shows at the bottom of sublime

  • Copy this text in the console

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
  • Close and re-open sublime text 3
2) We need to install TypeScript from Package Control by searching for this package. To open package control, We need to open Command Palette from tools menu.



3) Then type Install Package in the popup window.



4) Package Control will popup and then search for TypeScript plugin by writing: TypeScript and then select the package.

Note: you will notice i do not have typescript screenshot since it is already installed on sublime

5) Now, try to add any TypeScript file (with .ts extension) and you will be able to use TS features while writing code in Sublime Text!



Enjoy!


Monday, November 02, 2015

npm ERR! while installing Ionic on OSX

Hi All,

While I was trying to install Ionic framework to start develop cross mobile apps using Ionic, I was getting errors while running the following command:

$ npm install -g cordova ionic

I have El Capitan version 10.11.1 with Node.js version 5.0.0 and npm version 3.3.6.

I tried to uninstall cordova first, then re-install cordova. After that, I tried to install ionic by itself but i was getting the following errors in the terminal window:

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

I tried to read more if i am missing any requirements for Cordova CLI in OSX. I found out that XCode contains all OSX SDK tools and dependencies for Cordova apps development in OSX.

Cordova CLI Requirements url for OSX: 
http://cordova.apache.org/docs/en/5.1.1/guide/platforms/ios/index.html


So i have decided to install XCode first, and the i re-ran the installation command for Ionic and i was able to create Ionic apps on my OSX dev machine.

So installing XCode on my machine did the trick!

Hope this helps.

Thanks a lot.