适用于 Python Virtualenv 的 Debian+KDE 启动器

问题描述 投票:0回答:1

我正在尝试 - 但没有成功 - 在 Debian 中使用 KDE 桌面(这将是一个 .desktop 文件)创建一个启动器,以在激活 python 虚拟环境的情况下启动 konsole,到目前为止,这就是我所拥有的:

[Desktop Entry]
Categories=Network;
Comment[en_US]=Nombre
Comment=Nombre
Encoding=UTF-8
Exec=konsole --noclose -e '/home/user/PyProjects/project/.venv/bin/activate'
GenericName[en_US]=Consultas
GenericName=Consultas
Icon=/ruta/al/icono
MimeType=
Name[en_US]=Consultas
Name=Consultas
Path=/home/user/PyProjects/project/
StartupNotify=true
StartupWMClass=Consultas
Terminal=true
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-GNOME-FullName=Consultas
X-KDE-RunOnDiscreteGpu=false
X-KDE-SubstituteUID=false
X-KDE-Username=
X-MultipleArgs=false

我使用的是 Debian 11 w/KDE 5.20.5、Python 3.9.2,并且该脚本具有执行权限 (577)。
我错过了什么?
提前致谢

PS:我还尝试了 Exec 行:

Exec=konsole --noclose -e source '/home/user/PyProjects/project/.venv/bin/activate'
Exec=konsole --noclose -e 'source /home/user/PyProjects/project/.venv/bin/activate'
python debian virtualenv kde-plasma
1个回答
0
投票

这是启用虚拟环境的终端启动器的工作示例。

[Desktop Entry]
Comment[it_IT]=
Comment=
Exec=/bin/bash -c 'source /home/gallochri/venv/bin/activate && /bin/bash'
GenericName[it_IT]=
GenericName=
Icon=system-run
MimeType=
Name[it_IT]=My venv
Name=My venv
Path=
StartupNotify=true
Terminal=true
TerminalOptions=\s--noclose
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
© www.soinside.com 2019 - 2024. All rights reserved.