Skip to main content

Posts

Showing posts with the label OS

Formatting JSON in Kate - KDE Editor

Some years ago, I wrote a post on Formatting XML in Kate - KDE Editor . This one  below is for JSON format. Like the XML one this one also makes use of a tool installed on your machine and is invoked from Kate as a filter. TLDR;   Kate  is one awesome editor ( If you don't like  Vim  for its 'CLI'ness ) When working from the command line we can use a handy tool ' jq ' to format JSON files and pretty print them. Well, the good news is we can use the same from within Kate  as well But it is a tedious task to use it when you have some content in  Kate  ( more so if it is an unsaved file ) and want to format it. Incase, you don't have  jq  installed, simply hit sudo apt-get install jq and that will install it for you. If you use  jq  you would do something like this, Save File (  MySavedFile.xml  ) Go to Command Line cat MySavedFile.txt | jq '.' - > MySavedFile.txt and then reload our file in  Kate . If you wish t...

Setting up HMA on Ubuntu

There are variety of reasons for wanting to setup a proxy connection on your machine. Getting this done on a Windows OS is simple, with tools like HMA! ( Hide My Ass! ) However, the surprise is it is quite easy to get it done on Ubuntu as well. This is for Ubuntu 18.10, I haven't really tried on another OS but the steps would remain the same. Do note that you will need a valid HMA username and password for this to work. There are 3 ways you can connect using HMA, I chose OpenVPN. Steps: First you need to setup OpenVPN on your machine if it is not available already     sudo apt-get install network-manager-openvpn-gnome Next you need the download the certificate and VPN config files from official HMA website          Download HMA VPN Configs Here! Save it in a folder on your machine and extract it. I prefer ~/vpn_HMA/     cd ~/     mkdir vpn_HMA/ Once you have the extracted folder in p...

Formatting XML in Kate - KDE Editor

TLDR;   Kate is one awesome editor ( If you don't like Vim for its 'CLI'ness ) When working from the command line we can use a handy tool ' xmllint ' to format XML files using its --format option. But it is a tedious task to use it when you have some content in Kate ( more so if it is an unsaved file ) and want to format it. Incase, you don't have xmllint installed, simply hit sudo apt-get install libxml2-utils and that will install it for you. If you use xmllint you would do something like this, Save File ( MySavedFile.xml ) Go to Command Line cat MySavedFile.txt | xmllint --format - > MySavedFile.txt and then reload our file in Kate . If you wish to remain in Kate and get this done then you would need to do, Select text ( Complete or Partial ) Hit ' Ctrl + \ '  or go to Tools -> Filter Text Incase your Kate does not have the option for 'Filter Text' under tools, you just need to enable the 'Text F...

Solving "Adobe Flash Player" Issue on Ubuntu (Chromium and Firefox)

I was stuck in this situation where I followed all applied instructions to install/activate Flash Plugin for Chromium (Version 37.0.2062.120 Ubuntu 12.04 (281580) (64-bit)) and Firefox (38.0.5) 1. Download corresponding version of Flash from Adobe Site: https://get.adobe.com/flashplayer/ 2. Untar and move data to corresponding directories. 3. For some reason, it didn't work. Then after lot of search, I came across this post (Link at end of the article). Basically, what was missing in my case was a symbolic link in /usr/lib/mozilla/plugins/ So basically what we do is, Download the package from https://get.adobe.com/flashplayer/ mkdir /usr/lib/flash-plugin/ if it does not exist Extract the downloaded tar.gz and copy libflashplayer.so to / usr/lib/flash-plugin Give chmod 775 /usr/lib/flash-plugin/libflashplayer.so Finally, the missing link in my case, cd /usr/lib/mozilla/plugins/ ln -s /usr/lib/flash-plugin/libflashplayer.so . chmod 775 libflashplayer.so ...

Find size of package in Ubuntu before downloading it via command line

It is better to know the size of a package before downloading it. At times, apt-get install prompts before downloading the package and we can read the size there. However sometimes dependencies are downloaded and then there is a prompt for the BIG package. But by now some packages are already installed and if the BIG package is rejected because of slow bandwidth etc. an extra effort is to be made to clean the unnecessary packages too.( apt-get autoremove does it too. But, it is extra effort after all)   What we can do is this, apt-cache --no-all-versions show $package | grep '^Size: '   E.g: apt-cache --no-all-versions show qtoctave | grep '^Size: ' Size: 3891520 The size is in bytes. Ubunut Version: 12.04 LTS

Solving Ubuntu - Android unable to send file over bluetooth from phone to Dell Vostro Laptop

I have Ubuntu 12.04 LTS on my Dell Vostro laptop. I am able to send files over bluetooth from my PC to my Android mobile but not vice versa even though the two devices are paired.The file transfer just fails with " File Not Sent " message. The problem is the option to receive files is disabled in the gnome-file-share-properties of Ubuntu. To access this dialog open the terminal and type  gnome-file-share-properties Please note that you might be able to change the property if you are using the dialog as a root user.You need to be a non-root user for this. You just need to check the option for " Receive files in Downloads folder over Bluetooth " and it is done.

How a Linux System boots. What happens when you push the power On button...

Booting is a process when a computer system initializes itself and loads the operating system(OS). So what happens during a boot process on a Linux machine ( this post is relevant to Ubuntu, however most systems would do similar steps ) ? When you push the power on button, the BIOS (Basic Input/Output System) loads from the ROM present on the motherboard BIOS It launches the Power On Self test (POST) which involves starting the hardware specifically the screen and the keyboard and testing of the RAM i.e. main memory   Boot Loader Once the POST completes, the boot loader takes over. The boot loader is present on the hard disk and for Linux systems the common ones are GRUB and ISOLINUX . Depending on the type of system i.e BIOS/MBR or EFI /UEFI the location of the boot loader varies. For the former it is present at the boot sector and for the latter it is in EFI partition Common boot loaders for Linux are GRUB and ISOLINUX.The boot loader is  responsible for l...