Tag Archives: Ubuntu

Auto Mounting Drives in Ubuntu

If you are using Ubuntu in dual mode with Windows you must be having a few partition that are NTFS. By default these NTFS drives are not auto mounted. So while you have the partitions, you won’t be able to access them if you don’t mount it.
As you already may know that in Ubuntu (and Linux in general) there are no drives. Combine it with the fact that the root directory starts from a forward slash (/). Every drive in Linux is ‘mounted‘. So when you insert a DVD disk the content of the disk may be mounted to a directory /media/username/DvdLabel. Here DvdLabel is the name of the mounted directory which was taken from the label of the disk.
Similarly if you have a partition with the label, say, Documents when you click the Documents partition, it is then that the Documents partition (or drive) is mounted to /media/Documents.
By default Ubuntu doesn’t mount the partitions when it starts. You have to click the partition in Nautilus (or Files, the file explorer) once so that it can be mounted. This can be irritating since when an application starts which requires a partition they will result in error. Eg, if you have set dropbox to sync to files to Documents drive or Transmission to download files to Multimedia drive.
You can make these NTFS drives automount with Ubuntu by various method as described in this page. But its a long and complicated read. So here is the method explained simply.

Find out Label and UUID

First you need to know the exact Labels and UUID of the drives. Consider UUID (Universally Unique Identifier) as a unique identifier for the drive which will never change (unless you format the drive, re-partition it, or manually change it). To know the Label and UUID you need to use the command blkid command. This command when used with sudo will give you a list of all the partitions along with its Label and UUID. Like below:

vyom@VyomNix:~$ sudo blkid
[sudo] password for vyom:
/dev/sr0: LABEL="Alpha_0515" TYPE="udf"
/dev/sda1: UUID="30986b83-1234-4eeb-a30a-482223df145f" TYPE="ext4"
/dev/sda2: LABEL="WinServer" UUID="3F1234AB1233423C" TYPE="ntfs"
/dev/sda3: LABEL="Recovery" UUID="A12345E12345AF1B" TYPE="ntfs"
/dev/sda4: UUID="0659-9A568" TYPE="vfat"
/dev/sda6: UUID="b1234321-ad5f-4ddd-89ac-eed1234c56c7" TYPE="swap"
/dev/sda7: LABEL="Digital" UUID="33FA6E12GA6DF687" TYPE="ntfs"
/dev/sda9: LABEL="Entertainment" UUID="123FHE3E3N98BF65" TYPE="ntfs"
/dev/sda10: LABEL="Documents" UUID="37MME50B21B7C65B" TYPE="ntfs"
/dev/sda11: LABEL="Spare1" UUID="654EF123456CAF7E" TYPE="ntfs"
/dev/sda12: LABEL="Spare2" UUID="68D774EB5DBFPOOI" TYPE="ntfs"
vyom@VyomNix:~$

Continue reading Auto Mounting Drives in Ubuntu

Creating a Startup Application Script in Ubuntu

If you are new to Ubuntu and have installed various softwares, eventually there comes a time when you want the applications to start automatically just after the system boots.
Following are two ways to add applications to startup list. First is Windows method, while the second method is geeky way (as you must have guessed, it’s my favourite).

Easy method

Just like Windows have a startup folder where you can place shortcut files and which would let you start the applications when user logs in, in Ubuntu there is a ~/.config/autostart folder where you can place the shortcut files. (Just to recall ~/ is your home folder. So ~/.config = /home/username/.config).
You can also use the Startup Applications tool (ships inbuilt with Ubuntu) which lets you add startup applications to that folder. Shortcut files in Ubuntu are files which ends with .desktop. The folder where you can find most of the .desktop files is /usr/share/applications. So you can just find the desktop file related to the particular application and copy the .desktop file into the ~/.config/autostart folder.
If you want to start the application for every user then you would need to copy the .desktop file in /etc/xdg/autostart folder.

Starup Applications Folder and Tool
Autostart Folder on the left and Startup Applications Tool on the right

Continue reading Creating a Startup Application Script in Ubuntu

How Ubuntu screwed me over and why I still love it

As humans, memories have a special place in our heart. Nothing can prepare us if something goes wrong and god forbid you lose them. It’s hard but imagine losing months of snaps that you shot over the trips you made across city or continent, documents accumulated over the course of your research on some project, also those rare songs and movies you got your hands on. It could be a frustrating experience if you didn’t have a backup of the data you lost.
Something like that happened with me over the last week. I was playing with Ubuntu Operating System from last few months but in a virtual environment. On one fine weekend I thought I am ready to finally install Ubuntu 14.04 LTS on a dedicated partition and to use it as my primary OS. I created a bootable USB and rebooted PC. Ubuntu asked me if I want to “Replace the OLD Ubuntu” with the new one. I thought, “Ok, Cool, sure do. I don’t need old Ubuntu”. And it did remove old Ubuntu and nicely completed the rest of the installation.
When the Unity desktop showed up, it was all too familiar since I have been working on it for quite some time. Except when I tried to watch an episode of “The Flash” kept on my Multimedia drive. I couldn’t find it. I was like, “Why isn’t my other drives showing up? Are those not mounted?”. I was use to unusual things over my time with playing Ubuntu in virtual environment. But nothing could prepare me for what lay ahead. It was when I opened the “Disks” application that the reality hit me hard. Ubuntu had not only replaced old Ubuntu, but it had also wiped the existence of every other partition and the data along with it while installing itself.
Do you know that feeling? At first you feel numb. You think, “WTH just happened?“. The denial phase, “No, it can’t be happening”. Then the shock overtakes you. “NOOO, MY DATA!”. It soon turns into rage, “WTF Ubuntu, HOW CAN YOU DO THIS?”. You try to remember,“Did I do something wrong?”. Then you realize you didn’t. You just selected the automated install as opposed to let you choose your own partition. It’s then when you realize you DID made a huge mistake by choosing the automated install. Finally, you try to remember when was the last time you did a backup. Eyes wide open, “It was long time ago!“.
I had backed up my data about 3-4 months before. 3-4 months was a long time. A lot had happened since then. “I must have my data back”, I thought with a determined look in my face. The following week I used my secondary PC to recover the data back from the HDD using application known as MiniTool Power Recovery. It took it’s time. Juggling day job in the morning I only had nights to work on the recovery. Complete night to scan for partitions and data. Next two nights to actually recover the data. Another night to make sure I had not left anything else.
As I found out later that Ubuntu wiping out whole of the physical HDD and all its partitions without so much so as a warning “You are going to loose ALL YOUR DATA”, was actually a bug in the version I was using: 14.04.1. This bug was discovered about a year ago and all it required to fix it was probably just to reword the statement “Replace Old Ubuntu” with something like, “All your disk is going to be wiped out. Please make sure you are not installing this OS while drunk”. Let me tell you, that would have made a lot of difference. Had Ubuntu said something like that, I could have chosen the custom install instead. This bug was recently fixed in the update 14.04.2 but only after making a lot of people who trusted “automated install” to get pissed in the process.
Anyway, what happened couldn’t be roll backed. But I did manage to recover all my data. Though all the software that I had accumulated as giveaways were lost, along with all the customization that I had on my Windows Server 2008 R2 OS, but those can be acquired again.
This incident taught me quite a few important lessons. Of course the first one is not to trust “Automated installations”, especially when it comes to installing a complete OS. Other was to keep regular backups. Importance of cloud backup is especially important considering that it happens automatically once you set it up.
Let’s see what things I had already backed up. I had all my:

  • Documents backed up to Dropbox,
  • Firefox Add-Ons/Passwords backed up via Firefox Cloud,
  • Firefox Speed Dials backed by via EverSync cloud backup,
  • Other Multimedia related stuff like, Movies and Pictures (until last year) backed up to external HDD.

So, the recovery program allowed me to recover all the data that was not synced to the cloud, and which probably couldn’t be synced either since those were very large files (especially with the kind of quality of Internet that we get in our country).
With recent accident of unlocking my phone’s bootloader without taking backup, this incident of wiping my PC off, April has been one hell of a month. And it’s not over yet. So I will try not to bite more than I could chew for the rest of the month.
In the end, Ubuntu did screw me over but it was mostly my fault. I takeaway a lot from this experience. Had I not faced it, I would probably be less careful while experimenting on Ubuntu. And that’s why I have started to like Ubuntu even more for it taught me that software isn’t perfect. To always have a backup plan is probably the best way to keep yourself and your data, out of harm’s way.

Concept of Installing Applications in Ubuntu

Until now we have discussed how to install Ubuntu, concepts around files, keyboard shortcuts to navigate easily and various ways to customize Ubuntu with Gnome shell. Today I am going to discuss how to install applications in Linux along with the various ways to do them, and will end with a special note that would explain how “running” applications in Ubuntu is fundamentally different than Windows.
You must be used to installing softwares in Windows by downloading .EXE files or .MSI installers. You open these files and click Next -> Next and viola. Installing applications in Ubuntu is a bit different and safer than Windows in some cases. But before we get into the steps its important to understand the concept of Packages in Ubuntu.

What is a Package?

A package can be considered a collection of files bundled into a single file. Package contains among other things, the installation script which tells where the files will be copied and what settings needs to be changed once the package is installed.
In essence, the output of a package is equivalent to .exe or .msi installers, that is they install a software on the OS. There are many ways to install a package on Linux. You can install a package using Package manager which itself are categorized in Low-Level and High-Level package managers. You can also download packages over the Internet and use it to install it on the system (more on this later in this article).
Low level package managers are dpkg (for Debian based Linux like Ubuntu) and rpm (for SUSE and Fedora). While high level package managers are apt-get (for Debian), zypper (for SUSE) and yum (for Fedora).
Packages can depend on other package to be installed first. Say if you want to install some software which was written in PHP, you may need to install the PHP package first. This concept is called dependency and is usually taken care of itself if you are using a high level package managers.

Advanced Packaging Tool (APT)

The underlying package manager in Ubuntu (or any Debian based Linux) is APT. You can use the command apt to install or remove packages on your system. APT is also used in background in GUI based package managers like Ubuntu Software Center and synaptic.
EDX have a pdf which lists some basic commands to using package managers. Download it here.

What is Source and Binary?

Continue reading Concept of Installing Applications in Ubuntu

The User Experience of using Ubuntu

In previous articles we installed Ubuntu, learned how to use Gnome shell on Ubuntu and customize it as per needs. In this article I would be dealing on some more points which makes it easier to understand the aspects of Ubuntu for those who are still deeply wrapped up in the world of Windows. Then we will learn how you can use keyboard shortcuts to improve the User Experience of using Ubuntu. In the end we will see how you can use built in ways to help yourself if you ever needed to learn more about Ubuntu and Terminal commands.

Philosophy of Linux over Windows

There are a few structural changes one notices when they migrate to Linux based OS like Ubuntu as compared to Windows. Following is a list that explains some of them:

1. Disk System

In Windows each partition of the HDD is referred as Disk1, Disk2 etc. While in Ubuntu it is termed as sda1, sda2. Here sda stands for one physical hard disk. And sda1 stands for Storage Device “A” partition 1 on a single physical HDD.

2. File System Type:

Filesystem is a way for the OS to keep the data on the HDD and a way to access it. Windows user would be familiar with NTFS and FAT32 but on Ubuntu, EXT3 or EXT4 is used primarily while EXT2 and XFS are also common.

3. Drive Naming Convention:

In  Windows people are too familiar with drives named on alphabet like C, D, E and F. It’s the C: drive which is the root drive and where OS is installed. Ubuntu is radically different  where the naming convention is considered.
In Ubuntu, root is a single forward slash. That is, “/“. So suppose I create a directory (another term for “folders”) called home in the root folder. The path for that would be /home.
Due to this convention, the way removable drives are handled is also different in Linux. A CD you insert with label projectone in the CD drive will be “mounted” and can be accessed from say, /media/username/projectone.
Lastly, in Linux, file and folder names are case sensitive. So, /home/user is different from /home/User and /home/USER.

A typical Directory Structure in Linux
A typical Directory Structure in Linux. Image Courtesy: edx.org

Continue reading The User Experience of using Ubuntu

Making Ubuntu Personalized with GNOME

Until now we got familiar with Ubuntu and know how to install updates and softwares, as well as know how to use a few commands using Terminal. And now that we know what is Unity and the Unity bar, it’s time to dump it! Seriously, there are cooler alternatives out there. One such alternative is GNOME. GNOME was native part of Ubuntu until a few versions ago. But Canonical switched it for Unity later. And while Unity may provide a very good shell I don’t think it’s on par with modern era.
In this guide I will install GNOME  and write about how to customize it with extensions.

GNOME:

GNOME shell provides a fully customized UI on top of Ubuntu. Consider a shell akin to a completely new theme in Windows, except, shell is much more than just a theme. It actually is a complete Desktop Environment (DE) and contains completely different and sometimes a unique set of features which other shell lacks.
Unlike Windows, you can  choose to use any DE right before you login from the login page. So while one user might be using Unity, you on the same Ubuntu can use GNOME. I should warn though that GNOME is a little heavy on resources than Unity, but it’s beautiful and that there are some sacrifices which have to be made for “elegance”. Without wasting more time lets just install GNOME and see it in action.
To install GNOME run following command on Terminal (again Ctrl + Shift + T) while entering password when asked:

sudo apt-get install gnome

This will install a bunch of packages (around 500 MBs) which are included in GNOME by default. Continue reading Making Ubuntu Personalized with GNOME

Ubuntu: Updating and Setting up Softwares

In my last article I wrote about my first impressions of freshly installed Ubuntu 14.04 and shared what I knew about Unity interface which Ubuntu comes bundled with. Today I am going to update the OS and install various softwares. You can follow the steps to replicate the same on your copy of the OS or skip a few steps as per your requirements.
Installing updates is the first thing which one should do after installing a fresh copy of Ubuntu. Updates may include feature enhancement or security bugs. There are two methods to update Ubuntu. For first you can press “Dash Home” button on top of the Unity bar and type update, then select “Software Updater“.

Software Updater
Software Updater
Software Updater Checking for Updates
Software Updater Checking for Updates

This would check for updates and give you an option to install the updates right away. But there’s no fun in that. And I on the other hand will use more traditional way to update my OS… Continue reading Ubuntu: Updating and Setting up Softwares

Ubuntu: The Stage is Set

So we have installed Ubuntu in a Virtual Environment and know that some (or a lot) of the things in Ubuntu differs from windows, like filesystem and how removable drive works. In this article I will be starting from a fresh install of Ubuntu and try to get familiar with the User Interface. In the upcoming post I will proceed to set it up with softwares and settings.
I will literally be writing this article “while” I am using my PC, so this is not just a guide but more of a walk-through. Hence, please excuse my remarks which I sometimes make to emphasize my excitement (or disappointment) when I discover something.
Here’s what a freshly booted Ubuntu looks like:

Freshly booted Ubuntu
Freshly booted Ubuntu

We can notice a few things now:

  1. The taskbar is above the screen. It have the text “Ubuntu Desktop” written in right side of the taskbar. It also includes some icons on the top right corner including a clock and an icon on extreme right which looks like “Settings” icon.
  2. Unity bar which runs across the left side of the desktop, containing some icons of softwares like Firefox, Libre Office and System Settings. You will also notice an icon of Recycle bin down below.
  3. Rest of the screen is just plain desktop with no other stuff than default Orange wallpaper.

Now that we know about these three things, we would like to know how does these differ in functionality. Nice! Now we are getting into the good stuff …
Continue reading Ubuntu: The Stage is Set

Stuff I do in Windows that needs an alternative in Linux

In my previous post I said I would be looking an alternative in Linux for everything I do in Windows. Here’s an initial list of the applications that I am finding an alternative to. I would be updating this post fairly regularly, adding more things to the list and their alternatives, until I am confident that I can plan to make Ubuntu as my primary OS.
 

Softwares Type Alternative in Linux
Which have Nix versions
Firefox Browser Firefox
F.lux Screen Dimming app F.lux
Dropbox File sharing Dropbox
Telegram Chat application Telegram
VLC Player Video Player VLC
Steam Gaming software Steam
Which have no Nix Versions
Garena Gaming LAN client NA
Raptr Gaming Client NA
Which have good alternatives
uTorrent Bit torrent application Transmission
Everything Real time file search Locate command in Terminal
Nettalk IRC Client XChat
Microsoft Office Picture Manager Picture editor Shotwell or GIMP
Wordweb Dictionary GoldenDict
Netmeter Record of consumed bandwidth Conky comes closest
IDM Download manager uGet
Google Talk Google chat application EmpathyIM
Winamp Music Player Rhythmbox or Banshee
MS Office Office Suite LibreOffice or Wine
Where no alternative is needed
BullZip PDF Printer Not Needed since ubuntu have built-in PDF Printer
PuTTY SSH and Telnet Client ssh and telnet command on Terminal
FileZilla FTP Client ftp command in Terminal
Code::Blocks C, C++ Programming IDE Use GCC from Terminal or Emacs
To Be Decided
MS-Paint Pixel level bitmap picture editor

Apart from the applications, there are other things which a particular Windows user gets adapt to:

  1. Custom Keyboard Shortcuts: As per current info it’s possible to set custom Keyboard Shortcuts in Nix easily.
  2. Ability to create apps shortcuts:
  3. Background apps and a System Tray:
  4. Window Switching: From what I know now, switching in Nix is cooler and more functional than windows. Shortcut to use it is “Home key” + “W”.
  5. Autostart Apps: Ability to let the apps start automatically  when OS boots by putting the app in something called as StartUp folder.

When the softwares and UX is sorted out next thing which comes is understanding some lingo of Nix which might be totally unfamiliar to newbies in Linux:

  1. Filesystem: Nix don’t have the concept of Drives like C, D or E. Rather everything in Nix starts from the root. “\” is root folder. Hence path to your home folder can be, “\home\vyom” which means “vyom folder inside home folder of root folder”.
  2. Mounting of drives: Any DVD or removable USB drive you insert is mounted to some folder inside root folder. <insert example>.
  3. Installing Apps: Nix don’t have .EXE files rather it have various ways to install apps.
    • apt-get install <softwarename>
    • TAR Packages

Expect revision to this post to reflect new information soon.

Ubuntu: Beginning my Walk on Uncharted Territory

I had a long awaited dream of migrating from Windows to Linux. I was exposed to Windows since more than a decade and made aware of Linux a lot later. But when I did, sheer glimpse of Linux use to make me feel all geeky inside, but I never really gave Linux a chance. I was too engrossed by the ease of use of Windows and just-reinstall-windows as the default option to get out of any misery I face in Windows. Till the time I get to know the real power of Linux in the form of Ubuntu and the general open source nature of it it was very late. I had become so dependent on Windows for my daily tasks that I started to avoid Nix for all the reasons.

Now I have finally decided to give Linux (in form of Ubuntu) a fair trial. But instead of installing it on a dedicated drive I decided to virtualize it so that I can use both Windows and Linux till the time I become proficient in Ubuntu.
Installing Ubuntu on VirtualBox would have been a breeze had I followed this guide (created by my friend Aaruni, which I had to recover from archive. Or this for an updated article). But alas I came across his walk through a bit late and also came across this problem of not getting to install 64 bit Ubuntu on VirtualBox. But thanks to the suggestion provided here, I managed to solve it without spending hours. The summary of the problem was that I had to disable “Virtualization” from “Turn Windows Features On or Off” since it conflicts with the “Enable Virtualization Tech” turned ON in BIOS.

So now, here I am publishing this post from within Ubuntu 14.04 and exploring the world of Linux without completely abandoning my comfort zone of Windows. But I Intend to make Ubuntu my primary OS in a few months until I can learn every nooks and cranny of this seemingly giant but not completely unknown territory that is Ubuntu.
I also intend to document my journey of using Ubuntu from a perspective of “oh-I-am-a-Windows-guy-and-I-want-to-work-on-Nix-but-not-sure-of-how-to-do-certain-things-that-I-use-to-do-in-Windows!” kind of guy. Hence I would be looking for “every” alternative of things in Ubuntu that I am so use-to in Windows from tools to shortcuts to the whole User Experience. It will be an exciting journey and something to look forward to but in the end worth doing.