【发布时间】:2011-03-23 13:04:31
【问题描述】:
我想知道如何使用 Qt 做这样的事情 (source)。我查看了文档,但找不到任何方法来检查外部进程是否正在运行。
if [ "$(pidof ksmserver)" ]; then
echo "KDE running."
# KDE-specific stuff here
elif [ "$(pidof gnome-session)" ]; then
echo "GNOME running."
# GNOME-specific stuff here
elif [ "$(pidof xfce-mcs-manage)" ]; then
echo "Xfce running."
# Xfce-specific stuff here
fi
【问题讨论】:
标签: linux qt desktop gnome kde