Monday 10 August 2015

Install WintoUSB di Linux Mint

Currently WinUSB is not in the Ubuntu Software Center for Ubuntu 14.04 and there is no PPA for installing WinUSB in Ubuntu 14.04 either, so you have to install the Ubuntu 13.10 version.
  1. Open the terminal using the keyboard combination Ctrl+Alt+T.
  2. Download the winusb package that is compatible with your operating system's architecture:
    for Ubuntu 32-bit:
    wget https://launchpad.net/~colingille/+archive/freshlight/+files
    /winusb_1.0.11+saucy1_i386.deb
    
    for Ubuntu 64-bit:
    wget https://launchpad.net/~colingille/+archive/freshlight/+files
    /winusb_1.0.11+saucy1_amd64.deb  
    
  3. Install winusb:
    sudo dpkg -i winusb_1.0.11+saucy1*
    
  4. Fix dependencies errors:
    sudo apt-get -f install
    
These four steps will install the WinUSB graphical interface and the WinUSB command line tool. The WinUSB GUI is much easier to use than the WinUSB command line tool.
WinUSB is a tool for creating a bootable USB flash drive used for installing Windows. For creating a bootable USB flash drive for installing Ubuntu use the built-in Startup Disk Creator application. For creating a bootable USB flash drive for installing other Linux distros use UNetbootin from the Ubuntu Software Center.

Wednesday 8 July 2015

Install VNC Server Di Linux Mint


Setelah sebelumnya posting tentang VNC server di debian, lanjutan kali ini tentang instalasi VNC Server di UBUNTU dengan tampilan GUI META desktop environment. Versi Ubuntu yang saya pakai adalah Ubuntu Saucy Salamander (13.10).

Langkah – langkah instalasi:

  • Install META desktop environment
  • Install VNC server
  • Konfigurasi VNC Server
  • Auto start on boot VNC Server



1. Install META desktop environment

Tambahkan lebih dulu salah satu repo berikut ini di /etc/apt/sources.list (pilih salah satu saja)



  1. sudo add-apt-repository "deb http://repo.mate-desktop.org/ubuntu saucy main"
  2. sudo add-apt-repository "deb http://packages.mate-desktop.org/repo/ubuntu saucy main"
  3. sudo add-apt-repository "deb http://mirror1.mate-desktop.org/ubuntu saucy main"



Install META desktop environment



  1. sudo apt-get update
  2. sudo apt-get --yes --quiet --allow-unauthenticated install mate-archive-keyring
  3. sudo apt-get update
  4. sudo apt-get install mate-core
  5. sudo apt-get install mate-desktop-environment



2. Install dan Start VNC server




  1. sudo apt-get install vnc4server
  2. vncserver
masukkan password dan konfirmasi password. Langkah ini sekaligus membuat konfigurasi default start up VNC.
Selanjutnya stop VNC server untuk meng-edit konfigurasinya.

vncserver -kill :1


3. Edit Konfigurasi VNC Server


sudo nano .vnc/xstartup

Edit pada baris-baris berikut ini:

  1. #!/bin/sh
  2. # Uncomment the following two lines for normal desktop:
  3. unset SESSION_MANAGER
  4. unset DBUS_SESSION_BUS_ADDRESS
  5. # exec /etc/X11/xinit/xinitrc
  6. [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
  7. [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  8. xsetroot -solid grey
  9. vncconfig -iconic &
  10. # x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  11. # x-window-manager &
  12. mate-session &
  13. # gnome-session --session=ubuntu-2d &

Simpan perubahan tersebut (tekan ctrl + x lalu tekan Y)



4. Membuat script auto-start on boot




Langkah selanjutnya yang tidak kalah penting adalah membuat script auto start supaya VNC Server berjalan otomatis setelah server di restart (rebooting). Berbeda dengan CentOs yang cukup bisa dilakukan dengan command chkconfig.



4.1. Buat script startup lalu edit.

  1. touch /etc/init.d/vncserver
  2. chmod +x /etc/init.d/vncserver
  3. nano /etc/init.d/vncserver

4.2. Copy paste kode berikut ini lalu simpan

  1. #!/bin/sh -e
  2. ### BEGIN INIT INFO
  3. # Provides:          vncserver
  4. # Required-Start:    networking
  5. # Required-Stop:     networking
  6. # Default-Start:     2 3 4 5
  7. # Default-Stop:      0 1 6
  8. ### END INIT INFO

  9. PATH="$PATH:/usr/X11R6/bin/"
  10.   
  11. # The Username:Group that will run VNC
  12. export USER="root"
  13. #${RUNAS}

  14. # The display that VNC will use
  15. DISPLAY="1"

  16. # Color depth (between 8 and 32)
  17. DEPTH="16"

  18. # The Desktop geometry to use.
  19. #GEOMETRY="x"
  20. #GEOMETRY="800x600"
  21. GEOMETRY="1024x768"
  22. #GEOMETRY="1280x1024"

  23. # The name that the VNC Desktop will have.
  24. NAME="your-vnc-server"

  25. OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

  26. . /lib/lsb/init-functions

  27. case "$1" in
  28. start)
  29. log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
  30. su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
  31. ;;

  32. stop)
  33. log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
  34. su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
  35. ;;

  36. restart)
  37. $0 stop
  38. $0 start
  39. ;;
  40. esac

  41. exit 0
Agar script tersebut menjadi executable, ubah hak akses permission-nya.



sudo chmod +x /etc/init.d/vncserver

4.3. Atur script menjadi auto start pada saat proses booting





sudo update-rc.d vncserver defaults 99






4.4. Start VNC Server

/etc/init.d/vncserver start



Jalankan VNC viewer di client, lalu koneksikan ke server, dengan format IP_address_server:5901, port 5901 bisa diganti sesuai jenis user dari 1, 2 dan seterusny.