Thursday, January 29, 2015

[How-to] Mount /home to another disk partition

[How-to] Mount /home to another disk partition

I need to free up some space in my linux(Ubuntu) main partition. I decided to move my /home folder to another partition. So I did the following, as instructed here, https://help.ubuntu.com/community/Partitioning/Home/Moving:

~$ sudo blkid
~$ sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
~$ cmp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
~$ sudo gedit /etc/fstab
    and appended
    UUID=????????  /media/home  ext4  defaults  0  2 
~$ sudo mkdir /media/home
~$ sudo mount -a
~$ sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/.
~$ sudo diff -r /home /media/home
~$ sudo gedit /etc/fstab
     and edited /media/home to /home
~$ cd / && sudo mv /home /old_home && sudo mkdir /home
~$ reboot
~$ sudo rm -r /old_home
~$ sudo rmdir /media/home

Kali Linux - My Disaster Recovery Script

~# update-rc.d ssh enable

~# cat /etc/apt/sources.list
        deb http://security.kali.org/kali-security kali/updates main contrib non-free
   deb http://http.kali.org/kali kali main contrib non-free

~# echo export http_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export https_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export ftp_proxy=\"http://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc
~# echo export all_proxy=\"socks://userid:password@proxyaddressordomainname:8080/\" >> ~/.bashrc

~# openvas-mkcert
~# oepnvas-mkcert-client -i
~# openvas-nvt-sync --wget OV_HTTP_FEED
~# openvassd
~# openvasmd --rebuild --progress
~# openvasmd --create-user=openvasadmin --new-password=1234567890
~# openvasmd -p 9390 -a 0~# gsad --http-only --listen=0 -p 9392~# openvas-check-setup

Friday, July 18, 2014

Install SketchUp Make 2014 into Ubuntu 14.04

Install SketchUp Make 2014 into Ubuntu 14.04

This post of Ji M exactly worked for me, http://ubuntuhandbook.org/index.php/2014/06/install-google-sketchup-ubuntu1404/ 

Summary:
1. Configure Wine > Applications > Windows Version
    Select Windows 7

2. Configure Wine > Libraries > New override for library
    Add riched20

3. Install SketchUp

4. Launch SketchUp with no RubyAPI by:
    SketchUp.exe /DisableRubyAPI
    or
    Edit the command on the application's desktop link.


Problem:
The application hangs at start-up immediately after selecting a template. Step no. 4 above corrected the problem.

Saturday, July 12, 2014

Avast Linux Guide

Download Avast Linux here:
http://files.avast.com/files/linux/avast4workstation_1.3.0-2_i386.deb
or from my backup:https://drive.google.com/file/d/0B4CqOxmp5noLNnFUQzFkSUZ0NU0/edit?usp=sharing

WARNING:
 Installation Procedure:
sudo dpkg -i avast4workstation_1.3.0-2_i386.deb 

On Kernel error try this: 
sudo sysctl -w kernel.shmmax=128000000
or to permanently effect the setting
echo sysctl -w kernel.shmmax=128000000 >> /etc/init.d/rcS


Installed Application
Executables from terminal
- avast
- avast-update
- avastgui

Error on Updating
When updating, the /home/[user]/.avast/400.vps will increase in size. If size breaches the size of kernel shared memory, a kernel error will again occur. Increase again the size of kernel.shmmax as instructed above.

References
https://forum.avast.com/index.php?topic=91145.0
https://forum.avast.com/index.php?topic=116665.0

Friday, July 11, 2014

Friday, July 4, 2014

How to resize pictures in Ubuntu

In Ubuntu, this is how I resize my image files

First, I installed imagemagick
~# sudo apt-get install imagemagick

To resize file individually
~# convert [imagefilename] -resize 1366 [newimagefilename]
  • The [newimagefilename] can be the same as the original filename if the original file is not intend not to be preserved.
  • 1366 will be the new size, change this with desired figure.
To deal with multiple files, I use loop like this: 

~# for file in *.JPG; do convert $file -resize 1366 $file; done

Saturday, May 24, 2014

How to Install and Calibrate Joystick in Ubuntu

How to Install and Calibrate Joystick in Ubuntu

~$ sudo apt-get update
~$ sudo apt-get install joystick
~$ sudo apt-get install jstest-gtk


To calibrate, open jstest-gtk from search key.