[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命令查看诊断信息)

######################################
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/1hsAppOw

下载

安装:
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/screensnippet

#用起来还是不方便,回头用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"
    原文作者:SQL
    原文地址: https://segmentfault.com/a/1190000004682659
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞