Tuesday, July 15, 2014

Steps to Remastersys Ubuntu 12.04 LTS

1. Check there is enough space in /home folder. Because the customized OS will be stored under /home folder by default.
2. sudo /etc/apt/sources.list
Add this line at the bottom of the file
deb http://www.remastersys.com/ubuntu precise main
3. sudo apt-get update
4. sudo apt-get install remastersys*
5. sudo remastersys dist iso mycustomubuntu.iso
6. Goto the location /home/remastersys/remastersys
7. md5sum /home/remastersys/remastersys/yourfilename.iso
8. Check the file that is located /home/remastersys/remastersys/youfilename.iso.md5
Both the output should be the same.
9. sudo remastersys clean

Wednesday, July 2, 2014

Jun for fun - courtesy NixCraft

Wednesday, June 25, 2014

Steps to install Openshot Video editor in Ubuntu 14.04

1. Add openshot PPA
sudo add-apt-repository ppa:openshot.developers/ppa

2. Update list
sudo apt-get update

3. Install openshot
sudo apt-get install openshot openshot-doc

Transmission installation steps in Ubuntu 14.04

Add transmission into the repository:
sudo add-apt-repository ppa:transmissionbt/ppa

Steps for Transmission web interface: (install, if require)
sudo apt-get update
sudo apt-get install transmission-cli transmission-common transmission-daemon

Steps for Transmission GUI:
sudo apt-get update
sudo apt-get install transmission-gtk transmission-cli transmission-common transmission-daemon

GUI installation in Ubuntu 14.04 Server LTS

Installing light weight GUI in Ubuntu 14.04 Server LTS

#sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install

Activate apt-get with proxy server in Ubuntu 12.04 LTS

Setting up the proxy server temporarily

#export http_proxy=http://yourproxyaddress:proxyport

BASH rc method

This method adds a two lines to your .bashrc file in your $HOME directory. This method is useful if you would like apt-get and other applications for instance wget, to use a http-proxy.

gedit ~/.bashrc
Add these lines to the bottom of your ~/.bashrc file (substitute your details for yourproxyaddress and proxyport)


http_proxy=http://yourproxyaddress:proxyport
export http_proxy
Save the file. Close your terminal window and then open another terminal window or source the ~/.bashrc file:

source ~/.bashrc
Test your proxy with sudo apt-get update and whatever networking tool you desire. You can use firestarter or conky to see active connections.

If you make a mistake and go back to edit the file again, you can close the terminal and reopen it or you can source ~/.bashrc as shown above.


source ~/.bashrc

Squid log parsing script in Ubuntu 12.04

Squid log parsing script in Python

Step1: copy the following script and paste into any editor (gedit, vim, vi or nano)

#!/usr/bin/env python

import sys, os
from datetime import datetime

try:
    if not os.path.isfile(sys.argv[1]):
        sys.stderr.write("[Error]: %s is not a file\n" % sys.argv[1])
        sys.exit(1)
except IndexError:
    sys.stderr.write("Usage: parse_squid_log.py access.log\n")
    sys.exit(1)

with open(sys.argv[1]) as log:
    for line in log:
        line = line.split(' ')
        line[0] = str(datetime.fromtimestamp(float(line[0])))
        print ' '.join(line).strip()

Step2: Change the permission as like this (sudo chmod +x scriptname.py)
Step3: ./scriptname.py /var/log/squid3/access.log

The output will be in a readable format.