Skip to content

Instantly share code, notes, and snippets.

@h3r
Last active October 22, 2024 13:03
Show Gist options
  • Save h3r/2d5dcb2f64cf34b6f7fdad85c57c1a45 to your computer and use it in GitHub Desktop.
Save h3r/2d5dcb2f64cf34b6f7fdad85c57c1a45 to your computer and use it in GitHub Desktop.

Installing Cool-Retro-Term on Windows10

First of all, this document is just a recompilation of different resources that already existed on the web previously that I personally tested some ones did work and other not. I liked the idea to make a full guide from start to end so all of you could also enjoy playing with cool-retro-term on windows 10. Personally I installed it on a windows 10 pro version. Fingers crossed!

result

Briefly, we are going to:

1- enable linux subsystem on windows 10 2- clone and compile cool-retro-term git source 3- connect to windows 4- package all execution under a custom made exe file using windows internal tools 5- edit our fancy exe to have its own icon


STEP 1 - Enable Linux Subsystem WLS on Windows 10

The first thing you should do is enabling developer mode. To get there:

  • Press windows key > type "Windows update and settings" > hit Enter

  • Click on "For Developers" tab on the left panel

  • Choose "Developer mode"

  • Restart if prompted

  • Press windows key > type "Power Shell" > right click > click on "Run as Administrator"

  • Copy-paste this on powershell:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Install your distro of choice (I've only tested with ubuntu).

    View of Linux distros in the Windows store

After the whole installation finishes, go and press windows + r > type "bash" and hit enter. It will open a native full linux shell. The first time you open bash, the system will prompt a series of config parameters as user and password.


STEP 2 - Getting Cool-Retro-Term

If I remember properly, git was already installed, if not type:

sudo apt-get install git

Next, lets get to work. If you have any problem check the official repository guide

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install qtchooser qt5-default qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-localstorage build-essential qtdeclarative5-dev

git clone --recursive https://github.com/Swordfish90/cool-retro-term.git

cd cool-retro-term
qmake && make
cd ..

sudo mv cool-retro-term /opt/cool-retro-term
sudo ln -s /opt/cool-retro-term/cool-retro-term /usr/sbin/cool-retro-term

If all did go as intended and no dependency failed to install you should have now cool-retro-term properly installed as a direct command.

export DISPLAY=localhost:0 cool-retro-term &


STEP 3 - Connecting seamlessly to Windows 10

The problem right now is that we installed a console version of ubuntu and it does not have a way to display graphical guis so we are going to bypass this to windows using Xming-server. Download it from here.

After installing, execute xming server and we just need the last step, to tell ubuntu to use Xming.

    export DISPLAY=localhost:0.0
    cool-retro-term &

If you are ok like this you could do win+r > bash > type "cool-retro-term" and will open the retro term on windows.

STEP 4 - Packaging

Personally I liked the idea of having all done within a single doubleclick,without console on the background and without having to manually open xming server every time.

We are going to open windows+r>bash create a script somewhere of your preference (I called it "crt.sh" and placed on a scripts folder on my home directory)

sudo nano crt.sh

Fill it with:

#!/bin/bash
export DISPLAY=localhost:0.0
cool-retro-term

This launches our retro term linking to xming window server. Now we are going to call this script from windows. Create a new notepad file, type the following text changing the path where you placed the sh script and save with extension ".bat" i.e.: "crt.bat"

@echo off
xming :0 -clipboard -multiwindow
start /B "" "C:\Windows\System32\bash.exe" -c "sh /home/h3r/scripts/crt.sh"

Now this launches xming silently and runs the terminal but still opens a console on the background. What I did found is, there is a windows application called iexpress that lets you package scripts, unpackage, run install scripts, etc... we are going to use this tool to execute our bat file every time we click on it.

press windows key > type "iexpress" > right click and "run as administrator"

this will pop a wizard to configure our executable. Follow as:

  • Create new Self Extraction Directive file
  • Extract files and run an installation command
  • Type some cool title like "cool-retro-term"
  • No promt
  • Do not display a license
  • Add > include our .bat file

  • THIS IS AN IMPORTANT STEP: on "Install Program" type cmd /c youtbatfilename.bat

  • Hidden

  • No Message

  • browse and type your executable final name , AND check the option "Hide File Extracting Progress Animation from the User"

  • No Restart

  • Choose or not to save SED file, its a configuration file if you don't want to repeat the whole process again in case you did type something wrong. AND THAT'S IT!


STEP 5 - Edit our fancy exe to have its own icon

Well, this is the first and the fastest solution I did found on the internet, it literally taken me about 30 seconds to have the new icons working.

  • Download Resource Hacker & Open. The webpage style really scares but the software is simple and functional.
  • File > Open : choose your recently created executable
  • Open the icon folder, just select one
  • Go to Action > Replace Icon > Open file with new icon : choose a new icon

Additional! Web Tool to convert .png to .ico

Some icon pngs from Xodetaetl


AND THATS ALL!

I personally had to restart to see the new icon. I hope you had no troubles going through this guide. If you like, you can share a beer with me using PayPal ;). Donate

@AdityaMitra5102
Copy link

AdityaMitra5102 commented May 29, 2024

Writing it in 2024 coz we dont need xservers anymore. Follow these steps
To install Cool Retro Term on a Windows machine

  • Install WSL
    image
  • Install Ubuntu (I use Ubuntu 22.04)
    image
  • Install cool-retro-term by sudo snap install cool-retro-term --classic
  • Create a bat file on your desktop (or whereever you want)
  • Add the following code in the bat file
@ECHO off
"C:\Program Files\WSL\wslg.exe" -d Ubuntu-22.04 --cd "~" -- env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/cool-retro-term_cool-retro-term.desktop /snap/bin/cool-retro-term --fullscreen

  • Done. Now you can use it.

Now, if you don't use Ubuntu and want to use Cool retro term for Windows CMD instead, do the following steps (after the ones mentioned above.)

  • Open Ubuntu shell
  • Go to /usr/bin by cd /usr/bin
  • We are going to create a pointer to Windows cmd
  • Create a new file called cmd with sudo nano cmd
  • Add the following code
#! /bin/bash
/mnt/c/Windows/System32/cmd.exe /K "C: & cd C: & cls"
  • Save the file with Ctrl + S, the exit the editor by Ctrl + X
  • Make the file executable with sudo chmod +X cmd

Now you can just type 'cmd' in Ubuntu shell or in the cool retro term to open the windows cmd.

If you want to make cmd to open by default in Cool Retro Term now, Do the following steps

  • Open cool retro term by entering the following on the Ubuntu shell /snap/bin/cool-retro-term

  • Right click and select Settings
    image

  • Go to the advanced tab

  • Check the box saying 'Use custom command instead of shell at startup'

  • Write cmd in the command box.
    image

  • Exit settings

  • Exit cool Retro term

  • Now try running the bat file you created earlier. It will open Windows command prompt in Cool retro term

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment