/usr/share/applications/qq.desktop
1
2
3
4
5
6
7
8
9
| [Desktop Entry]
Type=Application
Encoding=UTF-8
Name=qq
Comment=qq
Exec=/opt/startup_appimage.sh /opt/qq.AppImage
Icon=
Terminal=false
Categories=System;
|
/opt/startup_appimage.sh
1
2
3
4
5
6
7
8
9
| #!/bin/bash
if [ "$(id -u)" -eq 0 ]; then
echo "当前用户是root"
$1 --no-sandbox
else
echo "当前用户不是root"
$1
fi
|