清理不用的软件包

Nov 05, 2017 03:46:16 PM

sudo pacman -Rns $(pacman -Qtdq)
 

Redshift自动调节屏幕亮度

Nov 04, 2017 06:48:48 PM

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.

Redshift 是一个有意思的小程序,它能根据你的环境来调节电脑屏幕的色温。如果你长时间坐在电脑前盯住屏幕,那么使用 Redshift 可使你的眼睛免受更大的伤害。

Archlinux:

yaourt -S redshift

然后添加到自启动

https://github.com/jonls/redshift

.bashrc ArchBang

Dec 08, 2012 11:13:51 PM

 

# Add nano as default editor
export EDITOR=nano
VBOX_USB=usbfs

# modified commands
alias diff='colordiff'              # requires colordiff package
alias grep='grep --color=auto'
alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias nano='nano -w'
alias ping='ping -c 5'
alias ..='cd ..'

# new commands
alias da='date "+%A, %B %d, %Y [%T]"'
alias du1='du --max-depth=1'
alias hist='history | grep'      # requires an argument
alias openports='netstat --all --numeric --programs --inet --inet6'
alias pg='ps -Af | grep $1'         # requires an argument (note: /usr/bin/pg is installed by the util-linux package; maybe a different alias name should be used)

# privileged access
if [ $UID -ne 0 ]; then
    alias sudo='sudo '
    alias scat='sudo cat'
    alias svim='sudo vim'
    alias root='sudo su'
    alias reboot='sudo reboot'
    alias halt='sudo halt'
    alias update='sudo pacman -Su'
    alias netcfg='sudo netcfg2'
fi

# ls
alias ls='ls -hF --color=auto'
alias lr='ls -R'                    # recursive ls
alias ll='ls -l'
alias la='ll -A'
alias lx='ll -BX'                   # sort by extension
alias lz='ll -rS'                   # sort by size
alias lt='ll -rt'                   # sort by date
alias lm='la | more'

# safety features
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -I'                    # 'rm -i' prompts for every file
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'

# pacman/yaourt aliases
alias pac="sudo /usr/bin/pacman -S"		# default action	- install one or more packages
alias paca="/usr/bin/yaourt -S"			# default yaourt action	- install one or more packages including AUR
alias pacu="/usr/bin/yaourt -Syua"		# '[u]pdate'		- upgrade all packages to their newest version
alias pacr="sudo /usr/bin/yaourt -Rs"		# '[r]emove'		- uninstall one or more packages
alias pacs="/usr/bin/pacman -Ss"		# '[s]earch'		- search for a package using one or more keywords
alias pacas="/usr/bin/yaourt -Ss"		# '[a]ur [s]earch'	- search for a package or a PKGBUILD using one or more keywords
alias paci="/usr/bin/yaourt -Si"		# '[i]nfo'		- show information about a package
alias paclo="/usr/bin/pacman -Qdt"		# '[l]ist [o]rphans'	- list all packages which are orphaned
alias pacc="sudo /usr/bin/pacman -Scc"		# '[c]lean cache'	- delete all not currently installed package files
alias paclf="/usr/bin/pacman -Ql"		# '[l]ist [f]iles'	- list all files installed by a given package
alias pacexpl="/usr/bin/yaourt -D --asexplicit"	# 'mark as [expl]icit'	- mark one or more packages as explicitly installed 
alias pacimpl="/usr/bin/yaourt -D --asdeps"	# 'mark as [impl]icit'	- mark one or more packages as non explicitly installed

# '[r]emove [o]rphans' - recursively remove ALL orphaned packages
alias pacro="/usr/bin/pacman -Qtdq > /dev/null && sudo /usr/bin/pacman -Rs \$(/usr/bin/pacman -Qtdq | sed -e ':a;N;$!ba;s/\n/ /g')"

[ ! "$UID" = "0" ] && archbey -c white
[  "$UID" = "0" ] && archbey -c green
#PS1="\[\e[01;31m\]┌─[\[\e[01;35m\u\e[01;31m\]]──[\[\e[00;37m\]${HOSTNAME%%.*}\[\e[01;32m\]]:\w$\[\e[01;31m\]\n\[\e[01;31m\]└──\[\e[01;36m\]>>\[\e[0m\]"

virtualbox

Dec 08, 2012 10:35:46 PM

安装virtualbox虚拟机软件及附加组件

yaourt -S virtualbox virtualbox-guest-iso

将当前的用户添加到 vboxusers 用户组中:

sudo gpasswd -a sandy vboxusers

添加usb访问权限

在~/.bashrc 里添加如下语句

VBOX_USB=usbfs

USB2.0需要 Oracle_VM_VirtualBox_Extension_Pack ,下载和virtualbox对应的版本

比如我的virtualbox版本是4.2.4,那就访问 http://download.virtualbox.org/virtualbox/4.2.4/ 下载  Oracle_VM_VirtualBox_Extension_Pack-4.2.4-81684.vbox-extpack

下载完后,打开virtualbox,选择 管理--全局设定--扩展,添加下载的   Oracle_VM_VirtualBox_Extension_Pack-4.2.4-81684.vbox-extpack ,按照提示输入密码安装即可。

重启电脑后使用virtualbox。

 

Archlinux安装pdf虚拟打印机

Dec 04, 2012 02:22:37 AM

 

sudo pacman -S cups-pdf
sudo systemctl enable cups.service
or 
sudo systemctl start cups.service

用浏览器访问
http://localhost:631/

添加发现的pdf虚拟打印机-》打印机类型选Generic, Postscript Printer。依照指示走就ok。提示你输入帐号密码请输入root及root密码。

可以测试一下,和windows下的打印机不同的是它默认会把pdf文件输出到一个目录里。默认是

/var/spool/cups-pdf/$用户名/ ;可以自己修改配置文件/etc/cups/cups-pdf.conf 设置默认目录。
效果不错;

Arch64 Alsa Systemctl

Nov 24, 2012 03:05:18 AM

安装了archlinux64位,使用systemctl enable不了alsa,提示无install选项

手动链接服务

 

sudo ln -s /lib/systemd/system/alsa-store.service /etc/systemd/system/multi-user.target.wants/alsa-store@.service

sudo ln -s /lib/systemd/system/alsa-restore.service /etc/systemd/system/multi-user.target.wants/alsa-restore@.service

修改hosts,加快访问google

Nov 24, 2012 12:36:07 AM

#一般hosts文件在Windows下位于c:\windows\system32\drivers\etc\hosts。Linux下位于/etc/hosts

 

203.208.46.146 www.google.com
203.208.46.147 www.google.com.hk
203.208.46.132 clients1.google.com
203.208.46.149 mail.google.com
203.208.46.161 chatenabled.mail.google.com
203.208.46.161 mail-attachment.googleusercontent.com   
203.208.46.146 id.google.com
203.208.46.146 encrypted.google.com
203.208.46.161 encrypted-tbn0.google.com
203.208.46.162 encrypted-tbn1.google.com
203.208.46.163 encrypted-tbn2.google.com
203.208.46.164 encrypted-tbn3.google.com
203.208.46.132 webcache.googleusercontent.com 
203.208.46.191 ssl.gstatic.com
203.208.46.161 docs.google.com
203.208.46.157 0.docs.google.com
203.208.46.157 1.docs.google.com
74.125.39.99 chrome.google.com
74.125.39.99 clients2.google.com

如何编辑lxde右键菜单

Nov 03, 2012 02:44:24 PM

下了个压缩包,右键设置打开方式,第一次设置错了,但是这个方式却留在里 右键菜单里面;另外,安装里playonlinux,右键里出现了notepad,卸载playonlinux后,notepad菜单还在。请问如何编辑右键菜单呢?

 

找到了 
在 ~/.local/share/applications/文件夹下,删除不用的打开方式即可

pidgin-lwqq

Nov 03, 2012 04:11:53 AM

 

安装pidgin
$sudo pacman -S pidgin

 

yaourt里面 的pidgin-lwqq脚本安装不成功

手动git源代码编译安装

首先安装git

 

$sudo pacman -S git

然后克隆pidgin-lwqq源代码

 

$ git clone https://github.com/xiehuc/pidgin-lwqq
$ cd pidgin-lwqq
$ mkdir build
$ cmake ..
$ make
$ sudo make install

最后打开pidgin,添加帐号,选择webqq协议即可