Introduction#
Ever found yourself staring at your Linux app store for twenty minutes, unable to decide what to play? Well, what if you let fate decide instead?
Robin’s Roulette is a little Bash-powered experiment that turns your Linux gaming backlog into a game of chance. It fetches the Flathub game catalogue, checks what you’ve already installed or rejected, then spins the wheel of fortune, and presents you with a random game to try.
Will it be a hidden gem, a glorious waste of time, or something you’ll uninstall before you’ve even worked out the controls? There’s only one way to find out!
If a game catches your eye, the script can install and launch it for you. Once you’ve finished playing, you can keep it or uninstall it and add it to your reject list, so it won’t come around again. Also before all of that you can reject a game you’ve been dealt.
It’s all powered by Bash and a handful of familiar Linux command-line utilities, with a little terminal colour magic, ASCII theatrics and random sentences thrown in for good measure. No elaborate launcher, no complicated database, just a script doing one job.
So, place your bets, summon the RNG gods, and remember: the house always wins, unless the game crashes first.
Dependencies#
Every script depends on some sort of dependency. For instance Obviously this one needs Bash to work. Other than that, here is a list of the utilities used;
- python3 - Is used for the optional Ascii Art countdown script.
If Python3 is missing you can install it by typing into your terminal:
sudo apt install python3 python3-pip python3-venvThe rest of these are ubiquitous for most Ubuntu systems, but may be missing:
- curl - Fetches the Flathub catalogue and appstream metadata
- jq - Parses the JSON responses
- flatpak - Lists installed apps, installs, runs, and uninstalls games
- shuf - Picks the random game index
- sed - Strips ANSI codes, converts HTML to text
- fold - Wraps the description to terminal width
- tr - Builds the banner border, flattens newlines
- wc - Measures visible text width for centring
- tput - Terminal width fallback
- grep - Scans /proc/*/cgroup in wait_for_flatpak_exit
There is nothing innocuous here, but always open scripts obtained of the internet and check them first.
If any of these packages are not installed, you can install them by typing the command below. Then replacing the application name.
sudo apt install jqInstallation#
Installation of the script is easy. First you need to make a directory for it to live in. You can choose your own path, but below is a good example. Open up your terminal application and type;
mkdir ~/scripts
cd scripts/Then you can get the files from this site by typing or pasting;
curl -fsSL https://robinslab.co.uk/downloads/roulette/robins_roulette.sh -o robins_roulette.sh
curl -fsSL https://robinslab.co.uk/downloads/roulette/robins_countdown.sh -o robins_countdown.shRemember to inspect anything downloaded from the internet before running it;
cat robins_countdown.shcat robins_roulette.shLastly the script won’t work until you change the permissions, the snippet below adds the execute permission to the files:
chmod +x robins_roulette.sh robins_countdown.shnow you can run the script anytime by typing.
./robins_roulette.shNote; you can also run the countdown timer separately. You can treat this as a unnecessary plugin for the main script to work. that goes for python3 too.
./robins_countdown.shOutroduction - should be a word#
I hope you have at least a couple of hours fun with this, and pick the script apart to learn from it, or play something fun. If you have any suggestions, please leave them on the YouTube video. If your feeling exceptionally flush, please consider using the buy me a coffee widget or visit my wishlist page.
If you've enjoyed this article and fancy helping keep the servers humming and the tools running, you can find things on the Robin's Lab wishlist . No obligation — reading, sharing, enjoying the articles and disagreeing with me are all completely free. I won't even send you an invoice.









