This is something which I believe should have been available by default.
Thou, the below steps to get that is not so difficult and also little bit of fun.
Step 1. Download gconf-editor
# yum install gconf-editor
Step 2. Open gconf-editor
# gconf-editor
Step 3. Go to / -> desktop -> gnome -> shell -> windows
Step4. Now click on value of button_layout and change it to:
"menu:minimize,maximize,close"
Step 5. Logout and Login back ...... it's done! :)
Note: if you want some space between menu buttons use "space" for eg:
"menu:minimize,maximize,space,close"
My Own Blog
Sunday, 13 November 2011
Thursday, 15 September 2011
Tip / Trick for web developers
Today I was trying to install JEvent2.0 in Joomla1.5.23 for one of my client.
But, when ever I "upload and install" JEvent I was getting few MySQL error messages.
Something like this:
* Component Install: DB function failed with error number 2006
MySQL server has gone away SQL=INSERT INTO ULJoomla_components VALUES( 0, 'JEvents MVC', 'option=com_jevents', 0, 0, 'option=com_jevents', 'JEvents MVC', 'com_jevents', 0, 'js/ThemeOffice/component.png', 0, '', 1 )
SQL =
INSERT INTO ULJoomla_components VALUES( 0, 'JEvents MVC', 'option=com_jevents', 0, 0, 'option=com_jevents', 'JEvents MVC', 'com_jevents', 0, 'js/ThemeOffice/component.png', 0, '', 1 )
* Error Loading ModulesMySQL server has gone away SQL=SELECT id, title, module, position, content, showtitle, control, params FROM ULJoomla_modules AS m LEFT JOIN ULJoomla_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 2 AND m.client_id = 1 ORDER BY position, ordering
Solution:
Extract the archive file and paste the complete path and press "Install" (not upload and install).
But, in my case I don't have full path since I have access to joomla's root directory using ftp only.
Here, goes the solution, how I made it worked for me:
1. upload the archive file into (joomla'root directory)/tmp/
2. now use "upload and install" method to install file.
Finally installed smoothly without a single issue.
But, when ever I "upload and install" JEvent I was getting few MySQL error messages.
Something like this:
* Component Install: DB function failed with error number 2006
MySQL server has gone away SQL=INSERT INTO ULJoomla_components VALUES( 0, 'JEvents MVC', 'option=com_jevents', 0, 0, 'option=com_jevents', 'JEvents MVC', 'com_jevents', 0, 'js/ThemeOffice/component.png', 0, '', 1 )
SQL =
INSERT INTO ULJoomla_components VALUES( 0, 'JEvents MVC', 'option=com_jevents', 0, 0, 'option=com_jevents', 'JEvents MVC', 'com_jevents', 0, 'js/ThemeOffice/component.png', 0, '', 1 )
* Error Loading ModulesMySQL server has gone away SQL=SELECT id, title, module, position, content, showtitle, control, params FROM ULJoomla_modules AS m LEFT JOIN ULJoomla_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 2 AND m.client_id = 1 ORDER BY position, ordering
Solution:
Extract the archive file and paste the complete path and press "Install" (not upload and install).
But, in my case I don't have full path since I have access to joomla's root directory using ftp only.
Here, goes the solution, how I made it worked for me:
1. upload the archive file into (joomla'root directory)/tmp/
2. now use "upload and install" method to install file.
Finally installed smoothly without a single issue.
Wednesday, 14 September 2011
Alias to find process id of a running process
This is an example for those who believe in saving time.
You can create your own aliases to save your time from typing long commands again and again.
Create alias
# alias p_id='echo -n '\''process name:'\'';read a;ps -e | grep firefox | cut -d '\'' '\'' -f 2'
Execute it
# p_id
process name:[name of the running process]
[output will be the process id]
You can create your own aliases to save your time from typing long commands again and again.
Create alias
# alias p_id='echo -n '\''process name:'\'';read a;ps -e | grep firefox | cut -d '\'' '\'' -f 2'
Execute it
# p_id
process name:[name of the running process]
[output will be the process id]
Sunday, 7 August 2011
[Alpha version] Now it is simple to install rpm packages on other pc which don't have internet connection.
Run this script package-script.sh from the system which has internet connection then copy the package.tar.gz file.
Now,
How to install packages on other pc which don't have internet connection.
1. paste package.tar.gz into non-internet pc.
2. Switch to root user using
$ su -
3. Extract tarball
# tar -C packagepkd -xvf package.tar.gz
4.
# cd packagepkd/.package/
5. rpm -ivh ....
check "man rpm" for more details.
Note:
Kindly, report here if you find any bug.
Now,
How to install packages on other pc which don't have internet connection.
1. paste package.tar.gz into non-internet pc.
2. Switch to root user using
$ su -
3. Extract tarball
# tar -C packagepkd -xvf package.tar.gz
4.
# cd packagepkd/.package/
5. rpm -ivh
check "man rpm" for more details.
Note:
Kindly, report here if you find any bug.
How to remove all *.lnk files from pen drive
Yesterday, I have connected my pen drive on someone else's system. Now, when I return home and connected my pen drive on my system, I have found lnk files for each file and directory in my pendrive. It is a waste of time deleting those files one by one. So, here is a simple command to remove all lnk files.
# find /path/to/pendrive -name '*.lnk' -exec rm -v '{}' ';'
# find /path/to/pendrive -name '*.lnk' -exec rm -v '{}' ';'
Friday, 8 July 2011
How to change MAC address in fedora
1. First step is to find the current MAC address and take a backup copy in a safe place.
To know your current MAC type:
$ ifconfig | grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:19:48:2E:D1:27
The above hexadecimal numbers 00:19:48:2E:D1:27 is your MAC address for device eth0.
Simply copy and paste it in a file.
2. Now, time to change the MAC address this requires you to work as root user.
Take the network interface down
# ifdown eth0
Now, lets change the current MAC address to 00:E0:81:5C:B4:0F
# ifconfig eth0 hw ether 00:E0:81:5C:B4:0F
Take the network interface up again
# ifconfig eth0 up
Check if your MAC address is changed:
# ifconfig eth0 | grep HWaddr
Note:
Changing MAC address is only temporary. Once you reboot your machine, the operating system will reflect the physical MAC address burnt in your network card and not the MAC address you set.
To know your current MAC type:
$ ifconfig | grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:19:48:2E:D1:27
The above hexadecimal numbers 00:19:48:2E:D1:27 is your MAC address for device eth0.
Simply copy and paste it in a file.
2. Now, time to change the MAC address this requires you to work as root user.
Take the network interface down
# ifdown eth0
Now, lets change the current MAC address to 00:E0:81:5C:B4:0F
# ifconfig eth0 hw ether 00:E0:81:5C:B4:0F
Take the network interface up again
# ifconfig eth0 up
Check if your MAC address is changed:
# ifconfig eth0 | grep HWaddr
Note:
Changing MAC address is only temporary. Once you reboot your machine, the operating system will reflect the physical MAC address burnt in your network card and not the MAC address you set.
Thursday, 7 July 2011
Default Permission
Default Permission:
For Normal Users:-
1. On File:
-rw-rw-r-- or 664
2. On Directory:
drwxrwxr-x or 775
For users with root permissions:-
1. On File:
-rw-r--r-- or 644
2. On Directory:
drwxr-xr-x or 655
For Normal Users:-
1. On File:
-rw-rw-r-- or 664
2. On Directory:
drwxrwxr-x or 775
For users with root permissions:-
1. On File:
-rw-r--r-- or 644
2. On Directory:
drwxr-xr-x or 655
Subscribe to:
Posts (Atom)