Archive for the ‘Tips & Tricks’ Category

Usefull linux commands (ongoing)

Monday, March 9th, 2009

These are just commnads i had to hunt for in linux and want to remember for possible later use.

this will show the last 10 lines of a file (messages in this example) and monitor the file for changes, press ctrl-c to exit

tail -f /var/log/messages

create a loop file (replace 1024 with the size in MB)

dd if=/dev/zero of=loop_filename bs=1M count=1024

mkfs.ext3 -F loop_filename

Check fragmentation of XFS filesystem (50% is not bad really, change sda6 to your xfs partition)

xfs_db -c frag -r /dev/sda6

Kill a stubborn process, #### is the process id (PID)

kill -9 ####

Mythweb weather and doppler radar

Thursday, March 5th, 2009

mythweb dopplerI previously posted my fix to get a partial fix to the weather page in MythWeb, but the doppler radar image wasn’t there… after further perusing i found a fix…

sudo ln -s /var/www/mythweb/data/ /var/www/

Seems this one was actually throwning a nice error in the Apache2 error.log…

[Thu Mar 05 05:02:58 2009] [error] [client 192.168.0.269] File does not exist: /var/www/data, referer: http://tv/mythweb/weather

Wheee… MythWeb weather works for me now (Mythbuntu 8.10)

Fix MythWeb’s Weather page (partially)

Thursday, March 5th, 2009

mythweb weatherJust installed Mythbuntu and was playing around with the MythWeb feature, really sweet. But, the weather page was only showing a horizontal rule.

Did some poking around with the module code. In the file /var/www/mythweb/modules/weather/handler.php It read:

// Get configured WeatherScreens from the database
$sh = $db->query(’SELECT screen_id, draworder
FROM weatherscreens
WHERE hostname=?’,
$_SESSION['settings']['host']);

Changing the last line to the following like I found in a similar section in init.php to:

hostname);

actually showed me my current conditions and three day forcast… the doppler radar image is missing though.

Hope it helps someone out there.

Show or Hide the Recycle Bin in Windows XP

Thursday, January 29th, 2009

2 registry files:

To show…

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]
@=”Recycle Bin”

 

To hide…

REGEDIT4

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]

AVG AntiVirus FREE - VERSION 7.5

Saturday, January 24th, 2009

I have been a long time user of AVG. Sometime last year they went to this bloated version 8… I had just reinstalled my Windows XP and wanted the old one back.

Being a packrat, i still had AVG-Free-Edition-7.-5.487 (from 9-11-2007)

click click… This version has expired…

date & time… 9-11-2007… click click… bingo

basically just set the date and time back to a time near the version you want.

Still updates fine, works much faster with a lower footprint.

find older versions at: http://www.oldversion.com/program.php?n=avg

Windows Firewall Error 5

Saturday, January 24th, 2009

Just reinstalled Windows XP with SP3 slipstreamed via nLite. I use a router so normally have the firewall disabled. Needed to connect directly to the net for another reason and tried to enable the Windows Firewall. Went to control panel, clicked on firewall, was greeted with the normal message telling me it was not on and to change settings i would need to enable it. I told windows to make it so, and received an error saying it couldnt be done.

So, i went into services (services.msc), scrolled down to Windows Firewall/Internet Connection Sharing (ICS), right clicked it and chose start… received an “Error 5 Access is denied”… wtf?!?

Next i was off to google, came across a LENGTHY thread… http://forums.techguy.org/4034641-post37.html … that is the portion of the thread that finally solved it for me.

Basically i was somehow missing some registry keys…

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile]
“EnableFirewall”=dword:00000001
“DoNotAllowExceptions”=dword:00000000
“DisableNotifications”=dword:00000000

After entering those, i rebooted and all was well.

Disable the Firefox plugin delay

Wednesday, October 8th, 2008

Tired of waiting on the timer when installing a Firefox extension? I was, so I typed in about:config into the address bar and added the following preference with a value of 0:

security.dialog_enable_delay

Hurray, no more delay :)

Removing the AVG Safe Search extension in Firefox

Wednesday, October 8th, 2008

Having a problem with the AVG Safe Search plugin? You can’t uninstall it because the Uninstall button is greyed out? Yea, Grisoft decided to install this extension and not allow users to remove it… I always hate that.

Sure you can disable it, but i wanted it GONE. Here is how… open regedit, and browse to:

KEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions

delete:

{3f963a5b-e555-4543-90e2-c3908898db71}

Restart Firefox and your done :)

IPConfig

Friday, January 18th, 2008

The default output is to display only IP address, subnet mask and default gateway for each adapter bound to TCP/IP.

Adding /flushdns to this command will purge the local DNS resolver cache, this is handy when a website has VERY recently moved. I learned this command after my webhosts automatic DNS update failed renewing my account. Other computers in the house could see the website, but this one machine would not. After flushing its DNS cache, all was well.

Another switch is /displaydns, this lists all entries in the cache (including recent entries from the hosts file).

In Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon. To restart the nscd daemon, use the command `/etc/init.d/nscd restart`.

An easy way to backup PuTTY configuration

Sunday, December 23rd, 2007

Putty stores its settings in the Windows registry. To save a backup of your Putty settings, you’ll need to export this registry key to a file. At a command line enter:

regedit /e putty.reg HKEY_CURRENT_USER\Software\SimonTatham