Wednesday, 19 December 2012

Install "Foto" image and album Manager app in elementary os luna

"Foto" is a new elementary style image and album viewer app. It is very light weight when compared to  shotwell - the default image and album viewer app of elementary. As you know, I'm using a daily build of elementary os and I had upgraded it. But before completing the upgrade, I computer got switched off and the update failed. Then I found that one of the dependency of shotwell is causing the issue and I'm not able to run the update or install any other packages.

Tuesday, 4 December 2012

How to fix "Cannot establish any listening sockets - Make sure an X server isn't already running" error in linux

Today I had a problem. I have allocated around 30 GB of hard disk for my elementary os installation. It was almost full and only around 110 MB free space was there. But I had run the software update and shut down the computer. But after some time, when I restarted the computer, I was not able to access the Graphical User Interface. I am stuck.

Then I tried accessing the another terminal (not GUI, but tty) using key shortcut Ctrl+Alt+F1 I was able to access the terminal. I gave my username and password and I was able to login to the terminal. Then only thing not working is GUI (Hint :- issue with X windows system). I ran the command df -h and found that / is full (there is no free space).

Tuesday, 27 November 2012

Mysql Hot Backups using Percona's Xtrabackup and innobackupex script

Percona's Xtrabackup is one of the hot tools used in the industry for taking mysql backups of live systems. Facebook is using Xtrabackup for their mysql backup needs so you can understand the importance of Xtrabackup.

But we are not directly using Xtrabackup for live hot backups. We are using innobackupex wrapper for taking the backups as Xtrabackup tool can only take the backup of innodb. What if we are also using myisam engine? But by using innobackupex wrapper, we can not take the backup of innodb, but also whole different type of mysql engine like myisam,archieve etc. Innobackupex is a wrapper script which will call Xtrabackup program and will take care of the different type of databases.

Convert the files from Windows os to unix/linux format and vice versa using tofrodos

The problem we face in linux or unix world is that we will be working in linux but rest of the world depends on Windows. So like the files we get. Most of the files are from Windows and we need to process these files in linux.

It is just too much expensive to have Windows copy running side by side or in Virtual Machine to process these Windows files. Luckily we already have the solutions for this. Here comes the software called tofrodos handy for all of us.

Monday, 26 November 2012

Changing time zone and time in Ubuntu/Linux

This is a quick tutorial. Here we check how to change time zone in linux as well as changing the server time using terminal.

For changing the time zone:

Your server time is in UTC and you want to change it to IST (Indian Standard Time). For this follow the below steps:

Friday, 23 November 2012

How to enable internet connectivity to remote server which is not connected to internet using port forwarding [port forward local port to remote machine using ssh tunneling]

Last time we saw that we can port forward the remote port to local machine and use it for testing the apps in the remote server. The opposite of this is also true. Yes, we can port forward the local port to remote server and use it for internet connectivity in the remote machine.

This trick comes handy if the remote server is behind a firewall or in a VPN and there is no direct connectivity to the internet. So what we will do if we need to update the applications in the server. Or what if we need to install a critical security update to the server? Here again comes the port forwarding to our rescue.

Thursday, 22 November 2012

How to port forward remote port to local machine using ssh [trouble shooting remote server apps in local machine]

Some times, you may need to test a remote application (GUI app) which is running in a linux server. As it is a server, we cannot test the app from the server as there is no GUI for the server. The app can be accessed over a web browser though. But for some other reasons, you are not able to access it through the web browser using the server's ip address. So our first purpose is the trouble shoot the issue. Whether the app is actually running in the server with all the features enabled?

We can ssh to the server and check the whether the app is running using ps -ef | grep appname command. Then we found out that the app is actually running in the server. But why we are not able to access it through server's ip address and the port? Here comes the rescuer in the form of port forwarding.

Monday, 19 November 2012

How to enable history in elementary os luna even after the restarting the computer or closing the terminal

Note: Elementary os luna is still in development and will have many bugs still to be resolved. So these types of issues may occur. This is not to blame the developers but I hope it will be helpful to some body who is using it and has been affected by this issue.

I'm using the daily builds of elementary os luna. I use terminal a lot and uses many command line and terminal shortcuts daily to make my jobs easier. One of such command line short cut is uing Ctr+r to search for the previously used commands. But elementary luna it was not working after I have restarted my computer or even in another terminal. I did a bit of research and found out the issue and fixed it.

Saturday, 17 November 2012

How to add legal notice to your server while logging in through ssh in linux[alternate method: without using]

I had to implement the legal warning while the users are logging in to our servers. Actually there are two methods to do this. One is using and other is using motd.tail. We are going to see these two methods and their implementation here.

Thursday, 15 November 2012

How to directly login to the screen session running on your remote server using ssh

You know that I am a big fan of gnu screen utility. Also we have seen many short cuts for screen here. We used to access our screen session after log in to the remote server through ssh and then 'screen -x screenname' command. But it is actually time consuming. Yes we can directly login to the screen session using the awesome ssh. Let's find out how.

You may think that we can type the command,

ssh [email protected] "screen -x screenname"

Wednesday, 14 November 2012

Boot from usb drives even if your hardware doesn't support it using EasyBCD and plop boot manager

Last time, I have told you about an amazing software called EasyBCD. It is a boot manager editor software which gives you a easy to use interface to customize your boot loader. Its just not a boot manager configuration tool, but it also comes with the plop boot manager built in with it.

So what is the advantage of having plop boot manager?You can read about plop boot manager here.
 In short, it let you boot using your usb even if you hard ware doesn't support it. Old hardwares do not have the option boot from usb drives. I used to test a lot of linux distros but burning CDs and DVDs for this purpose is just waste of money. By using an usb to test the linux distros, I can save a lot of money and also help environment.

Restore Windows MBR even if you don't have Windows disk by using Ubuntu live cd/usb

Last time we saw how to restore MBR using windows 7 disk. But what if you don't have a Window disk but only a Ubuntu live cd or live usb disk?Yes, we can use the amazing linux to restore MBR. I have found this tip on Google plus  but never tried it my self. It is by the amazing fellow named Benjamin Humphrey who runs the most famous ubuntu blog in the planet OMG! Ubuntu!. So here is we go.

Fix MBR (Master Boot Record - Windows boot manager) after messing the grub boot manager when dual booting windows 7 and ubuntu and reconfigure it using EasyBCD

This time I decided that instead of installing Ubuntu using wubi with Windows 7, I'll dual boot the daily build of elementary os with Windows 7. I downloaded and boot eOS using a bootable usb using plop boot manager. Everything went smooth but I wrongly installed the grub over Windows 7's MBR at /dev/sda.

Grub became the boot manager and there is also windows 7 entry at the grub boot menu along with eOS menu entry. But when we select windows 7, it again comes to the first shown grub boot menu. So it created an infinite loop for the windows 7 and I was not able to boot to windows 7.

Saturday, 28 April 2012

Artha - The best dictionary app for ubuntu [offline]

I was in search of the best dictionary app (software) for my ubuntu as I recently started reading many ebooks. As English is not my native language, a good dictionary app is always the best friend while reading. I have tried many dictionary app but I finally I have settled on the dictionary app called "Artha".

Friday, 23 March 2012

Most useful screen shortcuts and commands in linux

Last time we saw about how to use screen and the advantages of screen. But there are more useful screen tips and tricks. Here I'm going to show you my most used screen commands.

As we saw we have created a screen session called 'backup' last time and logged in to that using screen -r backup or screen -x backup. But you need to remember that that is the name of that particular screen session. Inside a screen session we can have multiple screen windows. Not only that we can name each of these windows.

Wednesday, 14 March 2012

How to use screen in mulit user mode in linux?

Linux screen command is one of the most used command in my life. Not only it is very useful but also it is very versatile. Screen is mainly used to run another terminal inside our normal linux terminal.

For example, you are connecting to your remote computer over ssh and want to run a script which will take more than 1 hour to execute. Normal cases there are chances that your remote connection over ssh might get disconnected. If so you need to start the whole process again as once the remote connection get disconnected, the running process will also stops.

Friday, 9 March 2012

How to find the number of occurance of a character or word in a file

Some times we need to find how many times a character or a word has repeated in file. For this we can use vim. Vim is extremely powerful tool and learning some cool tricks in vim will always help you beat the heat.

So for example, i want to find how many times the word linux comes a file which is full words and lines. Imagine if the file has more than 1000 lines finding manually it will be just waste of time if you know the simple command in the vim.

Wednesday, 7 March 2012

Most useful ps commands in linux

One of the most used commands in linux to find about the running processes in linux is ps command and top command. There are many command line arguments that we can give to these commands to extract the exact information that we need. But it is a bit confusing, right? So here we are going to look for the most used command line arguments in the ps command.

Saturday, 3 March 2012

How to hide a file or folder in Linux

This is a basic question that arises in the mind of the most new linux users. This can be easily achieved in linux. Its a matter of just adding a do in front of the file/folder name in linux.

For example, to hide a file called 'linux-tips.txt', we just need to add a dot in front of it. It will be like this.

Sunday, 26 February 2012

My favorite (and most used) Linux command line shortcuts

Linux terminal is one of my most used application. So it became necessary for me to master it. Even if we take a little bit of time for mastering the shortcuts, it will be really helpful in the long term.

Below are some of the my favorite and most used command line shortcuts which now I am using almost every time.