Skip to content

Instantly share code, notes, and snippets.

@sam-sla
Forked from pierremonico/Postman.desktop
Last active November 26, 2020 12:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sam-sla/56f6bc4ee9e317cf8eb4efca650a4e60 to your computer and use it in GitHub Desktop.
Save sam-sla/56f6bc4ee9e317cf8eb4efca650a4e60 to your computer and use it in GitHub Desktop.
Install Postman
#!/usr/bin/env bash
cd /tmp || exit
echo "Downloading and unpacking Postman... (1/5)"
wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz
tar -xzf postman.tar.gz
rm postman.tar.gz
echo "Installing to opt... (2/5)"
if [ -d "/opt/Postman" ];then
sudo rm -rf /opt/Postman
fi
sudo mv Postman /opt/Postman
echo "Creating symbolic link... (3/5)"
if [ -L "/usr/bin/postman" ];then
sudo rm -f /usr/bin/postman
fi
sudo ln -s /opt/Postman/Postman /usr/bin/postman
echo "Downloading .desktop file... (4/5)"
wget https://gist.githubusercontent.com/sam-sla/56f6bc4ee9e317cf8eb4efca650a4e60/raw/90d701b5eb942c07f633bd59f769333b0ced8db8/Postman.desktop
echo "Installing .desktop file... (5/5)"
if [ -e "/usr/share/applications/Postman.desktop" ];then
sudo rm /usr/share/applications/Postman.desktop
fi
sudo mv Postman.desktop /usr/share/applications/Postman.desktop
echo "Installation completed successfully."
echo "You can use Postman!"
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@shivdhar
Copy link

The icon wasn't visible to me.

The desktop file in step 4 seems to point to some other file, whose Icon points to /opt/Postman/resources/app/assets/icon.png
It turned out to be at /opt/Postman/app/resources/app/assets/icon.png (note the 'app/' after Postman).

You might want to update it to link to the Postman.desktop file above instead.

Anyway, thanks for the good work!

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