This repository provides an interactive setup script to install and run a desktop environment (DE) inside GitHub Codespaces. It includes support for a selection of stable DEs, allowing users to customize their experience based on preferences.
- Customizable Setup: Choose from one stable desktop environments XFCE.
- Web-Based Access: Seamlessly access your Codespace desktop using VNC and noVNC directly in your browser.
- User-Friendly: Guided installation process with explanations for every step.
- Secure Access: Automatically generates SSL certificates for encrypted noVNC connections.
- Additional Tools: Includes optional scripts to install VScode
- GitHub Codespaces with sufficient resources:
- Recommended: At least 2 cores or 4 cores.
- Internet Connection: Required for installing packages and accessing the desktop remotely.
- Click the Fork button in the top-right corner to create your own copy.
- Navigate to your forked repository.
- Click Code > Open with Codespaces to start your Codespace for 2-Core Version or go to https://github.com/codespaces create new codespace and configure it for 4-Core Version.
- Open the Terminal in your Codespace.
- Make the script executable:
chmod +x setup.sh
- Run the setup script:
./setup.sh
- Follow the prompts to:
- Select your desktop environment.
- Customize your installation (optional).
- Configure access and additional settings.
During installation, you can choose from the following stable desktop environments:
- XFCE
The script installs the selected DE along with all required components for a smooth experience.
After setup, access the desktop environment using the browser-based noVNC client:
- Start the VNC server:
vncserver :1
- Start noVNC:
websockify -D --web=/usr/share/novnc/ --cert=$HOME/novnc.pem 6081 localhost:5901
- Open the browser and navigate to:
https://<your-codespace-url>:6081
- Enter your VNC password when prompted.
GitHub Codespaces automatically stops after 1 hour of inactivity. When restarting, follow these steps:
- Kill any existing VNC session:
vncserver -kill :1
- Restart the VNC server:
vncserver :1
- Restart noVNC:
websockify -D --web=/usr/share/novnc/ --cert=$HOME/novnc.pem 6081 localhost:5901
Codespaces are automatically deleted after 1 month unless you toggle the auto-deletion setting off.
No, you could try but it needs some modifying and I gave up configuring multuple Des
XFCE is lightweight and provides the best performance in a Codespace environment.
Just search on Youtube XFCE custumizations.
Yes, as long as you have the Codespace URL and access to your GitHub account.
Yes, the script generates SSL certificates to encrypt connections via noVNC.
You can restart it from your GitHub Codespaces dashboard and reinitialize the VNC server and noVNC.
Yes, use the optional update.sh
script in this repository to upgrade to the latest LTS version.
Run the tools.sh
script to install common tools and applications.
We recommend at least 2 cores and 4-Cores for a smooth experience.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request.