FS Tab GUI

Many times we need to alter the setting at the fstab, but we always having difficulty to remember the syntax and settings.

There's one GUI for setup the fstab:
1. yum install pysdm
2. cp /etc/fstab /etc/fstab.bk
3. Go to applications -> Storage Device Manager
4. Get the harddisk you like to mount from the left pane
5. Click on the "mounting" tab
6. Check the items :
    a. Allow any user to mount the file system
    b. The file system is mounted at boot time
    c. Allow a user to mount and unmount the file system
7. If bumped with the permission, just set the umask of files and directories permission in octal with: "000"

Reboot your computer, and check the mounting

Published with Blogger-droid v2.0.9

Free some space on phone's memory without DATA2EXT

Free some space on phone's memory without DATA2EXT

Although there is a2sd, that keeps the apks on the sd-ext some files are stored on phone's nand on /data partitionand if we install a lot of apks then you remain out of free space. WE DO ALL THIS WITH PHONE ON, NOT IN RECOVERY.

1st let's see how much free space I'm having:

# df -h | grep data /dev/block/mtdblock5 147.6M 76.7M 70.9M 52% /data 

As you can see I have left about 70 MB free. Lets see what folders eat my space:

# du -sk /data/data/* | sort -rn | head 18641 /data/data/com.navngo.igo.javaclient 14911 /data/data/com.opera.browser 6756 /data/data/com.google.android.gm 5194 /data/data/com.android.providers.contacts 3661 /data/data/com.htc.launcher 3083 /data/data/com.htc.googlereader 1276 /data/data/com.swype.android.inputmethod 1172 /data/data/com.android.settings 1144 /data/data/com.htc.android.mail 1084 /data/data/and.blogger 

Ok so it seems that iGO and Opera are eating 32 megs together. I'll leave data/data/com.google.android.gmalone since it's Gmail and I want to be more responsive by keeping its files to nand (I only have a class 4 card). Lets get to work. 1st we need to make a folder on sd-ext where to keep the files.

# mkdir /system/sd/.moreapps 

I made the folder .moreapps. Now let's move stuff and symlink them.

First we move them:

# mv /data/data/com.navngo.igo.javaclient /system/sd/.moreapps/com.navngo.igo.javaclient 

Then we symlink them:

# ln -s /system/sd/.moreapps/com.navngo.igo.javaclient /data/data/com.navngo.igo.javaclient 

Now we repeat the operation for opera. Move:

# mv /data/data/com.opera.browser /system/sd/.moreapps/com.opera.browser 

Symlink:

# ln -s /system/sd/.moreapps/com.opera.browser /data/data/com.opera.browser 

Now let's check again my free space.

# df -h | grep data /dev/block/mtdblock5 147.6M 51.8M 95.9M 35% /data 

Well it seems to me I gained 35 MB without uninstalling apps, without moving ALL of them to SD and experience some lags.

Now let's check if we made the symlinking right

# ls -al --color=none /data/data/com.opera.browser lrwxrwxrwx 1 0 0 38 Feb 22 05:46 /data/data/com.opera.browser -> /system/sd/.moreapps/com.opera.browser 

Yap all seems right. Opera and iGO are working at same speed, I freed up some space. Everyone's happy.

The advantage of this method is that you can choose what to move to sd-ext you don't have to have all to sd-ext. Now make sure you don't name your folder in /system/sd "data" since a2sd script will move back on nand all its contents.

This method is recommend for GPS software, Browsers, Games, some apps you got from market. It's best to leave system apps there to avoid FCs or slowdowns. If anything goes wrong with your app after this you can always move them back. 1st you delete the symlink (rm /data/data/whatevar) then move it back.


source: source

Getting the duplicated line of a stream

This command is to get the duplicated row/line out of a text stream:


more text.txt | uniq -d


Published with Blogger-droid v2.0.4

Print specific column from a stream with pipe separator

This is the command to print a defined column out of a text stream which has pipe "|" separator.


example, given a text stream example.txt of:

test1|column 1 | row 1

test2|column 1 | row 2

test 3|column 1 | row 3


Need to extract to:

column1,row1

column1,row2

column1,row3


The command is:

more example.txt | awk 'BEGIN {FS="|"} {print $1 "," $2}'


Published with Blogger-droid v2.0.4

Problem On AutoStart of the VNC Server but not configured

Remmina remote desktop connection installation is suspected responsible of activating the autostart trigger script of the vncserver if installed on Fedora 15.

Hence, during boot up, the system will initialize the Remmina setting first prior running the setting written in /etc/sysconfig/vncservers.

This potentially make crash of the autostart setting of /etc/sysconfig/vncservers.


To make this aligned, these are the steps on this issue:

1. Edit the file: /root/.vnc/xstartup, to mask the lines  as below:

    #xsetroot -solid grey

    #xtrem -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"&

    #twmmmm &

    #start &

2. Reboot your PC.


If you already have a vncserver running, you will need to shutdown the service before rebooting by:

1. Log in using "local", then "vncserver -kill :1" , or

2. Invoking "service vncserver stop", then delete any files inside "/tmp/.X11-unix"

3. Restart the vncserver service by "service vncserver restart"


I hope this will help somebody.


Published with Blogger-droid v2.0.2

Automatically Setting Numlock in Fedora

Execute these steps:

1. Install numlockx


yum install -y numlockx


or


download: rpmfind.net/linux/rpm2html/search.php?query=numlockx

install using:

rpm -ivh numlockx*.rpm


2. vi /etc/gdm/Init/Default


3. Find a line at the end like


exit 0


4. Add these lines just befor the line above


if [ -x /usr/bin/numlockx];

    then /usr/bin/numlockx on

fi


5. Save the file and restart the computer


You will find the NumLock has been activated by default at startup.


Published with Blogger-droid v2.0.2

Nice Blog!!