ASP.NET vNext on Ubuntu Linux

Disclaimer: Please note that this description is made based on taken notes during installation and is a subject to change after additional verification.

Described installation has been made on Ubuntu 14.04.

In first step let’s update packages information using:

sudo apt-cache update

Next step is installation of Mono prerequisites:

sudo apt-get install git autoconf libtool automake build-essential mono-devel gettext libuv0.10

Then clone Mono repository from GitHub to selected folder, install it and verify instalation:

mkdir mono
cd mono
git clone
https://github.com/mono/mono.git

Change directory in order to execute autogen.sh script

./autogen.sh –prefix=/usr/local && make && sudo make install

And check Mono version using:

mono –version

By default this version of Ubuntu does not have installed Curl so we need to install it:

sudo apt-get install curl

Install KVM and perform upgrade:

curl -sSL https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh && source ~/.kre/kvm/kvm.sh

kvm upgrade

You can clone now official GitHub repository for ASP.NET vNext using:

git clone https://github.com/aspnet/home

However in order to restore required nuget packages additional certificates installation is required:

CERTMGR=/usr/local/bin/certmgr
sudo $CERTMGR -ssl -m
https://go.microsoft.com
sudo $CERTMGR -ssl -m https://nugetgallery.blob.core.windows.net
sudo $CERTMGR -ssl -m https://nuget.org
mozroots –import –sync

Now you can call in selected project folder following command:

kpm restore

Everything should work for console application, however in order run e.g. MVC project additional configuration is needed (installation of Kestrel from source code):

sudo apt-get -qqy install \
autoconf \
automake \
build-essential \
libtool

In separate folder clone libuv repository:

git clone https://github.com/libuv/libuv

Install and configure it:

./autogen.sh && ./configure && sudo make install
sudo ldconfig

Now for MVC project after calling “kpm restore” you can now run it using:

k kestrel

Reklamy

angular.js npm run protractor Ubuntu 14.04 error

When going through angular.js tutorial I’ve faced issue when running end-to-end tests with protractor.

npm run protractor

command didn’t work, even after running as advised following commands:

npm install

npm run update-webdriver

In order to fix this issue I’ve installed chromium-webbrowser and also removed protractor entry in package.json file. After that I’ve run:

npm install protractor –save-dev

and next time after running protractor everything worked as expected

Sublime Text 2 save session on Ubuntu problem

I’ve had never before problems when using Sublime Text 2 (ST2) on my Windows 7 machine. Especially concerning my favorite feature which automatically opens files opened during last session. However I’ve faced such a problem on Ubuntu. Despite hot_exit and remember_open_files properties set to true, no files from last session had been opened. Some people even raised this as a bug (googled for it).

I’ve noticed strange behavior that when trying to change settings (some experiments) dialog box with permissions denied information appeared. However running ST2 using sudo command allowed me to save changes in settings files. So it appeared to me as permissions issue. If I can’t save settings as standard user then maybe session data can’t be saved in similar way. I’ve checked permissions for files in ~/.config/sublime-text-2/Settings and owner of all files had been set to root. I’ve called command:

sudo chown your_user_name Session.sublime_session

…and it works now as designed. After closing editor and opening it once again all files opened during last session are restored.

Sublime Text 2 on Ubuntu

My text editor choice is Sublime Text 2 (for all operating systems). It should be sufficient for my current needs, but in future I would like to get to know Vim also.

Anyway, I’ve found this great post how to setup Sublime Text 2 on Ubuntu, along with adding it to Unity Dashboard.

http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/

 

Btw. in order to improve speed of dashboard search, I highly recommend disabling online search results. You can do this by searching for ‚Security & Privacy’, then go to search tab and move the slider so that it shows ‚off’ value.

Ubuntu and VirtualBox

Every time Canonical releases new version of Ubuntu I give it a try. Every new version gets better and better and this time I felt that it requires more attention from me.

So I’ve installed the latest Ubuntu 13.10 (Saucy Salamander) on VirtualBox (these days I’m a huge fan of virtualization). However from my perspective with Linux there are always problems. This time was no different. The biggest problem I have with many virtualization platforms is to have it work in fullscreen mode. It always ends up with searching and reading many posts in the Internet, which doesn’t help in any case.

This time, in one of posts, I’ve found a solution. It seems like Ubuntu (probably many other distros also) requires proper VBox version also in order to get Guest Additions working correctly. For me installation of 4.2.18 did the trick and with Guest Additions installed user experience is pretty good.