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

2014年11月12日 星期三

[Ubuntu]flashplugin doesn't work on firefox - Failed to load libpepflashplayer.so

You can get the newest version of flash player to firefox. Just do the following:
 
sudo add-apt-repository ppa:skunk/pepper-flash
sudo apt-get update
sudo apt-get install pepflashplugin-installer
sudo mkdir -p /opt/google/chrome/PepperFlash
sudo ln -s /usr/lib/pepflashplugin-installer/libpepflashplayer.so /opt/google/chrome/PepperFlash
 
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install freshplayerplugin 

2014年11月4日 星期二

[Linux] Zeroshell RADIUS server + 802.1x Switch + SIP Phone

1. Zeroshell RADIUS server:


login username:admin/password:zeroshell

select RADIUS


add switch Name / IP address / Secret









 
  ------------------------------------------------------------------------------
2. Switch Seting 802.1X :

setting RADUIS Server IP / Port / Secret




 --------------------------------------------------------------------------------
3. IP Phone Seting 802.1X :











SIP Phone setting
Switch :Enable
EAP Method:PEAP or TTLS
Username:admin   (default)
Password:zeroshell   (default)


---------------------------------------------------------------------------------


Zeroshell RADIUS server ISO :
http://www.zeroshell.org/download/

2014年11月2日 星期日

[Ubuntu]mount an exFAT file system

Installing the below packages only will  mounts your exFAT formatted drives .
 
sudo apt-add-repository ppa:relan/exfat
sudo apt-get update
sudo apt-get install exfat-fuse exfat-utils
 --------------------------------------------------------
Find the position exFAT device.
 
cat /proc/partitions 

major minor  #blocks  name                                                                                          
                                                                                                                    
  11       0    1048575      sr0                                                                                        
   8        0  976762584    sda
   8        1   78147461     sda1
   8        2          1              sda2
   8        5    3999744      sda5
   8        6  894612480   sda6
   8       80   61930496   sdf
   8       81   61914112   sdf1   <<— exFAT device
--------------------------------------------------------
mount it manually.
sudo mkdir /media/exfat
sudo mount -t exfat /dev/sdf1 /media/exfat

2014年10月27日 星期一

大搬家…

 
今天把FB關閉了....
但現在的FB備份,無法備份網誌,
再加上之前 WordPress blog我的舊網誌~
索性就來個大搬家~
全部都搬進來Blogger統一管理!!
以後三不五十就可以在這裏寫些東西了~

Asterisk 1.7.1 Setting Login



進入root prompt

 1) 輸入 system-config-network,更改network設定, /etc/init.d/network restart

 2) 輸入yum -y update

 3) reboot

4) edit /etc/asterisk/http.conf as follows:
enabled = yes (remove semicolon)
enablestatic = yes (remove semicolon)
bindaddr = 0.0.0.0 (change from 127.0.0.1 to 0.0.0.0 to allow all IP)
prefix = asterisk (you have to put this for Asterisk 1.6)

5) edit /etc/asterisk/manager.conf as follows:

eanbled = yes
webenabled = yes

#add the following lines
[admin]
secret = test
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

 GUI Login name = admin, password(asterisk 叫 secret) = 1234

 6) execute /etc/init.d/asterisk restart

 7) Using an brower with the URL = http://<your_asterisk_server_IP_address>:8088/asterisk/static/config/index.html

 可以看到Asterisk-GUI的界面。

 8) 輸入 username = admin, password = 1234, 就可以Login 的Asterisk-GUI。

[Ubuntu]Lenovo Wifi not work.


解決方法:
sudo gedit /etc/modprobe.d/blacklist.conf
新增一筆內容如下:
blacklist acer_wmi

儲存後Reboot。即可。

[Ubuntu] Wireshark no interface



sudo groupadd wireshark
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 4754 /usr/bin/dumpcap
sudo usermod -a -G wireshark takashi
id takashi
#id takashi check group.reboot

-------------------------------------------------------
Upgrade to 1.8.2

To install the PPA, run the following command:

sudo add-apt-repository ppa:eugenesan/ppa

then run

sudo apt-get install wireshark

[ZPL]BC命令的格式


BC命令的格式:
^BCo,h,f,g,e,m

^BC = Code 128條碼
o  = 字體方向
默認值:^FW默認值或上一個^FW的值。
其他值: N = 正常(Normal)
R = 順時針旋轉90度(Roated)
I  = 順時針旋轉180度(Inverted)
B = 順時針旋轉270度(Bottom)
h = 條碼高度
默認值:由^BY設置其他值:1到9999點
f = 打印註釋行
默認值: Y = 打印(Yes)
其他值: N = 不打印(No)
g = 將註釋行打印在條碼上方
默認值: N = 不打印在條碼上方其他值: Y = 打印在條碼上方
e = 打印UCC校驗位
默認值:Y = 打印(Yes)
其他值:N = 不打印(No)
m = 模式
默認值:N = 不選擇模式其他值:U = UCC匹配模式。 (^FD或^SN後必須有19位數字。)用FNC1值自動選擇C子集。

版本16.3.0版本有效:
A = 自動模式。 自動模式將分析收到的數據並自動決定選取最佳的壓縮方式。 ^FD可以用全部ASCII字符。 打印機將確定是否變化子集。 四個及以上的數字將自動變化為C子集。

[ubuntu] install 嘸蝦米(ibus)




sudo dpkg -i ibus-table-boshiamy_1.3.0.20101012-1_all.deb

( ibus need restart)

[Game] Rimworld enable Dev mode (for Mac)

In Finder Press Command+Shift+Dot to open hidden folder /Users/[user name]/Library/Application Support/RimWorld/Config/DevModeDisable Dele...