Reverse Scroll on Fedora 18

Check your mouse ID by typing:

xinput --list


It will show a list something like this:

� Virtual core pointer                     id=2 [master pointer  (3)]
�   ��� Virtual core XTEST pointer               id=4 [slave  pointer  (2)]
�   ��� Microsoft Microsoft�� 2.4GHz Transceiver v7.0 id=9 [slave  pointer  (2)]
�   ��� Microsoft Microsoft�� 2.4GHz Transceiver v7.0 id=10 [slave  pointer  (2)]
� Virtual core keyboard                   id=3 [master keyboard (2)]
    ��� Virtual core XTEST keyboard             id=5 [slave  keyboard (3)]
    ��� Power Button                             id=6 [slave  keyboard (3)]
    ��� Power Button                             id=7 [slave  keyboard (3)]
    ��� Microsoft Microsoft�� 2.4GHz Transceiver v7.0 id=8 [slave  keyboard (3)]



After you get the mouse ID, then type this command to make the mouse scroll reversed:

xinput set-button-map 1 2 3 5 4

Fedora FTP 530 Error

Check your stored password by:

more /etc/passwd

check for the shell location from every lines of the files.
Compare these shells againts the:

/etc/shells

If there's path missing / not defined in the /etc/shells, just add that path (make sure you have installed the shell).

Fedora Mouse Reverse Scroll

Just invoke this to know the current config:

xmodmap -pp

To modify into reversed scroll:

xmodmap -e "pointer = 1 2 5 4 7 6 8 9 10 11 12"

Setting up VNCServer on Fedora 16

1. yum install tigervnc-server 2. cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:3.service 3. vim /etc/systemd.system.vncserver@:3.service     Edit: ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" ExecStop=/sbin/runuser -l -c "/usr/bin/vncserver -kill %i" To: ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" ExecStop=/sbin/runuser -l -c "/usr/bin/vncserver -kill %i" Then save the file 4. systemctl enable vncserver@:3.service 5. systemctl start vncserver@:3.service If you find error: Failed to issue method call: No such file or directory vncserver Then check the running vncserver services by: vncserver -list If found that terminal allready run, kill it by: vncserver -kill

OCI8 Installation on Fedora 16

Install all the Oracle's Instant Client rpms applications from :
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

The transcript of the istallation:
 1021  yum install oracle-instantclient-x86_64-11.2.0.2.0-1.remi.nosrc.rpm
 1022  yum install local oracle-instantclient-x86_64-11.2.0.2.0-1.remi.nosrc.rpm
 1024  yum install local oracle-instantclient11.2-tools-11.2.0.2.0.x86_64.rpm
 1025  yum install local oracle-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm
 1027  yum install local oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm
 1028  yum install local oracle-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm
 1029  yum install local oracle-instantclient11.2-tools-11.2.0.2.0.x86_64.rpm
 1031  yum install local oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm
 1033  yum install local oracle-instantclient11.2-odbc-11.2.0.2.0.x86_64.rpm
 1035  yum install local oracle-instantclient11.2-jdbc-11.2.0.2.0.x86_64.rpm

provide the system variables for oracle installations:
 1099  export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
 1100  export ORACLE_HOME=/usr/lib/oracle/11.2/client64

Install 'libaio' dependencies:
 1110  yum install -y libaio-devel.x86_64
 1111  yum install libaio.x86_64

Install pecl:
 1136  yum install -y pecl
 1137  pecl

Config the pear proxy:
 1139  pear config-set http_proxy http://proxy1:8080/

Install php-devel:
 1142  yum install -y php-devel

Install php-pear:
 1150  yum install php-pear

Using pecl, install oci8:
 1140  pecl install oci8

Inside the installation, provide the argument of instantclient installation location:
"instantclient,/usr/lib/oracle/11.2/client64/lib"
(please re-check the actual location of the installation.
It may differ according to each instantclient version)

Then, add this line into file /etc/php.ini:
extension=oci8.so

Then restart the httpd.

Day 5 in Jelapang

Just started to blog again. So this is why it started with day 5 instead of my first day.

This morning I went out from home still with my wife.around 5 minutes earlier than yesterday.

I saw some of people are the same people I was around with last night when I came home from work.Seems they are in morning shift too.

One thing I like here in the morning LRT is the train which is longer than afternoon trains.It's nice since I can be sitting all the way.

The trip from Jelapang to Choa Chu Kang took around 10 minutes.

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

How To Install Google Chrome In Fedora 15

These are the steps on installing google chrome to a Fedora 15 system:

1. Download the rpm:

     wget http://dl-ssl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

2. Rename the google repo in /etc/yum.repos.d as another file

3. Install the rpm:

    Yum install local -y /<donwload_dir>/google-chrome-stable_current_x86_64.rom


Published with Blogger-droid v2.0.2
Published with Blogger-droid v2.0.2

Installing mysql-workbench on Fedora

This are the steps for installing MySQL Workbench on Fedora:

1. Get the list of dependencies by invoking:

     yum install mysql-workbench

2. Install the dependencies independently

3. Install remi repo:

     yum install http://rpms.famillecollet.com/remi-release_15.rpm

4. Download (my case, I'm using wget) from:

     ftp://ftpbone.net/mirrors/rpms.famillecollet.com/fedora/15/rmi/x86_64/msql-workbench-....rpm


Published with Blogger-droid v2.0.2

Configuring Yum Behind Proxy

This is to enable yum installation to a server behind proxy network.

1. Configure yum.conf

    vi /etc/yum.conf

    add these lines:

            proxy = http://proxyname:port/

            proxy_username = name

            proxy_password = password



2. Export http_proxy variable

   export http_proxy = "http://proxy:port/"

3. Export http_proxy variable in bash login script

vi /root/.bash_profile

export http_proxy="http://proxy:port/"

ORACLE PL/SQL: Change Date/Time format display

The syntax:

SELECT to_char(INSERTDATETIME,'YYY-MM-DD HH24:MI:SS') FROM tablename WHERE conditions


Published with Blogger-droid v2.0.2

Oracle PL/SQL List of all table

To query tables on a database:

SELECT * FROM tab


Published with Blogger-droid v2.0.2

Setting up php OCI8 on Fedodra 15

Hi guys, some of you need to know about setting up your PHP on Fedora 15 to beable to be used to query Oracle database.

Here is the steps:

1. Make sure your "php-devel" package has been installed along with the dependencies. (Use Yum installation if you are not sure)

2. Install "instantclient-basic" and "instantclient-devel" from Oracle site.

     note: Choose the .rpm type of files and install them using "yum install local ...rpm"

3. Find and get the oci8 source file from: 

     http://pecl.php.net/package/oci8 (ie : oci8-1.4.5.tgz)

4. Extract the file at "/usr/lib/oracle/<VERSION>"

5. From command window, go to the extracted directory and type:

     "./configure --with-oci8=shared,instantclient,usr/lib/oracle/<VERSION>/client/lib"

6. Make

7. Make install

8. Add library shared object for PHP

    echo extension=oci8.so > /etc/php.d/oci8.ini

9. Restart the server


Published with Blogger-droid v2.0.2

Testing

This is testing for using blogger droid


Published with Blogger-droid v2.0.2

Nice Blog!!