Friday, August 9, 2013

Installing Ubuntu using USB drive

Sources

Creating live usb
  • Download Ubuntu from here
  • Format the usb drive to NTFS (Use Disk utility)
  • Unmount the usb device (Don't remove it from pc)
  • Use the following command in Linux terminal to copy the .iso file into the usb device
dd if=/location/of/.iso/file of=/location/of/usb/device bs=1024
    • Finding /location/of/usb/device
      • Remove the usb drive
      • Type cd /dev in Terminal
      • Type ls
      • Plug in usb device
      • Again type ls
      • Now it will display the usb device's location (Eg: If two extra items sdc and sdc1 are displayed in the second case /location/of/usb/device =  /dev/sdc (and NOT /dev/sdc1). See the example below
dd if=/home/vineeshvs/Downloads/ubuntu-12.04.2-desktop-i386.iso of=/dev/sdc bs=1024 status=progress

Installation

  • Restart the system and enter BIOS (press F1 or F2 or F10 or Del or Esc (different for different computers))
  • Go to Boot menu and set the boot preference such that usb divice (USB HDD) comes gets the first priority
  • Exit BIOS saving the changes and reboot with the usb device plugged in
  • Now the boot will be done from usb device and you can install Ubuntu
     Manual partitioning
  • Please visit the second link listed in Sources above
  • Sample partition for a 250 GB harddrive:
    • /boot : 300 MB
    • swap : 1998 MB
    • / : 7998 MB
    • /home : 245704 MB

Copying files from my remote linux machine

  •  Copying file
Source:  File vs.txt in the location /home/vineeshvs_logged_in/Desktop from the pc I have logged in.
Destination: /home/vineeshvs_remote_pc/Desktop in a remote pc in the same network with ip 10.107.104.1

scp /home/vineeshvs_logged_in/Desktop vineeshvs@10.107.104.1:/home/vineeshvs_remote_pc/Desktop
  • Copying folder
Source:  Folder vs in the location /home/vineeshvs_logged_in/Desktop/vs from the pc I have logged in.
Destination: /home/vineeshvs_remote_pc/Desktop in a remote pc in the same network with ip 10.107.104.1

scp -r /home/vineeshvs_logged_in/Desktop/vs vineeshvs@10.107.104.1:/home/vineeshvs_remote_pc/Desktop

Saturday, August 3, 2013

Installing Python in Windows

Courtesy:
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
http://www.calazan.com/how-to-set-the-proxy-settings-in-windows-via-command-line/
http://docs.python-guide.org/en/latest/starting/install/win.html

http://zetcode.com/tutorials/pyqt4/firstprograms/
http://www.ee.iitb.ac.in/student/~amaldev/contact.html 

Verified with:
OS: Windows 7 (32 bit)
Python version: 2.7.5 (32 bit)

1. start -> cmd
2. Go to command prompt
3. Set the http proxy environment (if your network use proxy)
    set HTTP_PROXY=http://user:password@proxy.domain.com:port
4. Go to http://www.python.org/getit/ and select the version of python and download (I used 'Python 2.7.5 Windows Installer')
5. Click on the (.msi) file and install in default directory (C:\Pytho27)
6. Go to http://docs.python-guide.org/en/latest/starting/install/win.html (It will istall the latest version of Distribute for Windows)
7. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools and install the 'setup tool for your pyton version'
(Install setuptools-0.9.8.win32-py2.7.‌exe if you have installed python 2.7.*)
8. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip and install 'pip' for your version of python
(Use pip-1.4.win32-py2.7.‌exe if you have installed python 2.7.*)
'Pip' is used to install packages for python.
9. Try to install one package to see if 'pip' is properly installed.
   
    1. start -> cmd
    2. Go to command prompt
    3. Type pip install virtualenv
10. Instead of installing through command prompt, you may visit http://www.lfd.uci.edu/~gohlke/pythonlibs and install the required packages.
(To run the sample code below, you need to install 'PyQt'. Hence install PyQt-Py2.7-x32-gpl-4.9.6-1.‌exe.

11. Try one code: Please visit http://zetcode.com/tutorials/pyqt4/firstprograms/ and copy the sample program and paste it in notepad and save as 'sample.txt'
12. Go to start -> Python 2.7 -> IDLE (Python GUI)
13. File -> open -> directory_where_sample.txt_is_saved/sample.txt
14. A new window will be opened with our sample code. Go to Run -> Run module. Now you should be able to see a blank pop up window (created by the sample python program)

VIS & VL2MV

18/01/2016: -----------     Installing VIS model checker     ----------------------------         Download from: http://vlsi.colorado.edu/~...