How to add LinuxBBQ System Tool?

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
missinglink
Rawdog
Posts: 36
Joined: Tue Jan 01, 2013 10:46 pm

How to add LinuxBBQ System Tool?

Unread post by missinglink » Mon Jul 29, 2013 9:48 pm

MB et al,
Tips/howto on adding the LinuxBBQ System Tool to any of the general purpose roasts that do not come with it?
My basic giveaway BBQ roast is Trollinger32, endowed with the mighty tool. But there are others I use - and more importantly pass along to others - that could benefit.
Obviously not looking to screw up the minimal/cli blends ...

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: How to add LinuxBBQ System Tool?

Unread post by pidsley » Mon Jul 29, 2013 10:51 pm

Look in ~/.config/openbox/menu.xml (on T32). You'll see that the menu calls "bbqsys" -- this is a bash script in /usr/bin. This script calls some other helper scripts (like bbqcups and bbqasian). You can see what other scripts it calls by looking at the code. I don't know if bacon has packaged the tool to make it portable, but you can copy the appropriate scripts from /usr/bin on Trollinger to any other Debian system. Once you figure out which scripts you need, you could make a tar file containing all the scripts to make it easy to copy all of them to another system. Ask if you need more help.

(edit) If bacon doesn't already have this packaged, and you don't want to try it yourself (but it would be a great way to learn more), I think I know which scripts need to go into a tar archive. Let me know if you want the list or the archive.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: How to add LinuxBBQ System Tool?

Unread post by machinebacon » Tue Jul 30, 2013 3:21 am

Thanks pidsley. Fact is that bbqsys is not really ready for the prime and quite hackish. There's a cli version of it which I'll post later, here. First have to get home:)
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: How to add LinuxBBQ System Tool?

Unread post by machinebacon » Tue Jul 30, 2013 7:27 am

Okay here we are.

So, this is the bbq CLI starter (which is definitely working on every system, as long as dialog is installed). It is actually used for starting CLI apps, but it now includes the bbqfix (system tool). I prefer this over the graphical tool (using yad) because it does definitely run on literally every Debian flavour and remix.

Code: Select all

#!/bin/bash

# The BBQ CLI Menu
# May-July 2013 <[email protected]>
# this time only depending on dialog

# set fancy colors
# using .dialogrc

# set var
INPUT=/tmp/menu.sh.$$

# set function for upgrade warning
function upgrade(){
	wget http://linuxbbq.org/feed_format.txt -O /tmp/feed_format.txt
	dialog --backtitle "LinuxBBQ - Bork Your Own" --title "Upgrade warnings" --textbox /tmp/feed_format.txt 0 0
	rm /tmp/feed_format.txt
}

# bbq system hospital
function bbqfix(){
dialog --backtitle "LinuxBBQ - Start" --title "System Hospital" --menu " \n" 0 0 0 \
	a "Set Timezone" \
	k "Set keymap" \
	l "Set localization" \
	b "Sync Network Time" \
	c "Reset and fix soundcard" \
	C "Fix Maestro and ESS soundcards" \
	d "Edit sources.list" \
	e "Update GRUB2" \
	f "Repair GRUB" \
	g "Remove unused kernels" \
	h "Install CUPS" \
	i "Reconfigure all packages through dpkg" \
	j "Update application alternatives" \
	m "Configure and check network" \
	n "Edit HOSTS file" \
	o "Add adblocking to HOSTS file" \
	p "Run testdisk to repair hard drives" \
	q "Install Asian Language support" \
	r "Install nVidia drivers" \
	s "Edit Sources List" \
	t "Edit GRUB file" \
	u "Change Distro Defaults" \
	v "Install localepurge and remove unused locales" \
	w "Remove orphaned packages" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	w) sudo orphaner;;
	v) sudo apt-get install localepurge && sudo localepurge;;
	h) bbqcups;;
	i) sudo dpkg-reconfigure --all;;
	j) sudo update-alternatives --all;;
	k) sudo dpkg-reconfigure keyboard-configuration;;
	l) sudo dpkg-reconfigure locales;;
	m) sudo service networking restart && service network-manager restart;;
	n) sudo mcedit /etc/hosts;;
	o) sudo adblock-host;;
	p) sudo testdisk;;
	q) bbqasian;;
	r) sudo bbqnvidia;;
	s) sudo mcedit /etc/apt/sources.list.d/bbq.list;; 
	t) sudo mcedit /etc/default/grub;;
	u) sudo bbq-distro-defaults;;
	a) sudo dpkg-reconfigure tzdata;;
	b) sudo ntpdate 0.nl.pool.ntp.org;;
	c) fixsnd;;
	C) fixess;;
	d) sudo mcedit /etc/apt/sources.list.d/bbq.list;;
	e) sudo update-grub;;
	f) sudo grubrepair;;
	g) sudo kernel-remover -F text;;
	b) main;;
	x) exit 0;;
esac
main
}

# set function for the office menu
function office(){
dialog --backtitle "LinuxBBQ - Start" --title "Office" --menu " \n" 18 30 12 \
	W "Word Processor" \
	S "Spreadsheet" \
	E "Email Client" \
	N "Newsreader" \
	a "Address Book" \
	d "Calendar" \
	c "Calculator" \
	t "To Do" \
	p "Personal Information Manager" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	W) wordgrinder;;
	S) sc;;
	E) mutt;;
	N) newsbeuter;;
	A) alsamixer;;
	r) bbqradio;;
	m) mocp -T slob;;
	T) tv;;
	l) shell-fm;;
	a) abook;;
	c) bc;;
	t) calcurse;;
	p) tina;;
	d) wyrd;;
	b) main;;
	x) exit 0;;
esac
}
	
# media menu
function media(){
dialog --backtitle "LinuxBBQ - Start" --title "Multimedia" --menu " \n" 14 30 10 \
	A "Alsamixer" \
	r "Radio" \
	m "Music Player" \
	T "TV Player" \
	l "Shell.fm" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	A) alsamixer;;
	r) bbqradio;;
	m) mocp -T slob;;
	T) tv;;
	l) shell-fm;;
	b) main;;
	x) exit 0;;
esac
}

# Network Menu
function network(){
dialog --backtitle "LinuxBBQ - Start" --title "Network" --menu " \n" 14 30 10 \
	l "Links2 Browser" \
	i "IRC Client" \
	c "Instant Messenger" \
	e "Email Client" \
	n "Newsreader" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	l) links2 www.startpage.com ;;
	i) irssi;;
	c) centerim;;
	e) mutt;;
	n) newsbeuter;;
	b) main;;
	x) exit 0;;
esac
}

# accessories
function acc(){
dialog --backtitle "LinuxBBQ - Start" --title "Accessories" --menu " \n" 14 30 10 \
	m "Midnight Commander" \
	r "Ranger" \
	v "vi" \
	h "htop Process Monitor"\
	d "Disk Usage" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	m) mc;;
	r) ranger;;
	v) vi;;
	h) htop;;
	d) ncdu;;
	b) main;;
	x) exit 0;;
esac
}

# games
function games(){
dialog --backtitle "LinuxBBQ - Start" --title "Games" --menu " \n" 14 30 10 \
	a "bastet" \
	b "rogue" \
	c "ninvaders" \
	d "freesweep"\
	e "pacman" \
	f "adventure" \
	g "phantasia" \
	h "worm" \
	i "cribbage" \
	j "snake" \
	k "wargames" \
	l "sail" \
	m "robots" \
	n monop \
	o boggle \
	p hangman \
	q hack \
	r backgammon \
	s mille \
	t canfield \
	u wump \
	v tetris \
	w gomoku \
	y trek \
	z battlestar \
	B "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	a) bastet;;
	b) rogue;;
	c) ninvaders;;
	d) freesweep;;
	e) pacman;;
	f) adventure;;
	g) phantasia;;
	h) worm;;
	i) cribbage;;
	j) snake;;
	k) wargames;;
	l) sail;;
	m) robots;;
	n) monop;;
	o) boggle;;
	p) hangman;;
	q) hack;;
	r) backgammon;;
	s) mille;;
	t) canfield;;
	u) wump;;
	v) tetris;;
	w) gomoku;;
	y) trek;;
	z) battlestar;;
	B) main;;
	x) exit 0;;
esac
}

# main selection
function main(){
dialog --backtitle "LinuxBBQ - Start" --title "Main Menu" --menu " \n" 15 30 12 \
	f "Fix your system" \
	u "Upgrade Warnings" \
	a "Accessories" \
	n "Network and Chat" \
	o "Office" \
	m "Multimedia" \
	g "Games" \
	b "Reboot" \
	q "Power off" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	f) bbqfix;;
	u) upgrade ;;
	a) acc ;;
	n) network;;
	o) office;;
	m) media;;
	g) games;;
	b) systemctl reboot;;
	q) systemctl poweroff;;
	x) exit 0;;
esac
}

main

exit 0
As you can see, it calls different functions at the end of the file, the functions are all declared above. If you only want the bbqfix part, here it is:

Code: Select all

#!/bin/bash
dialog --backtitle "LinuxBBQ - Start" --title "System Hospital" --menu " \n" 0 0 0 \
	a "Set Timezone" \
	k "Set keymap" \
	l "Set localization" \
	b "Sync Network Time" \
	c "Reset and fix soundcard" \
	C "Fix Maestro and ESS soundcards" \
	d "Edit sources.list" \
	e "Update GRUB2" \
	f "Repair GRUB" \
	g "Remove unused kernels" \
	h "Install CUPS" \
	i "Reconfigure all packages through dpkg" \
	j "Update application alternatives" \
	m "Configure and check network" \
	n "Edit HOSTS file" \
	o "Add adblocking to HOSTS file" \
	p "Run testdisk to repair hard drives" \
	q "Install Asian Language support" \
	r "Install nVidia drivers" \
	s "Edit Sources List" \
	t "Edit GRUB file" \
	u "Change Distro Defaults" \
	v "Install localepurge and remove unused locales" \
	w "Remove orphaned packages" \
	b "Back to Main" \
	x "Exit BBQ Menu" 2>"${INPUT}"
menuitem=$(<"${INPUT}")
case $menuitem in
	w) sudo orphaner;;
	v) sudo apt-get install localepurge && sudo localepurge;;
	h) bbqcups;;
	i) sudo dpkg-reconfigure --all;;
	j) sudo update-alternatives --all;;
	k) sudo dpkg-reconfigure keyboard-configuration;;
	l) sudo dpkg-reconfigure locales;;
	m) sudo service networking restart && service network-manager restart;;
	n) sudo mcedit /etc/hosts;;
	o) sudo adblock-host;;
	p) sudo testdisk;;
	q) bbqasian;;
	r) sudo bbqnvidia;;
	s) sudo mcedit /etc/apt/sources.list.d/bbq.list;; 
	t) sudo mcedit /etc/default/grub;;
	u) sudo bbq-distro-defaults;;
	a) sudo dpkg-reconfigure tzdata;;
	b) sudo ntpdate 0.nl.pool.ntp.org;;
	c) fixsnd;;
	C) fixess;;
	d) sudo mcedit /etc/apt/sources.list.d/bbq.list;;
	e) sudo update-grub;;
	f) sudo grubrepair;;
	g) sudo kernel-remover -F text;;
	b) main;;
	x) exit 0;;
esac
The other tools that are called there:

fixsnd
fixess
bbqcups
bbqasian
bbqnvidia
grubrepair
adblock-host

You find them in the Scripts section: http://www.linuxbbq.org/bbs/viewforum.php?f=15

Store the scripts as root in /usr/local/bin/ and make them executable (chmod +x) and readable for normal users (chmod 777)

The only problem is that I haven't yet ported bbqasian to use dialog, but I guess it's anyway not of interest for most. But it will come, very soon.
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: How to add LinuxBBQ System Tool?

Unread post by pidsley » Tue Jul 30, 2013 7:30 am

Thank you.

missinglink
Rawdog
Posts: 36
Joined: Tue Jan 01, 2013 10:46 pm

Re: How to add LinuxBBQ System Tool?

Unread post by missinglink » Tue Jul 30, 2013 8:56 pm

Thanks pidsley and MB.
Not on my BBQ machine right now - though I may try to screw things up when I get back to it.
I'll stay tuned for any additional thoughts.

Post Reply