sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list sudo apt-get update sudo apt-get install mono-runtime
How to install .Net Core on Ubuntu 16.04
Add the dotnet apt-get feed
In order to install .NET Core on Ubuntu, you need to first set up the apt-get feed that hosts the package you need.
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 sudo apt-get update
Install .NET Core SDK
Before you start, please remove any previous versions of .NET Core from your system by using this script.
sudo apt-get install dotnet-dev-1.0.0-preview2-003121
Initialize some code
Let’s initialize a sample Hello World application!
mkdir hwapp cd hwapp dotnet new
Run the app
The first command will restore the packages specified in the project.json file, and the second command will run the actual sample:
dotnet restore dotnet run
And you’re ready!
You now have .NET core running on your machine!
Source: .Net Core on Ubuntu
Authentic Louisiana Red Beans and Rice Gumbo
Products for the gumbo
- 1 pound dry kidney beans
- 1/4 cup olive oil or sunflower
- 1 large onion, chopped
- 1 green bell pepper, chopped
- 2 tablespoons minced garlic
- 2 stalks celery, chopped (optional)
- 8 cups water
- 2 bay leaves
- 1 teaspoon Cajun seasoning
- 1 pound andouille sausage, sliced
- 1 tablespoon salt
Products for the rice
- 2 cups long grain white rice
- 4 cups water
Preparation of the gumbo
Leave the red beans overnight submerged in a pan filled with water and a tablespoon of salt.
On the next day remove the water and pour a new fresh water in the pan. Heat until it reaches the boiling point.Remove from the stove and discard of the water. Move the bean to a cooker pressure.
Add 8 cups of water. Add one chopped onion . Add the cooking oil (sunflower or olive oil). Place the lid and make sure it is sealed. Boil for another hour after reaching the boiling point (you will hear hissing from the air trying to escape from the pressure cooker).
Turn off the cooking stove and wait for the steam to completely escape from the pressure cooker. You can speed the process by opening the valve on the lid. Once the steam is all gone open the lid and add the sausage, sliced in circles not thicker than 3-4 mm. Add the chopped green bell pepper. If you have celery, chopped it and add it too. Add the bay leaves.
Close the lid (but do not seal it) and boil for another 20 minutes.
Open the lid and add the mined garlic and the Cajun seasoning. Boil for another 5 minutes and then turn of the stove.
Preparation of the rice
Wash the rice with cold water and put it in a pod and add 4 cups of water. Put the lid on and boil for 20 minutes after reaching the boiling point. Boil using a low heat.
Turn the cooking stove off, open the lid and add 2 tablespoons of butter. Stir it until the butter melts completely.
How To Watch Netflix on Ubuntu The Easy Way
I was trying to find a way to watch Netflix in Ubuntu 14.04 In the past you had to install Wine and Silverlight. Since Google Chrome 37 it should work natively. Still I was getting Error Code: M7063-1913
It turns out some libraries were messed up. Apparently the problem is fixed in 14.10 Alpha but I wanted to keep running the oficiall stable version.
I step by step instructions on how to get Netflix to work in Google chrome in Ubuntu 14.04 are available here:
Migrating Your Ubuntu Machine to a SSD Drive
https://radu.cotescu.com/migrating-your-ubuntu-machine-to-a-ssd-drive/
http://ubuntuforums.org/showthread.php?t=2053134
http://www.howtogeek.com/howto/19141/clone-a-hard-drive-using-an-ubuntu-live-cd/
Re-map keyboard keys
Many computer keyboards have an Fn key. It allows adding a second function to an existing key. An example is the F11 key. In combination with the Fn key it acts as a Volume Down:
Fn + F11 = Volume Down
Some other keyboards have this the opposite way – F11 acts as a Volume Down by default and you have to press and hold Fn in order to get the normal F11 key functionality.
If you want to change the default behaviour and you are lucky enough all it takes is to make the change in the BIOS of the computer. More likely your computer have no such setting so you need to use a keyboard re-mapping software. One such program is SharpKeys.
Disable autologin in Ubuntu
After installing Ubuntu on a stick the system will let you in without asking for a password. What happens is that the display manager LightDM will auto-login the built-in ubuntu user.
While for many people it may seems convenient and fast I would like to have the system protected by a password. If you think like me then please keep reading to find out how to do it. It took me a lot of trials and errors and even if it is not a perfect solution it works for me.
My first idea was to disable the auto-login for ubuntu user and set a password which I had to type in order to log in. This did not work – for some reason the password kept resetting between the restarts and although I had to type the username (ubuntu) I was able to just press the Enter key and log in.
At the end I did the following:
Step 1) Set a password for the root account:
sudo passwd root
You have to type the password twice. I know it is not recomended but this is my system and I want it that way.
Step 2) Create a new user that you would use most of the times. I will call it joe for example. The best way to create it is to cick the gear icon in the top right corner of the screen and then choose System Settings… -> User Accounts. The click the plus sign (lower left). In the new dialog choose the account type – Standard or Administrator. Type the Full Name and Username. When ready click the Add button.
We have to set a password for this accound and to add it to the sudo group. Open a terminal and type:
sudo passwd joe
You have to type the password twice.
sudo usermod -a -G sudo joe
Step 3) Disable autologin for ubuntu account and enable the manual login
The configuration file that we have to edit is /etc/lightdm/lightdm.conf and initially should look like this:
Open the file in your favourite text editor and add the following line to enable the manual login:
greeter-show-manual-login=true
You also need to comment out the autologin-user=ubuntu line by inserting the # sign in the front. Your configuration files should look like this:
Step 4) Lock the ubuntu account
Open a terminal and type:
sudo passwd -l ubuntu
The account will be locked and you cannot use it to login. This means we have two accounts we can use to log in – root and joe.
By default LightDM only shows the user-created accounts on the login page. When you restart the system you will see the user joe which you can click on and type the password in order to login. In addition to that you should see the text Login. If you click it you will be able to type a username, press Enter and then type the password. You can use this way to log in with the root user.
In both cases you are protected by a password. I hope this helps you.
Microsoft Entity Framework – Training Videos
This is a selection of videos about Entity Framework.
Entity Framework 5.0 – Intro to Model First – Part 1 of 2
Entity Framework 5.0 – Intro to Model First – Part 2 of 2
Entity Framework 5 – Database First
OpenVPN client in Ubuntu
I wanted to connect to an OpenVPN server from my Ubuntu on a stick.
There are different clients but the one I liked was the Linux Network-Manager GUI for OpenVPN. To install it you need to enable the Universe repository first:
sudo add-apt-repository universe sudo apt-get update
and then type:
sudo apt-get install network-manager-openvpn
After the installation completes add a VPN connection by clicking on the wireless icon from the top menu and selecting VPN Connections -> Configure VPN. The network connections dialog pops up:
Click the Add button and from the drop-down either select OpenVPN or Import a saved VPN connection… and then click Create button:
In the first case you have to manually configure everything like the location of the user certificate, the private key, etc.
The second option allows you to import an existing configuration file that already have all these settings defined. What I did was to put the configuration file with all the files referenced by it in one folder and import the configuration file.
You can also configure the existing network connections (both wired and Wi-Fi) to automatically connect to your VPN. This is done in the General tab.
Bluetooth headset in Ubuntu
After I installed Ubuntu 14.04.1 LTS I found that the Bluetooth drivers and utilities were already installed. I paired my Bluetooth headset Jabra BT620s without any problems. Unfortunately I could not make it to be the default device for playback or this was what I was trying to do similarly to the way you would do it in Windows. No matter what I was doing the sound kept coming from the computer’s speakers.
It took reading a lot of posts talking about other peoples problems with Bluetooth headsets and their solutions. I tried several of them and what worked for me was installing PulseAudio Volume Control from Software Center:
It allows you to specify the profile for your headset which by default is off. I set it to High Fidelity Playback (A2DP):
The last step is in sound settings to set the mode for the headset to match the profile you chose in the PulseAudio Volume Control:
That was all – no messing with configuration files or running commands in a terminal. I hope these steps work for you too.