我创建了一个自定义启动器文件:
[Desktop Entry]
Type=Application
Name=P4V
Comment=Perforce Visual Client
Icon=/usr/lib/p4v/P4VResources/icons/P4-V_128x128.png
Exec=/usr/bin/p4v
Terminal=false
Categories=Development;
Run Code Online (Sandbox Code Playgroud)
并将此文件拖到我的启动器中。但是,当我单击该图标时,它会在第二个不同的图标下打开应用程序(我单击顶部的图标,它会在底部的图标下打开应用程序):
直到我使用手动添加的顶部 P4v 图标启动应用程序后,底部图标才会出现。
我为我的 python 机器人创建了一个超级基本的 init.d 脚本:
#!/bin/bash
# chkconfig: 2345 20 80
# description: Description comes here....
# Source function library.
. /etc/init.d/functions
start() {
echo "starting torbot"
python /home/ctote/dev/slackbots/torbot/torbot.py
# example: daemon program_name &
}
stop() {
# code to stop app comes here
# example: killproc program_name
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
# code to check status of app comes here
# example: status program_name
;;
*)
echo "Usage: …
Run Code Online (Sandbox Code Playgroud)