Development and Tech News

  • Archive
  • RSS
  • Ask me anything

“Ninite” like bash script to install and configure some basic apps in Ubuntu

For many people who use Windows, “Ninite” seems to be an easy and effective way to install many of the applications that they use everyday after a fresh install of the OS.

The makers of Ninite even recently released a Linux version found here. Although this is very helpful to Linux users, I thought the die-hard terminal and scripting fans would like a simple bash script better to make the automation even easier so I created a simplistic one below:

Ok a few things to note here:

The applications I am adding here that you might not know of are

  1. Guake - a beautiful terminal app with a rich amount of features. My terminal app of choice. It supports multiple tabs, different backgrounds, transparency, etc. but more importantly, can be configured to show and hide upon a keystroke. It was inspired from the Quake command line.
  2. Gnome-Do is a simple OS X like spotlight app that allows the user to search for or run apps and files easily. The user can just summon/hide it with a keystroke and allows him to launch applications without using the mouse.

If you are still learning bash scripting (and I still am :P ), it is important to note that:

  1. I originally recommend the user to run with elevated privileges using sudo and not su because I use it later to get the user’s home directory. The current user is gotten through the $SUDO_USER variable. It cannot be gotten from the $USER variable as it will return ‘root’ from the script being run with elevated privileges. If I run it as su, the information as to who originally ran the script with elevated privileges will not available so easily. 
  2. The checking of whether the application is installed or not is not necessary but has been included mainly for adding custom messages or code later if I need to revise it.
  3. If you are wondering what the ‘2>&-’ means, it is a form of IO redirection. It is not necessary for the script but is done as a good practice. There is a lot more information than what I can describe here

To download, just click on the Snipt icon on the bottom of the code view and then select the download link on the bottom of the page. Remove the extension so it ends in .sh. chmod +x the file (essentially making the file executable) and run it using sudo.

If you have any questions, feel free to ask!

    • #Ubuntu
    • #bash
    • #scripting
    • #application
    • #apps
    • #install
  • 1 year ago
  • 20
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

20 Notes/ Hide

  1. transientyou83 likes this
  2. keynotetis8 likes this
  3. emileeyou89 likes this
  4. spurgeoncc likes this
  5. thenameisadib reblogged this from gautham-chandra
  6. thenameisadib likes this
  7. gautham-chandra posted this
← Previous • Next →

About

Providing any knowledge I learned from mistakes along the way so others dont need to make them

Pages

  • SharePoint Development
  • Android
  • Portfolio
  • Tech, Support and Misc

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile
Effector Theme by Pixel Union