Category Uncategorized

Xubuntu/XFCE – Adding Custom (Quick-Launch) Tool Bar Launchers

The quick launch bar so familiar to pretty much every operating system and window manager these days, is a valuable asset, simplifying the need to navigate through several menus to start up any application you use regularly. XFCE is no different. XFCE has a quick way to add applications to your launch bar but when you look through the list of applications it provides it is far from complete and in many cases may not contain the application you want to add. No worries¬† This article will show you step by step how to add a “custom” program launcher to your bar.

Add launch bar menu

Add launch bar menu

First we’re going to right-click a space on the launch bar at the top or bottom of the screen as this can be done to the popup launcher as well, and were going to select “Panel” -> “Add New Items…:¬† This...

Read More

Fix iBooks after jailbreaking iOS 5.0.1

A lot of people have used the recent jailbreak tool RedSn0w to unlock their devices. Most have found that this is causing iBooks to no longer open or crash when opening after the jailbreak is done. Thanks Apple. Luckily, some tools have been created to fix this, however not everyone is getting the results they want with it. The issue with the tools looks to be that they are not fixing the permissions correctly when the iBooks files are moved to /var/stash. We found that with an extra step, you can get that working correctly.

First off, you will want to download SBSettings for the BigBoss repo. This repo have came installed with Cydia, so you shouldn’t need to add anything new. Once SBSettings is installed, your device should respring and take you back to the lockscreen.

Now, you will want ...

Read More

Check out our IP locator

New addition to the site! Find the country, city, state and ISP of any IP address. Check it out here:

RandomLinux.com IP lookup

Read More

Script to remove all drafts from WordPress

If you use a RSS feed aggregator for wordpress, you could end up with quite a few drafts that you will never use and need to remove. There are plugins for WordPress that will take care of this issue for you, however from my experience, they tend to be slow and can time out.

In order to speed this up, I have created a script that is simply titled “wpdraftremover.” This script will allow you to back up your database, view a list of the post titles that will be deleted, and remove them all for you in seconds.

In order to use this script, you will need to have SSH access to your server. Then, from the same folder as your wp-config.php file, you will want to run the following command:

bash <(GET randomlinux.com/wpdraftremover)

That will allow you to run the script without having to save the fil...

Read More

Bash script to remove unused WordPress tags

If you use an autotagging plugin in WordPress and you remove some posts, you may have tags left over in your database that are no longer being used. Since I’ve had that problem and couldn’t find a plugin to do what I wanted, I decided to write a script to remove those. You can see the source of this at http://randomlinux.com/tagremover.

To use this, you will need to ssh into your server and run the following command in the same directory as your wp-config.php file.

wget http://randomlinux.com/tagremover && sh tagremover

That will run the file, show your unused tags and prompt you to delete them. Keep in mind that this has only been tested on a few sites, so your results are not guaranteed and I am not responsible for anything that happens...

Read More

Tweaks for linux/freebsd apache and mysql – control the load with these tweaks

#Apache httpd.conf tweak: prefork.c module

#Add this to httpd.conf

=====================

<IfModule prefork.c>

StartServers 15

MinSpareServers 10

MaxSpareServers 40

ServerLimit 256Max

Clients 256

MaxRequestsPerChild 1000

</IfModule>

=====================

#mysql tweak:

#add this to my.cnf

=====================

key_buffer = 48

Mmax_allowed_packet = 8M

table_cache = 128

sort_buffer_size = 48M

net_buffer_length = 8M

thread_cache_size = 4

query_cache_type = 1

query_cache_size = 4M

=====================

#Another mysql tweak:

#add to my.cnf

max_connections = 200

bind-address = 127.0.0.1

safe-show-database

skip-locking

skip-innodb

# MySQL 4.x has query caching available.

# Enable it for vast improvement and it may be all you need to tweak.

query_cache_type=1

query_cache_limit=1M

query_cache_siz...

Read More

Happy Easter!

Just wanted to say Happy Easter to all of the randomlinux.com readers! Thank you so much for all of your support so far!

Read More

Using the read command

If you are writing a shell script and you are needing to have a variable set by getting user input, you can do so using read. If you are needing to get a variable set, you can use read along with the variable name.

read value

Then whatever the user inputs at the prompt will be come the value for the variable “value.” This example will show you how to incorporate it into your script.

#!/bin/bash

echo “Please input a value”
read value
echo “The value that you entered is $value”

Will come out looking like this when you run it, stopping to ask the user for a value and waiting for them to input one.

# ./example
Please input a value
5
The value that you entered is 5

You could also just use read -p to pause and make the user hit a key to continue.

#!/bin/bash

read -p “Press any key to creat...

Read More