Login

Jump to:

Initial Installation
Numlock On
Installing Teamviewer
Installing Java Runtime Environment
Installing Spotify
CCleaner Alternative
Useful Stuff
Search for package or package description using the apt command
List all available Hard Drives and Partitions
Game Tiiiiiiiiiiiime
List devices
Checking temperature sensors from Command Line
Sharing Linux folders for Windows machines
RSSOwl - A Cool RSS reader
How to Disable Home Folder Encryption After Installing Ubuntu
Resolving "the disk drive for /dev/mapper/cryptswap1 is not ready yet or not present" error during boot up.
Dropbox for Linux
Auto-mounting a Windows partition on each restart.
Installing PopCorn Time using a PPA.

Initial Installation.

First of all, one problem I had is when Ubuntu Installation launched there was no backlight. The first try was with ubuntu version 12.04. When I tried installing Ubuntu 13.10 I didnt' have this issue. Here is a simple fix for versions that do have this:

When you boot the disc or usb drive and you see the "Purple Ubuntu screen" or Ubuntu splash, right away, hold the Fn button and dim your screen brightness then brighten it back up. If you forget to do this and the splash (or purple screen) is gone then the backlight wont probably work.

Once ubuntu is installed and you boot from the HDD, do the same when you boot Ubuntu. When you see the purple screen, right away Hold Fn button and dim the screen down and up.

Second issue was that I couldn't adjust the backlight when Ubuntu booted normally. To fix this and make Ubuntu turn the backlight all the way up follow this:

Open terminal (CTRL+ALT+T).
Type in:

gksudo gedit /etc/rc.local

and hit enter.

Find the line "exit 0".

Above exit 0, paste the following line:

setpci -s 00:02.0 F4.B=00

Save the file and exit Gedit. If you get a popup message the "untitled document" isn't saved, ignore it and close without saving.

This fix will automatically make the backlight turn on upon boot.

Now to ensure you can adjust your backlight once Ubuntu has booted:
In terminal, enter the command:

sudo gedit /etc/default/grub

In the file, find the line: GRUB_CMDLINE_LINUX=""

Change that line to: GRUB_CMDLINE_LINUX="acpi_osi=Linux"

Save the file and exit gedit. If you get a popup message the "untitled document" isn't saved, ignore it and close without saving.

Now in terminal, type the command:

sudo update-grub

Wait for the process to finish then exit terminal. Reboot your PC.

Once rebooted, you will notice the purple screen, but you don't need to adjust your backlight this time. Backlight may go out during the boot process but it will turn back up.

A couple of things to consider:
What I realized after these changes is that the Brightness Bar is not displayed inside Ubuntu when playing with the brightness. For some users, the backlight still won't automatically turn on. You can however use the brightness controls after Ubuntu is booted to turn the backlight on. If after applying all the above changes, the backlight won't turn on:

In the terminal type:

gksudo gedit /etc/rc.local",

find the line "setpci -s 00:02.0 F4.B=00" and change it to "setpci -s 00:02.0 F4.B=FF". (without quotes). Save and reboot.
Also, you'll notice if you go into standby (and I think Hibernate as well), the backlight will probably be off.
For some users, the backlight keys will be backwards. Mine aren't, but some users' are. It's not that big of a bug. 


Numlock On

I use the numpad that I'm fortunate enough to have on my laptop enough and I noticed that it was not on each time I booted my machine up. A few google searches later this solution came up from the Ubuntu Community page:

Enable Numlock on Login

System Settings > Keyboard Layout > Options > Miscellaneous compatibility options

Check "Default numeric keypad keys" 

This setting takes effect after Login and has no effect at the Login screen or consoles. (couldn't find this on Ubuntu 13.10)

Enable NumLock during startup

Enabling Numlock on startup can be done of several different ways. First install numlockx:

sudo apt-get install numlockx

Place command with init scripts

sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& numlockx on\n\nexit 0|' /etc/rc.local

Installing Teamviewer.

Download the .deb files directly from the Teamviewer website and install them through the Ubuntu Software Center (just double click it and USC will start).


Installing Java Runtime Environment.

The best practice for this is to just download the packages from the respective sites and install through the .deb with your preferred method:

http://apt.ubuntu.com/p/openjdk-7-jre (the JRE file)
http://apt.ubuntu.com/p/icedtea-7-plugin (the Browser Plugin)

I used the command line version:

1. sudo apt-get install openjdk-7-jre
2. sudo apt-get install icedtea-7-plugin

Installing Spotify.

For Spotify to install correctly, add the repository, add the key, update and then install the client by copy-pasting the following lines on the terminal:

1. sudo add-apt-repository "deb http://repository.spotify.com stable non-free"
2. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59
3. sudo apt-get update
4. sudo apt-get install spotify-client

CCleaner Alternative.

Being a strong Windows user since Windows 3.11 (!!!) I'm experimenting with lots of different applications on this platform. CCleaner is my favorite one. Yes it hides my dirty laundry but other than that it keeps my TMPs neat and tidy ... way too often (thank you for that Microsoft). Trying to find an alternative for Linux I discovered the perfect one:

Open up the terminal and paste:

sudo apt-get install bleachbit

After installation run it and choose your cleaning options carefully. Run a preview to see what will get cleaned and the clean it if you are satisfied. Use the "Root" version if you get any errors while cleaning.


Useful Stuff.

At some point I needed to add some extra memory. And since I'm a lazy a$$ I didn't want to shutdown the PC, turn it over and unscrew everything to find what type of RAM was pre-installed. I remember using the CPU-Z software for Windows which was absolutely amazing so I started a new journey to find something relevant for Linux. Here are some good (but not really "there") alternative.

1. CPU-G

Simple installation

sudo add-apt-repository ppa:cpug-devs/ppa
sudo apt-get update
sudo apt-get install cpu-g

2. I-Nex

sudo add-apt-repository ppa:nemh/gambas3
sudo add-apt-repository ppa:i-nex-development-team/stable
sudo apt-get update
sudo apt-get install i-nex

3. Built-in command line option

sudo dmidecode –type memory

Search for package or package description using the apt command.

Some times you don't know package name but aware of some keywords to search the package. Once you got package name you can install it using apt-get -i {package-name} command:

apt-cache search "Text-to-search"
apt-cache search "httpd"
apt-cache search "web server"
apt-cache search "web server"| grep something

List all available Hard Drives and Partitions.

Open up a terminal aaaaaaaaaaaaand:

sudo fdisk -l

Game Tiiiiiiiiiiiime.

Linux in General is not very famous for its gaming enthusiasts. But ... you can easily remember these old amazing console games where one extra live could make a real difference. So here's how to simply emulate them on Ubuntu.

1. SNES (Super Nintendo Entertainment System)

The most straightforward Emulator I've found is the ZSnes. It already exists on the default repositories so:

sudo apt-get update
sudo apt-get install zsnes

and I've seen that one more library should be installed:

sudo apt-get install libsdl1.2debian 

List devices.

At one point I needed to list the interfaces on my Laptop exactly as they are mentioned on Ubuntu for an application that ask specificly for that names. So here are some commands and their results.

  1. lspci command - List all PCI device including Ethernet cards (NICs).
  2. ip command - Display or manipulate routing, devices, policy routing and tunnels on Linux operating systems.
  3. ifconfig command - Display or configure a network interface on Linux or Unix like operating systems.

e.g.:

lspci
lspci | grep -i eth

Using the grep option we get all results that have "eth" in any part of the line and -i switch ignores the case. In this example it is "Ethernet" instead of "ethernet" so without -i there would be no result as there is no lower case "eth". So here is how it looks on my PC:

$ lspci |grep -i eth
05:00.0 Ethernet controller: Qualcomm Atheros AR8132 Fast Ethernet (rev c0)

But wait ... I have an amazing Wireless Device in my Laptop also. Where is it? Here comes the solution:

ip link

It should look something like:

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Win situation right? Here's another simple command for quick results:

ifconfig -s -a

Here we use the ifconfig command to list the Status (-s) of All (-a) Network Interfaces present.


Checking temperature sensors from Command Line.

Install lm-sensors

sudo apt-get install lm-sensors

After installation type the following in terminal

sudo sensors-detect

You may also need to run:

sudo service module-init-tools start

Answer Yes for all questions that will follow.
At the end of sensors-detect, a list of modules that needs to be loaded will be displayed. Type "yes" to have sensors-detect insert those modules into /etc/modules, or edit /etc/modules yourself.

 

Finally to get your CPU temperature type:

sudo service kmod start

to read the changes made by sensors and insert the modules into the kernel and type

sensors

Output:

acpitz-virtual-0
Adapter: Virtual device
temp1: +51.0°C (crit = +110.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +49.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +49.0°C (high = +105.0°C, crit = +105.0°C)

To see HDD temperature Install hddtmp

sudo apt-get install hddtemp
sudo hddtemp /dev/sda /dev/sda: ST320LT007-9ZV142: 39°C

 Sharing Linux folders for Windows machines.

It used to be quite a journey to do this. Installing Samba, changing the configuration for some files etc etc. Now it's much more simple by doing these easy steps:

  1. Decide which folder you want to share.
  2. Right Click and Select "Sharing Options"
  3. On the Pop Up Windows click on "Share this folder"
  4. If some dependencies and/or software is missing you will be prompted to install them so just do it if there is need to.
  5. You will possibly need to restart after the installation in order for the sharing to work so hit Restart.
  6. From the Windows machine hit Start + R and \\linux-IP and you should see your share.

RSSOwl - A Cool RSS reader.

Everybody loves a good newspaper. Too 1990's though no? Here comes the RSS News Feeds and with the RSSOwl you can have all of your favorite news with a single click. Here's how to install it through the Terminal using the GetDeb repository(CTRL+ALT+T)

sudo wget -c http://archive.getdeb.net/install_deb/getdeb-repository_0.1-1~getdeb1_all.deb
sudo dpkg -i getdeb-repository_0.1-1~getdeb1_all.deb
sudo apt-get update
sudo apt-get install rssowl

How to disable home folder encryption after installing Ubuntu.

The process involves

  1. Backing up the Home Folder
  2. Removing the original Home Folder
  3. Removing the Encrypted information from the backup folder
  4. Removing the Encryption tools from Ubuntu
  5. Copying back the backed up folder.

Easy as 1-2-3 ... 4 ... 5 ... aaaaaand 6 if you include the logging back in with your user name to see if everything is working.

1. To create the backup copy, launch a terminal while you’re logged in and run the following command, replacing user with your username:

sudo cp -rp /home/user /home/user.backup

The -rp options here tell cp to copy the directory recursively – that is, copy everything inside it – and to preserve the file ownership and permission information. Open the /home/user.backup directory on your system and verify that the backup was created successfully. All your files should be there.

2. You can’t remove the encryption while you’re logged in, so you’ll have to switch to a different user account first. The simplest way to do this is by creating another user account with administrator (sudo) privileges. Log out from the panel after creating the other user account. Select your temporary user account on the login screen and log in. fire up a terminal and run the following command to delete your current, encrypted home directory. Be sure you have a backup before deleting the home directory! And be careful when running sudo rm -rf commands – these can quickly delete important files if you’re not careful.

sudo rm -rf /home/user

(Remember to replace user with your username.)

3. Delete the .ecryptfs folder in your backup folder. The encryption utilities won’t uninstall until you delete this folder.:

sudo rm -rf /home/user.backup/.ecryptfs

4. Remove the encryption utilities from your system:

sudo apt-get remove ecryptfs-utils libecryptfs0

5. Finally, restore the unencrypted backup of your home directory to its original location:

sudo mv /home/user.backup /home/user

Your home directory is now unencrypted. You can log out (or restart your system) and log in normally. You may want to delete the temporary user account from the User Accounts window.


 

Resolving "the disk drive for /dev/mapper/cryptswap1 is not ready yet or not present" error during boot up.

I always saw this error while booting but didn't actually have any issues within Linux. After I formatted and reinstaled my Windows (thank you Linux for not making me format you every other month), I noticed that during boot it asked me to press "S" if I wanted to continue! Frustrating as trying to clear the bottom of your Nutella jar I know. It probably has to do with the fact that I swapped the Hard Drives' physical place on the motherboard. What used to be "sda" is now "sdb" and vice versa but anyway this should apply for all relevant "cryptswap errors" OK here are the steps:

  1. Open a Terminal window (Ctrl+Alt+T) or a virtual console and run: sudo swapoff -a
  2. Open /etc/crypttab (e.g., sudo nano -w /etc/crypttab or sudo -H gedit /etc/cryptab for a GUI editor) and put a # at the beginning of the line that starts with cryptswap1. Save the file.
  3. Do the same thing with the line that starts with /dev/mapper/cryptswap1 in /etc/fstab.
  4. Install gparted (sudo apt-get install gparted). Run it and format your swap partition as linux-swap. Make sure to get the right partition; if you get the wrong one, you'll lose possibly important data! The line you commented out in crypttab should give the correct partition name (it comes right after /dev/).
  5. Run sudo mkswap /dev/sd# repacing # with that same device name. Part of that command's output should be text that says UUID=*** where *** is a string of letters and numbers.
  6. In the file /etc/initramfs-tools/conf.d/resume, find the line that says RESUME=UUID= followed by letters and numbers like (but not identical to) *** from the last step. Replace them with *** (i.e., with the letters and numbers mkswap gave after UUID=.
  7. Run sudo update-initramfs -u
  8. Run sudo swapon /dev/sd# (with the same /dev/sd# as you had in steps 4 and 5 above).
  9. If you want to re-encrypt it run sudo ecryptfs-setup-swap.
  10. Finally run swapon -s will check to see if swap is successfully enabled.

 Dropbox for Linux

Just a note before explaining everything. Installation didn't go well 2 out of 3 times I tried. But here it is:

Go to the official https://www.dropbox.com/ site and hit download in the top right corner. It will automatically sense that you are a Linux rebel so it will give you the relevant distros and package to download. Since we're in Ubuntu here, I'm choosing the Ubuntu .deb file and the correct architecture of 32 bit since my inntallation is 32 bit. Save the file and run it by double clicking it inside the folder you saved it. This should open the Ubuntu Software Manager and suggest you should install the software. So hit install and wait for it to finish. The next step is a bit foggy since I did the installation a while back and I can't exactly remember how it went, but it will certainly ask for a nautilus restart in order for the daemon to function properly. This is where everything started to fall apart in the first 2 installations. The restart never completed successfully and my Dropbox could never connect. Finally I made it and everything is working fine now.


Auto-mounting a Windows partition on each restart.

First of all let's determine what type of File System our Windows partition uses by:

sudo fdisk -lu

Read between the lines and you should see your Windows partitions with the information we need:
Device Boot Start End Blocks Id System

Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 718847 358400 7 HPFS/NTFS/exFAT
/dev/sdb2   718848 625137663 312209408 7 HPFS/NTFS/exFAT

See? I told you this would happen. It looks like you have two beautiful NTFS partitions right there. But wait. I don't like the look of the first one. It has Boot written all over ... and the Blocks (KBytes) suggest this is too small. It is! This the Boot Partition Windows creates during the installation so you can just ignore it. There is nothing in there that should matter to you.

So now that we understood the fdisk use for this particular situation, let's forget about it and move to the actual command that will give us even more important information. I know I tricked you ... wanna fight about it?

sudo blkid

/dev/sda6: UUID="c92bfca1-8fb7-4ec8-91ef-27033eec8b58" TYPE="ext4" 
/dev/sdb1: LABEL="System Reserved" UUID="F00073020072CEDA" TYPE="ntfs" 
/dev/sdb2: LABEL="Windows 8" UUID="CE46791F46790A0B" TYPE="ntfs"

There, do you see it again? It's the same sdb1 Device but now you see the label: System Reserved. We don't want that do we? Let's keep our Windows 8 partition. Take a note of the UUID because we need this.

You will now need to create a mountpoint for each NTFS partition that you wish to mount. We are going to add one entry only for /dev/sdb2. From a terminal:

sudo mkdir /media/Windows

 You can of course choose a different name: Data, Mother, Father, UseTheForce, PeanutButterJellyTime ... 

Now comes the tricky part. Editing the fstab file. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system's file system.

Make a copy of the current fstab:

sudo cp /etc/fstab /etc/fstab.orig

Edit:

gksudo gedit /etc/fstab

If you get an error / warning that the gksudo command is available through the apt-get command then download it with (I think) the following command:

sudo apt-get install gksu

Now paste the following on your fstab end:

UUID=CE46791F46790A0B  /media/Windows  ntfs-3g  defaults,windows_names,locale=en_US.utf8  0 0

replacing the UUID and other info with your own.

Now save the file and run:

sudo mount -a

If you want to disable mounting the specific Partition from within Nautilus then change the above fstab line to this:

UUID=CE46791F46790A0B /mnt/Windows ntfs noauto,umask=222 0 0

Which actually means that you have to create a Mountpoint folder inside /mnt and not /media as we did.

For a FAT32 Partition a general line should be:

UUID=CE46791F46790A0B /media/Windows vfat defaults,user,exec,uid=1000,gid=100,umask=000 0 0

This would make all of the files executable but ... OK. Why not?

The only reason I wanted this is so I could direct Dropbox to Sync all files on the Windows folder so that I don't have a duplicate 8GB Dropbox folder while using an SSD for my Linux.


Installing PopCorn Time using a PPA.

To add the WebUpd8 Popcorn Time PPA and install the app in Ubuntu / Linux Mint (and elementary OS along with Ubuntu derivatives: Xubuntu, Kubuntu, etc.), use the following commands:

sudo add-apt-repository ppa:webupd8team/popcorntime
sudo apt-get update
sudo apt-get install popcorn-time

 

Go to top