02 June 2013

437. system-config-firewall on debian

Please, read this first:
system-config-firewall is a python based Red Hat tool.

The best way to manage your firewall is by configuring iptables by hand. It gives you minimal rule sets which are clear and easy to read.

If you absolutely need a GUI, then try included debian tools such as gufw, firestarter etc. but note that they can only configure a small subset of what iptables are capable of. They also often given rule sets that can be difficult to read.

If you are coming to debian from rhel/fedora+clones and are missing some of the redhat tools, note that you are probably better of adapting the recommended work flow of the distro you are using.

Having said that, e.g. system-config-samba works fine on debian so far (but again, configuring samba by hand is not that difficult).

The real work was done by the person who did the patching (can't find a specific name -- just Ubuntu Contributions)

This was done on Debian Jessie. I may have missed some of the pre-requisite dependencies. Post comments and I shall add.

Anyway, look at this as an exercise, nothing more.

sudo apt-get install checkinstall python-slip-dbus python-tksnack build-essential gfortran debhelper python-newt selinux-utils intltool python-support
mkdir ~/tmp
cd ~/tmp
mkdir sysfirewall
cd sysfirewall/
wget https://launchpad.net/~ubuntu-contribs/+archive/contrib/+files/system-config-firewall_1.2.29.orig.tar.gz
wget https://launchpad.net/~ubuntu-contribs/+archive/contrib/+files/system-config-firewall_1.2.29-2.diff.gz
tar xvf system-config-firewall_1.2.29.orig.tar.gz
gunzip system-config-firewall_1.2.29-2.diff.gz
sed -i 's/python2.6/python2.7/g' system-config-firewall_1.2.29-2.diff
patch -p0 < system-config-firewall_1.2.29-2.diff
cd system-config-firewall-1.2.29/
dpkg-buildpackage -uc -us
sudo dpkg -i ../*.deb
sudo apt-get -f install
system-config-firewall



You can see what your rules are and if they have taken effect by doing

sudo iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT icmp -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination

You can also use your pre- and hand-configured rule set and put it in /etc/default/iptables and /etc/default/ip6tables, then edit with system-config-firewall (for whatever reason).

01 June 2013

436. Miramath on debian

For no particular reason (well, because of this: http://forums.debian.net/viewtopic.php?f=10&t=104566) here's a very brief how-to to get miramath up and running. There may well be more packages required and which I had pre-installed. The pre-built miramath binaries don't work on debian jessie, but since this is python...well..Anyway:

First compile and install PyQwt-Polar. It takes quite a while. Note that there's a conflict between PyQwt-Polar and python-qwt5-qt4 which may potentially be serious. A side-effect of this is that you can't build a proper package, since dpkg would detect this conflict (hence the make install). What this means is that PyQwt-Polar will over-write files installed by the python-qwt5-qt4 files i.e. A potentially Bad Thing.  Consider setting it up in a chroot.

There's another reason why I wouldn't recommend miramath for serious work at the moment -- it is in pre-alpha and the degree to which is it maintained isn't entirely clear to me. For scientific work, use octave and maxima, which are well-maintained and have been around for ages.

The flip-side of this is obviously that there's no harm in checking out a new and interesting piece of software, and presumably no-one is preventing you from contributing. Anyway. The main reason for checking this out was the debian forum post referenced above.

I did this on Debian Jessie, but it should work on Wheezy as well.

sudo apt-get install python-sip-dev python-qt4-dev python-scipy python-qt4-gl python-sympy python-ply python-qwt5-qt4 python-qwt3d-qt4 python-guiqwt python-dev libqwt-dev libqwt5-qt4
mkdir ~/tmp/
cd ~/tmp
wget http://ufpr.dl.sourceforge.net/project/miramath/PyQwt-Polar/PyQwt-Polar-5.2.0.tar.bz2
tar xvf PyQwt-Polar-5.2.0.tar.bz2
cd PyQwt-Polar-5.2/
cd configure/
python configure.py -Q ../qwt-5.2
make
sudo make install

Then continue:
wget http://waix.dl.sourceforge.net/project/miramath/Release%20Tarballs/miramath0.020.tar.bz2
cd ~/miramath
sed -i 's/sympy.abs/sympy.Abs/g' symbolics_init.py
chmod +x main.py
./main.py


30 May 2013

435. Briefly: Frippery extensions for Gnome 3.8

I'm running Debian Wheezy on most of my machines, Debian Jessie on my laptop, and Arch on my home multimedia centre. Arch has Gnome 3.8 which up until recently didn't have the extensions that I had relied on to make Gnome 3.8 use-able.

Well, the Frippery extensions for Gnome 3.8 are out now: http://intgat.tigress.co.uk/rmy/extensions/index.html

Sure, you can install them the boring way by going to extensions.gnome.org, but it's more fun to do
cd ~
wget http://intgat.tigress.co.uk/rmy/extensions/gnome-shell-frippery-0.6.0.tgz
tar xvf gnome-shell-frippery-0.6.0.tgz

The files will be extracted into their proper locations.
At this point I (foolishly) did alt+F2, type r, and hit enter (to reload gnome shell) -- which promptly crashed GNOME 3. At this point I simply rebooted from a tty since restarting gdm didn't help. 

Use gnome-tweak-tool/Shell Extensions to enable and disable extensions.

Using the Frippery extensions (favourites, bottom panel etc.). Note that this desktop also uses conky to display the  sysinfo on the right hand of the desktop.