Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mac OSX 'open' equivalent for Debian
#!/bin/bash
# echoes '#!/bin/bash xdg-open "$1" &> $HOME/.xdg-open-error &' to /usr/sbin/open
echo -e "\043\041/bin/bash\n\nxdg-open \042\044\061\042 &> $HOME/.xdg-open-error &" > ozanmuyes-open
sudo mv ozanmuyes-open /usr/sbin/open
sudo chmod +x /usr/sbin/open
echo -e "\n# Mac OSX \047open\047 equivalent for Debian\nalias 'open'='/usr/sbin/open'" >> $HOME/.bashrc
. $HOME/.bashrc
echo "OK"
@ozanmuyes
Copy link
Author

ozanmuyes commented Jun 17, 2017

Usage

Download

curl -o /tmp/install-open.sh https://gist.githubusercontent.com/ozanmuyes/ea92b8eaba34d9c57894f05751270118/raw/9aa7d212214ebbdbacb7deb9c2f7f29164b739e2/install-open.sh

Change Mod

sudo chmod +x /tmp/install-open.sh

Run

/tmp/install-open.sh

Altogether

curl -o /tmp/install-open.sh https://gist.githubusercontent.com/ozanmuyes/ea92b8eaba34d9c57894f05751270118/raw/9aa7d212214ebbdbacb7deb9c2f7f29164b739e2/install-open.sh && sudo chmod +x /tmp/install-open.sh && /tmp/install-open.sh

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