add: comfyui for linux start menu

sudo sh ./setup-desktop.sh
This commit is contained in:
Noxy 2025-09-17 03:35:47 +03:00 committed by GitHub
parent e42682b24e
commit 446a008886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Name=ComfyUI
Exec="/opt/comfyui/run.sh"
Type=Application
Terminal=true
Icon=/opt/comfyui/comfyui.png
Categories=Utility;

BIN
comfyui-desktop/comfyui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

31
setup-desktop.sh Normal file
View File

@ -0,0 +1,31 @@
#!/bin/bash
read -p "ComfyUI Path: " COMFYUI_PATH
COMFYUI_PATH=${COMFYUI_PATH}
DEFAULT_VENV="${COMFYUI_PATH}venv"
read -p "VEnv path (default: $DEFAULT_VENV): " VENV_PATH
VENV_PATH=${VENV_PATH:-$DEFAULT_VENV}
RUN_SCRIPT="comfyui-desktop/run.sh"
cat > "$RUN_SCRIPT" << EOL
#!/bin/bash
source "${VENV_PATH}/bin/activate"
cd "$COMFYUI_PATH"
python main.py
EOL
chmod +x "$RUN_SCRIPT"
if [ ! -d "/opt/comfyui" ]; then
mkdir -p /opt/comfyui
if [ $? -ne 0 ]; then
echo "Error: Failed to create /opt/comfyui. Please check permissions or run as root."
exit 1
fi
fi
cp 'comfyui-desktop/comfyui.png' /opt/comfyui/comfyui.png
cp 'comfyui-desktop/run.sh' /opt/comfyui/run.sh
cp 'comfyui-desktop/comfyui.desktop' /usr/share/applications/comfyui.desktop
echo "Setup complete! You can run ComfyUI using Start menu"
echo "comfyui.desktop copied to /usr/share/applications/comfyui.desktop"