[debian]Debain系統使用技巧

0:Drive BCM43225 wireless card(添加無線網卡BCM43225驅動)

#check out your wireless card
lspci

#Download the firmware of the wifi card
from the website below,u will get want u want
https://wiki.debian.org/brcm80211

1:Set the iso files as your local software repo(設置本地iso文件,爲軟件倉庫源 )

#downlaod the iso files below (from site: mirrors.hust.edu.cn):
debian-8.2.0-amd64-DVD-1.iso                       
debian-8.2.0-amd64-DVD-2.iso                     
debian-8.2.0-amd64-DVD-3.iso    
#make three folders
mk /mnt/dvd1
mk /mnt/dvd2
mk /mnt/dvd3
#mount your iso files like this 
mount -o loop debian-8.2.0-amd64-DVD-1.iso  /mnt/dvd1
mount -o loop debian-8.2.0-amd64-DVD-2.iso  /mnt/dvd2
mount -o loop debian-8.2.0-amd64-DVD-3.iso   /mnt/dvd3

#modify your source.list file like this
vi /etc/apt/source.list

deb file:///mnt/dvd1/ jessie contrib main
deb file:///mnt/dvd2/ jessie contrib main
deb file:///mnt/dvd3/ jessie contrib main

#good job! do update and install work
apt-get update
apt-get install xxx

2:add online repo(添加在線倉庫源)

deb http://mirrors.aliyun.com/debian/ jessie contrib main

3:add sudoer(添加超級用戶權限)

su root
apt-get install sudo 

vim /etc/sudoers

yyp  and add your user name

gaoy  ALL=NOPASSWD: ALL     <-- 這個是不須要輸入密碼的

4:add zh_CN utf8 characters support(添加中文 utf8支持)

sudo dpkg-reconfigure locales
選擇 zh_CN.UTF-8 等幾個和中文相關的 locale

5:add Chinese Input Method to fcitx(添加 fcitx 輸入法)

(按以下方式添加,特別注意使用fcitx-diagnose命令查看診斷信息)python

######################################
sudo vim /etc/X11/Xsession.d/25xchinput 
##################################### content of 25xchinput
export LAGN=zh_CN.utf8
export LC_CTYPE=zh_CN.utf8
export LC_ALL=
export XMODIFIERS=@im=fcitx
export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=XIM
fcitx &

####################################  install input method: fcitx
sudo apt-get install fcitx fcitx-config-gtk fcitx-table-wbpy

#################################### choose your default input method
fcitx-configtool

####################################diagnose your input method if it is abnormal
fcitx-diagnose 

#################################### test your input method,run the command below
fcitx

6:python開發ide:wingIDE安裝

http://pan.baidu.com/s/1hsAppOwmysql

下載

安裝:
sudo dpkg -i xx.deb
激活:
xxx
設置dash搜索圖標
sudo cp /usr/lib/wingide5/resources/linux/desktop/wingide5.desktop   /usr/share/applications/

7:使用gnome-tweak-tool 程序管理你的Debian系統,功能很是強大

#運行
gnome-tweak-tool
#經常使用工具包含
1:添加開機啓動程序
2:設置系統主題
3:設置桌面顯示圖標(桌面可存放文件(夾))
4:設置背景圖片和鎖屏時的圖片 
5:設置系統字體
等等

8:python環境的完善

系統默認使用python 2.7.9
#安裝ipython
sudo apt-get install ipython
#安裝pip
sudo apt-get install python-pip
#安裝pyqt4
sudo apt-get install pyqt4-dev-tools

#下面的包會被安裝
  libmysqlclient18 libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-script libqt4-scripttools libqt4-sql
  libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xmlpatterns libqtassistantclient4 libqtwebkit4 mysql-common python-qt4 python-sip
Suggested packages:
  libqt4-declarative-folderlistmodel libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer
  libqt4-dev python-qt4-dbg
The following NEW packages will be installed:
  libmysqlclient18 libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-script libqt4-scripttools libqt4-sql
  libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xmlpatterns libqtassistantclient4 libqtwebkit4 mysql-common pyqt4-dev-tools python-qt4
  python-sip

#在ipython中測試一下,是否安裝成功了
In [1]: import PyQt4
In [2]: import PyQt4.QtCore
In [3]: from  PyQt4.QtCore import *



#pyqt使用例子
from PyQt4.QtCore import *
a=QString("apple")
print type(a)  #PyQt4.QtCore.QString

9:rar,unrar壓縮解壓軟件的安裝

#使用apt-get安裝的版本太舊,功能已經沒法知足須要,不少文件沒法正常解壓
#下載下面文件 
wget http://www.rarlab.com/rar/rarlinux-x64-5.3.b4.tar.gz
#解壓後,進入目錄,複製已經編譯好的unrar rar程序到/usr/bin目錄
cp rar unrar /usr/bin

#解壓命令
unrar e xxx.rar

10:顯示鼠標當前位置的shell語句

這條shell語句在調試程序時,是很是有用的
 while true; do xdotool getmouselocation; sleep 0.1; clear; done


#須要安裝 xdotool工具
sudo apt-get install xdotool

10:screen to gif的腳本

PyQt寫的一個小工具,還能夠https://github.com/frans-fuerst/screensnippetlinux

#用起來仍是不方便,回頭用Qt寫個圖形用戶界面的程序
countdown()
(
  IFS=:
  set -- $*
  secs=$(( ${1#0} * 3600 + ${2#0} * 60 + ${3#0} ))
  while [ $secs -gt 0 ]
  do
    sleep 1 &
    printf "\r%02d:%02d:%02d" $((secs/3600)) $(( (secs/60)%60)) $((secs%60))
    secs=$(( $secs - 1 ))
    wait
  done
  echo
)



byzanz-record --delay 5 --duration=10  --x=0 --y=0 --width=600 --height=600 screencast.gif & sleep 5; countdown "00:00:10"
相關文章
相關標籤/搜索