Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- Encoding=UTF-8
- # PCLinuxOS SysTools
- #
- # Based on the original script available at http://pclosmag.com/html/Issues/200910/page21.html
- FILE1=/etc/apt/sources.list
- FILE2=/root/.Xresources
- FILE3=/etc/default/grub
- FILE4=/etc/sudoers
- FILE5=/etc/fstab
- FILE6=/etc/rc.local
- FILE7=/root/.bashrc
- FILE8=~/.Xresources
- FILE9=~/.zshrc
- FILE10=~/.bashrc
- FILE11=~/.conkyrc
- FILE12=~/.mpd/mpd.conf
- FILE13=/root/.zshrc
- FILE14=/etc/X11/xorg.conf
- FILE15=~/.mrxvtrc
- FILE16=/root/.mrxvtrc
- export MAIN_DIALOG='
- <window window_position="1" title="BunsenLabs SysTools" icon-name="applications-system">
- <vbox>
- <hbox homogeneous="True">
- <frame Terminal Processes>
- <hbox homogeneous="True">
- <hbox>
- <button>
- <input file>/usr/share/icons/Faenza/apps/48/utilities-terminal.png</input>
- <action>urxvt &</action>
- </button>
- </hbox>
- <vbox homogeneous="True">
- <button>
- <label>HTOP</label>
- <action>urxvt -e htop &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/apps/24/htop.png</input>
- <action>gksu "urxvt -e htop" &</action>
- </button>
- </vbox>
- </hbox>
- </frame>
- <vbox>
- <frame Kernel Messages>
- <button>
- <label>View Messages</label>
- <action>urxvt -hold -title "View Kernel Messages" -e raffaello --file=dmesg.cfg ---dmesg &</action>
- </button>
- <entry><variable>VAR</variable></entry>
- <hbox>
- <button>
- <label>Search</label>
- <input file>/usr/share/icons/Faenza/apps/16/catfish.png</input>
- <action>dmesg | grep $VAR | yad --text-info --width=700 --height=300 --title "$VAR in Kernel Messages" &</action>
- </button>
- <button>
- <label>Search & Save</label>
- <input file>/usr/share/icons/Faenza/actions/16/document-save.png</input>
- <action>dmesg | grep $VAR > '$HOME'/Documents/dmesg_output_$VAR.txt &</action>
- <action>leafpad '$HOME'/Documents/dmesg_output_$VAR.txt</action>
- </button>
- </hbox>
- </frame>
- </vbox>
- </hbox>
- <frame Command Information>
- <hbox>
- <text><label>Command:</label></text>
- <entry><variable>VAR1</variable></entry>
- </hbox>
- <hbox>
- <button>
- <label>Help</label>
- <action>$VAR1 --help | yad --text-info --width=700 --height=600 --title "Help" &</action>
- </button>
- <button>
- <label>Where</label>
- <action>whereis $VAR1 | yad --text-info --width=500 --height=20 --title "Where" &</action>
- </button>
- <button>
- <label>Which</label>
- <action>which $VAR1 | yad --text-info --width=300 --height=200 --title "Which" &</action>
- </button>
- <button>
- <label>Version</label>
- <action>$VAR1 --version | yad --text-info --width=500 --height=200 --title "Version" &</action>
- </button>
- <button>
- <label>Manpage</label>
- <action>manpdf $VAR1</action>
- </button>
- </hbox>
- </frame>
- <hbox homogeneous="True">
- <frame Hardware>
- <vbox>
- <button>
- <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
- <label>Sensors</label>
- <action>sensors | yad --text-info --width=400 --height=200 --title "Sensors" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/places/16/network-workgroup.png</input>
- <label>Network Interfaces</label>
- <action>urxvt -title "Current Network Interfaces" -hold -e raffaello --file=ifconfig.cfg ---ifconfig &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/status/16/nm-signal-100.png</input>
- <label>Wireless Interfaces</label>
- <action>iw eth1 info | yad --text-info --width=500 --height=200 --title "Current Wireless Networks" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
- <label>Hardware Information</label>
- <action>gksu lshw | yad --text-info --width=700 --height=500 --title "Information-About-The-Hardware" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/devices/16/media-floppy.png</input>
- <label>BIOS Information</label>
- <action>gksu dmidecode | head -20 | yad --text-info --width=400 --height=500 --title "BIOS-Information" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/devices/16/audio-card.png</input>
- <label>PCI Devices</label>
- <action>lspci | yad --text-info --width=800 --height=500 --title "PCI Devices" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/categories/16/gnome-control-center.png</input>
- <label>System Informations</label>
- <action>inxi-gui &</action>
- </button>
- </vbox>
- </frame>
- <frame System>
- <vbox>
- <hbox>
- <pixmap>
- <input file>/usr/share/icons/Faenza/categories/16/applications-other.png</input>
- </pixmap>
- <menubar>
- <menu>
- <menuitem>
- <label>Running Kernel</label>
- <action>uname -a | yad --text-info --width=700 --height=20 --title "Current Running Kernel" &</action>
- </menuitem>
- <menuitem>
- <label>Disk Usage</label>
- <action>ydf &</action>
- </menuitem>
- <menuitem>
- <label>Show Path</label>
- <action>echo '$PATH' | yad --text-info --width=700 --height=10 --title "System Path" &</action>
- </menuitem>
- <label>System Information</label>
- </menu>
- </menubar>
- </hbox>
- <hbox>
- <pixmap>
- <input file>/usr/share/icons/Faenza/mimetypes/16/rpm.png</input>
- </pixmap>
- <menubar>
- <menu>
- <menuitem>
- <label>View Installed Applications</label>
- <action>packlist.sh &</action>
- </menuitem>
- <menuitem>
- <label>Open List of Installed Applications</label>
- <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>
- <action>dpkg-query -l | sort >> '$HOME'/tmp/installed_debs.txt</action>
- <action>leafpad '$HOME'/tmp/installed_debs.txt</action>
- <action>rm -f '$HOME'/tmp/installed_debs.txt</action>
- </menuitem>
- <menuitem>
- <label>Search in List of Installed Applications</label>
- <action>packsearch.sh &</action>
- </menuitem>
- <label>Installed Applications</label>
- </menu>
- </menubar>
- </hbox>
- <hbox>
- <pixmap>
- <input file>/usr/share/icons/Faenza/apps/16/hardinfo.png</input>
- </pixmap>
- <menubar>
- <menu>
- <menuitem>
- <label>Hard Drive Partitions</label>
- <action>gksu "fdisk -l | yad --text-info --width=700 --height=500 --title "Hard-Drive-Partitions"" &</action>
- </menuitem>
- <menuitem>
- <label>Hard Drive UUID</label>
- <action>gksu "blkid | yad --text-info --width=700 --height=300 --title "Hard-Drive-UUID"" &</action>
- </menuitem>
- <menuitem>
- <label>Current Mount Points</label>
- <action>mount | yad --text-info --width=700 --height=300 --title "Current Mount Points" & </action>
- </menuitem>
- <menuitem>
- <label>Available Disk Space</label>
- <action>df -h | yad --text-info --width=700 --height=200 --title "Available Disk Space" &</action>
- </menuitem>
- <menuitem>
- <label>Connected USB Devices</label>
- <action>lsusb | yad --text-info --width=700 --height=300 --title "Connected USB Devices" &</action>
- </menuitem>
- <label>Devices</label>
- </menu>
- </menubar>
- </hbox>
- <hbox>
- <pixmap>
- <input file>/usr/share/icons/Faenza/apps/16/xterm.png</input>
- </pixmap>
- <menubar>
- <menu>
- <menuitem>
- <label>X-Server Information</label>
- <action>xdpyinfo | yad --text-info --width=700 --height=500 --title "Information About The X-Server" &</action>
- </menuitem>
- <menuitem>
- <label>GLX/OpenGL Information</label>
- <action>glxinfo | yad --text-info --width=700 --height=500 --title "Information About GLX And OpenGL" &</action>
- </menuitem>
- <label>X-Server</label>
- </menu>
- </menubar>
- </hbox>
- <hbox>
- <pixmap>
- <input file>/usr/share/icons/Faenza/emblems/16/emblem-people.png</input>
- </pixmap>
- <menubar>
- <menu>
- <menuitem>
- <label>Group Memberships</label>
- <action>groups | yad --text-info --width=700 --height=100 --title "View Group Memberships" &</action>
- </menuitem>
- <menuitem>
- <label>Groups</label>
- <action>cat /etc/group | yad --text-info --width=300 --height=500 --title "View Groups" &</action>
- </menuitem>
- <label>Groups</label>
- </menu>
- </menubar>
- </hbox>
- <button>
- <input file>/usr/share/icons/Faenza/apps/16/synaptic.png</input>
- <label>Synaptic Logs</label>
- <action>gksu "bl-file-manager /root/.synaptic/log" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/categories/16/applications-system.png</input>
- <label>Loaded Modules</label>
- <action>lsmod | yad --text-info --width=700 --height=500 --title "View Loaded Modules" &</action>
- </button>
- <button>
- <input file>/usr/share/icons/Faenza/categories/16/applications-system.png</input>
- <label>System Services</label>
- <action>systemctl -t service -a | yad --text-info --width=600 --height=600 --title "View Services" &</action>
- </button>
- </vbox>
- </frame>
- </hbox>
- <hbox>
- <frame Edit Files>
- <hbox>
- <button><label>sources.list</label><action>yad --title='"$FILE1"' --text-info --width 900 --height 400 --filename='"$FILE1"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE1"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>menu.lst</label><action>yad --title='"$FILE3"' --text-info --width 700 --height 400 --filename='"$FILE3"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE3"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>sudoers</label><action>gksu "yad --title='"$FILE4"' --text-info --width 700 --height 400 --filename='"$FILE4"'" &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE4"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>xorg.conf</label><action>yad --title='"$FILE14"' --text-info --width 700 --height 400 --filename='"$FILE14"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE14"'" &</action></button>
- </hbox>
- </frame>
- <frame Edit Files>
- <hbox>
- <button><label>fstab</label><action>yad --title='"$FILE5"' --text-info --width 700 --height 400 --filename='"$FILE5"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE5"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>rc.local</label><action>yad --title='"$FILE6"' --text-info --width 700 --height 400 --filename='"$FILE6"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE6"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>.Xresources</label><action>leafpad '"$FILE8"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE2"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>mpd.conf</label><action>yad --title='"$FILE12"' --text-info --width 700 --height 400 --filename='"$FILE12"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/utilities-terminal.png</input><action>leafpad '"$FILE12"' &</action></button>
- </hbox>
- </frame>
- <frame Edit Files>
- <hbox>
- <button><label>.mrxvtrc</label><action>leafpad '"$FILE15"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE16"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>.zshrc</label><action>leafpad '"$FILE9"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE13"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>.bashrc</label><action>leafpad '"$FILE10"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/gksu-root-terminal.png</input><action>gksu "leafpad '"$FILE7"'" &</action></button>
- </hbox>
- <hbox>
- <button><label>.conkyrc</label><action>yad --title='"$FILE11"' --text-info --width 700 --height 400 --filename='"$FILE11"' &</action></button>
- <button><input file>/usr/share/icons/Faenza/apps/16/utilities-terminal.png</input><action>leafpad '"$FILE11"' &</action></button>
- </hbox>
- </frame>
- </hbox>
- <frame>
- <hbox homogeneous="True">
- <button>
- <input file>/usr/share/icons/Faenza/status/24/dialog-question.png</input>
- <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>
- </button>
- <text use-markup="true"><label>"<span color='"'black'"' font-family='"'Droid Sans'"' weight='"'bold'"' size='"'large'"'><small>BunsenLabs SysTools</small></span>"</label></text>
- <button>
- <input file>/usr/share/icons/Faenza/actions/24/application-exit.png</input>
- <action type="exit">exit 0</action>
- </button>
- </hbox>
- </frame>
- </vbox>
- </window>
- '
- gtkdialog --program=MAIN_DIALOG
Advertisement
Add Comment
Please, Sign In to add comment