Documentation

Installing ThinkCode on Linux

This guide provides detailed instructions for installing ThinkCode on various Linux distributions. ThinkCode supports multiple installation methods to accommodate different Linux environments and user preferences.

Prerequisites

Before installing ThinkCode, ensure your system meets the following requirements:

  • Operating System: Linux distribution with GLIBC 2.28+ (Ubuntu 20.04+, Fedora 34+, Debian 11+, etc.)
  • Processor: Multi-core processor (Intel Core i5 8th generation / AMD Ryzen 5 3000 series or equivalent)
  • Memory: 8GB RAM (16GB+ recommended)
  • Storage: 2GB available space (SSD recommended)
  • Display: 1280 x 720 resolution
  • Internet: Connection required for installation, updates, and cloud-based AI features

For a complete list of requirements, see the System Requirements page.

Installation Methods

ThinkCode can be installed on Linux using several methods:

  1. Package Manager
  2. AppImage
  3. Snap Package
  4. Flatpak
  5. Direct Download
  6. Command Line
  7. Build from Source

Package Manager Installation

Ubuntu/Debian-based Distributions

Install ThinkCode using APT:

  1. Add the ThinkCode repository:
curl -fsSL https://thinkstudio.iechor.com/linux/apt/gpg | sudo gpg --dearmor -o /usr/share/keyrings/thinkcode-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/thinkcode-archive-keyring.gpg] https://thinkstudio.iechor.com/linux/apt stable main" | sudo tee /etc/apt/sources.list.d/thinkcode.list
  1. Update package lists and install ThinkCode:
sudo apt update
sudo apt install thinkcode

Fedora/RHEL-based Distributions

Install ThinkCode using DNF:

  1. Add the ThinkCode repository:
sudo rpm --import https://thinkstudio.iechor.com/linux/rpm/gpg
sudo dnf config-manager --add-repo https://thinkstudio.iechor.com/linux/rpm/thinkcode.repo
  1. Install ThinkCode:
sudo dnf install thinkcode

Arch Linux (AUR)

Install ThinkCode from the Arch User Repository:

yay -S thinkcode

or

git clone https://aur.archlinux.org/thinkcode.git
cd thinkcode
makepkg -si

AppImage

The AppImage format allows you to run ThinkCode without installation:

  1. Download the ThinkCode AppImage from the official website
  2. Make the AppImage executable:
chmod +x ThinkCode-x.x.x.AppImage
  1. Run the AppImage:
./ThinkCode-x.x.x.AppImage
  1. (Optional) Integrate with your desktop environment:
./ThinkCode-x.x.x.AppImage --install

Snap Package

Install ThinkCode using Snap:

sudo snap install thinkcode --classic

The --classic flag is required to allow ThinkCode full access to your system.

Flatpak

Install ThinkCode using Flatpak:

  1. Make sure Flatpak is installed on your system
  2. Add the Flathub repository if you haven't already:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  1. Install ThinkCode:
flatpak install flathub com.thinkstudio.thinkcode
  1. Run ThinkCode:
flatpak run com.thinkstudio.thinkcode

Direct Download

You can download and install ThinkCode manually:

  1. Visit the ThinkCode download page

  2. Download the appropriate package for your distribution (.deb for Debian/Ubuntu, .rpm for Fedora/RHEL)

  3. Install the package:

    For Debian/Ubuntu:

    sudo dpkg -i thinkcode_x.x.x_amd64.deb
    sudo apt install -f # Resolves any dependencies

    For Fedora/RHEL:

    sudo rpm -i thinkcode-x.x.x.x86_64.rpm

Command Line Installation

For quick installation via command line:

curl -fsSL https://thinkstudio.iechor.com/install-linux.sh | sh

This script will detect your distribution and install ThinkCode using the appropriate method.

Build from Source

Advanced users can build ThinkCode from source:

  1. Install build dependencies:

    For Debian/Ubuntu:

    sudo apt install git nodejs npm python3 build-essential

    For Fedora/RHEL:

    sudo dnf install git nodejs npm python3 make gcc gcc-c++
  2. Clone the repository:

git clone https://github.com/thinkstudio/thinkcode.git
cd thinkcode
  1. Install dependencies and build:
npm install
npm run build
  1. Run the application:
npm start

First Launch Configuration

When you first launch ThinkCode, you'll need to complete the setup process:

  1. The setup wizard will guide you through initial configuration
  2. Sign in with your ThinkCode account or create a new one
  3. Configure AI features and other settings
  4. (Optional) Import settings from VS Code if you have it installed

Linux-specific Features

ThinkCode integrates with Linux in several ways:

Desktop Integration

  • Application menu entry
  • File associations for code files
  • Custom URI handler for thinkcode:// links
  • MIME type registration

Terminal Integration

  • Command-line interface for opening files and folders:
    thinkcode myproject/
  • Remote development over SSH
  • Integration with common Linux terminal emulators

Extensions for Linux Development

  • Container development with Docker and Podman
  • WSL integration for dual-boot systems
  • Language servers optimized for Linux

System Configuration

Adding to PATH

ThinkCode should be automatically added to your PATH. If not, add the following to your shell configuration file (.bashrc, .zshrc, etc.):

export PATH="$PATH:/usr/bin/thinkcode"

File Associations

To associate file types with ThinkCode:

xdg-mime default thinkcode.desktop text/plain
xdg-mime default thinkcode.desktop text/x-python
# Add more MIME types as needed

Custom Icon Themes

ThinkCode supports custom icon themes through the XDG icon theme specification. Place custom icons in:

~/.local/share/icons/[theme-name]/apps/

Performance Optimization

For optimal performance on Linux:

  • Enable GPU acceleration when available
  • Configure memory limits based on your system
  • Use local AI models on systems with limited resources
  • Enable file system watching limits:
    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Updating ThinkCode

ThinkCode can be updated using the same method you used for installation:

  • Package Manager:

    sudo apt update && sudo apt upgrade # Debian/Ubuntu
    sudo dnf upgrade # Fedora/RHEL
    yay -Syu # Arch Linux
  • Snap:

    sudo snap refresh thinkcode
  • Flatpak:

    flatpak update com.thinkstudio.thinkcode
  • AppImage: Download the latest AppImage and replace the old one

Uninstalling ThinkCode

To uninstall ThinkCode:

  • Package Manager:

    sudo apt remove thinkcode # Debian/Ubuntu
    sudo dnf remove thinkcode # Fedora/RHEL
    yay -R thinkcode # Arch Linux
  • Snap:

    sudo snap remove thinkcode
  • Flatpak:

    flatpak uninstall com.thinkstudio.thinkcode
  • AppImage: Delete the AppImage file and remove desktop integration:

    ./ThinkCode-x.x.x.AppImage --remove-appimage-desktop-integration

To completely remove configuration files:

rm -rf ~/.config/ThinkCode
rm -rf ~/.cache/ThinkCode

Troubleshooting

Common Issues

Missing Dependencies

If you encounter missing dependency errors:

# For Debian/Ubuntu
sudo apt install -f
 
# For Fedora/RHEL
sudo dnf install --best --allowerasing thinkcode

Display Issues

For graphics-related problems:

  • Try launching with software rendering:
    thinkcode --disable-gpu
  • Check your graphics drivers are up to date
  • Ensure you have appropriate libraries installed:
    # For Debian/Ubuntu
    sudo apt install libgl1-mesa-glx libegl1-mesa

Permission Issues

For permission-related errors:

  • Check file ownership:
    sudo chown -R $USER:$USER ~/.config/ThinkCode
  • Verify you have write permissions to the installation directory

Advanced Troubleshooting

For detailed diagnostics:

  1. Launch ThinkCode with verbose logging:
    thinkcode --verbose
  2. Check the log file at ~/.config/ThinkCode/logs
  3. Run with debug information:
    THINKCODE_DEBUG=1 thinkcode

Distribution-specific Notes

Ubuntu

  • Works best with the official .deb package
  • Wayland support is available but experimental
  • For LTS releases older than 20.04, consider using the AppImage

Fedora

  • GNOME integration is fully supported
  • SELinux policies are included in the package
  • Fedora Silverblue users should use Flatpak installation

Arch Linux

  • AUR package is maintained by the community
  • Rolling release may occasionally have compatibility issues with internal dependencies
  • Consider using the AppImage for maximum stability

Next Steps

Now that you've installed ThinkCode on Linux, check out: