2014年12月28日 星期日

[Ubuntu] xrandr set screen panning in netbook(ASUS 1015PE)

ASUS Netbook 1015PE LCD 10" 1024x600
-----------------------------------------------------------
set to 1280x720 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1280x720 --panning 1280x720 --scale 1.25x1.2

set to 1280x768 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1280x768 --panning 1280x768 --scale 1.25x1.28

set to  1366x768 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1366x768 --panning 1366x768 --scale 1.33398x1.28

set to 1440x900 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1440x900 --panning 1440x900 --scale 1.40625x1.5

set to 1600x900 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1600x900 --panning 1600x900 --scale 1.5625x1.5

set to 1980x1080 command:
#xrandr --output LVDS1 --mode 1024x600 --fb 1980x1080 --panning 1980x1080 --scale 1.9335x1.8
==========================================================
modify   /etc/rc.local
add  screen panning command.


#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

xrandr --output LVDS1 --mode 1024x600 --fb 1280x768 --panning 1280x768 --scale 1.25x1.28

exit 0

startup autorun scripts 


But for a user script these should be launched as session scripts by gnome! Have a look under System > Preferences > Startup Applications.

add autorun /etc/rc.local

Pls Reboot.



[Ubuntu] Asus Fn+F3 touchpad toggle doesn't work

mkdir ~/bin
gedit ~/bin/toggletouchpad.sh


#!/bin/bash
if [ $(synclient -l | grep TouchpadOff | awk '{print $3}') == 1 ] ; then
  synclient touchpadoff=0;
else
 synclient touchpadoff=1;
fi 

chmod +x ~/bin/toggletouchpad.sh
~/bin/toggletouchpad.sh 
------------------------------------------------------------------------------------------------- 
Go to Settings Manager -> Keyboard -> Application shortcuts and 
create an Fn+F3 shortcut to point to /home/USER/bin/toggletouchpad.sh 
(replace USER with your actual username) and test the Fn+F3 combination.
     

2014年12月26日 星期五

[Android] FreeScale i.MX6DL SABRE platform pre-built Android 4.4.2 image.

1.Downloaded and unzipped the image (android_kk4.4.2_1.0.0-ga_full_image_6qsabresd)

2.Downloaded and unzipped the MFG tool (Mfgtools-Rel-13.01.00_ER_MX6DL_UPDATER)

3.Created "android" directory under MFGTool-Dir/Profiles/MX6Q Linux Update/OS Firmware/files

4.Copied the following files from android_jb4.2.2_1.0.0-ga_image_6qsabresd.tar.gz to the MFGTool-Dir/Profiles/MX6Q Linux Update/OS Firmware/files/android/ directory.

u-boot-6dl.bin
SD/boot.img
SD/system.img
SD/recovery.img


5.Changed the SABRE-SD SW6 (boot) to 00001100 to enter download mode Updated the MFGTool-Dir/cfg.ini file so that
[profiles] chip = MX6DL Linux Update

[platform] board = SabreSD

[LIST] name = Android-SabreSD-SD

6.OTG-USB cable connected to the motherboard and computer.

7.Run MfgTool2.exe.

8.Development board connected to the power supply, the following "HID-compliant device", click "Start" to start the download.

 9.After the download is complete. Turn off the power development board.
Changed the SW6 (boot) to 01000010 to enter SD-card boot mode.

============================================================================

1.Downloaded and unzipped the image (android_kk4.4.2_1.0.0-ga_full_image_6qsabresd)

2.Downloaded and unzipped the MFG tool (Mfgtools-Rel-13.01.00_ER_MX6DL_UPDATER)

3.Created "android" directory under MFGTool-Dir/Profiles/MX6Q Linux Update/OS Firmware/files

4.Copied the following files from android_jb4.2.2_1.0.0-ga_image_6qsabresd.tar.gz to the MFGTool-Dir/Profiles/MX6Q Linux Update/OS Firmware/files/android/ directory.

u-boot-6dl.bin
eMMC/boot.img
eMMC/system.img
eMMC/recovery.img


5.Changed the SABRE-SD SW6 (boot) to 00001100 to enter download mode Updated the MFGTool-Dir/cfg.ini file so that

[profiles] chip = MX6DL Linux Update

[platform] board = SabreSD

[LIST] name = Android-SabreSD-eMMC

6.OTG-USB cable connected to the motherboard and computer.

7.Run MfgTool2.exe.

8.Development board connected to the power supply, the following "HID-compliant device", click "Start" to start the download.

 9.After the download is complete. Turn off the power development board.
Changed the SW6 (boot) to 11010110 to enter eMMC boot mode.

2014年12月23日 星期二

[Proxmox] 無法更新 apt-get update error

Proxmox VE 3.x

 
apt-get update
Failed to fetch https://enterprise.proxmox.com/debian/dists/wheezy/pve-enterprise/binary-amd64/Packages The requested URL returned error: 401 Some index files failed to download. They have been ignored, or old ones used instead.
   
cat /etc/apt/sources.list.d/pve-enterprise.list
deb https://enterprise.proxmox.com/debian wheezy pve-enterprise

編輯pve-enterprise.list,並在路徑前加入“#”

nano /etc/apt/sources.list.d/pve-enterprise.list
# deb https://enterprise.proxmox.com/debian wheezy pve-enterprise

編輯sources.list,
並加入deb http://download.proxmox.com/debian wheezy pve-no-subscription
nano /etc/apt/sources.list
deb http://ftp.debian.org/debian wheezy main contrib

# PVE pve-no-subscription repository provided by proxmox.com, NOT recommended for production use
deb http://download.proxmox.com/debian wheezy pve-no-subscription

# security updates
deb http://security.debian.org/ wheezy/updates main contrib

網頁按下Refresh, 下方便出現可更新項目元件。

2014年12月22日 星期一

[DIY] DIY passive ethernet tap

使用三個RJ-45接頭,
兩個的8Pin的RJ45平行對焊~~~
另外一個頭,只需要2Pin,
分別搭在8Pin的RJ45接頭第三和第六腳位。





































搭配Switch使用,Host兩端分別接上網路設備及Switch,
Tap端連接PC,此時開啟Wireshark即可攔封包。



















2014年12月19日 星期五

[Proxmox] USB physical port mapping / 新增USB裝置至虛擬主機

新增HP Laser Jet 1020 Printer至Win7 虛擬主機.



Setp 1:

查詢虛擬主機所連接的Port位

qm monitor <VM_ID> 
qm> info usbhost


















根據上圖,HP 1020印表機位置在Bus 1 、 Port 1
因此要寫入設定檔時,必須寫入1-1
  • Bus 1, Port 1 => 1-1


如連接的設備遇到Port 連續顯示時,寫入方式如下:
  •  Bus 1, Port 1, Port 3 => 1-1.3



Setp 2:

編輯虛擬主機設定檔

nano /etc/pve/qemu-server/<VM_ID>.conf 














新增一筆USB裝置
usb0:host=1-1



Setp 3:

開啟虛擬主機(Win7),查看裝置管理員,
則出現USB列印支援,印表機也出現HP 1020




[Ubuntu] Ubuntu-MATE 14.10 install XRDP


Install XRDP command:

sudo apt-get install xrdp




MATE Desktop Interface:

sudo apt-get update

sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

echo mate-session >~/.xsession

sudo service xrdp restart


xfce Desktop Interface:


sudo apt-get update

sudo apt-get install xfce4

echo xfce4-session >~/.xsession

sudo service xrdp restart



LXDE Desktop Interface:


sudo apt-get update

sudo apt-get install lxde

echo lxsession -s LXDE -e LXDE > ~/.xsession

sudo service xrdp restart

Ubuntu Libreoffice add Chinese language

  sudo apt-get install libreoffice sudo apt-get install libreoffice-l10n-zh-tw libreoffice-help-zh-tw   如要新增簡體中文則輸入下方指令: sudo apt-get instal...