Guest User

Untitled

a guest
May 26th, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.58 KB | None | 0 0
  1. #! /bin/bash
  2. Encoding=UTF-8
  3.  
  4. # PCLinuxOS SysTools
  5. #
  6. # Based on the original script available at http://pclosmag.com/html/Issues/200910/page21.html
  7.  
  8. FILE1=/etc/apt/sources.list
  9. FILE2=/root/.Xresources
  10. FILE3=/etc/default/grub
  11. FILE4=/etc/sudoers
  12. FILE5=/etc/fstab
  13. FILE6=/etc/rc.local
  14. FILE7=/root/.bashrc
  15. FILE8=~/.Xresources
  16. FILE9=~/.zshrc
  17. FILE10=~/.bashrc
  18. FILE11=~/.conkyrc
  19. FILE12=~/.mpd/mpd.conf
  20. FILE13=/root/.zshrc
  21. FILE14=/etc/X11/xorg.conf
  22. FILE15=~/.mrxvtrc
  23. FILE16=/root/.mrxvtrc
  24.  
  25. export MAIN_DIALOG='
  26. <window window_position="1" title="BunsenLabs SysTools" icon-name="applications-system">
  27.  
  28. <vbox>
  29. <hbox homogeneous="True">
  30. <frame Terminal Processes>
  31. <hbox homogeneous="True">
  32. <hbox>
  33. <button>
  34. <input file>/usr/share/icons/Faenza/apps/48/utilities-terminal.png</input>
  35. <action>urxvt &</action>
  36. </button>
  37. </hbox>
  38.  
  39. <vbox homogeneous="True">
  40. <button>
  41. <label>HTOP</label>
  42. <action>urxvt -e htop &</action>
  43. </button>
  44.  
  45. <button>
  46. <input file>/usr/share/icons/Faenza/apps/24/htop.png</input>
  47. <action>gksu "urxvt -e htop" &</action>
  48. </button>
  49. </vbox>
  50. </hbox>
  51. </frame>
  52.  
  53. <vbox>
  54. <frame Kernel Messages>
  55.  
  56. <button>
  57. <label>View Messages</label>
  58. <action>urxvt -hold -title "View Kernel Messages" -e raffaello --file=dmesg.cfg ---dmesg &</action>
  59. </button>
  60.  
  61. <entry><variable>VAR</variable></entry>
  62.  
  63. <hbox>
  64. <button>
  65. <label>Search</label>
  66. <input file>/usr/share/icons/Faenza/apps/16/catfish.png</input>
  67. <action>dmesg | grep $VAR | yad --text-info --width=700 --height=300 --title "$VAR in Kernel Messages" &</action>
  68. </button>
  69.  
  70. <button>
  71. <label>Search & Save</label>
  72. <input file>/usr/share/icons/Faenza/actions/16/document-save.png</input>
  73. <action>dmesg | grep $VAR > '$HOME'/Documents/dmesg_output_$VAR.txt &</action>
  74. <action>leafpad '$HOME'/Documents/dmesg_output_$VAR.txt</action>
  75. </button>
  76. </hbox>
  77. </frame>
  78. </vbox>
  79. </hbox>
  80.  
  81. <frame Command Information>
  82. <hbox>
  83. <text><label>Command:</label></text>
  84. <entry><variable>VAR1</variable></entry>
  85. </hbox>
  86.  
  87. <hbox>
  88. <button>
  89. <label>Help</label>
  90. <action>$VAR1 --help | yad --text-info --width=700 --height=600 --title "Help" &</action>
  91. </button>
  92.  
  93. <button>
  94. <label>Where</label>
  95. <action>whereis $VAR1 | yad --text-info --width=500 --height=20 --title "Where" &</action>
  96. </button>
  97.  
  98. <button>
  99. <label>Which</label>
  100. <action>which $VAR1 | yad --text-info --width=300 --height=200 --title "Which" &</action>
  101. </button>
  102.  
  103. <button>
  104. <label>Version</label>
  105. <action>$VAR1 --version | yad --text-info --width=500 --height=200 --title "Version" &</action>
  106. </button>
  107.  
  108. <button>
  109. <label>Manpage</label>
  110. <action>manpdf $VAR1</action>
  111. </button>
  112. </hbox>
  113. </frame>
  114. <hbox homogeneous="True">
  115.  
  116. <frame Hardware>
  117. <vbox>
  118. <button>
  119. <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
  120. <label>Sensors</label>
  121. <action>sensors | yad --text-info --width=400 --height=200 --title "Sensors" &</action>
  122. </button>
  123.  
  124. <button>
  125. <input file>/usr/share/icons/Faenza/places/16/network-workgroup.png</input>
  126. <label>Network Interfaces</label>
  127. <action>urxvt -title "Current Network Interfaces" -hold -e raffaello --file=ifconfig.cfg ---ifconfig &</action>
  128. </button>
  129.  
  130. <button>
  131. <input file>/usr/share/icons/Faenza/status/16/nm-signal-100.png</input>
  132. <label>Wireless Interfaces</label>
  133. <action>iw eth1 info | yad --text-info --width=500 --height=200 --title "Current Wireless Networks" &</action>
  134. </button>
  135.  
  136. <button>
  137. <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
  138. <label>Hardware Information</label>
  139. <action>gksu lshw | yad --text-info --width=700 --height=500 --title "Information-About-The-Hardware" &</action>
  140. </button>
  141.  
  142. <button>
  143. <input file>/usr/share/icons/Faenza/devices/16/media-floppy.png</input>
  144. <label>BIOS Information</label>
  145. <action>gksu dmidecode | head -20 | yad --text-info --width=400 --height=500 --title "BIOS-Information" &</action>
  146. </button>
  147.  
  148. <button>
  149. <input file>/usr/share/icons/Faenza/devices/16/audio-card.png</input>
  150. <label>PCI Devices</label>
  151. <action>lspci | yad --text-info --width=800 --height=500 --title "PCI Devices" &</action>
  152. </button>
  153.  
  154. <button>
  155. <input file>/usr/share/icons/Faenza/categories/16/gnome-control-center.png</input>
  156. <label>System Informations</label>
  157. <action>inxi-gui &</action>
  158. </button>
  159.  
  160. </vbox>
  161. </frame>
  162.  
  163. <frame System>
  164. <vbox>
  165. <hbox>
  166. <pixmap>
  167. <input file>/usr/share/icons/Faenza/categories/16/applications-other.png</input>
  168. </pixmap>
  169.  
  170. <menubar>
  171. <menu>
  172. <menuitem>
  173. <label>Running Kernel</label>
  174. <action>uname -a | yad --text-info --width=700 --height=20 --title "Current Running Kernel" &</action>
  175. </menuitem>
  176.  
  177. <menuitem>
  178. <label>Disk Usage</label>
  179. <action>ydf &</action>
  180. </menuitem>
  181.  
  182. <menuitem>
  183. <label>Show Path</label>
  184. <action>echo '$PATH' | yad --text-info --width=700 --height=10 --title "System Path" &</action>
  185. </menuitem>
  186. <label>System Information</label>
  187. </menu>
  188. </menubar>
  189. </hbox>
  190.  
  191. <hbox>
  192. <pixmap>
  193. <input file>/usr/share/icons/Faenza/mimetypes/16/rpm.png</input>
  194. </pixmap>
  195.  
  196. <menubar>
  197. <menu>
  198. <menuitem>
  199. <label>View Installed Applications</label>
  200. <action>packlist.sh &</action>
  201. </menuitem>
  202.  
  203. <menuitem>
  204. <label>Open List of Installed Applications</label>
  205. <action>yad --info --text "I will open a list of the installed RPMs in a temporary text file.\nIf you want to keep it, save it in a different location, since the temporary file will be removed.\nPress OK to continue."</action>
  206. <action>dpkg-query -l | sort >> '$HOME'/tmp/installed_debs.txt</action>
  207. <action>leafpad '$HOME'/tmp/installed_debs.txt</action>
  208. <action>rm -f '$HOME'/tmp/installed_debs.txt</action>
  209. </menuitem>
  210.  
  211. <menuitem>
  212. <label>Search in List of Installed Applications</label>
  213. <action>packsearch.sh &</action>
  214. </menuitem>
  215.  
  216. <label>Installed Applications</label>
  217. </menu>
  218. </menubar>
  219. </hbox>
  220.  
  221. <hbox>
  222. <pixmap>
  223. <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
  224. </pixmap>
  225.  
  226. <menubar>
  227. <menu>
  228. <menuitem>
  229. <label>Hard Drive Partitions</label>
  230. <action>gksu "fdisk -l | yad --text-info --width=700 --height=500 --title "Hard-Drive-Partitions"" &</action>
  231. </menuitem>
  232.  
  233. <menuitem>
  234. <label>Hard Drive UUID</label>
  235. <action>gksu "blkid | yad --text-info --width=700 --height=300 --title "Hard-Drive-UUID"" &</action>
  236. </menuitem>
  237.  
  238. <menuitem>
  239. <label>Current Mount Points</label>
  240. <action>mount | yad --text-info --width=700 --height=300 --title "Current Mount Points" & </action>
  241. </menuitem>
  242.  
  243. <menuitem>
  244. <label>Available Disk Space</label>
  245. <action>df -h | yad --text-info --width=700 --height=200 --title "Available Disk Space" &</action>
  246. </menuitem>
  247.  
  248. <menuitem>
  249. <label>Connected USB Devices</label>
  250. <action>lsusb | yad --text-info --width=700 --height=300 --title "Connected USB Devices" &</action>
  251. </menuitem>
  252.  
  253. <label>Devices</label>
  254. </menu>
  255. </menubar>
  256. </hbox>
  257.  
  258. <hbox>
  259. <pixmap>
  260. <input file>/usr/share/icons/Faenza/apps/16/xterm.png</input>
  261. </pixmap>
  262.  
  263. <menubar>
  264. <menu>
  265. <menuitem>
  266. <label>X-Server Information</label>
  267. <action>xdpyinfo | yad --text-info --width=700 --height=500 --title "Information About The X-Server" &</action>
  268. </menuitem>
  269.  
  270. <menuitem>
  271. <label>GLX/OpenGL Information</label>
  272. <action>glxinfo | yad --text-info --width=700 --height=500 --title "Information About GLX And OpenGL" &</action>
  273. </menuitem>
  274.  
  275. <label>X-Server</label>
  276. </menu>
  277. </menubar>
  278. </hbox>
  279.  
  280. <hbox>
  281. <pixmap>
  282. <input file>/usr/share/icons/Faenza/emblems/16/emblem-people.png</input>
  283. </pixmap>
  284.  
  285. <menubar>
  286. <menu>
  287. <menuitem>
  288. <label>Group Memberships</label>
  289. <action>groups | yad --text-info --width=700 --height=100 --title "View Group Memberships" &</action>
  290. </menuitem>
  291.  
  292. <menuitem>
  293. <label>Groups</label>
  294. <action>cat /etc/group | yad --text-info --width=300 --height=500 --title "View Groups" &</action>
  295. </menuitem>
  296.  
  297. <label>Groups</label>
  298. </menu>
  299. </menubar>
  300. </hbox>
  301.  
  302. <button>
  303. <input file>/usr/share/icons/Faenza/apps/16/synaptic.png</input>
  304. <label>Synaptic Logs</label>
  305. <action>gksu "bl-file-manager /root/.synaptic/log" &</action>
  306. </button>
  307.  
  308. <button>
  309. <input file>/usr/share/icons/Faenza/categories/16/applications-system.png</input>
  310. <label>Loaded Modules</label>
  311. <action>lsmod | yad --text-info --width=700 --height=500 --title "View Loaded Modules" &</action>
  312. </button>
  313.  
  314. <button>
  315. <input file>/usr/share/icons/Faenza/categories/16/applications-system.png</input>
  316. <label>System Services</label>
  317. <action>systemctl -t service -a | yad --text-info --width=600 --height=600 --title "View Services" &</action>
  318. </button>
  319.  
  320. </vbox>
  321. </frame>
  322. </hbox>
  323.  
  324. <hbox>
  325. <frame Edit Files>
  326. <hbox>
  327. <button><label>sources.list</label><action>yad --title='"$FILE1"' --text-info --width 900 --height 400 --filename='"$FILE1"' &</action></button>
  328. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE1"'" &</action></button>
  329. </hbox>
  330.  
  331. <hbox>
  332. <button><label>menu.lst</label><action>yad --title='"$FILE3"' --text-info --width 700 --height 400 --filename='"$FILE3"' &</action></button>
  333. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE3"'" &</action></button>
  334. </hbox>
  335.  
  336. <hbox>
  337. <button><label>sudoers</label><action>gksu "yad --title='"$FILE4"' --text-info --width 700 --height 400 --filename='"$FILE4"'" &</action></button>
  338. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE4"'" &</action></button>
  339. </hbox>
  340.  
  341. <hbox>
  342. <button><label>xorg.conf</label><action>yad --title='"$FILE14"' --text-info --width 700 --height 400 --filename='"$FILE14"' &</action></button>
  343. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE14"'" &</action></button>
  344. </hbox>
  345. </frame>
  346.  
  347. <frame Edit Files>
  348. <hbox>
  349. <button><label>fstab</label><action>yad --title='"$FILE5"' --text-info --width 700 --height 400 --filename='"$FILE5"' &</action></button>
  350. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE5"'" &</action></button>
  351. </hbox>
  352.  
  353. <hbox>
  354. <button><label>rc.local</label><action>yad --title='"$FILE6"' --text-info --width 700 --height 400 --filename='"$FILE6"' &</action></button>
  355. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE6"'" &</action></button>
  356. </hbox>
  357.  
  358. <hbox>
  359. <button><label>.Xresources</label><action>leafpad '"$FILE8"' &</action></button>
  360. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE2"'" &</action></button>
  361. </hbox>
  362.  
  363. <hbox>
  364. <button><label>mpd.conf</label><action>yad --title='"$FILE12"' --text-info --width 700 --height 400 --filename='"$FILE12"' &</action></button>
  365. <button><input file>/usr/share/icons/Faenza/apps/16/utilities-terminal.png</input><action>leafpad '"$FILE12"' &</action></button>
  366. </hbox>
  367. </frame>
  368.  
  369. <frame Edit Files>
  370. <hbox>
  371. <button><label>.mrxvtrc</label><action>leafpad '"$FILE15"' &</action></button>
  372. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE16"'" &</action></button>
  373. </hbox>
  374.  
  375. <hbox>
  376. <button><label>.zshrc</label><action>leafpad '"$FILE9"' &</action></button>
  377. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE13"'" &</action></button>
  378. </hbox>
  379.  
  380. <hbox>
  381. <button><label>.bashrc</label><action>leafpad '"$FILE10"' &</action></button>
  382. <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE7"'" &</action></button>
  383. </hbox>
  384.  
  385. <hbox>
  386. <button><label>.conkyrc</label><action>yad --title='"$FILE11"' --text-info --width 700 --height 400 --filename='"$FILE11"' &</action></button>
  387. <button><input file>/usr/share/icons/Faenza/apps/16/utilities-terminal.png</input><action>leafpad '"$FILE11"' &</action></button>
  388. </hbox>
  389. </frame>
  390. </hbox>
  391.  
  392. <frame>
  393. <hbox homogeneous="True">
  394. <button>
  395. <input file>/usr/share/icons/Faenza/status/24/dialog-question.png</input>
  396. <action>yad --question --text "To be able to perform all the operations, check if the following apps are installed: \\n\\nchkconfig dmidecode Faenza leafpad lm-sensors lshw \nurxvt mesa-utils mupdf oxygen xdpyinfo\\n\\nDo you want to install them if they are not already installed?"; if [ "$?" = 0 ]; then gksu "xterm --noclose -e apt-get install chkconfig dmidecode Faenza-icon-theme leafpad lm_sensors lshw urxvt mesa-demos mupdf oxygen-icon-theme pcmanfm xdpyinfo"; fi</action>
  397. </button>
  398.  
  399. <text use-markup="true"><label>"<span color='"'black'"' font-family='"'Droid Sans'"' weight='"'bold'"' size='"'large'"'><small>BunsenLabs SysTools</small></span>"</label></text>
  400.  
  401. <button>
  402. <input file>/usr/share/icons/Faenza/actions/24/application-exit.png</input>
  403. <action type="exit">exit 0</action>
  404. </button>
  405. </hbox>
  406. </frame>
  407. </vbox>
  408. </window>
  409. '
  410. gtkdialog --program=MAIN_DIALOG
Advertisement
Add Comment
Please, Sign In to add comment