Debian/Ubuntu:
sudo apt update
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo mv winehq.key /usr/share/keyrings/winehq-archive.key
wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources
sudo mv winehq-$(lsb_release -cs).sources /etc/apt/sources.list.d/
sudo apt update
sudo apt install -y winehq-stableFedora/RHEL:
sudo dnf install -y wineArch Linux:
sudo pacman -S wine wine-gecko wine-monoopenSUSE:
sudo zypper install -y wineDebian/Ubuntu:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejsFedora/RHEL:
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo dnf install -y nodejsArch Linux:
sudo pacman -S nodejs npmopenSUSE:
sudo zypper install -y nodejs18 npm18Debian/Ubuntu:
sudo apt install -y chromium-browserFedora/RHEL:
sudo dnf install -y chromiumArch Linux:
sudo pacman -S chromiumopenSUSE:
sudo zypper install -y chromium# Create Chromium configuration directory
mkdir -p ~/.config/chromium/Default
# Create a desktop shortcut for easy access (optional)
cat > ~/.local/share/applications/chromium-dev.desktop << 'EOF'
[Desktop Entry]
Version=1.0
Name=Chromium (Dev Mode)
Comment=Web Browser with Dev Tools
Exec=chromium --disable-web-security --user-data-dir=/tmp/chromium-dev --allow-running-insecure-content
Icon=chromium
Terminal=false
Type=Application
Categories=Network;WebBrowser;
EOF
# Make it executable
chmod +x ~/.local/share/applications/chromium-dev.desktop# Test if Chromium runs properly
chromium --version
# Test opening a URL
chromium https://google.com &Install Google Chrome:
# Debian/Ubuntu
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update
sudo apt install -y google-chrome-stable
# Fedora/RHEL
sudo dnf install -y google-chrome-stable
# Arch (from AUR)
yay -S google-chromeInstall Firefox (fallback):
# Debian/Ubuntu
sudo apt install -y firefox
# Fedora/RHEL
sudo dnf install -y firefox
# Arch
sudo pacman -S firefox
# openSUSE
sudo zypper install -y firefox# Set Wine environment
export WINEPREFIX="$HOME/.wine"
export WINEARCH="win64"
# Initialize Wine (opens GUI - select Windows 10)
winecfg# Download Python for Windows
cd /tmp
wget https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe
# Install in Wine
wine python-3.10.11-amd64.exe
# Verify installation
wine python --versionmkdir -p ~/Desktop/chatai
cd ~/Desktop/chatai
# Place your files:
# - app.exe (your ChatAI executable)
# - start.sh (the startup script)
# - native_proxy.js (the proxy server)
# - public/ folder with your web files
chmod +x start.sh./start.sh- Open browser at: http://localhost:3000
- Or direct backend: http://localhost:5001
Press Ctrl+C in the terminal to stop all services.
If you have issues with CORS or local file access, launch Chromium with development flags:
chromium --disable-web-security --user-data-dir=/tmp/chromium-dev --allow-running-insecure-content http://localhost:3000# Check current default browser
xdg-settings get default-web-browser
# Set Chromium as default
xdg-settings set default-web-browser chromium-browser.desktop
# Or for Google Chrome
xdg-settings set default-web-browser google-chrome.desktopThe script will try browsers in this order:
- google-chrome (Google Chrome)
- chromium-browser or chromium (Chromium)
- firefox (Firefox)
- xdg-open (System default)
- Auto-installs Ollama if missing
- Creates directories (models, ollama, public)
- Moves UI files from html/browser to public if needed
- Starts services in order:
- Ollama service
- ChatAI backend (Wine app)
- Node.js proxy server
- Opens browser automatically (tries Chromium first)
- Handles cleanup when stopped
Wine issues:
winecfg # Check configurationPython missing in Wine:
wine python --version # Should show Python 3.10.xBrowser not opening:
# Check if Chromium is installed
chromium --version
# Manually open the URL
chromium http://localhost:3000
# Or try other browsers
google-chrome http://localhost:3000
firefox http://localhost:3000Port conflicts:
sudo netstat -tulpn | grep -E ':(3000|5001|11434)'Check logs:
tail -f server.logThat's it! Install Wine + Node.js + Chromium, configure Wine, install Python in Wine, then run the script. Chromium will automatically open the ChatAI interface.