Kimarite

HDSentinel_script_save_xfce

Apr 4th, 2021 (edited)
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. ## FILE: HDSentinel_script_save-xfce (see the summary at the end of the script)
  4. ##
  5. ## DESCRIPTION: Script for launching HDSentinel from a desktop icon into a gnome-terminal profile named HoldOpen that will hold the terminal window open after HDSentinel has ended.
  6. ## script also will generate and save a report with a date/time stamped filename.
  7. ##
  8. ## AUTHOR: Marc Sayer <marcsayer56@gmail.com>
  9. ##
  10. ## DATE: Mon, Jan 20 2014 23:43:23
  11. ##
  12. ## MODIFIED: Sat, March 8 2014 00:35:41
  13. ##
  14. ## VERSION: 3
  15. ##
  16. ## Script has been tested in Ubuntu 13.04 and Zorin 7 Core, in both 32 & 64 bit versions - gnome-teminal is the terminal emulator in the Gnome DE (Desktop Environment).
  17. ## Some Ubuntu based distros may use a different DE, but may still include Gnome functionality, Zorin 7 CORE is an exmaple of this.
  18. ## This bash script is very basic. It is for folks who are not familiar with scripting and/or are new to Linux.
  19. ## If you know your way around a script, you probably do not need it and can get this done on your own.
  20. ## If you know enough to have a terminal emulator of preference, this will be baby steps to you.
  21. ## This is aimed at folks who don't spend a lot of time outside of the GUIs.
  22. ## To create the terminal profile HoldOpen needed to hold open the window after HDSentinel completes, please see the readme file.
  23.  
  24. ## change to folder where HDSentinel is located
  25. cd ~/HDSentinel
  26.  
  27. ## Get date/time, determine format, and save as variable "DATE"
  28. DATE=`date '+-%Y-%m-%d-%H:%M'`
  29.  
  30. ## Open gnome-terminal using the profile "HoldOpen", execute HDSentinel, generate and save HDSentinel report with creation "DATE" in the filename.
  31. # gnome-terminal --window-with-profile=HoldOpen -e "sudo ./HDSentinel -html -r report-$DATE"
  32.  
  33. ## Open xfce4-terminal using do not close window (exec bash), execute HDSentinel, generate and save HDSentinel report with creation "DATE" in the filename.
  34. xfce4-terminal -e "bash -c 'sudo ./HDSentinel -html -r report-$DATE ; exec bash'"
  35.  
  36. ## Script has been tested in Debian 10 Buster, in both 64 bit versions - xfce4-terminal is the terminal emulator in the Cinnamon DE (Desktop Environment).
  37. ## FORK: kimarite
  38. ## MODIFIED: Sun, April 4 2021 20:21:41
  39.  
RAW Paste Data