Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
【求助】开机打开程序的bash命令
Apps Section
871
views ·
1
replies ·
To
floor
Go
不避风云
deepin
2016-04-19 16:56
Author
本帖最后由 bubifengyun 于 2016-4-19 09:05 编辑
每天都要写代码,天天都需要关机开机。
每次开机都要先打开vim,打开firefox,打开vscode,打开一个chm文件。
然后把他们分别放在四个桌面,一个写代码,一个测试代码,一个记录问题做笔记,一个查阅资料。
哪位大神可否给提供一个shell代码,实现一个脚本程序,做到代替开机的这些工作,然后把他们分别放在不同的桌面下。
先谢谢啦。
其中打开这四个程序的脚本,分别如下。
$ vim
## change to another terminal
$ firefox
## change to another terminal
$ vscode
## change to another terminal
$ chmsee xx.chm
Copy the Code
我可以实现在同一个脚本下打开,但是都在同一桌面下。
```bash
firefox &
vscode &
chmsee xx.chm &
vim -p xx.php xxx.php
Copy the Code
```
先谢谢啦。
Reply
Like 0
Favorite
View the author
All Replies
MattD
deepin
2016-04-19 18:31
#1
用wmctrl实现,试试改成以下形式:
#!/bin/bash
firefox &
vscode &
chmsee xx.chm &
vim -p xx.php xxx.php &
sleep 10
wmctrl -r firefox -t 0
wmctrl -r vscode -t 1
wmctrl -r chmsee -t 2
wmctrl -r vim -t 3
Copy the Code
Reply
Like 0
View the author
Comments
bubifengyun
2016-04-30 20:06
不错,不过安装wmCtrl 后,系统出现好多问题。而且那个CHMsee一点都不配合。折腾了一下,还是把wm Ctrl给删了,凑合着慢慢一个个打开吧。
yutent
deepin
2016-04-22 04:33
#2
It has been deleted!
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
每天都要写代码,天天都需要关机开机。
每次开机都要先打开vim,打开firefox,打开vscode,打开一个chm文件。
然后把他们分别放在四个桌面,一个写代码,一个测试代码,一个记录问题做笔记,一个查阅资料。
哪位大神可否给提供一个shell代码,实现一个脚本程序,做到代替开机的这些工作,然后把他们分别放在不同的桌面下。
先谢谢啦。
其中打开这四个程序的脚本,分别如下。
我可以实现在同一个脚本下打开,但是都在同一桌面下。
```bash
```
先谢谢啦。