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.