Skip to main content

Posts

Showing posts from May, 2020

Installation of Hardware Virtualization Support on Ubuntu

While installing Android Studio on Ubuntu, it warned me to install hardware virtualization support for better performance. My CPU supports this technology. I think it should come while installation of operating system. But anyway, there are lots of information to install it: https://help.ubuntu.com/community/KVM/Installation Just follow the directions on the page.

Error: Sub-process /usr/bin/dpkg returned an error code (1)

When a process locks the debconf config.dat file, you may get this error.  The solution of this error is identifying the process and killing it. You can find the guilty process wtih this command:  sudo fuser -v /var/cache/debconf/config.dat You will get an PID on the screen. And you can use this PID in the following command: sudo kill THAT_PID_NUMBER_GOT_ABOVE_COMMAND or you can just use the following code to kill the process without seeing PID number: sudo fuser -v -k /var/cache/debconf/config.dat All these info has been taken from askubuntu community .

What to do If Your Keyboard's AltGR Key is Broken

AltGr Key A little water has been spilled on my laptop's keyboard. And just one key has been broken now. AltGr key... My keyboard is Turkish Q setup. AltGr key is important for following characters: ₺ # $ € @ { } [ ] \ | ~  If you use Windows, you can use CTRL+ALT key combination. It behaves same as AltGr key. Or you can use alt codes. For instance while pressing ALT key, press 64 on numpad. With this combination, you can write @ character on the screen. These two solutions are very efficient for Windows operating system.  On Ubuntu, you can't use alt codes while pressing ALT key. Because ALT key has some other shortcut duties for productivity. You can't use CTRL+ALT combination too.  So, thinked about today. How can i write those special characters. Of course researched about it. And found a solution.  There ise an application in Ubuntu Software store. "GnomeTweaks" First install it. Then run it.  Go to keyboard and mouse section. Go to additional options. Find...

How to Stop File System Check on Every Boot in Ubuntu

While determining the default OS to boot, I have edited too much files. May be I did a wrong thing. Now I realised that on every boot, Ubuntu splash screen says there is a file system check. This bothered me. After a little research, found a solution.  You need to edit fstab file in /etc/fstab . Open the file using this command:  sudo nano /etc/fstab Pay attention the uncommented lines. At the end of each line there is a parameter "0" or "1" or "2". 0: force the system not to do  a file system check 1: force the system to do a file system check at every boot 2: force the system to do a just one file system check at the next first boot I've change the parameters to "0" and reboot.  Voila! There is no "file system check" warning at boot.

Modifying UEFI & GRUB Settings to Determine Default OS

This is for the people who wants to change the UEFI and/or GRUB2 configuration. Why? To change boot order or to set default operating system to boot.  I have a laptop which is installed an SSD and a SATA HDD. SSD for Windows 10 (without SSD, working with Windows is like going somewhere on a turtle) and sata HDD for Ubuntu 20.04.  I don't know why, Windows take the charge of booting process. It boots without asking me. But I want my pc to ask me which OS should be booted, and if I do not give it an input, it should boot Windows. I can be able to choose Ubuntu whenever I want. Because of my wife, my system should be set up as default operating system is Windows. If you do not an input, computer should boot up into Windows. Because she has some difficulties with linux systems.  How to Solve This? First it is needed to force the pc to boot into Ubuntu. And Ubuntu should ask which OS should be booted (because Windows never asks this or I do not know how to make it as...

C# ?: (Question Mark Dot) Operator

I liked this operator. It is called "ternary" operator too. I can use it instead of basic "if" statements. Syntax of this: condition ? consequent : alternative And the code sample:   1 2 3 4 5 6 7 8 9 10 using System ; class Operators { static void Main () {start: //a label to start again Console.Write( "Do you want to continue? (y, n): " ); string answer = Console.ReadLine(); Console.WriteLine(answer == "y" ? "Congrats!" : "See you later!" ); goto start; } }

A Sample of C# Variables and Data Input From User

This is a"how to" to get two different datas from user and define them to two different variables: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 using System; namespace Variables { class Program { static void Main(string[] args) { starthere: Console . WriteLine( "Please enter first number:" ); int first = Convert . ToInt32(Console . ReadLine()); Console . WriteLine( "Please enter second number which is greater then the first:" ); int second = Convert . ToInt32(Console . ReadLine()); if (first < second) { Console . WriteLine( " \n Let's count them from smaller to greater: \n " ); for ( int i = first; i <= second; i ++ ) { Console . WriteLine(i); } } else ...

My First C# Program

C# is a popular programming language produced and mainteined by Microsoft. This page is included basics of C# programming language and my learning steps with some code snippets. On following lines, there is my first program's codes. It runs in "console" application. using System ; namespace Basics { class Program { static void Main ( string [ ] args ) { Console . Title = ( "Started to Learn!" ) ; // Set a title for CMD window. basla : // a flag to return here back. Console . WriteLine ( "What is your name? " ) ; // Printing to the screen   string ad = Console . ReadLine ( ) ; // set a variable named "ad" and waiting for user input. Console . WriteLine ( " \n How old are you" ) ; // Text which was printed on the screen. "\n" flag is for jum...

A Solution to Play Some Streaming Videos Which Do Not Play on Ubuntu

While using Ubuntu, the last version, you may encounter that everything works perfect on YouTube. But if you encountered some streaming videos can not be played on some sites in Ubuntu, now you have a solution. Ubuntu needs a video library to be installed  to play all the videos on all ths web sites. Installing  "libavcodec-extra"  package in package manager or using following command in terminal solves this issue:  < sudo apt install libavcodec-extra >

Transforming an old PC to a MediaCenter With LibreElec

I had an old PC with ultra thin form factor. Foxxconn NetBox NT-330-i which specifications are Intel Atom330 CPU at 1.6 GHz, 2GB DDR2 RAM at 800MHz, onboard Nvidia ION GPU. This hardware can not run "nowadays" operating systems smoothly. My netbox' operating system was Windows XP which is not supported by Microsoft and other software companies. So I needed to find a solution.       Got an HDMI cable, connected it to my TV. Got a wireless keyboard and connected to my netbox. Then I downloaded x86_64 version of  LiberElec . I downloaded a tool to make a bootable USB of this image file from  here . Then connected a USB stick and ran this tool. It did everthing. Next step was booting this little computer from USB. I followed the instructions and installed LibreELEC to my netbox.   LiberElec is a Linux based operating system that includes just  KODI project . LiberElec's motto is "Just enough OS for KODI". KODI is ...

Android 10 for LG G2

LG's popular mobile phone which produced in 2013 is still alive. This magical touch comes from a few XDA developers  and LineageOS crew. Thanks to all of these heros. With the version 17.1 of LineageOS, you can use your "old" phone with the latest Android version. All you need to do is go to the wiki page of this device in LineageOS's web site  and follow the instructions. Here are two screenshots from the device: