Tag Archives: linux

ICT skills at primary school

ICT skills at primary school

Our children have computer lectures at their primary school since this year. In general, it's a great idea that students are exposed to computer literacy at an early stage. But sometimes it comes with small hiccups. Like in our case...

Curriculum, literature and exercise book

Although our children have access to computers at home since a while already it is the curriculum of their primary school in regards to IT literacy that lead to this blog article.

The title "Let's Learn ICT Skills" by the Mauritius Institute of Education (MIE) introduces Computer Fundamentals and Operations to young learners at primary school level. The textbook is divided into six units and covers first steps into the world of ICT.

Starting with an orientation in Windows the title discusses the essential use of typical desktop applications to handle word processing, to introduce simple graphics and presentation skills, to cover basic functionality in spreadsheets and to venture into the unknown areas of the interweb.

Each chapter has different learning objectives and introduces elementary skills in various applications. To keep matters easy the textbook is focused on Windows operating system and the Microsoft Office suite. Which in general and most commonly okay for the majority of primary school students.
Not sure whether it classifies as a tutorial. You are most welcome to comment and assist. #BlogMore about modern parenting obstacles...

https://jochen.kirstaetter.name/azure-for-school/
Well, most students... ;-)

Our start situation - Linux

As a parent it is not easy to trust a full-fledged computer into the hands of your youngster(s) without fearing the whole system might be infested by viruses, malware and ransomware in shortest time. Especially given recent reports on various problems.

Following my decision to provide our kids with family-friendly and security-enhanced tablets running on Amazon's Fire OS compared to regular Android, it was only right to provide them a similar experience on the desktop. At least in my point of view.

Personally, it was important for me to have peace of mind knowing our children are using Linux based system. Don't get me wrong Microsoft has done a tremendous job to improve security over the last decade. It's just that I didn't want to purchase a new laptop for them and Linux runs just fine on older hardware.

Instead of upgrading the available HP laptop from Windows Vista Business to latest Windows 10 I decided to install Xubuntu 17.04 originally. Some weeks back, I then upgraded their machine to Bionic Beaver (version 18.04) already, and they can "beta-test" the upcoming Ubuntu LTS version.

After all, as more and more software is moved towards web applications it really doesn't matter anymore whether Firefox is run under Windows or Linux, does it? Additionally, they have access to LibreOffice, GIMP and other educational software packages like GCompris, and so forth.

Well, the children's exercise book is explicitly covering Windows, some applications of the Microsoft Office suite as well as Paint.net - software that isn't available on Linux out of the box.

Various approaches possible

Of course, there is no golden solution to this situation and multiple possibilities are given. All depending on circumstances, personal taste and eventual hardware constraints. Following, I would like to give you an overview of options - all of which I already used successfully in the past.

Virtualisation

This might come first in someone's mind and I have to agree with that. Installing a virtualisation software like Oracle VirtualBox, VMware Workstation or even qemu can be done easily and the the actual experience can be seamless. In our situation though is the existing hardware with a previous generation CPU and 2 GB RAM only the limiting factor to this approach.

Using wine or CodeWeavers CrossOver

Emulation software like wine or CodeWeavers CrossOver eliminate the necessity to install and run a complete virtualisation solution. The software provides an abstraction layer of native Windows API functionality and allows to install and run Windows software like the Microsoft Office suite among others directly on a Linux machine. Luckily, the hardware wouldn't be the limiting factor but I have to confess that it is my laziness to opt-in for this viable approach. Also, the first chapter in the kids' literature - Getting familiar with Windows - wouldn't be possible for them using this approach.

Remote access

Last but not least, providing remote access to an existing instance of a Windows system seems to be one of the easiest options. Here, the kids get to experience Windows directly and it doesn't need any resources on their Linux system. Using a software package like rdesktop or remmina enables a Linux user to connect to a Windows system via Remote Desktop Protocol (RDP). So far so good, but I'm not interested to provision a dedicated machine for this purpose at home. The system would be idle most of the time and consume a good chunk of electricity instead.

As mentioned earlier I have used all those approaches successfully, and it is good fun to tinker around with them. But those are most likely options for an adult and not really suitable for a child attending primary school.

A solution - Cloud-based virtual machine

Taking the pro aspects of each of the approaches earlier I decided to provision a virtual machine running Windows 10 Professional in the cloud. Access to that machine is available using RDP and in regards to hardware constraints it requires an internet connection only.

Actually, this suits me very well as it gives me control on various levels:

  • Local network: I can control at any time whether the kids' laptop gets access to our WiFi network or the internet based on simple authentication and routing configuration.
  • Operating times: A virtual machine in Azure is fully controlled through the Azure portal. I can decide when the VM is running and when not.
  • Hardware on demand: Provisioning hardware to the VM on Azure is just a few clicks and a reboot away.
  • Data exchange: Synchronisation of files between the local Linux laptop and the Windows machine in Azure is based on cloud storage providers like OneDrive, Google Drive, Dropbox, etc. Meaning backup of files is integrated and additional devices like their tablets can be added easily.

Later on, if the VM isn't needed anymore or in case the children totally messed it up I don't have to worry about anything. The VM gets decommissioned and can be provisioned again within minutes if needed.

Azure configuration and fine-tuning

To start with this educational system for my children I went into the Azure Portal and created a new virtual machine using the Windows 10 Pro image. To keep nice and smooth I also created a new resource group to isolate it from other business-related activities.Given

Size of the VM

ICT skills at primary school
I chose a (hopefully) decent hardware setup running the virtual machine on a Standard B4MS (4 cores with 16 GB RAM) tier. This should be sufficient enough for Microsoft Office, Paint.net and Firefox.

Auto-shutdown

Also, I activated the Auto-shutdown feature which restricts the use of the system until a specified time, and helps me to save a heap of money, too.
ICT skills at primary school
The main purpose of that VM is to allow the children to follow the exercises and steps in their school book. At the given time the system simply shuts down, and it's dinner time in the off-line world.

Starting the VM

Now that we know how to stop the VM we should have a look about how to start it. There are multiple choices available. Most obvious you can launch the virtual machine via the Azure Portal itself. Nothing surprising here.

Next, Microsoft offers the free Azure mobile app for Android and iOS to stay connected to your Azure resources. This is quite neat to manage, monitor and operate Azure on the go.

And then there is azure-cli - the Command-line tools for Azure - which gives you the next generation multi-platform command line experience for Azure.

$ az 

     /\
    /  \    _____   _ _  ___ _
   / /\ \  |_  / | | | \'__/ _\
  / ____ \  / /| |_| | | |  __/
 /_/    \_\/___|\__,_|_|  \___|


Welcome to the cool new Azure CLI!

Usually, I have Visual Studio Code open almost the whole day and starting the kids' virtual machine is done using the Azure CLI Tools extension.
ICT skills at primary school

I'm currently using the following .azcli file to manage that VM:

# Logging into Azure
az login

# Starting kids' VM on Azure
az vm start -g Personal -n windows4kids

# Stopping kids' VM
az vm stop -g Personal -n windows4kids --no-wait

The az login triggers the device login on Azure and after entering a generated code to authenticate your machine you get access to your resources on Azure, like this:
ICT skills at primary school

Accessing the VM

Windows machines on Azure are accessed via RDP and Linux has a variety of client applications for that protocol. In the portal you should assign a static domain name to your VM as the public IP address is most likely to change between daily uses. The portal allows you to download the Connect parameters as a .rdp file that you can open in any text editor on Linux.

ICT skills at primary school
Using the details from the .rdp it is possible to set up a new connection in remmina for future use. I'm storing the password to keep it simple for the children to access their new Windows machine.

Now, remmina is configured to start automatically after they logged into their account and the Windows VM on Azure is easy accessible via shortcut from the system tray area.

Give it a try - Azure free credit

Microsoft gives new sign-ups on Azure an initial credit that allows you to explore the various options and get yourself familiar with the available resources. Why don't you give it a try?

How to reduce the amount of disk space used by the systemd journal

We, Linux people, generally use systemd now and one of its components is the journal controlled by the journalctl command line tool.

As explained on the Arch wiki,

systemd has its own logging system called the journal. The /var/log/journal/directory is a part of the systemd package and the journal will write to /var/log/journal/

The journal is always appended and therefore grows in size. On my laptop, the journal was taking 1.8Gb of space and was full of details which, I believe, I’ll never need. So I decided to clear all old contents (which the systemd people call a vacuum). I issued:

journalctl --disk-usage
journalctl --vacuum-size=64M
journalctl --disk-usage

And the journal immediately became smaller. I then issued a

journalctl --verify

which made me realise that some of the remaining journal files were corrupted (for some reason). There is no journal repair tool in systemd so I simply removed the offending files (with rm).

Now, I can easily check my journal entries for today and I know everything will be all fine:

journalctl --since today

Ghost Desktop on Xubuntu 17.04 won’t start

Ghost Desktop on Xubuntu 17.04 won't start

Already before the migration from Joomla to Ghost last weekend I run the Ghost Desktop application on Windows. Now, after the successful completion it was about time to get going on my other machines. You know, the ones away from the main rig... Usually used during the evening hours, just for fun, or experimenting.

Tonight, I decided to give one of my Linux systems some attention, started to upgrade some packages, and installed new software. Among those also Ghost Desktop App for Linux. On the Ghost website you get version 1.3.0 (as of writing), and it's a Debian package.

Knowing that the desktop app is an Electron-based application, and I already packaged a few Electron apps myself, it would run on any Ubuntu-based system, too.
Note: This post was written in Ghost Desktop running on Xubuntu 17.04 64bit

Installation of Ghost Desktop

Either you double-click on the downloaded .deb package and your system will prompt you to open/install the application in Software, or you can run the following command in the Terminal:

$ sudo dpkg -i ~/Downloads/ghost-desktop-1.3.0-debian.deb 

Ghost Desktop can then be launched via the Application Menu/Launcher under ghost-desktop or if you prefer the terminal:

$ Ghost

The problem: Ghost Desktop won't start

If you try to launch the application via the menu or any other GUI launcher you won't get any response at all. The software just isn't executed, it seems.

Compared to running it in the Terminal. This might produce the following output:

$ Ghost
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Unable to find a valid app
    at Object.<anonymous> (/usr/lib/Ghost/resources/electron.asar/browser/init.js:121:9)
    at Object.<anonymous> (/usr/lib/Ghost/resources/electron.asar/browser/init.js:173:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:424:7)
    at startup (bootstrap_node.js:147:9)

The solution: Set permissions

Fortunately, this has been reported already on GitHub by user letsjustfixit. The issue is caused by a missing permission bit on the Electron app. A temporary workaround has been documented until the package is going to be fixed.

Run the following chmod to set read and execute bits on the Electron app and dependent components. Then launch Ghost Desktop again.

$ sudo chmod -R +rx /usr/lib/Ghost/resources/app
$ Ghost 

 ⚡️  Welcome to Ghost  👻

Happy blogging!

It's great to see that such issues are handled on GitHub, and the "fix" is easily done.

As maintainer of own Electron-based applications I'm interested in the root cause. So far, I didn't come across a similar problem (touching wood!). Thankfully, I'm going to add this to my notes on Electron.

If you're familiar with this kind of problem regarding Electron packaging on Linux, give it try to fix it. On my side, I already cloned the Ghost-Desktop repository. Let's see whether I'm able to create a pull request for the Ghost community.

Open and not extract .docx, .xlsx and .pptx files in the latest Gnome 3

In the latest version of Gnome 3, a subtle change was brought to Nautilus, the file manager, to automatically extract the content of a ZIP file in a new folder when it is double-clicked on instead of open an application to do so. The problem is that Microsoft Office files (.docx, .xlsx, .pptx, etc.) are ZIP files. This means that double-clicking on a .pptx file extracts its content instead of opening the file in, say, LibreOffice Impress!

This makes life miserable for all those who need to open Microsoft Office files on a regular basis and, of course, this is a bug (as acknowledged by the Gnome people  and the Red Hat / Fedora people).

Fortunately, it is quite easy to make Nautilus become sane again. Open Preferences and in the Behavior tab, unselect “Extract the files on open” in the Compressed Files section.

Phew!

Quick fix for fast forward youtube



Symptom

Youtube loads but there is no sound, and youtube seems to be playing in fast forward mode.

After digging around, I realised that the sound sub-system of Linux needs to be badly fixed. It tries to play through the audio HDMI port first. Youtube should also fix their sound output code on Linux. The trick is to disable the HDMI codec driver for the sound.

Add this line in modprobe.conf: blacklist snd_hda_codec_hdmi

I've seen huge threads about this problem on various forums. Maybe this will help a few people.

Linux Meetup (29/08/2015)




A Linux Meetup after a long time !

We held our first meetup after a very very long time :) I wasn't expecting 71 people, but we got around 13 people who showed up. Quite a few couldn't make it at the last minute. The usual suspects showed up with the addition of Ashvin, who made it this time :) 2 employees of Mauritius Telecom were also present.

group

Bufferbloat explained

I demo'ed and explained the bad latency that Internet Users experienced on the DSLresport website. I explained how, once you cross 5MB/s, your bandwidth isn't that important anymore. Now, we need to talk about latency . When, I showed how by implementing CoDEL we could solve the latency problem, the 2 employees of Mauritius Telecom understood the issue at hand. Unfortunately, none of Emtel, Canal+ or Bharat Telecom engineers were around, sadly.

I hope that ISP guys get the message concerning the need for low latency in Mauritius for us to be able to benefit from a good service for services like VOIP, gaming, teleconference, and IMs.

With Open Source software and Linux, we were able to show how we can still achieve low latency while saturating both our uplink and downlink on a Mauritius Telecom MyT/30 Mbit/s connection. Quite a few people, in particular, Ajay Ramjatan & Shaan Nobee asked a lot of questions regarding fq_coDEL and the theory behind AQM.

I sincerely hope to see University Students pick up on research related to bufferbloat and how to fix it. I hope that Wifi will be fixed, as well as possibly adjusting coDEL for Mauritius.

There were a few questions regarding the IETF, and the applicability of standards. I explained how participation in standards is crucial for emerging countries like ours. In particular, I emphasize on the importance of sending Networking and Systems Engineers to conferences like the IETF, through the budget for training, rather than sending marketting guys, who would never be able to sell anything to a knowledgeable engineer. Too many IT companies think that investing in training is too expensive, and do not realise how they can grow their portolio of services for their customers.

Overall, It was a fun meetup. I hope that we, Linux users, can work together with ISPs to fix the latency issues that 99% of customers are currently experiencing right now.

URL for my presentation: my presentation
Dave Taht's talk on Bufferbloat At Stanford:
Dave Taht talk at Stanford

--Logan
C-x-C-c

Installing Visual Studio Code on Linux (Ubuntu)

Installing Visual Studio Code on Linux (Ubuntu)

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:

https://aka.ms/vscode

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

Installing Visual Studio Code on Linux (Ubuntu)
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...

Installing Visual Studio Code on Linux (Ubuntu)
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:

Installing Visual Studio Code on Linux (Ubuntu)
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:

Installing Visual Studio Code on Linux (Ubuntu)
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.

Update: Recently, I discovered that the official guide on Setting up Visual Studio Code on Linux also mentions the creation of a symlink as a tip.

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.

Installing Visual Studio Code on Linux (Ubuntu)
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:

Installing Visual Studio Code on Linux (Ubuntu)
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/[email protected]
/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/[email protected]
/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:

Installing Visual Studio Code on Linux (Ubuntu)
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.

Installing Visual Studio Code on Linux (Ubuntu)
Navigate the application menu to launch Visual Studio Code

Installing Visual Studio Code on Linux (Ubuntu)
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.

Installing Visual Studio Code on Linux (Ubuntu)
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

Ubuntu Jam at the University of Mauritius

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... 

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

Ubuntu Jam at the University of Mauritius
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.

Using Linux or BSD as your slave for repetitive editing

Generating URI on blogsum

Blogsum is a minimalist & secure CMS which I use. The only problem so far is generating the blog post URL. Generally, it's a long string of text such as Using Linux or BSD as your slave . However, I cannot use this as a URL generator. One way would be to use javascript or any decent client-side language to do that. What output would I expect ? Something like "Using-Linux-or-BSD-as-your-slave" . That's a pain to generate manually: I have to copy-paste it, and replace every space with a '-". However there is another way if you're using Linux or BSD.

The power of sed

Some people tend to jump on fully fledged programming languages like Perl, or Python. To me, it's like using a car to travel 5 meters down the road. The same group of people would probably use google to look up thousand of ways to do the editing. There's a way to do it on a single line of fairly readable code, using sed. Sed is a tiny piece of software available under all BSD and Linux systems. It stands for "Stream Editor". Sed can be used to do a lot of complex tasks.

sed has an easy to remember usage pattern for those kind of tasks that you can type on your terminal:

echo "Using Linux or BSD as your slave for repetitive editing" | sed 's/ /-/g'

The output is: Using-Linux-or-BSD-as-your-slave-for-repetitive-editing

Analysing the command we just typed

echo just prints whatever you want. echo "XXX", would print XXX on a terminal. By using echo "XXX XXX" and adding a '|' we take the "XXX", and send it for further processing. In this case, we send it to sed.

sed takes the input "XXX XXX", and applies an operation. In this case the, s means substitute. Now, what do we want to substitute ? We want to substitute the space character, with "-". we use the / and then the " " to tell that to sed. Now, what character do we want to use ? the "-". We use '/', and then '-', and another / to terminate the expression. What does the 'g' stand for ? By default it will replace only the first occurence of space with "-". We need to do it for all instances of space. so we use g for "global" replacement. That's it: we're done. Linux or BSD just did the grunt work for you :)



(Please don't hesitate to leave your comments :))
--Logan

Using Linux or BSD as your slave for repetitive editing

Generating URI on blogsum

Blogsum is a minimalist & secure CMS which I use. The only problem so far is generating the blog post URL. Generally, it's a long string of text such as Using Linux or BSD as your slave . However, I cannot use this as a URL generator. One way would be to use javascript or any decent client-side language to do that. What output would I expect ? Something like "Using-Linux-or-BSD-as-your-slave" . That's a pain to generate manually: I have to copy-paste it, and replace every space with a '-". However there is another way if you're using Linux or BSD.

The power of sed

Some people tend to jump on fully fledged programming languages like Perl, or Python. To me, it's like using a car to travel 5 meters down the road. The same group of people would probably use google to look up thousand of ways to do the editing. There's a way to do it on a single line of fairly readable code, using sed. Sed is a tiny piece of software available under all BSD and Linux systems. It stands for "Stream Editor". Sed can be used to do a lot of complex tasks.

sed has an easy to remember usage pattern for those kind of tasks that you can type on your terminal:

echo "Using Linux or BSD as your slave for repetitive editing" | sed 's/ /-/g'

The output is: Using-Linux-or-BSD-as-your-slave-for-repetitive-editing

Analysing the command we just typed

echo just prints whatever you want. echo "XXX", would print XXX on a terminal. By using echo "XXX XXX" and adding a '|' we take the "XXX", and send it for further processing. In this case, we send it to sed.

sed takes the input "XXX XXX", and applies an operation. In this case the, s means substitute. Now, what do we want to substitute ? We want to substitute the space character, with "-". we use the / and then the " " to tell that to sed. Now, what character do we want to use ? the "-". We use '/', and then '-', and another / to terminate the expression. What does the 'g' stand for ? By default it will replace only the first occurence of space with "-". We need to do it for all instances of space. so we use g for "global" replacement. That's it: we're done. Linux or BSD just did the grunt work for you :)



(Please don't hesitate to leave your comments :))
--Logan