Monday, March 29, 2010

Setting up Dansguarian parental filter as a transparent proxy in Ubuntu 9.10(karmic)

I have been wanting to setup a parental filter on Ubuntu for a long time. I tried a while ago and ran in to problems and put it off. But I got a bug in my bonnet and found a link that explains how to set it up as a transparent proxy so you don't have to change the proxy setting on all your browsers.

I liked his instructions so much I created a shell script that does them all in about 20 seconds.
Just download the script and save it in some directory. Then in a terminal cd to the directory where you saved it and type the following:

sudo bash dansguardian-transparent-config.sh

it should install the files need, edit the files, start the services and add the service to the init process.

Interestingly: after danguardian is running you cannot download the script. :)

Now anyone should be able to use Dan's guardian to protect their family. Now I need to learn how to analyze the logs and send notifications on interesting circumstances.

Labels:

Saturday, March 13, 2010

Wirehark in ubuntu 9.10(karmic) without having to launch from the commandline with sudo

So, I am having problems with qwest router making my network connections have trouble. So I installed wireshark and launched it. It came up in user mode and it didn't have any network interfaces in the list. So I had to launch it from a console with sudo. Then I found a page that explained how to fix it.

Basically:
$ sudo aptitude install libcap2-bin
$ sudo setcap cap_net_raw=+ep /usr/bin/dumpcap

Been a while lets catch up: Ubuntu ROCKS!

Well I no longer work for Novell. So, updates to SuSE linux were much more difficult. So, I tried Ubuntu.

What a difference! Not all good or bad. Debs instead of rpms.

Things I like about ubuntu:

- Drop dead easy upgrades: When you have 6 machines to worry about easy updates and upgrades really matter.

- A really active user/support community: I can usually find how to deal with what is bugging me.

- Synaptic/apt-get: I love how easy it is to find and install what you want as long as it is something they care about. At first it was hard to deal with special stuff but now since I think jaunty they even support PPA repos almost painlessly. Which brings me to my next thing...

- Media support: Medibuntu does a great job of getting media working. And in Karmic there was a package that just worked in the multiverse repo.

Things I don't prefer about ubuntu:

- gnome: I have always been a kde person. Don't get me wrong gnome is fine for people who don't want to be bothered with all the advanced options of everything. But, I really am a power user. I want context menus that have what I want in them. I want menu items that I can edit from a context menu, not have to got to a different app and navigate to it again. I want a menu search so I can find the thing I just installed. I want something that shows me that I just installed it. I want to click on one file and select a menu to compare it then go to another file and click another menu item to do the compare. Which I know can be done in either but is way harder to do in gnome. Well, you get the picture. Anyway ubuntu and kde have not gotten along nearly as well as SuSE and kde did. Which is understandable but still regrettable. Someday I hope they will.

- video support: This has really impoved a lot lately, but I constantly find that the fact that they don't have an option to tell it which graphics card and monitor to use means that when I install for the first time on my neighbors old computer that just got hit by another virus so they are ready to try something else, their old monitor shows up in 800x600 mode. Really! Really! Who ever wants 800x600 as their default, ever! I mean come on! Maybe on a cell phone! Anyway, that is a really sore spot but the other thing is switching modes is painful. It has improved a lot, but it is still painful. When I go to a new configuration, I want to save it and have it recognize it when I come back automatically, then if it gets it wrong let me pick it.

- Bluetooth: This is another one where it is hard to complain because it has improved so much in the last few releases, but it is still not there. When I listen to audio through my bluetooth device it sounds way worse in Ubuntu. I think they are down sampling it. anyway windows and my phone sound tons better. But at least now the pairing and connection is seamless(really love that, even better then windows in my opinion).

- Windows, Samba integration: I have had trouble every time I try to share drives with windows through samba and vice versa, I have gotten it to work so my windows machines can see my linux smb shares but not the other way around and worse, I can't access those same shares from other ubuntu boxes. What is up with that.?

- Better WINE: This has also improved so much recently that I am reluctant to say anything, but in order to bring my friends and neighbors to ubuntu, I need them to be able to run their essential windows apps, or have effective migratory apps(like google docs/open office). My son has one flash game that he loves and I tried to run it in wine and it almost worked the only problem was you can't see the characters. Kinda a deal breaker. I will say I have been amazed how often apps do just work now(keep up the good work).


I think that is it. As you might be able to tell, the list is much different then it was just 3 years ago. More about things that would be nice and less about show stoppers. Linux has turned in to a really powerful, easy to use tool, thanks in large measure to ubuntu and their great momentum and philosophy. I look forward with great anticipation to every new release and hope for the day when I will want to wait a year or two for the next Long Term Support(LTS) release for most of my machines.

Monday, August 18, 2008

Page up history-search-backward inputrc

Well I have been forced to use ubuntu for a while. Because openSuse 11.0 only has svn 1.5 and it is not compatible with the svn servers here at work. So I have had to figure out how to do some things in ubuntu. One is getting the pageup key to walk backward thru the history like it did in Suse. So I found this in the /etc/inputrc file.
I uncommented out the alternate mapping of \e[5 to do history-search-backward. That is all there is to it.

Friday, August 31, 2007

Solving problems Connecting bluetooth headset

So, I spent way too long fighting with my linux bluetooth system getting it to connect to my bt headset again. So, to help me remember what I learned this time I am going to add some info.
It looks to me like the behavior changes when kbluetoothd is running as opposed to when it is not running. don't know why. May have something to do with hcid having someone to show the ui to ask for the pin. I have it set to always ask for a pin in the yast config with I believe modifies the /etc/bluetooth/hcid.conf file, but in my file it says it uses /bin/bluepincat which is a little weird since the hcid.conf file says that it just returns the contents using /etc/bluetooth/pin file. When I run it from the console it actually asks for a pin which I assume would be stored somewhere.

When you go to the kbluetoothd configure paired devices. there is a link to a File location setup.
This tells me that the Link Key Directory is /var/lib/bluetooth/. So, I suspect that either bluepincat or hcid, who calls bluepincan is storing them in the /var/lib/bluetooth directory.

For some reason when I tried to connect the bt headset it would fail saying that it could not authenticate and the connection timed out.

So, I removed the pairing using kbluetoothd and then I tried to recreate it. I did this by putting the headset in pairing mode but somehow you need to get it to request a secure connection. I tried all kinds of things to get this to happen. What appears to have worked was to stop kbluetoothd then restart bluetooth with 'rcbluetooth restart' as root.
Then I started kbluetoothd again and went to the recently paired devices and clicked on the one that was my headset and said to show the services. Then finally it showed the pin promt.
when i was done there was an entry in the Link key directory. Then everything started working again.

Thursday, August 23, 2007

How to record Skype conversations on Linux

I needed to record some calls with coworkers so I thought I would research recording skype calls on linux.
Here is what I found.

lengau: How to record Skype conversations on Linux
This uses a program called skype-rec. It is taken from this howto that uses SUSE. The second one which I listed first is easier to follow but the original one has good info for suse users, and more user feedback.

Restoring your Firefox session on normal startup.

While I was trying to figure out why the close buttons were not showing up on each tab in firefox 2 like they are supposed to for me, I found this great little piece of information about getting firefox to restore you last session even on a normal startup. I had noticed that it would restore your session after an abnormal shutdown and had wished it would do the same thing on normal startup. Well, here it is. It is buried under Caveats on this discussion of the Browser.sessionstore.enabled setting.

For those not familiar with firefox, there are all these extra settings that you can get to by typing:

about:config

in the url box at the top.
then you can type a search in the text box that comes up if you know the setting or some part of the setting you are after.

For this feature you have to make sure browser.sessionstore.enabled is set to true.

Then you need to set browser.startup.page to 3. that is it.


Now if I can just get the close buttons to show up on the tabs I will be set.

Friday, August 10, 2007

Auto starting apps and scripts on startup

Ok, that was a lot easier than I thought. I found a great link on the gentoo wiki. The only thing is that they missed the more obvious way of right clicking on the directory in konqueror and creating a new link to application. Then just specify the script you want run. I have not tried it yet but if there are problems I saw that there are options for specifying whether to run in a console and the such. The directory you need to put it in is ~/.kde/Autostart/

Thats it.

Cool bluetooth device detection in kbluetoothd

Well, while I was playing with bluetooth proximity detection.(see previous post) I discovered some really cool things about kbluetoothd!

If you go to configuration from the menu you can go to Configure Services.
This brings up a dialog with three tabs. The one that most interested me is the one named "Device Discovery" On this tab you can create jobs from templates they have already created to do things like lock the screen and perform custom activation actions.

That is what I used it for. Now when I activate my bluetooth headset it automatically runs my little script to turn on bt_sco. This is great. I think it could also be used to do the screensaver thing but when I tried it, it was not updating fast enough to make it worth while. So, I am still using the proximity script from the privious post but I used dcop to start and stop the screensaver.

The commands I used are:
FAR_CMD='dcop kdesktop KScreensaverIface lock'
NEAR_CMD='dcop kdesktop KScreensaverIface quit'

I also used the suggestion made by one of the commenters in the cool solution and started the script like
./proximity > /dev/null ?

Tomorrow I find that directory that I have to put it in to get it to happen when I login.

How to Set Up a Bluetooth Proximity System on Suse Linux

OK, this is really cool. When you get close to your computer it logs you in and when you get far away it locks.


Cool Solutions: How to Set Up a Bluetooth Proximity System


There are lots of other cool things you can do with it. I want to see if I can use it to send the audio thru my phone so I can keep listening to my bluetooth headset and get audio from my PC thru my phone without having to change the pairing all the time.

I may try other stuff too like connecting certain apps to my phone. I have a new program I am working on to keep track of how much time I spend on different projects and I want to have it on my phone and on the pc. Now I will use this to auto sync the two.

I may try to do the same thing with a water and food log as well.

Wednesday, August 01, 2007

Smart mirror for ftp.suse.com

I have had a devil of a time finding this a couple of time so I am going to blog it here so I can find it.

Smart software manager 5.x and up automatically find installation sources for you but some of them are in europe for SUSE. So, I found the mirrors for most of them on the opensuse.org site but there are some that I could not find there. Specifically

ftp.suse.com

the mirror is actually one that is out there but it is not listed for this specific site

http://suse.mirrors.tds.net

seems to work and maybe there are others that are faster. But at least this can't be slower then ftp.suse.com.

SUSE Linux - auto-mounting not working because of dbus daemon: segmentation fault

Well, it has been literally months that my usb drives have not auto mounted so, I had almost given up when some persistent folks in our IS department helped me figure out that hal was not loading and it looked like it was because dbus was not loading. There was nothing in the /var/log/messages about any problem. Well they asked my friend Eric again and he was able to find the answer. He just did the right google search. Anyway below is a link to a list that had the answer along with the snippet that did the trick.

SUSE Linux - dbus daemon: segmentation fault: "The cause for this segmentation fault is not dbus, but config file: /
etc/dbus-1/system.d/avahi-dbus.conf
If you move that file out of that folder, dbus will start work again!
Just do
# mv /etc/dbus-1/system.d/avahi-dbus.conf /tmp/avahi-dbus.conf
# /etc/init.d/dbus start

Enjoy! :-)"

Update: I found that the application that requires avahi is ekiga(no idea how to pronounce that, it used to be gnomemeeting) but it is a sip phone application that I installed to test my webcam.