2015年12月9日
Debian 簡易使用 ftp
Server 端:
Setp 1. 安裝 ssh server
# apt-get install openssh-server
Step 2. 確認ssh port 是否有打開
# netstat -tlnp | grep ssh
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 763/sshd
tcp6 0 0 :::22 :::* LISTEN 763/sshd
ref:https://wiki.debian.org/SSH
Client 端:
Step 1. 下載 Client FileZilla
Step 2. 開啟並輸入主機 帳號 密碼 連接阜
2015年11月25日
2015年11月16日
2015年11月15日
Windows powershell 安裝或更新
Windows PowerShell 4.0 is part of the Windows Management Framework 4.0, which includes the following:
- Windows PowerShell
- Windows PowerShell Integrated Scripting Environment (ISE)
- Windows PowerShell Web Services (Management OData IIS Extension)
- Windows Remote Management (WinRM)
- Windows Management Infrastructure (WMI)
- Server Manager WMI provider
- Windows PowerShell Desired State Configuration (DSC)
Reference:http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx
2015年11月14日
2015年10月6日
Visual Studio C# 安裝 OpenCV
2015年9月30日
Interface Design Practice 1 2015/09/30
由PC host端觀看target board開機資訊,並操作基本uboot command
PC host端:
OS:Linux Debian
安裝minicom 終端模擬程式
在terminal下達底下command
請參考此篇→文章的Use Serial Port To Remote Control
這邊我的target bound rate為9600,format為8N1
安裝與設定完成則下達
# minicom -w
再把target board reset
離開minicom請按Ctrl-A再按q選擇yes
離開minicom請按Ctrl-A再按q選擇yes
2015年9月4日
Raspberry Pi 2 Energy Analysis
事前準備
- 一台Linux OS x86或x86-64 主機(有3GB以上硬碟空間,RAM>2GB)
- 一塊SBC(UDOO, Raspberry Pi 2)
- USB 延長線公對母
- ARM Energy Probe
下載DS-5 Streamline
# mkdir /usr/local/DS500-Strealine
# cd /home/clementyan/下載/
# mv DS500-BN-00019-r5p0-21rel1.tgz /usr/local/DS500-Strealine
# cd /usr/local/DS500-Strealine
# tar xfva DS500-BN-00019-r5p0-21rel1.tgz
2015年8月2日
Disabling shutdown command for users 禁止一般使用者關機 linux kde
最近玩server發現一件嚴重的事情!!
一般使用者竟然可以執行
$ /sbin/shutdown -h now
Solution:
# ls -l /sbin/shutdown
lrwxrwxrwx 1 root root 14 May 26 14:07 /sbin/shutdown -> /bin/systemctl
# ls -l /bin/systemctl
-rwxrwxrwx 1 root root 538904 May 26 14:07 /bin/systemctl
# chmod 755 /sbin/shutdown
# ls -l /bin/systemctl
-rwxr-xr-x 1 root root 538904 May 26 14:07 /bin/systemctl
# vi /etc/kde4/kdm/kdmrc
搜尋所有AllowShutdown=ALL
改成AllowShutdown=Root
一般使用者竟然可以執行
$ /sbin/shutdown -h now
Solution:
# ls -l /sbin/shutdown
lrwxrwxrwx 1 root root 14 May 26 14:07 /sbin/shutdown -> /bin/systemctl
# ls -l /bin/systemctl
-rwxrwxrwx 1 root root 538904 May 26 14:07 /bin/systemctl
# chmod 755 /sbin/shutdown
# ls -l /bin/systemctl
-rwxr-xr-x 1 root root 538904 May 26 14:07 /bin/systemctl
# vi /etc/kde4/kdm/kdmrc
搜尋所有AllowShutdown=ALL
改成AllowShutdown=Root
2015年7月25日
2015年7月24日
Arduino practice 3
const int numReadings = 10;
int readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
int total = 0; // the running total
int average = 0; // the average
int brightness = 0;
int fadeAmount = 5;
int delayDuration = 30;
int flag=0;
int readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
int total = 0; // the running total
int average = 0; // the average
int brightness = 0;
int fadeAmount = 5;
int delayDuration = 30;
int flag=0;
2015年6月7日
建立網路印表機伺服器 安裝網路印表機 智慧型手機列印 linux printer share windows linux smartphone tablet
測試環境在Linux上建網路印表機伺服器,讓電腦、手機與平板都可列印
Server硬體架構:x86_64
O.S.:Linux Debian Jessie
印表機:Epson stylns TX235(USB port)
印表機的選擇
印表機廠牌有Epson、Hp等,每家廠牌又有各種型號,我們所要選擇廠牌與型號,當然是要能支援Linux,我們從Linux 基金會的 Open Printing來搜尋哪些印表機支援Linux,網址如下:Open Printing 資料庫:http://www.openprinting.org/printers
2015年6月2日
Linux cpu temperature
# apt-get install lm-sensors
# sensors-detect
# sensors-detect revision 6209 (2014-01-14 22:51:58 +0100)
# Board: ASRock Z77 Extreme4
# sensors-detect
# sensors-detect revision 6209 (2014-01-14 22:51:58 +0100)
# Board: ASRock Z77 Extreme4
Doom on Linux Debian
# apt-get install prboom
Downloads Doom.wad
http://www.pc-freak.net/blog/doom-1-doom-2-doom-3-game-wad-files-for-download-playing-doom-on-debian-linux-via-freedoom-open-source-doom-engine/
2015年5月31日
Debian Jessie Cross Toolchains Install
安裝Cross-compiler分三個套件
armhf(ArmHardFloatPort)
Supported device:supports newer, more powerful 32-bit devices using ARMv7
armel(ArmEabiPort)
Supported device:port targets a range of older 32-bit devices using ARMv4, particularly those used in NAS hardware and a variety of *plug computers.
arm64(Arm64Port)
Supported device:latest 64-bit ARM-powered devices.
# dpkg --add-architecture armel
# apt-get update
# apt-get install crossbuild-essential-armel
紅色字可以替代armel armhf arm64
# vi /etc/apt/sources.list.d/crosstools.list
deb http://emdebian.org/tools/debian/ jessie main
# cd /tmp
# wget http://emdebian.org/tools/debian/emdebian-toolchain-archive.key
# apt-get install curl
# curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
# apt-get update
install arm-linux-gnueabi- armel toolchain
# dpkg --add-architecture armel
# apt-get update
# apt-get install crossbuild-essential-armel
# arm-linux-gnueabi-
arm-linux-gnueabi-addr2line arm-linux-gnueabi-gcc-nm
arm-linux-gnueabi-ar arm-linux-gnueabi-gcc-nm-4.9
arm-linux-gnueabi-as arm-linux-gnueabi-gcc-ranlib
arm-linux-gnueabi-c++ arm-linux-gnueabi-gcc-ranlib-4.9
arm-linux-gnueabi-c89 arm-linux-gnueabi-gcov-4.9
arm-linux-gnueabi-c99 arm-linux-gnueabi-gprof
arm-linux-gnueabi-cc arm-linux-gnueabi-ld
arm-linux-gnueabi-c++filt arm-linux-gnueabi-ld.bfd
arm-linux-gnueabi-cpp-4.9 arm-linux-gnueabi-ld.gold
arm-linux-gnueabi-dwp arm-linux-gnueabi-nm
arm-linux-gnueabi-elfedit arm-linux-gnueabi-objcopy
arm-linux-gnueabi-g++ arm-linux-gnueabi-objdump
arm-linux-gnueabi-g++-4.9 arm-linux-gnueabi-ranlib
arm-linux-gnueabi-gcc arm-linux-gnueabi-readelf
arm-linux-gnueabi-gcc-4.9 arm-linux-gnueabi-size
arm-linux-gnueabi-gcc-ar arm-linux-gnueabi-strings
arm-linux-gnueabi-gcc-ar-4.9 arm-linux-gnueabi-strip
if you whant to install armhf architecture
# dpkg --add-architecture armhf
# apt-get update
# apt-get install crossbuild-essential-armhf
Reference:https://wiki.debian.org/CrossToolchains
armhf(ArmHardFloatPort)
Supported device:supports newer, more powerful 32-bit devices using ARMv7
armel(ArmEabiPort)
Supported device:port targets a range of older 32-bit devices using ARMv4, particularly those used in NAS hardware and a variety of *plug computers.
arm64(Arm64Port)
Supported device:latest 64-bit ARM-powered devices.
# dpkg --add-architecture armel
# apt-get update
# apt-get install crossbuild-essential-armel
紅色字可以替代armel armhf arm64
# vi /etc/apt/sources.list.d/crosstools.list
deb http://emdebian.org/tools/debian/ jessie main
# cd /tmp
# wget http://emdebian.org/tools/debian/emdebian-toolchain-archive.key
# apt-get install curl
# curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
# apt-get update
install arm-linux-gnueabi- armel toolchain
# dpkg --add-architecture armel
# apt-get update
# apt-get install crossbuild-essential-armel
# arm-linux-gnueabi-
arm-linux-gnueabi-addr2line arm-linux-gnueabi-gcc-nm
arm-linux-gnueabi-ar arm-linux-gnueabi-gcc-nm-4.9
arm-linux-gnueabi-as arm-linux-gnueabi-gcc-ranlib
arm-linux-gnueabi-c++ arm-linux-gnueabi-gcc-ranlib-4.9
arm-linux-gnueabi-c89 arm-linux-gnueabi-gcov-4.9
arm-linux-gnueabi-c99 arm-linux-gnueabi-gprof
arm-linux-gnueabi-cc arm-linux-gnueabi-ld
arm-linux-gnueabi-c++filt arm-linux-gnueabi-ld.bfd
arm-linux-gnueabi-cpp-4.9 arm-linux-gnueabi-ld.gold
arm-linux-gnueabi-dwp arm-linux-gnueabi-nm
arm-linux-gnueabi-elfedit arm-linux-gnueabi-objcopy
arm-linux-gnueabi-g++ arm-linux-gnueabi-objdump
arm-linux-gnueabi-g++-4.9 arm-linux-gnueabi-ranlib
arm-linux-gnueabi-gcc arm-linux-gnueabi-readelf
arm-linux-gnueabi-gcc-4.9 arm-linux-gnueabi-size
arm-linux-gnueabi-gcc-ar arm-linux-gnueabi-strings
arm-linux-gnueabi-gcc-ar-4.9 arm-linux-gnueabi-strip
if you whant to install armhf architecture
# dpkg --add-architecture armhf
# apt-get update
# apt-get install crossbuild-essential-armhf
Reference:https://wiki.debian.org/CrossToolchains
2015年5月29日
2015年5月28日
Linux Mplayer 測試 視訊攝影機 WebCam
# apt-get install mplayer
tv://<channel_name>
--tv=<option1:option2:...>
$ mplayer --tv=driver=help -vo help
MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team
Available video output drivers:
vdpau VDPAU with X11
xv X11/Xv
gl3 OpenGL 3.x
gl OpenGL
x11 X11 ( XImage/Shm )
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
caca libcaca
v4l2 V4L2 MPEG Video Decoder Output
null Null video output
directfb Direct Framebuffer Device
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
gl_nosw OpenGL no software rendering
$ ls /dev/video*
/dev/video0 /dev/video1
$ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
tv://<channel_name>
--tv=<option1:option2:...>
$ mplayer --tv=driver=help -vo help
MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team
Available video output drivers:
vdpau VDPAU with X11
xv X11/Xv
gl3 OpenGL 3.x
gl OpenGL
x11 X11 ( XImage/Shm )
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
caca libcaca
v4l2 V4L2 MPEG Video Decoder Output
null Null video output
directfb Direct Framebuffer Device
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
gl_nosw OpenGL no software rendering
$ ls /dev/video*
/dev/video0 /dev/video1
$ mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
monitor brightness resolution setup linux
觀看目前monitor資訊
$ xrandr --current
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 4096 x 4096
LVDS-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 222mm x 125mm
1366x768 60.01*+
1360x768 59.80 59.96
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
960x600 60.00
960x540 59.99
800x600 60.00 60.32 56.25
840x525 60.01 59.88
800x512 60.17
700x525 59.98
640x512 60.02
720x450 59.89
640x480 60.00 59.94
680x384 59.80 59.96
576x432 60.06
512x384 60.00
400x300 60.32 56.34
320x240 60.05
DVI-0 disconnected (normal left inverted right x axis y axis)
調整螢幕亮度
$ xrandr --output LVDS-0 --brightness 0.8
調整螢幕解析度
$ xrandr -s 1366x768
2015年5月20日
2015年2月27日
Vision Control System
https://www.google.com.tw/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0CDkQFjAE&url=http%3A%2F%2Fwww.openfoundry.org%2Ftw%2Fdownload%2Fdoc_download%2F960-&ei=85DwVJikPI_c8AXBp4GgAQ&usg=AFQjCNGE-0OVk2WP-8bsKD84BqAwTn9NlQ
http://blog.ez2learn.com/2011/10/20/taiwan-software-lacking-of-vcs/
https://ihower.tw/git/vcs.html
http://blog.ez2learn.com/2011/10/20/taiwan-software-lacking-of-vcs/
https://ihower.tw/git/vcs.html