Auto mount partitions in few easy steps

When we log in to Linux we have to mount partitions manually. In some earlier distributions of Ubuntu we had to enter the root password too. This is troublesome and I’m going to give you few easy steps to mount these partitions on start up or rather as we call it to auto mount these partitions.
First we have to understand what fstab is. The term fstab stands for file system table.  It contains the startup script which relates to mounting partitions so we have to add our partitions to the fstab. fstab looks like a table at a glance it has these columns

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

<file system> – this stands for the location of the partition. (eg: /dev/sda2)

<mount point> – the place in the file system where we want to mount the file system. (eg: /media/work)

<type> – the file system type. (eg: ntfs, ext4)

<option> – here we want to mount it automatically so it should be auto

<dump> – the archiving schedule for the partition.

<pass> – the order in which fsck checks the device/partition for errors at boot time. The root device should be 1. Other partitions should be either 2 (to check after root) or 0 (to disable checking for that partition altogether).

Now lets get to the fun part;

1) Mount the partitions manually then open a terminal and give df -h this will list all the mounted partitions with the file system details.

2) Unmount the partitions and then make directories with the names you like to give to those partitions in media eg: mkdir /media/Work

3) Open fstab sudo gedit /etc/fstab and add the partitions with the details you found using df -h
eg:
/dev/sda7 /media/Work ext4 auto 0 0
/dev/sda1 /media/Win7 ntfs auto 0 0

4) Now restart the machine :D

hope this was helpful :D
Bye! for now
:D

Is ubuntu reaching the end of it?

I started my life of Linux with Mandriva, it made me realize Linux is better than windows and I felt like I know something about operating systems by that time Ubuntu was there but it looked bulky and I hated that shade of brown color and its large icons. As the time goes by I got to know about LinuxMint which I loved (by the way I never sticked to Mandriva because it didn’t support my Huawei E220 which is my primary source of Internet connectivity) and I started to use LinuxMint as my primary OS I still had windows by the side because I didn’t like the presentation templates in open office, Mint supported my Huawei E220 that was the main reason for my transition. Mint was bas ed on Ubuntu after few release cycles I thought of moving to Ubuntu because it’s the same as Mint and the UI started to look better, and among other reasons the Mint made Ubuntu less stable so basically Mint is less stable than Ubuntu.

The transition took with Ubuntu 9.04 (Jaunty Jackalope) and my OS world was perfect!! free software all the time, just an apt-get to install those and the Ubuntu software center made some promises with nice descriptions. From there onwards the OS became better and better and better. Nice UIs, faster booting times, new logos, nicer user friendly installation guides and Ubuntu made the perfect OS for the open-source community and most of all its became the best OS for the newbies in Linux.

Lets talk about Linux for a bit, Since the beginning of GNU project it was all about freedom. Men and women who were involved in Linux always talked about freedom free software, freedom to distribute freedom of use and Linus Torvalds helped Richard Stallman with his philosophical idea of free software and the Linux community always withstand any dictatorship they always challenged the monopolies. That lead to success of this community.

Now new ubuntu comes with Unity, for what I have experienced its still in the development phase and its still not desktop worthy, but it seems like Mark Shuttleworth thinks its desktop worthy. Its a crappy desktop environment where you cannot change the position of the launcher and the reason for that is the launcher should match with the ubuntu logo which is in the top left hand corner. As the latest reports says there wont be an ubuntu logo after all it will be just a blue triangle, but still they are arguing about it lets just hope for the best.

Change is good it makes people think differently and act differently but those changes should not make people slaves. Ubuntu says; the Gnome support will still be there for another few releases and then after that Gnome no more. That will make the Ubuntu transition for a newbie difficult, the user friendly OS will not be that user friendly. I highly appreciate the work the Ubuntu developers put behind to build such a wonderful OS but I have this big question

IS UBUNTU REACHING THE END OF IT?

This is just a thought!
What do you think about? Leave a comment!

bye!

Installing XAMPP on Ubuntu

Hey guys this is a quick post on how to install XAMPP on ubuntu. Here we go first you have to download XAMPP.
First you have to browse to your downloads folder and enter this command to extract the compressed folder;

Code:
tar -zxvf xampp-linux-1.7.3a.tar.gz

Now you have to copy the content to /opt and here is the command;

Code:
sudo cp -vr lampp /opt/

As you have copied the content of the lampp folder to /opt using sudo you don’t have permission to access the files freely there are two things you can do you can change the ownership of the file system by using chown or change the permission using chmod. The best way and the easiest way to do this is chown and the command is;

Code:
sudo chown root:< your username > /opt/lampp

Now browse to /opt/lampp folder and run;

Code:
sudo ./lampp start

You can check the status of lampp by simply running

Code:
sudo ./lampp status

and it should be something like this

rusiru@rusiru-L510:/opt/lampp$ sudo ./lampp status
Version: XAMPP for Linux 1.7.3a
Apache is running.
MySQL is running.
ProFTPD is running.

Hope this was helpful :D
if you have any questions feel free to comment :)
Bye.
Have fun :D

P.S.

Go to localhost to check it out :D

Academic reference management with Mendeley

Hey guys this is a really quick post. I hope this will help everyone who are doing Literature surveys and who are researching. This has some reference with the post Getting started with Latex. In the above post I was talking about how to work with Latex and about some Latex editors I’m using (my favourite is Texmaker!).
When we work with research papers sometimes its different to manage those. What I meant by managing is, creating bibliography or .bib files, downloading sorted papers, highlighting, synchronizing with the current folders, taking snapshots of Internet, Google Scholar Search, MS Word plugins, etc. Mandeley does all of that and there are many more features :)
Now how to install;

Step 1: Add the repository
Add the APT line to the bottom of the file /etc/apt/sources.list. Please note the trailing slash.
- Hardy/8.04: deb http://www.mendeley.com/repositories/xUbuntu_8.04 /
- Intrepid/8.10: deb http://www.mendeley.com/repositories/xUbuntu_8.10 /
- Jaunty/9.04: deb http://www.mendeley.com/repositories/xUbuntu_9.04 /
- Karmic/9.10: deb http://www.mendeley.com/repositories/xUbuntu_9.10 /
- Lucid/10.04: deb http://www.mendeley.com/repositories/xUbuntu_10.04 /
- Maverick/10.10: deb http://www.mendeley.com/repositories/xUbuntu_10.10 /

Step 2: Install using apt-get
sudo apt-get update
sudo apt-get install mendeleydesktop

Note this is just for Linux but Mandeley is also available for Mac and Windows.

Here are some screen shots;

Mandeley

Mandeley desktop

Hope this is helpful
Have fun :D
bye!!

Facebook and Security

Hi guys I’m writing a post after a long time (ok its not that long! about one month I guess). This time I thought of writing about the privacy settings of Facebook. People who are making accounts or rather creating Facebook profiles increase day by day, the numbers go up to 6 figures per day. This sometimes arouse concerns of the users whether their privacy is remained intact. Most of the time what happens is some crook uses someones profile picture to use it as the profile picture of a fake account. This has happens a lot and many people still suffer from those bitter experiences. Not only that but also, there are various kinds of blackmailing done through the Internet sometimes via the Facebook only. So the question is how can we change the privacy settings?
Now we are gonna talk about the real deal! but before going in to details you have to think about this a bit. Facebook changes its “face” time to time so the path to these settings changes. Therefore, the names may change but the settings will be the same. Lets start!

First you have to go to Accounts -> Privacy settings check the image below,

Privacy settings

That will lead to a page like this,

Choose Privacy

In that page you can see 4 main topics, and out of those topics Sharing on Facebook uses the largest space.
First lets start with Basic Directory Information, to go to the settings page, click on the View Settings page and you’ll get a page like this,

Basic directory settings

The first topic is Search for me on Facebook. This is refers to the visibility of your profile by doing a Facebook search, and on the drop-down menu you can see,

Drop-down menu

Here you can change the visibility settings as you want and when you click on the customise menu item, you’ll get a window like this, which enables you to block certain people and change privacy further according to your convenience.

Custom privacy

Lets get back to the second topic of the Basic directory settings and that is, Send me friend requests. By changing the drop-down menu assigned to this you can change the settings of the friends requests, who can send you and who cannot. Like wise, the same settings apply for Send me messages, See my friend list, See my education and work, See my current location and hometown, and finally See my interests and other Pages. The image which corresponds to Basic directory settings above is how I have used my privacy settings, therefore I recommend it as preferable because its your data, your information so you should limit the visibility of it, but anyway its your choice at the end of the day. :) OK then lets get back to the next big topic!

Sharing on Facebook, to go to settings page you have to click on the Customise settings link and you’ll get a page like this;

Customise settings

Lets start with Things I share;

Things I share

Here you can change the settings of your personal information, and the drop-down menu is as same as above. On the bottom of that list you can see a link called as Edit album privacy this refers to the photos you have uploaded. When you click on that link you’ll get a page like this;

Album privacy

And yet again you can change the settings as you wish but make sure you do :D

Lets move down to Things others Share and Contact information. And again the same settings apply so now this should be easy to understand!

Things others share and contact information

Now we are moving to the remaining Main topics. Those are Applications and Websites , Block lists and Controlling how you share, Lets start with Applications and Websites. When you click on the Edit your settings link,

Applications and websites

These information plays another crucial role. I’m saying that because there were certain incidents, for an instance there are applications which analyze your information without your knowledge. Which can be harmful, and the worst part of this is, even though you don’t use any untrusted applications your friends might be using those without knowing, and through your friends profile that application can access your information. You can prevent that from happening by changing the privacy settings on applications and websites :)
Lets start with What you’re using here you can remove or turn off the platform applications to remove you have to click on the Remove link and you’ll get a window saying;

Remove

From that window you can remove all the unnecessary applications by just selecting it and clicking on the remove selected button. Now lets move to Games and application activity this has a drop-down menu like the previous settings and you just have to change the settings as you wish.

Lets move on to Information accessible through your friends when you click on the edit settings button you’ll get a window to select the information which you want to share with your friends applications,

Information accessible

This is the setting I explained earlier which can access your data through your friends’ applications. Therefore you should be careful about the information you share.

Then there is Instant personalisation which enables you to see relevant information about your friends the moment you arrive on select partner websites. This depends on the plugins which you use so if you don’t have any you don’t have to change anything (like in my case) but if you have any just click on the Edit settings button and change the settings. Finally we have Public search which takes us back to Basic directory settings as I have disabled public search I get a page like this.

Public Search

Now lets move to the last main topic that is Block lists. When you click on the Edit your list link you’ll get a page as below,

Block list

Here you can block others from sending your requests, application invitations, and event invitations by just typing that person’s name.

Phew finally its done :) i never thought it will be this long anyway.
I hope this helped you if so please put some comments on that, and also remember this is about your privacy so changing settings is up to you I’m just guiding you through the process.

To get further information on privacy settings visit Facebook Privacy guide

bye for now :D

~~ Rusiru Boteju ~~

Android and NetBeans

Hey guys I’m writing this post after few weeks. This time I thought of writing a post about Android. I bought a HTC Hero, the first HTC android phone with the Sense UI . Since the day I bought the phone I wanted to write an app for the phone, but with work didn’t get much time to do that. Finally I found some time to kill, so as a result of that I’m writing this post.

First I wrote my Hello World app using Eclipse. Though it’s a powerful IDE I don’t like the idea of using Eclipse. Therefore I looked for a plugin to NetBeans to develop my first Android app. Among the first few search results I found this article How to setup Netbeans for Android development and it worked the magic. Even though the above mentioned post was written for NetBeans 6.5 it works for NetBeans 6.8 too.

Note: you have to install Android SDK to start. Follow this link to install the SDK Installing the SDK

Ok then lets start developing our first android app; to start work first you have to install NetBeans and have to install the Android plugin by following the above link.
Open NetBeans File -> New Project and you’ll get the screen below select Android as the category and Android Application as the Project and then click next.

New Project

And the next part is the Name and Location window its as same as a usual NetBeans project therefore I’m not gonna explain that to you!

Name and Location

OK now lets take a look at the first code this is really simple, the below image is the class which you have to edit.

Java class

you have to add these lines of code which is demonstrated on the following image

TextView tv = new TextView(this);
tv.setText(“Hello Android”);
Button bt = new Button(this);
bt.setText(“GO”);
setContentView(bt);

Finished code

and then you have to hit the run button and it will start the Android emulator

Running App

Try more and enjoy
bye for now
:D

Note: This link has more and further details on android development

~~ Rusiru Boteju ~~

VirtualBox and Windows

I thought of writing this post after the installation of Windows 7 in VirtualBox. This may be old news for some guys out there but still this can be new to some.
As I have told you earlier I don’t use Windows, Ubuntu dual boot anymore, now I solely depend on Ubuntu, it’s not that I hate windows but I’m uncomfortable with it ;) ok now lets get down to business.
First you have to install VirtualBox, to do that go to Applications -> Ubuntu Software Center and on search type VirtualBox and press install to install. After the installation go to Applications -> Accessories -> VirtualBox OSE and that will start virtualbox.
At first you have to create a new machine you can do by clicking on the light blue color new button after clicking on that you’ll get a window like this;

Create New Virtual Machine

so there you have to enter the name of the OS (You can give any name you like) and you have to select the OS type then after pressing next you’ll see a window like this;

Base memory

and there you have to select the base memory that means the RAM so the greener part of the bar shows the size that is available for the virtual machine. Let me explain this a bit, in my laptop I’m currently using 2.5Gb of RAM, that is shown at the end of the bar, that means for the host OS that complete capacity is available. But as I’m trying to run two operating systems at once I should be able to share the RAM so the greener part of the bar shows the safe side or the safe capacity that I can use and approximately its about half of the total capacity. So its better to stay on the safer side then you can use both the OSs without any problem (hope you got what I’m trying to say if not put some comment on that I’ll explain a bit more :) ). Now after pressing next you’ll get a window like this;

hard disk

Here we have to select the hard disk that means the virtual hard drive so now you have to create your first virtual hard drive (hope you are doing this for the first time). I’ll go to the creation of hard disk in a bit till then lets look at the final image of our virtual machine creation process.

Final

Now in the above image we can see the hard disk size is 20Gb and base memory is 955Mb etc.

Lets take a look at the creation of virtual hard disk. Ok now after selecting create a new hard drive and clicking next you’ll get a window like this;

create hard disk

In the above image we can see there are two radio buttons,

#Dynamically expanding storage :- That means the size of the hard disk will grow as you install more softwares and when you download more data. When you use this option make sure you have enough space on your physical hard drive.

#Fixed size storage :- This means the size of the hard drive is fixed.

After selecting the option you want click next then you’ll get a window similar to this;

harddisk name and size

In the above image I have given the name windows 7 and the size was given as 20Gb. Now in this case if you select dynamically expanding storage the whole 20Gb wont be allocated at once it will be allocated as the memory fills but if you use fixed size storage then 20Gb will be allocated at once. Therefore you have to allocate space according to your need. In the image you can see there is a little folder icon next to the textfield but clicking on that you can select the location of your virtual hard drive if you don’t change the path it will get saved in ~/..VirtualBox/HardDisks. After clicking on the next button you’ll get a summary like this;

summery

Ok now we are done with the creation of the machine and you’ll see your virtualbox window like this;

VirtualBox

Now it’s time to install the OS. Before doing that there are certain configurations you have to do. First of all you have to select the new machine you created and click on the settings button and from there when you click on General you’ll see a summary of what you have done so far. Now go to system and check the boot order here you can change the base memory once again (if you really need it). The image below is a screenshot;

System

And after that click on Storage if you are installing the OS using a DVD or CD image then you have to give the path of the image you can do that by selecting the CD icon in the storage tree and on the Attributes you have to click on the little folder icon and browse the image file. If you are planning to use the host CD/DVD drive you have to select the Host CD/DVD drive from the CD/DVD Device dropdown menu like the image below;

CDDVD

Now network settings, click on Network and click on the enable network adapter and cable connected check boxes and that will enable networking (and also remember you have to install samba server on ubuntu “sudo apt-get install samba”). After installing the OS you can access all the shared “Folders” in your computer by typing //10.0.2.2 on Run (For windows).

networking

And now we are good to install the new OS after installing it will look like this;

beforeGA

After installing Guest Additions you can have a full screen view like the image below;

afterGA

You can install Guest Additions by going to Device -> Install Guest Additions in the window which you get after clicking on the Start button. Now its your time to do your experiments.

Hope this was helpful
bye for now
have fun :D

~~ Rusiru Boteju ~~

Fixing a broken pendrive

Hey guys, after the installation of Lucid had to install all the softwares from the beginning. It was a time consuming task, but I kinda like the idea of apt line commands of installation so I did all the installations without going to synaptic package manager. Thats what happened so far, today I’m gonna talk about what happened to me yesterday and how I fixed it.
This is the story from the beginning;
I was copying some image files to my pen drive, (its a Kingston DataTraveler 2Gb) suddenly it got ummounted during the copying process. Then when I plugged it back it didn’t work. When I do a lsusb it shows the pen drive but for sudo fdisk -l it says there is no partition table. I was so upset, and since then I was searching the web and looking for a solution. There were certain suggestions for Linux those are testdisk, gparted etc but nothing worked the worst part was it was write protected too. :( gparted didn’t even recognize the pen drive. I thought it was the end, even in certain ubuntu forums some users said its the end of the pen drive. I never gave up, i just kept searching, while doing that I plugged the pen to windows xp machine the same problem occurs the pen drive is available but can’t format it cos of the write protection. Then I found this article, about how to remove write protection on pen drives, but in windows that didn’t work too, but I kept on reading the comments of that article on one of those comments I found this COMMENT and that particular comment saved my life.
This is what you have to do, first download the software from this Link. Then unplug all the other usb devices except the one you need to recover or the one you want to fix. Extract the file and double click on the .exe file (ah btw you have to do this in a machine with windows xp). The software will automatically format your pen drive with fat16 file system (Format it again with ntfs or fat32 if you want).
And finally the pen drive is recovered :) you are over joyed :D
Hope this was helpful!
bye for now
Good Luck!!

~~ Rusiru Boteju ~~

The change it self – Lucid Lynx

Hey guys! hope you have already installed “Lucid Lynx” or as we all know it ubuntu 10.04. I installed Lucid few hours back, and it is definitely a change. I installed it by creating Startup Disk, it was an exciting idea for me, because I tried it out for the first time. The installation was really impressive, it took me less than 10mins (it was that fast) and I’m proud to say, from today onwards I’m totally “opensourced” (at least the operating system) and also I might install windows on virtual box in time to come (if I want it).

What I like about Lucid:
- E220 Huawei dongle works like a charm (it was not like this when I was using Karmic)
- The UI design is way cooler than the earlier editions and the window controls on the right hand side of the window border gives it a more sleek look.
- Ubuntu software center is renewed with more features.
- Gnome-terminal looks purple
- And finally the menu items are improved and more user friendly.

Terminal
terminal

Software Center
software center

What I don’t like about Lucid:
- The indicator applet takes too much space (the space between icons are too much when comparing to the icon sizes).
- Bluetooth with phoenix bios still suck till you install omnibook module (check my post on Phoenix bios and bluetooth)
indicator

I hope the indicator applet problem will get solved soon its not that much of a big issue.

Lucid Lynx really shows that change can happen, because its that good, and when you use it you’ll realize its fast(i.e. installation, boot-up and response time).
Now I’m gonna tell you about few things you have to do after installing Lucid(there are many blog posts about that but here I’m gonna tell you what I did so far)

1. Change font sizes, the default font size is 10 but I changed it to 9.

font sizes

2. Remove the panel on the bottom and install Docky
sudo add-apt-repository ppa:docky-core/ppa
sudo apt-get update
sudo apt-get install docky

then add more docklets change settings to make it look like what I did or as you prefer,

Docky

3. Lucid comes with Empathy as the default chat client it was the same with Karmic too but I like pidgin so I installed pidgin sudo apt-get install pidgin if you want to change the smiley theme to those smilies in yahoo messenger or MSN messenger download the file in this LINK extract it on ~/.purple/smileys then go to Preferences -> Themes -> Smiley Theme and select original – M@her and that will do the trick.

pidgin

4. When it comes to twitter I use Choqok as in my previous post so to install choqok, sudo apt-get install choqok but in default Gwibber comes with Lucid.

5. I installed chrome too by downloading and installing the .deb file

Those are the major changes I did after installing Lucid Lynx.

If you are new to Linux then the best OS to use is ubuntu and also if you are new to computing then again the best OS is ubuntu that is what I recommend.

bye for now download, install and experience the change !!!!!!!

~~ Rusiru Boteju ~~

Restore Grub boot loader after installing Windows

I got some free time, after finishing my work (I do get a lot of free time these days don’t I?) Anyway when I was writing my previous post about Removing older kernels from Ubuntu Karmic I thought of writing a bit more about the grub so today I’m gonna write about how to restore grub.
When we install windows xp, vista, 7 or some other version of MS OS’s, while having ubuntu or some other Linux distribution we can see that, the grub menu goes away or simply put, the grub menu doesn’t come when the OS is booting. How can we go to ubuntu? Do we have to install ubuntu? (I’m using ubuntu here because I’m using ubuntu as my primary OS) those are the questions which come to mind to mind. But there is no point in being worried, we can restore the grub, and it will solve the problem :D

Note: when it comes to grub 2 the process is a bit different (I’ll explain it later on)

Ok then lets start with Grub 1 (I call this grub 1 because the new one is called grub 2)

First insert the live CD and reboot. When the menu appears go to Try Ubuntu without installing menu and press enter.
When you get to the desktop open a terminal and type
Code:
sudo grub

This will lead you to a grub prompt which will look like this : “grub>”
Then from there you have to find where the grub is situated, to do that you can use the command,
Code:
find /boot/grub/stage1

and that will return something like hd0, 1 (It may differ) for the demonstration purpose I’ll use hd?. ?
now we have to enter
Code:
root (hd?,?)

for example if you got hd0,1 you have to type root (hd0,1)
Then you have to enter setup command which will install the grub to the MBR
Code:
setup(hd0)

and finally
Code:
quit
reboot

And that will do the trick for grub 1 :)

Now lets restore grub 2. When restoring grub 2 you have to have ubuntu 9.10 (for now or later version)
This part is a bit tricky and have a bit more to remember (keep that in mind)
As we did in the earlier process first you have to boot up ubuntu using the live CD then open a terminal and type,
Code:
sudo -i

This will make you the super user (root). If you think logging in as root is risky then don’t. What you have to change in the following commands is, you have to add “sudo” in front of each command :)
Now you have to identify the mounted partitions of your computer, to do that you have to enter the following command,
Code:
fdisk -l (usually you have to do sudo fdisk -l but as you are logged in as root you don’t have to)

Then from that result you have to find out in which partition ubuntu is installed. (it could be /dev/sda1 , /dev/sda2 etc.)

Note:
If you have partitioned your HDD as root(/), home, boot etc. separately then you have to select the partition which is used as boot if not, that means you if you have just root(/) and home then select the partition which is used as root. For now I’ll take /dev/sda1 as my root partition.

Now you have to mount that partition,
Code:
mount /dev/sda1 /mnt (we are working as root)

After mounting the root partition you have to bind the /dev and /proc you can do this by entering the following,
Code:
mount –bind /dev /mnt/dev
mount –bind /proc /mnt/proc
update-grub
grub-install /dev/sda
grub-install –recheck /dev/sda

Important: Check the above command carefully it says /dev/sda and not /dev/sda1. “sda” means the full hard disk where ubuntu is installed

Now you have to unmount the partitions you mounted during the process,
Code:
umount /mnt/dev
umount /mnt/proc
umount /mnt

and then you have to reboot the computer.

And that does it :D
I hope now you don’t have that to worry about :D
Have fun,
Bye for now!!

~~ Rusiru Boteju ~~

Follow

Get every new post delivered to your Inbox.