Ubuntu Tweak – Customise Your Desktop

Ubuntu Tweak is an application designed to configure Ubuntu easier for everyone. It provided many useful desktop and system options that the default desktop environment isn’t provided. It can be download from http://ubuntu-tweak.com/ website.

Ubuntu Tweak

Features of Ubuntu Tweak

  • View of Basic System Information(Distribution, Kernel, CPU, Memory, etc.)
  • GNOME Session Control
  • Auto Start Program Control
  • Quick install common usded applications
  • A lot of third-party sources to keep application up-to-date
  • Clean unneeded packages or cache to free the disk space
  • Show/Hide and Change Splash screen
  • Show/Hide desktop icons or Mounted Volumes
  • Show/Hide/Rename Computer, Home, Trash icon or Network icon
  • Tweak Metacity Window Manager’s Style and Behavior
  • Compiz Fusion settings, Screen Edge Settings, Window Effects Settings, Menu Effect Settings
  • Set the Shortcuts to let qucikly access your favourite applications
  • GNOME Panel Settings
  • Nautilus Settings
  • Advanced Power Management Settings
  • System Security Settings

Ubuntu 10.04 – Enabling Location Based Address Bar Permanently in Nautilus File Browser

In my previous post ,  Only the key control was given to enable location based address bar , but if you want to enable location based address bar permanently in nautilus File Browser. simply follow these steps,

Goto Terminal and type the given command

#gconf-editor

You will get one new configuration window , In that editor select

apps -> nautilus -> preferences

Right side you can see some options , just enable the second option [always_use_location_entry ]

Configuration Editor

Now your nautilus will show only location permanently in address bar.

University Timetabling System [ Unitime ] in Linux

Steps for Installing and Configuring University Timetabling System [Unitime]
Prerequisites

1. Java 1.5 or latest [ http://java.sun.com ]
2. Mysql 5.x [ http://www.mysql.com ]
3. Tomcat 5.5.x [ http://tomcat.apache.org/]

Installation [Everything has to be done in root mode ]
1. Download the Unitime source file from http://www.unitime.org/ webiste

2. Extarct the tar file into /opt/unitime folder [ #mkdir /opt/unitime]

#tar -xzvf unitime-3.1_bld248.tar.gz  -C /opt/unitime

3. Start your mysql server

#/etc/init.d/mysqld start

4. Import sql file into mysql server [located in /opt/unitime/doc/mysql folder]

[ Note : MySQL is case sensitive on table names by default. To change this, add the following line to the /etc/my.cnf file. This forces MySQL to translate all table names to lowercase before executing the statement.]

lower_case_table_names=1

# mysql -u root -p -f </opt/unitime/doc/mysql/schema.sql
# mysql -u root -p  </opt/unitime/doc/mysql/woebegon-data.sql

5. Connect  mysql client and create the user for timetable database [ the default username is timetable and password is unitime ] , run the following queries in mysql client window.

update mysql.user set host=’localhost’ where user=’timetable’;
update mysql.user set password=PASSWORD(‘unitime’) where user=’timetable’;
commit;
grant all on timetable.* to timetable;
flush privileges;

I have given sample mysql client window and queries

[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.22

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> update mysql.user set host=’localhost’ where user=’timetable’;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> update mysql.user set password=PASSWORD(‘unitime’) where user=’timetable’;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all on timetable.* to timetable;
Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

mysql> exit
Bye

6. Copy the UniTime.war file into tomcat webapps folder

# cp /opt/unitime/web/UniTime.war /opt/apache-tomcat-5.5.29/webapps/

7. Create  a file called my_login.conf and add the following line

#gedit my_login.conf
Timetabling {
org.unitime.timetable.authenticate.jaas.DbAuthenticateModule required;
};

Save the file and exit.

8. Add the following paths at end of /etc/profile file

#gedit /etc/profile
export JAVA_OPTS=”${JAVA_OPTS} -Djava.security.auth.login.config=/opt/unitime/my_login.conf”
export JAVA_OPTS=”${JAVA_OPTS} -Djava.awt.headless=true”
export JAVA_OPTS=”${JAVA_OPTS} -Xmx512m”

9. Run the following command to set the path

#source /etc/profile

10. Now , its time to start your tomcat server

#/opt/apache-tomcat-5.5.29/bin/startup.sh

11. Open your web browser , type the follwoing address

http://localhost:8080/UniTime

12. If you get the login window , then evrything is ok , otherwise some problem with your installation. the default usename and password of unitime is

username : admin
password : admin

13. Have a fun with your university scheduling system !!!

How to Reset MySQL Server Password ?

Sometime you might have forgotten your MySQL server password  for connecting to client. At that time while you try MySQL command in your terminal you will get the following error message

#mysql -u root -p

Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: YES)

To get around this problem you need to reset the password.  Just do the given steps for that

1. Enter root mode in your terminal

#sudo su

2. Stop the MySQL Server

#/etc/init.d/mysql stop   [for Ubuntu]

or

#/etc/init.d/mysqld stop  [for Fedora and Cent OS]

3. Open the MySQL configuration file and add the following line under the [mysqld] section

skip-grant-tables;

#gedit /etc/mysql/my.cnf

4. Restart the MySQL server

#/etc/init.d/mysql restart

5. Execute the following command

#mysql -u root mysql

6. Now automatically you will get into the MySQL client window, here you can reset your lost password

mysql> UPDATE user SET password=PASSWORD(‘newpassword’) where USER=’root’;

mysql> FLUSH PRIVILEGES;

7. Undo the changes in /etc/mysql/my.cnf and restart the MySQL server

8. Now you can login with your mysql -u root -p command with your new password.

Thats it .

Attachment: my.cnf  configuration file

Ubuntu 10.04 Beginners Manual

The Ubuntu manual team has released new beginners guide for 10.04 version. it would be really very useful for those who want to start Ubuntu  from scratch. Click the link below to download free copy of  Manual in Portable Document format.

Download Ubuntu 10.04 Beginners Guide

8085 Two Pass Assembler – Sample Program

Assembler is a program which is used for converting mnemonics into machine code. For more explanation refer “Systems programming and operating systems By Dhamdhere “ book. Here i have given very simple example to understand the Intel 8085 two pass assembler.

General Functions of an assembler
Pass one

  • Assign addresses to all statements in source code
  • Save values (addresses) assigned to labels for use in pass two
  • Process directives

Pass two

  • Translate instructions
  • Convert labels to addresses
  • Generate values defined by BYTE and WORD
  • Process the directives not done in pass one
  • Write object code to output device

Sample Program : Addition of two numbers

Sample Data (In Hex Format):

(4000H) = 14H
(4001H) = 89H
Result  = 14H + 89H = 9DH

Source program

ORG 2000H
START:      LXI H 4000H          : HL points 4000H
MOV A, M                                         : Get first operand
INX H                                                 : HL points 4001H
ADD M                                               : Add second operand
INX H                                                 : HL points 4002H
MOV M, A                                         : Store result at 4002H
HLT                                                     : Terminate program execution
JMP START

Pass1 :
a) Symbol Table :   NIL

START    2000

b) Literal Table

4000   14H
4001   89H

c) Opcode / Mnemonics Table

Address    Mnemonics        Opcode       Operand
2000              LXI H,4000H       21          00  40
2003              MOV A, M             7E
2004              INX H                     23
2005              ADD M                   8E
2006              INX H                     23
2007              MOV M, A             77
2008              HLT                        76
2009              JMP START         32


Pass2:
1. Generating Hexadecimal / Object Code

Address  Opcode
2000      21
2001      00
2002        40
2003      7E
2004      23
2005      8E
2006      23
2007      77
2008      76
2009      32
200A      00
200B      20

2. Machine Code

00100001
00000000
01000000
01111110
00010011
10001110
00100011
01110111
01110110

10 Myths About Ubuntu Linux Operating System

  1. Ubuntu only ships the latest and greatest
  2. Ubuntu fix bugs for the current and past releases
  3. Ubuntu is a stand-alone distribution
  4. Updates can break things
  5. Uses a lot of resources
  6. Ubuntu can not play games [ or No gaming support]
  7. Big companies don’t use Ubuntu
  8. Ubuntu  won’t connect to an iPod or MP3 player..
  9. User has to learn command line/terminal for using Ubuntu
  10. Customizing Ubuntu  is very hard

Ubuntu 10.04 – Enabling Address Bar in Nautilus File Browser

Tips and Tricks

To Enable nautilus  address bar [text based location] in Ubuntu 10.04 ,

Press CTRL+L   [ L is a small letter]


Nautilus File Browser - Address Bar Enabled

Reference

http://krp90.wordpress.com/2010/04/07/nautilus-make-the-text-based-address-bar-reappear-in-ubuntu-10-04

10 Basic Linux Commands

1. Man – Online Manual Page for Linux Commands

  • Displaying Manual or Help Page

# man find

  • Getting Short Description

# man -f ifconfig

  • Getting List of commands using keyword

# man -k “network”

  • Converting Manual Page into Portable Format [ Text , PDF , PS ]
    • For Text File conversion
      # man ls | col -b > lstext.txt
    • For PDF or PS conversion# man -t ls > lsps.ps

      # man -t ls | ps2pdf – > lstext.pdf

2. apropos - search the command short description with the given keyword

  • General Syntax

#apropos “print”

  • Pattern Matching

#apropos -r “^[p]+[g]$”

[This pattern will match the command description word

starting with "p" and ends with "g" ]

3. cd – changing the current directoy to some destination directory

# pwd [ Current Working Directory]

# cd /opt/ [chnage to /opt]

# cd .. [ change to root]

4. ls - List Directories and Files

# ls [ display all files and folders ]

# ls -l [ display files with all information ]

# ls -a [ display hidden files also ]

# ls -R [ display the folder contents ]

# ls -i [ display the index number of each file ]

5.cp – copying folders and files from source to destination.

    5.1 Copying Files

# cp kavidhai.pdf /opt/

[copy the file kavithai.pdf into /opt folder]

# cp kavidhai.pdf sam.txt /opt/

[copy the files kavithai.pdf and sam.txt into /opt folder ]

    5.2 Copying Folders

# cp -r uploads/ /opt/

[Copy the folder uploads and its content into /opt folder]

6. rm – delete files and folders

# cd /opt/uploads

# rm kavidhai.pdf

[Delete kavithai.pdf from uploads folder ]

# cd ..

# rm -r uploads/

[Delete the folder uploads/ and its content from /opt]

7. cat - create ,display and concatenate the file (s)

7.1 Create new file

# cat > sample.txt

Hello

[This syntax will create new textfile you can use ctrl+c

for saving and exit from the editor. ]

7.2 Dispaly the file contents [Read Only]

#cat sample.txt

Hello

7.3 Concatenating Files

# cat > sample1.txt

Welcome to OpenPeata

^C

# cat sam.txt sample1.txt

Hello

Welcome to OpenPeata

8. history – User commands in terminal will be stored into hitory configuration file.

# history | tail -2

48 cat > sam.txt

49 cat sam.txt

[This command displays last 10 histories, to display entire history type only history command (#history)]

#history -c [Clears all history ]

9. find – search for files in a directory

# find /opt -name “eclipse”

[This command will search the files and folders contains the name 'eclipse' in /opt directory]

10. tar - Cretae Append , Delete , Extract the archive files

#tar -cf my.tar a.txt b.txt [Create my.tar from files ] a.txt and b.txt.

#tar -tvf my.tar [List all files in my.tar]

#tar -xf my.tar [ Extract all files from my.tar]

#tar -xzvf eclipse.tar.gz [ Extract tar.gz file]

#tar -xjvf octave.tar.bz2 [Extract tar.bz2 file]

Download the Reference Card

Gparted – Partition Log File for My 1TB Hard Disk

I am using 1TB Seagate hard disk , last night i formated everything and newly installed Ubuntu 10.4 also i partitioned my disk like following

  • Primary Partition (/)   – 200 GB
  • Extended Partition -    800  [ 9 GB for Swap , 300 GB for Research and  470 GB for Entertainment ]

Here is the log file details

GParted 0.5.1
Libparted 2.2
Delete Logical Partition (linux-swap, 7.45 GiB) from /dev/sda  00:00:01    ( SUCCESS )
calibrate /dev/sda5  00:00:00    ( SUCCESS )

path: /dev/sda5
start: 292970496
end: 308592639
size: 15622144 (7.45 GiB)
delete partition  00:00:01    ( SUCCESS )

Delete /dev/sda2 (extended, 7.45 GiB) from /dev/sda  00:00:00    ( SUCCESS )

calibrate /dev/sda2  00:00:00    ( SUCCESS )

path: /dev/sda2
start: 292970494
end: 308592639
size: 15622146 (7.45 GiB)
delete partition  00:00:00    ( SUCCESS )

Create Extended Partition #1 (extended, 791.82 GiB) on /dev/sda  00:00:00    ( SUCCESS )
create empty partition  00:00:00    ( SUCCESS )

path: /dev/sda2
start: 292977405
end: 1953520064
size: 1660542660 (791.81 GiB)

Create Logical Partition #2 (linux-swap, 9.51 GiB) on /dev/sda  00:00:01    ( SUCCESS )
create empty partition  00:00:00    ( SUCCESS )

path: /dev/sda5
start: 292977468
end: 312898004
size: 19920537 (9.50 GiB)
set partition type on /dev/sda5  00:00:01    ( SUCCESS )

new partition type: linux-swap(v1)
create new linux-swap file system  00:00:00    ( SUCCESS )

mkswap -L “” /dev/sda5

Setting up swapspace version 1, size = 9960264 KiB
LABEL=, UUID=8bd5b838-fa01-4c12-b1f9-510faad4445b

Create Logical Partition #3 (ext4, 305.10 GiB) on /dev/sda  00:01:05    ( SUCCESS )
create empty partition  00:00:00    ( SUCCESS )

path: /dev/sda6
start: 312898068
end: 952734824
size: 639836757 (305.10 GiB)
set partition type on /dev/sda6  00:00:00    ( SUCCESS )

new partition type: ext4
create new ext4 file system  00:01:05    ( SUCCESS )


mkfs.ext4 -j -O extent -L “Research” /dev/sda6

Filesystem label=Research
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
19996672 inodes, 79979594 blocks
3998979 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
2441 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
mke2fs 1.41.11 (14-Mar-2010)

Create Logical Partition #4 (ext4, 477.21 GiB) on /dev/sda  00:02:51    ( SUCCESS )
create empty partition  00:00:00    ( SUCCESS )

path: /dev/sda7
start: 952734888
end: 1953520064
size: 1000785177 (477.21 GiB)
set partition type on /dev/sda7  00:00:01    ( SUCCESS )

new partition type: ext4
create new ext4 file system  00:02:50    ( SUCCESS )

mkfs.ext4 -j -O extent -L “Entertainment” /dev/sda7

Filesystem label=Entertainment
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
31277056 inodes, 125098147 blocks
6254907 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
3818 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
mke2fs 1.41.11 (14-Mar-2010)