Installing Visual Studio Code on Ubuntu 16.04 using dpkg

Yesterday I posted a note about manually installing the Atom editor on Ubuntu 16.04 using dpkg. A friend recommended that I try out Visual Studio Code for Python development, and I was pleased to discover that it is available in a .deb package for install on Linux. I used the same command to install the VS Code .deb:

foo@manchoo:~/Downloads$ sudo dpkg -i code_1.4.0-1470329130_amd64.deb 
[sudo] password for foo: 
Selecting previously unselected package code.
(Reading database ... 303742 files and directories currently installed.)
Preparing to unpack code_1.4.0-1470329130_amd64.deb ...
Unpacking code (1.4.0-1470329130) ...
Setting up code (1.4.0-1470329130) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
foo@manchoo:~/Downloads$ 

 

Advertisements

Using dpkg to install a local .deb file

The Atom editor is not available via the Ubuntu software repository (i.e. via the apt tool), so it has to be installed by downloading the .deb file (e.g. atom-amd64.deb) and then manually installing. I have had some trouble with the Ubuntu GUI software manager, Ubuntu Software (I am running Ubuntu 16.04) so I prefer the command line when possible.

In order to “manually” install the .deb file I referred to this superuser.com entry, which worked perfectly. My terminal session, from the directory containing the .deb file:

foomanchoo@foomanchoopc:~$ sudo dpkg -i atom-amd64.deb
Selecting previously unselected package atom.
(Reading database ... 299299 files and directories currently installed.)
Preparing to unpack atom-amd64.deb ...
Unpacking atom (1.9.8) ...
Setting up atom (1.9.8) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
foomanchoo@foomanchoopc:~$

And that’s it. No dependencies, it just installed. See also this unix.stackexchange entry.

Virtualenv, a python tool

From the docs:

virtualenv is a tool to create isolated Python environments.

The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications? If you install everything into /usr/lib/python2.7/site-packages (or whatever your platform’s standard location is), it’s easy to end up in a situation where you unintentionally upgrade an application that shouldn’t be upgraded.

Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.

Also, what if you can’t install packages into the global site-packages directory? For instance, on a shared host.

In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either).

Full disk encryption performance reduction on Ubuntu 16.04 LTS and an older Intel Core i5

I have an older laptop (more of a laptank) that I bought in the summer of 2009 or 2010. About five or six months after upgrading to Windows 10 in Winter 2015/Spring 2016, I started having some serious bugs and decided to just nuke the hard drive and go Ubuntu. I have written about this before.

I was very disappointed with the performance of the machine after switching to Ubuntu, and I finally realized that it was likely due to the full disk encryption (FDE) which I enabled at time of install. After wiping the drive again and reinstalling Ubuntu, this time with only home folder encryption enabled, I have found the performance to be vastly improved. The memory footprint is reduced, program load/launch times are reduced, everything is faster and I am very, very happy to have fixed this problem. Right now I have open about 13 Firefox tabs, IntelliJ IDEA, system monitor, file browser, and terminal, and I am at 2.6/3.8GiB RAM (68%) and 0.464/3.9GiB (11.5%) swap. In my previous setup with FDE enabled the memory would have been maxed out many tabs ago…

My processor is a Core i5-540M @ 2.53GHz (Passmark 2448, see also Notebookcheck.net) and I only have 4GB RAM. I’m also rocking the original 500GB 5400rpm HDD which I actually can’t believe is still spinning. I probably will pop in a SSD and another 4GB RAM at some point to keep this little guy alive for another 5-10 years 😉

Servicing brakes on a 2004 Toyota Highlander

My passenger side (a.k.a. right) rear brake caliper was seized so, with the help of a co-worker, I replaced the rear rotors, calipers and pads, and I flushed (most of) the brake fluid. I didn’t touch the front brakes. It was a great experience and I learned a lot about the brake system in my car. So here’s a quick account.

Continue reading “Servicing brakes on a 2004 Toyota Highlander”

An old article about installing Linux on a Lenovo X1 Carbon notebook computer

I bought a refurbished Lenovo X1 Carbon notebook computer about 6 months ago from ArrowDirect, and so far it has been working out great. I’ve got Windows 7 on the X1 and Ubuntu 16.04 on my computer at home, and I would really, really like to move 100% to Linux on both of my machines. I found an old blog post from 2012 that has some details about installing Linux on an X1 carbon that might be worth keeping in mind.

I can’t completely purge Windows from my life, sadly. There are several CAD and engineering programs that I just can’t do without and are Windows/Mac-only. Wine works for some things, but not everything. I think the solution may be to buy an OEM copy of Windows 7 and just install it on a virtual machine.

WindowBuilder graphical Java GUI design tool for Eclipse

I’ve installed WindowBuilder, an Eclipse IDE plugin for Java GUI development, in order to try to help me make some modifications to the GUI design of OpticalRayTracer. There were a couple confusing things about getting it going so I’m capturing some details of the process here. There is a section for WindowBuilder on the Eclipse user forums. The original proposal for WindowBuilder is also available to read.

First, I am running Eclipse 3.8.1 (Juno) on Ubuntu 16.05 (Xenial Xerus). I installed Eclipse via apt:

$ sudo apt install eclipse

about-eclipse-2016-06-12 14-21-47

Next, I installed WindowBuilder via the built in Eclipse software install utility, following the instructions at this page.

eclipse-install-software-crop-2016-06-12 14-26-18

The following URL is pasted into the Work with: text entry box:

http://download.eclipse.org/windowbuilder/WB/release/R201406251200/4.2/

Screenshot from 2016-06-12 17-59-12

I initially tried to install the SWT Designer as well, but I got a dependency error and it was the cause, so I then omitted it.

Once WindowBuilder is installed, it is invoked by right clicking on a given file and selecting Open With > WindowBuilder Editor.

windowbuilder-2016-06-12 14-12-48

This opens an editor window which is very similar to the usual one, but there is a Design tab at the bottom which will provide the desired graphical editor view.

Screenshot from 2016-06-12 18-31-33.jpg

And that is all for now.