SHARE
TWEET

Untitled

a guest Apr 11th, 2012 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #开机启动时快速进入开发环境
  3. #chmod +x startup.sh
  4. #一定要以login方式执行,否则不会加载~/.bashrc
  5. #bash -l startup.sh
  6. #增加Ubuntu的启动项:System-Perferences-Startup Applications
  7.  
  8. ##2.开启chrome
  9. chromium-browser &
  10.  
  11. ##1.直接开启3个terminal,分别用于vim编辑、输入常用命令、测试
  12. gnome-terminal \
  13.   --working-directory='/home/saberma/Documents/shopqi' \
  14.   --tab -e vim \
  15.   --tab \
  16.   --tab \
  17.   --maximize \
  18.   --hide-menubar &
  19.  
  20. sleep 1
  21.  
  22. #wmctrl -r Terminal -N first
  23.  
  24. #3.开启4个terminal,分别用于启动开发环境的应用服务器,cucumber测试drb,rspec测试drb,查看开发日志,查看测试日志
  25. gnome-terminal \
  26.   --working-directory='/home/saberma/Documents/shopqi' \
  27.   --tab -t unicorn \
  28.   --tab -t cucumber \
  29.   --tab -t rspec \
  30.   --tab -e "bash -l -c 'cd ~/Documents/shopqi && tail -f log/development.log'" -t dev_log \
  31.   --tab -e "bash -l -c 'cd ~/Documents/shopqi && tail -f log/test.log'" -t test_log \
  32.   --maximize \
  33.   --hide-menubar &
  34.  
  35. #4.开启英语(点击窗口关闭后会只显示在任务栏中)
  36. rhythmbox --playlists-file= ~/english.pls &
  37.  
  38. sleep 2
  39.  
  40. # 播放英语(发送多个自动播放指令,确保rhythmbox已启动并能接收到)
  41. rhythmbox-client --play
  42. rhythmbox-client --play
  43. rhythmbox-client --play
  44. rhythmbox-client --play
  45.  
  46. #切换至第2个Workspace
  47. #sudo apt-get install wmctrl  #确保wmctrl已安装 #wmctrl -l 可查看程序窗口名称
  48. wmctrl -r test_log -t 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top