Posts

Showing posts from August, 2013

Raspberry PI - How to change desktop wallpaper?

Problem: When I right click on the desktop, a submenu pops up with these choices: terminal emulator, web browser, desktops, obconf, reconfigure, restart, exit. How can I change the desktop wallpaper? I don't see an option to do this with this submenu? Normally when you are using Raspbian "wheezy" with the LXDE Desktop Environment Right clicking should pop up: Create New Paste Selact All Invert Selection Sort Files Desktop Preferences If not ? Solution: Open a terminal and enter pcmanfm --desktop-pref . When the desktop preferences window pops up, click on the "Advanced" tab and deselect "Show menus provided by window managers when desktop is clicked." That's it and PCManFM File Manager that we had by default is back!

Cisco how to check interface index using snmp

Try command $ snmpwalk -v2c -c community-string HOST 1.3.6.1.2.1.31.1.1.1.1 Outcome will be: IF-MIB::ifName. 1 = STRING: Fa0 IF-MIB::ifName. 2 = STRING: Fa1              This -^- is the interface-number so when using for example nagios plugin check_itraffic use this number as interface parameter

[SOLVED ]Nagios / Cenreon This plugin must be either run as root or setuid root.

Problem:  Warning: This plugin must be either run as root or setuid root.    To run as root, you can use a tool like sudo.    To set the setuid permissions, use the command:    chmod u+s yourpluginfile Example: 1. chown root:nagios check_dhcp 2. chmod u+s check_dhcp    some plugins needs chown apache:nagios  (otherwise plugin`s outcome is out of bounds 255)

Colored bash in CentOS

The following is ripped from the ​ Gentoo /etc/bash/bashrc with minor modifications for slight differences in ​ CentOS : use_color = false # Set colorful PS1 only on colorful terminals. # dircolors --print-database uses its own built-in database # instead of using /etc/DIR_COLORS. Try to use the external file # first to take advantage of user additions. Use internal bash # globbing instead of external grep binary. safe_term = ${ TERM //[^[: alnum :]]/? } # sanitize TERM match_lhs = "$(<${COLORS})" [[ -z ${ match_lhs } ]] \ && type -P dircolors >/dev/null \ && match_lhs = $( dircolors --print-database ) [[ $'\n' ${ match_lhs } == * $'\n' "TERM " ${ safe_term } * ]] && use_color = true if ${ use_color } ; then if [[ ${ EUID } == 0 ]] ; then PS1 = '\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' else PS1 = '\[\033[01;32m\]\[email protected]\h\[\033[01;34m

Disable Ads on YouTube With This Simple Command

There are a lot of ways to block ads , but with a simple command in the developer console, you can disable all ads on YouTube via an experiment. Google frequently tries out new features with experiments via TestTube . A less advertised experiment can disable all ads on the site. Here's how to turn it on: Open up a YouTube video (any will do). Open up the developer console (Ctrl-Shift-J for Chrome, Ctrl-Shift-K for Firefox) Enter the following code: document.cookie="VISITOR_INFO1_LIVE=oKckVSqvaGw; path=/; domain=.youtube.com";window.location.reload(); Boom. No more ads. Since this is something that Google is allowing, it's possible it could go away in the future, but while it works, you get a lovely ad-free viewing experience without any plugins. It even works on those pesky video ads.

Unable to load dynamic library '/usr/lib/php/modules/module.so'

When I run command   php -v this error come up PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/module.so' - /usr/lib/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP 5.3.3 (cli) (built: Feb 22 2013 02:37:06) solution: This is cause by mcrypt extension. Edit /etc/php.d/mcrypt.ini and change ; Enable mcrypt extension module extension=module.so to this ; Enable mcrypt extension module extension=mcrypt.so     found at  http://stackoverflow.com/questions/16677558/startup-unable-to-load-dynamic-library-usr-lib-php-modules-module-so

Increasing the size of a virtual disk vmware on guest CentOS

Power off the virtual machine. Edit the virtual machine settings and extend the virtual disk size.  Power on the virtual machine. Identify the device name, which is by default /dev/sda , and confirm the new size by running the command: # fdisk -l Create a new primary partition: Run the command: # fdisk /dev/sda (depending the results of the step 4)   Press p to print the partition table to identify the number of partitions. By default there are 2: sda1 and sda2. Press n to create a new primary partition.  Press p for primary. Press 3 for the partition number, depending the output of the partition table print. Press Enter two times. Press w to write the changes to the partition table. Restart the virtual machine. Run this command to verify that the changes were saved to the partition table and that the new partition has an 83 type: # fdisk -l Run this command to convert the new partition to a physical volume: # pvcreate /dev/sda3 Run