Get Blogged by JoKi

"The only frontiers are in your mind"
29 | 07 | 2015
Navigation
Syndication
feed-image RSS 2.0
Latest Tweets

Most Read Articles
Article Time Line
About me
Family guy, geek, entrepreneur, software craftsman: Visual FoxPro, C#, SQL Server, MySQL, Linux consultant, conference speaker

Certificates & Awards

Microsoft Certified Professional

Microsoft Specialist - Programming in HTML5 with JavaScript and CSS3 Specialist

Microsoft MVP - Visual Developer for Visual FoxPro 2006 & 2007
Visual Developer for Visual FoxPro 2007
Visual Developer for Visual FoxPro 2006

Get in touch

Sharing is caring

Recent books

Sponsoring
If you like the information on these pages, your support is highly appreciated.
Thank you very much!
Affiliates
Spacer for layout formatting

Get Blogged by JoKi

Jochen Kirstaetter (2014)

The only frontiers are in your mind, welcome to my blog sphere. Your host at is Jochen Kirstätter aka JoKi.

Dive into the weird world of a professional Software Craftsman and follow his daily victories and struggles with modern technology at IOS Indian Ocean Software Ltd. Although living on a tropical island, I'm a business owner and entrepreneur in different industry sectors. Mainly operating in the development of tailor-made software solutions since more than 15 years, I also venture into the world of beauty and body care. You can either meet me at the weekly Code & Coffee meetups of the Mauritius Software Craftsmanship Community or reach me on Twitter @JKirstaetter

This blog is also about Flic en Flac and the beautiful island of Mauritius, my home.

Sincerely, JoKi



Installing Visual Studio Code on Linux (Ubuntu)
User Rating:★★★★★ / 3
PoorBest 
Linux 24 July 2015 - 

During this year's //build conference Microsoft officially announced a new member of the Visual Studio series called Code. As described by several people already it is a HTML5, JavaScript/TypeScript based text editor hosted inside the Electron shell and it runs natively on Windows, Mac OS X and Linux. This article hopefully gives you some ideas during installation and assistance to have an improved experience out of the box compared to the standard option - at least at the time of writing this article.

Getting Visual Studio Code

I started using Visual Studio Code since the first released version 0.1.0, and being part of the Insider Preview program for VS Code I managed to download and get the latest version always using this short-listed link:

http://aka.ms/vscode

Which is an alias for this web address: https://code.visualstudio.com/

Get the latest version of Visual Studio Code from the web site
Get the latest version of Visual Studio Code from the web site

Microsoft's web site of Code detects your operating system and directly offers you the best download option based on your current browser. I'm currently running Xubuntu 15.04 x64 - Vivid Vervet and the site offers me a direct link to get the latest 64-bit version of Visual Studio Code. In case that you'd like to download a different version please scroll down to the bottom of the site and check the additional options.

Note: Originally, I started using Code 0.1.0 on Xubuntu 14.10 and then upgraded my machine around mid of May. Also, on a different machine running Ubuntu 14.04 LTS I can confirm to use Visual Studio Code successfully.

Unzip the archive

After you downloaded the latest ZIP archive for your architecture, here: VSCode-linux-x64.zip, you should decide where to extract the content of the compressed file. Well, in my case, I'd like to have third party products below the appropriate location, and therefore I usually choose /opt. Eventually you might ask yourself why? Well, here's a decent chapter about the Linux Filesystem Hierarchy written by The Linux Documentation Project (TLDP):

1.13 /opt

This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/'package' or /opt/'provider' directory tree (similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\"Program Name"), where 'package' is a name that describes the software package and 'provider' is the provider's LANANA registered name.

Looks good to me, or?

Anyway, let's just use this as base - given that you're root on the machine - it's surely a good choice, otherwise feel free to unzip the archive in your personal user space below your home directory. Next, let's extract the content as suggested using the console (or terminal in case that you'd prefer this term):

$ cd /opt
/opt$ sudo unzip ~/Downloads/VSCode-linux-x64.zip

This is going to create a new directory VSCode-linux-x64 which contains the static binary to run Visual Studio Code on your system. Right now, you would be able to launch the text editor by executing the following command:

/opt$ ./VSCode-linux-x64/Code

Despite some warnings and errors on the console output, similar to those:

[3437:0724/220852:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

Visual Studio Code is up and running...

Welcome screen of Visual Studio Code on first start of the text editor
Welcome screen of Visual Studio Code on first start of the text editor

Adding a little bit more comfort

Hopefully, you were able to launch Visual Studio Code based on the description given above. Now, let's add a little bit more comfort to your user experience. Unfortunately, there is no out-of-the-box installation package for the usual distributions - at least not yet, and we are obliged to do some manual steps. Following, I'm going to give you my steps with some brief explanations about the why and how. Of course, there are always multiple choices and you might either skip one or the other step or even have better suggestions. Please use the comment section at the bottom to give me your tips & tricks. Thanks!

Version-(in)dependent folder and symbolic link

Not sure about you but given the manual installation steps I would like to have a better control each time I consider to install a newer version of Code. Also, this helps to keep some adjustments on constant path information like Application launcher and shortcuts to run Visual Studio Code. Okay, let's dig into that and first rename (move) the base directory of Code to a version-specific one:

/opt$ sudo mv VSCode-linux-x64 VSCode-0.5.0

Again, as of writing this article 0.5.0 was the latest available version. Meanwhile, the are good chances that you might have a higher version already - good! Next, I usually create a symbolic soft link back to the newly renamed folder in order to stay version-independent. Sounds confusing, right? Hold on, I'll explain it in a short, and you will see the benefits, too.

/opt$ sudo ln -s VSCode-0.5.0 VSCode

Your own /opt folder might look similar to this one right now:

Extract the Visual Studio Code zip archive below /opt directory and create a version-independent symlink
Extract the Visual Studio Code zip archive below /opt directory and create a version-independent symlink

As you can see on the screenshot I've been using Code since the very beginning, and using this approach I am actually able to keep all versions installed side-by-side next to each other. The most interesting part is the version-independent symlink in the /opt directory. This allows me to launch Visual Studio Code by executing the following line from anywhere:

/opt/VSCode/Code

Like using the Application Finder on Xubuntu after pressing Alt+F2:

Launch Visual Studio Code from the Application Finder with fully qualified path to executable
Launch Visual Studio Code from the Application Finder with fully qualified path to executable

This scenario gives us a good head start for further activities.

The power of PATH

Now that we have a "fixed" location for Visual Studio Code, it would be more comfortable to avoid to specify the full path information each time that we would like to launch the text editor. Also, looking to some of the cool command line options of Code on other platforms, it would be nice to have them as well on Linux. Okay, then let's do it using the PATH environment variable. The Linux Information Project has a good definition online:

PATH Definition

PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user. It increases both the convenience and the safety of such operating systems and is widely considered to be the single most important environmental variable.

That sounds exactly like what we are looking for. And in compliance with other operating systems, we are going to create another symlink for our purpose, like this:

~$ sudo ln -s /opt/VSCode/Code /usr/local/bin/code

Changing the letter casing of the executable from proper writing - Code - to lower case writing - code - isn't a typo actually.

Commonly, UNIX and Linux commands are written in lower-case writing anyway, so why should we break with this tradition? Of course, you will be able to launch the text editor now with this new path, too. Either on the console / terminal, like so

~$ code

or using the Application Finder - the choice is yours.

Launch Visual Studio Code from the Application Finder
Launch Visual Studio Code from the Application Finder

Thanks to the PATH environment variable we can now completely omit the path information. Linux knows where to find our executable now.

Application launcher in Main Menu

Being able to start Visual Studio Code anywhere from the console has already given us some comfort but compared to Windows and Mac OS X users we are still living in the digital stone age, and no application is fully installed on your Linux OS without an application launcher in your main menu. In Xubuntu you would open Application Menu (or press Alt+F1) - Settings - Main Menu in order to add a new launcher to the menu. In the menu editor select the Development section or any other where you would like to place the launcher and click on New Item to define the Launcher Properties. Eventually, you might like to enter the following on your machine:

Add a new item to the main menu for Visual Studio Code
Add a new item to the main menu for Visual Studio Code

Unfortunately, this leaves us with an empty icon for now. Quickly open a new terminal and switch to an existing one and let's see which graphics are provided by Microsoft, like so:

~$ find /opt/VSCode/* -type f -iname '*.png'
/opt/VSCode/resources/app/vso.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-up.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-left.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-right.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-right-dark.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-left-dark.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-down-dark.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-down.png
/opt/VSCode/resources/app/client/vs/base/ui/scrollbar/impl/arrow-up-dark.png
/opt/VSCode/resources/app/client/vs/editor/diff/diagonal-fill.png
/opt/VSCode/resources/app/client/vs/editor/css/arrow-left.png
/opt/VSCode/resources/app/client/vs/editor/css/arrow-right.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Resources/Images.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Images/FileIdentifier.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Images/icon2.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Images/icon3.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Images/icon1.png
/opt/VSCode/resources/app/client/vs/workbench/contrib/daytona/TestPlugin/Images/console-icons.png
/opt/VSCode/resources/app/client/vs/workbench/ui/parts/editor/media/letterpress.png
/opt/VSCode/resources/app/client/vs/workbench/ui/parts/editor/media/ This e-mail address is being protected from spambots. You need JavaScript enabled to view it
/opt/VSCode/resources/app/client/vs/workbench/ui/parts/editor/media/letterpress-dark.png
/opt/VSCode/resources/app/client/vs/workbench/ui/parts/editor/media/ This e-mail address is being protected from spambots. You need JavaScript enabled to view it
/opt/VSCode/resources/app/node_modules/emmet/Icon.png

Alternatively, you might also have a look at the SVG graphics provided by Visual Studio Code.

I chose the vso.png and to simplify my life in regards of future upgrades and unexpected changes, I placed a copy of the graphic file into the usual location on a Linux system:

~$ sudo cp /opt/VSCode/resources/app/vso.png /usr/share/icons/

Hint: Use the Move option in the window menu to relocate the dialog using the arrow keys, and then confirm your selection with a click on the OK button of the dialog.

Your Main Menu editor might look like this now:

Visual Studio Code as proper entry in the main menu of Xubuntu
Visual Studio Code as proper entry in the main menu of Xubuntu

Congratulations, your new application launcher has been added to the menu and you can either navigate into the Development section (or the one you chose) or type your choice into the application quick filter textbox to find and execute Visual Studio Code.

Navigate the application menu to launch Visual Studio Code
Navigate the application menu to launch Visual Studio Code

Use the quick filter entry of the application menu to launch Visual Studio Code
Use the quick filter entry of the application menu to launch Visual Studio Code

Creating a Desktop Entry file

As we are working with Linux there are always multiple ways to achieve the same or similar result. And eventually you might prefer the possibility to create and use a file-based application launcher which adds itself to the menu structure automatically. Creating a .desktop file is not too challenging and requires a simple text editor - like Visual Studio Code ;-) - to write the following definition into it:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Visual Studio Code
GenericName=Integrated Development Environment
Comment=Code Editing. Redefined. Build and debug modern web and cloud applications.
Exec=code
TryExec=code
Icon=vso
StartupNotify=true
Terminal=false
Type=Application
MimeType=text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx;application/x-csproj;application/x-vbproj;application/x-sln;application/x-aspx;text/xml;application/xhtml+xml;text/html;text/plain;
Categories=GNOME;GTK;Development;IDE;

Save it as vscode.desktop and then put this file into the appropriate location for a Linux system:

~$ sudo cp vscode.desktop /usr/share/applications/vscode.desktop

Thanks to the proper location of the shared icon and the symlinks we created earlier, we do not have to specify any absolute paths in our Desktop Entry file. As soon as the file has been copied below the shared applications folder it automatically appears in your main menu and is ready to be used.

For your extra comfort you might like to download the vscode.desktop file. You will have to rename the file and place it accordingly on your system.

Make it a launcher in Cairo Dock

As for the different options of Ubuntu I have to admit that I'm a long-year user of the Xfce environment, called Xubuntu, and on top I also like using a flexible dock panel (or two or three). Cairo dock is a fantastic package in case that you would like to have a little bit of Mac OS X flavour on your Linux desktop, and adding a launcher for Visual Studio Code is very simply to do.

Add Visual Studio Code to a dock panel like cairo dock or similar
Add Visual Studio Code to a dock panel like cairo dock or similar

First, run Visual Studio Code using one of the previously described methods. Next, after the application runs and an icon of code appears in the dock panel right-click the icon, then select the sub-menu entry "Make it a launcher" from the "code" context menu entry and you're done. That's actually similar to pinning an application to the taskbar in Windows 7, Windows 8 or Windows 10. Close the text editor and your new launcher will still remain in the dock panel.

Resume on installing Visual Studio Code

Without any question it is fantastic to have an identical text editor for all three major operating system. But Linux users are currently confronted with some lack of comfort compared to their Windows and Mac OS X friends. Although there are several and in my opinion easy ways to increase the user experience in using Visual Studio Code under Linux I'm a bit concerned whether Microsoft is keeping it on par to the other systems. Right now, installation takes some manual steps, there are essential parts missing in order to provide an excellent first contact and other editor features like automatic updates aren't yet available for the Linux variation compared to Windows and Mac OS X.

Bearing in mind that the product has been launched back in April/May this year only and we are currently on version 0.5.0, I am very interested in the future development. The documentation online has some neat features for you, and the team at Microsoft has an open ear to the feedback and wishes given on their UserVoice website, too.

That's all for the installation part of Visual Studio Code. Please leave your comments as well as tips & tricks for me.

Happy coding!

 
Ubuntu Jam at the University of Mauritius
Linux 18 July 2015 - 

Operating systems are simply tools to do a job...

And therefore, I have to admit that even though I use Microsoft Windows on a daily base to earn my living, I'm also using Linux since almost two decades on various machines. Together with different types of virtualisation I actually do not care whether an OS is running on bare-metal or inside a virtual machine. And given the computing power of recent machines it's not a question after all anymore. Given this little insight, let's directly hop into the Ubuntu Jam event from February 2015.

Saturday is usually the time the children are on tour with me and so why not take them to the University of Mauritius and have some fun together. Also, they know quite a number of folks of the Linux User Group of Mauritius, too. When we arrived at the campus it was actually simple to get a proper parking - just speak to the security guys around POWA, they are actually very friendly and willing to help. ;-)

Next, we had to look for those Linux geeks and penguins... Near the cafeteria they said, as if I know where the cafeteria is. Frankly, it was on our direct way to ask a group of students. Even though they gave us a strange but curious look, they were really glad to help and we managed to be around in time. Well, even too early... Anyway, enough time to get our gear in place. Even though that my dear son was more busy with his Nintendo DS than a Linux-driven laptop but hey that's absolutely fine. He's already geeky enough. Actually, later on - I don't know he managed it - he was gaming on someone else's Android smartphone.

Disclaimer: I won't be accountable for any hacks and root kit installations on your device that he's going to do!

So better keep your smartphone under your control. Anyway, it seems that the phone owner and my son had a good time checking out some gaming apps. This gave me a bit of liberty to show my older laptop running on Xubuntu 14.10, to answer a couple of Xfce4 related questions and to advertise the Developers Conference. Yes, I keep a git clone on that machine, too - actually running on different TCP ports on Apache and nginx simultaneously. Geeky style... 

Lots of hardware and software during the Ubuntu Jam - and the choice of tools covered a wide range...
Lots of hardware and software during the Ubuntu Jam - and the choice of tools covered a wide range...

Despite some light spray of rain, we had a great time during the Ubuntu Jam at the University of Mauritius (UoM)
Despite some light spray of rain, we had a great time during the Ubuntu Jam at the University of Mauritius (UoM)

Thanks to the vicinity of the UoM cafeteria it was a no-brainer to just get inside and grab some drinks and food for the lunch-break. Quite surprisingly, they also offer power drinks and other selections. Now, again well fed and still ambitious to handle Linux questions, I managed to get some exchange with Ish, Nirvan, Nadim, Pritvi and others regarding the organisation and ideas for the DevCon. Even though that there was a slight spray of rain, it seems that we all had a good time on the campus and I'm looking forward to attend the next Linux Jam - maybe then on openSUSE Leap or other distributions.

 
Live and let live - modern laziness...
General 28 June 2015 - 

Wow, it has been a while since I managed to visit the author's corner of my blog. Well, quite frankly there had been a variety aspects and quite a number of excuses to avoid coming to this place and I'd like to write a little bit about it. Eventually, this article might be a little bit boring for some of the readers but I would like you to join the comment section at the bottom - maybe after reading the following lines.

Thank you! Stay sharp!

Well, gratefully I have to report that the first ever Developers Conference had quite some positive impact on the local IT scene and we managed to reach out to some international audience, too. Apart from the (mostly) positive feedback of participants, speakers and sponsors alike, I would like to mention that the event received a little bit of media coverage, too. Despite our (short) preparation period of approximately 3.5 months and a small core organisation team of 3 people, I would say that we had quite some fun and hopefully were able to deliver some interesting content. But quite frankly I would like to remind people here on the island that it is about taking action and doing things... don't just sit there, talk about potential ideas and throw them overboard just because one or two people in your inner circle are discouraging and pointing out "so many problems and eventualities".

Remember, Rome wasn't built in a day and adventuring a journey of 1,000 miles starts with a first single step.

Taking a vacation from my blog

But coming back to this blog, I have to admit that I was simple taking a mental vacation from it. The preparation period of the conference as well as running the event in high gears was kind of exhausting - physically and mentally. And hereby, I would like to express my deepest gratitude and thanks to my loving wife, Mary Jane, and my two little monsters for their patience and light short-comings in terms of "paying attention", "being around", and of course "daddy-time in general". Thanks and I love you all...

And of course, there is the business side of the medal. Spending quite some time on arrangements with potential sponsors, having frequent exchange with potential speakers, and getting the conference web site in shape was kind of exhausting. But don't forget, I'm a small business owner, and spending time on such extra-ordinary activities has actually a double-impact. Yes, it does. Any non-productive time, economically speaking, directly implicates less incoming money on the bank account. So, while I was really enjoying the extra-time donated to community and creating more awareness of the Mauritius Software Craftsmanship Community in general, I had to keep an eye on the financial situation of things, too.

You can't just stop doing your daily job...

Guinness - Well deserved refreshment after the preparations and successful execution of the first ever Developers Conference in MauritiusWell deserved refreshment after the preparations and successful execution of the first ever Developers Conference in Mauritius

Obviously, there had been some catch-up to be done right after the event in order to keep my clients and my chief financial officer (read: BWE) happy. And so, instead of hanging out on the beach enjoying the perks of living on a tropical island, this meant to keep the caps on the keyboard warm and in constant movement. Like a well-oiled machinery that just needs some TLC from time to time I was hacking down lines of code during the last two months actually. Again, I really do love my profession and from that point of view, it never felt like an obligation or burden to get rid off of a pile of queued up work. Aux contraire, it felt great to be "back" and stay focused on coding lines after lines for my customers' requirements.

Lack of inspiration?

Now after roughly seven to eight weeks in, I'm still not sure whether it feels right to finally pick up blogging again. Honestly, due to narrow focus on work assignments - even though being busy with a variety of different contexts - I was waiting for the right moment to write here on the blog. Maybe you might have a similar experience that even though you have a fantastic idea to blog about... that there's a lack of inspiration, or should I say passion?, to actually sit and starting the article. Well, tonight it just feels right. The last two weeks had been great and I'm feeling the energy coming back to me. Right now, I'm again in a position where there's a little extra time... and some light cuddles of inspiration are whispering into my ears. ;-)

Yeah, that sounds kind of awkward...

Being occupied with other activities

Yes, trust me on that one... ;-)

Apart from writing code for customer projects and assignments I have been busy reading a good number of technical books on different topics. Again, I' have a good feeling about writing some reviews during the next couple of weeks. Most titles were of technical nature but there had been one or two titles from different genres in-between.

And, not to forget to mention I also got some event invitations which I had to attend to as well. Honestly, the last two months had been great in all kind of flavours - hahaha, expect for entertaining this blog - and I'm really looking forward to share some of those experiences with my readers. And there are going to be some technical entries, too.

Anyway, I kept my notes of interesting topics I would like to pin down here on the blog, and during the upcoming weeks I'm confident to share my thoughts on various aspects of software development, community activities in the IT world of Mauritius, and of course life in general.

Stay tuned for more chapters to come...

 
« Start : Prev : 1 : 2 : 3 : 4 : 5 : 6 : 7 : 8 : 9 : 10 : Next : End »

Page 1 of 60
Spacer for layout formatting