小编cto*_*ote的帖子

为什么我的自定义启动器会在单独的图标下打开?

我创建了一个自定义启动器文件:

[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 图标启动应用程序后,底部图标才会出现。

icons launcher

18
推荐指数
2
解决办法
4907
查看次数

无法启动 <myapp>.service: Unit <myapp>.service not found

我为我的 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)

python init.d upstart services

15
推荐指数
2
解决办法
4万
查看次数

标签 统计

icons ×1

init.d ×1

launcher ×1

python ×1

services ×1

upstart ×1