DEV Community

Brandon Rozek
Brandon Rozek

Posted on • Originally published at brandonrozek.com on

Aliases for Snaps and Flatpaks

Sometimes snap packages and flatpaks come with unmemorable names to run their commands. Luckily for snap packages, you can easily alias them. For example, to rename the .NET executable to dotnet run.

sudo snap alias dotnet-sdk.dotnet dotnet

Enter fullscreen mode Exit fullscreen mode

Sadly the same cannot be said for Flatpaks. There is a Github issue open at the moment. I’ll update this post when they successfully close the issue. In the meantime, we can use a script made by Seth Kenlon over at Red Hat’s blog. The script is at the bottom of the post for posterity. You can save it to ~/.local/bin, chmod +x ~/.local/bin, and then run fuzzpak [appname] where appname is the last part of the flatpak name. For example, the packageio.typora.Typora can be called with fuzzpak typora.

# parse opts
while [True]; do
if ["$1" = "--help" -o "$1" = "-h"]; then
    echo " "
    echo "$0 [OPTIONS]"
    echo "--directory, -d Location of flatpaks (default: $HOME/.var/app"
    echo " "
    exit
elif ["$1" = "--directory" -o "$1" = "-d"]; then
    DIR=$DIR
    shift 2
else
    break
fi
done

# main
launch_app "${1}"

Enter fullscreen mode Exit fullscreen mode

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay