Friday, 12 February 2010

File Deletion using "Shred"

shred: Delete a file securely, first overwriting it to hide its contents.

It is available on most of Linux distributions including Debian GNU/Linux. To remove file called personalinfo.tar.gz :

$ shred -n 200 -z -u personalinfo.tar.gz


Where,

* -n: Overwrite N (200) times instead of the default (25)
* -z: Add a final overwrite with zeros to hide shreddin
* -u: Truncate and remove file after overwriting

Read the man page of shred(1) for more information. Most of these utilities are not effective (read as useless) only if :

* File system is log-structured or journaled filesystems, such as JFS, ReiserFS, XFS, Ext3 etc
* Your filesystems is RAID-based, compressed filesystem etc
* In addition, file system backups and remote mirrors may contain copies of the file that cannot be removed by these utilities.

Thursday, 11 February 2010

Crash - Backup!

grub.conf

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df ro single
initrd /boot/initrd.img-2.6.31-19-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 42ec6cd1ec6cc0b1
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

/etc/X11/xorg.conf

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 24.0 - 80.0
Vertrefresh 50.0 - 75.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

/etc/fstab

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
#

proc /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=0aa07ec4-ef30-4c91-9ecd-68cb9e0f86df / ext4 errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=04bbfabb-2bb2-4feb-bbb5-726f7ee4781c /home ext4 defaults 0 2
# Entry for /dev/sda6 :
UUID=d3a3ecd4-7a0c-4ca4-86e9-80b6018f076b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb2 /media/Archives ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb8 /media/Video ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/sdb1 /media/Audio ntfs-3g defaults,locale=en_GB.UTF-8 0 0

Tuesday, 12 January 2010

Unlocking Toshiba SD290EKB (Multi-region)

1) Connect to TV
2) Power on DVD
3) Enter 7777 using remote
4) Use on-screen menu to change region code (region code 0 = region-code free)
5) Power off DVD

or the hack procedure:

1) Power On
2) Open Tray
3) Press 9879 0 (0 stands for Multiregion, you may press buttons 1 to 6 to choose a specific region)
4) A Message appears stating that "The Reg.No was changed to: [insert whatever region (0-6) you selected here]"

Tuesday, 24 November 2009

Fix allows you to drop your ping by 150


Step 1 - TcpAckFrequency

NOTE if you are running Windows Vista this setting may not have any effect - a hotfix is needed which i'm tracking down. This works fine under Windows XP

Type "regedit" in windows "run.." dialog to bring up registry menu

Then find:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic
es\Tcpip\Parameters\Interfaces\

There will be multiple NIC interfaces listed in there, find the one you use to connect to the internet, there will be several interfaces listed (they have long names like {7DBA6DCA-FFE8-4002-A28F-4D2B57AE8383}. Click each one, the right one will have lots of settings in it and you will see your machines IP address listed there somewhere. Right-click in the right hand pane and add a new DWORD value, name it TcpAckFrequency, then right click the entry and click Modify and assign a value of 1.

You can change it back to 2 (default) at a later stage if it affects your other TCP application performance. it tells windows how many TCP packets to wait before sending ACK. if the value is 1, windows will send ACK every time it receives a TCP package.

Step 2 - TCPNoDelay

Type "regedit" in windows "run.." dialog to bring up registry menu

Then find:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Paramet
ers

Right-click in the right hand pane and add a new DWORD value, name it TCPNoDelay, then right click the entry and click Modify and assign a value of 1.

Click Ok and close the registry editor, then reboot your PC.

Saturday, 14 November 2009

Flash Player Glitches


Removing Conflicting Plugins

Ubuntu comes with swfdec plug-in, but it doesn't work on several sites. Installing the version from Adobe might solve this problem and improve performance.

To remove other flash plug-ins and install only the one from Adobe open "Applications >> Accessories >> Terminal", then paste (CTRL+SHIFT+V) the code below in the terminal window and hit enter:

sudo apt-get remove swfdec-mozilla
sudo apt-get remove mozilla-plugin-gnash
sudo apt-get remove adobe-flashplugin
sudo apt-get remove flashplugin-nonfree
sudo apt-get install flashplugin-nonfree

Flash Tweaks

If you're still encountering problems, try:

sudo mkdir /etc/adobe
echo "OverrideGPUValidation=true" >~/mms.cfg
sudo mv ~/mms.cfg /etc/adobe/

Tuesday, 3 November 2009

Backup xorg.conf (Ubuntu 10.11)


# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 24.0 - 80.0
Vertrefresh 50.0 - 75.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

Tuesday, 13 October 2009

Getting Madwifi Working (Ubuntu)

1.
Code:
sudo nano /etc/apt/sources.list
Uncomment anything that starts with "deb". Exit by pressing "CTRL+X" then answer "Yes". Finally hit "ENTER"

2.
Code:
sudo apt-get update && sudo apt-get upgrade
3.
Code:
sudo apt-get install build-essential libssl-dev
4.
Code:
sudo apt-get install linux-headers-`uname -r`
5.
Code:
sudo apt-get install subversion
6.
Code:
sudo -i
7.
Code:
sudo svn checkout http://svn.madwifi-project.org/madwifi/trunk/ madwifi-ng
8.
Code:
cd madwifi-ng
9.
Code:
echo "" >> /etc/modprobe.d/blacklist
10.
Code:
echo "#Remove To Install MadWIFI Drivers" >> /etc/modprobe.d/blacklist
11.
Code:
echo "blacklist ath9k" >> /etc/modprobe.d/blacklist
12.
Code:
echo "blacklist ath5k" >> /etc/modprobe.d/blacklist
13.
Code:
make && make install
14.
Code:
echo ath_pci >> /etc/modules
Restart your machine.

*******

Kernel updates of your system will kill your driver and will require a driver recompile. Just open a terminal and type in...
Code:
sudo -i
and repeat from step 8.

Saturday, 12 September 2009

Turn Off "Fortunes" in Konsole

Type into Konsole.....

kdesudo kate /etc/bash.bashrc

.....then remove (or hash out) the line.....

/usr/bin/mint-fortune

(It's usually the very last entry).

Linux Mint - xorg.conf (Post Refresh Tweaks)


Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 24.0 - 80.0
Vertrefresh 50.0 - 75.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

Linux Mint - xorg.conf (Prior To Refresh Tweaks)


Section "Monitor"
Identifier "Configured Monitor"
Vendorname "Generic LCD Display"
Modelname "LCD Panel 1280x1024"
Horizsync 31.5-64.0
Vertrefresh 56.0 - 65.0
modeline "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
modeline "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
modeline "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
modeline "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
modeline "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Gamma 1.0
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
SubSection "Display"
Depth 24
Virtual 1280 1024
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

Section "Module"
Load "glx"
Disable "dri2"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
EndSection

Section "ServerFlags"
Option "DontZap" "False"
EndSection

Wednesday, 10 June 2009

msttcorefonts (Kubuntu 9.04)

sudo apt-get install msttcorefonts

Installing nVidia Drivers (Fedora 11)

Type into a terminal:
su
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum install akmod-nvidia xorg-x11-drv-nvidia-libs.i586 xorg-x11-drv-nvidia-libs.x86_64
reboot
Then add the following to the newly created xorg.conf (/ext/X11)


Section "Monitor"
Identifier "Configured Monitor"
VendorName "Generic LCD Display"
ModelName "LCD Panel 1280x1024"
HorizSync 31.5 - 64.0
VertRefresh 56.0 - 65.0
Gamma 1
ModeLine "640x480@60" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
ModeLine "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
ModeLine "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
ModeLine "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync vsync
ModeLine "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync vsync
ModeLine "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
DefaultDepth 24
SubSection "Display"
Virtual 1280 1024
Depth 24
Modes "1280x1024@60" "1280x960@60" "1024x768@60" "800x600@60" "800x600@56" "640x480@60"
EndSubSection
EndSection

reboot!