Tuesday, April 15, 2008
Audacious. Gnome. Multimedia keys.
Audacious - Gnome Mmkeys
Friday, April 11, 2008
Ubuntu 7.10 + Jabra BT620s + Jabra 320s
At first you should obtain MAC for you bluetooth audio device:
hcitool scan
Obtained address you should replace in scripts and configuration below instead of "XX:XX:XX:XX:XX:XX".
Create the following file in home directory to configure alsa plug in:
pcm.bluetooth {
type bluetooth
device XX:XX:XX:XX:XX:XX
profile "auto"
}
Then create python scripts. The first script turns on headset profile, the second one turns on A2DP profile for stereo streaming.
Headset proifle (headset.py file):
#!/usr/bin/env python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
bus_id = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(bus_id, '/org/bluez/audio'), 'org.bluez.audio.Manager')
path = audio.CreateHeadset('XX:XX:XX:XX:XX:XX')
#audio.ChangeDefaultHeadset(path) #change the device to be used by default
headset = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Headset')
#Connect and Play are not required in PCM mode
headset.Connect()
headset.Play()
A2DP profile (a2dp.py file):
#!/usr/bin/env python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
bus_id = manager.ActivateService('audio')
audio = dbus.Interface(bus.get_object(bus_id, '/org/bluez/audio'), 'org.bluez.audio.Manager')
path = audio.CreateDevice('XX:XX:XX:XX:XX:X')
#audio.ChangeDefaultDevice(path) #change the device to be used by default
sink = dbus.Interface (bus.get_object(bus_id, path), 'org.bluez.audio.Sink')
sink.Connect()
Okay. bluetooth-applet should be run. To turn on A2DP profile you should execute a2dp.py and to turn on Headset profile you should execute headset.py. Now you can test sound via audacious: options->preferences->Audio->Current Output Plugin->ALSA
Output Plugin Preferences->Device Settings->audio device: "bluetooth". In other players you should select "bluetooth" device instead of default or any other. See here how to set bluetooth support to another players.
Another way to set bluetooth support is to install Blueman manager.
URLs:
UPD: Audacous writes to console: ALSA lib pcm_bluetooth.c:238:(playback_hw_thread) poll error: Interrupted system call (4). I don't know what it means...
Monday, April 07, 2008
# eth0 - local network
# ppp0 - internet
# eth1 - home wnetwork
IPTABLES=/sbin/iptables
echo 1 > /proc/sys/net/ipv4/ip_forward
# Clearing
$IPTABLES -P INPUT ACCEPTs
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$IPTABLES -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
$IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
$IPTABLES -A FORWARD -i ppp0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o ppp0 -j ACCEPT
Sunday, March 23, 2008
Network card don't work after unplug/replug
http://0pointer.de/lennart/projects/ifplugd
Sunday, June 24, 2007
DC++ and Linux
If you run DC++ through WINE and have found file then try to download it DC++ will failed. For avoiding this behavior you must turn off "Show progress bars for transfers" option in the Settings -> Advanced. Now you can use this client with pleasure.
Good luck!
Saturday, May 19, 2007
Tuning Debian Etch 4.0
During using Debian Etch I found some issues which I have described in this article.
Ugly fonts in the Iceweasel (Firefox) application
When I changed Gnome to KDE the fonts in Iceweasel became to differ from other GTK applications (e.g. GIMP, Evolution). For resolving this issue I found the following solution:
Add this string gtk-font-name="Your favorite font name and size"
in the gtk config. In my case this looks like this:
File ".gtkrc-2.0.mine" included in the .gtkrc-2.0 :
gtk-font-name="Arial 8"
NTFS write support
You can found the solution for this issue on the following site. Now I use ntfs-3g module for writing on the ntfs partitions. To add support your required locale you should add the following option to mount: locale=ru_RU.utf8. The list of /etc/fstab for example:
/dev/hda2 /mnt/win ntfs-3g umask=0,locale=ru_RU.utf8 0 0
I hope ntfs-3g more or less stable :)
Debian Etch 4.0 on the Acer Aspire 1642
Quick Guide
Here's a short guide to installing Debian Etch 4.0 on the Acer Aspire 1642. Let's go!
Hardware
Part | Type |
Processor | Intel Pentium M 1.7G |
Memory | 512Mb |
Video card | Intel 915G |
Sound card | Intel HDA (ALC 883 chipset) |
Touchpad | Synaptics Touchpad |
Pair of hands | Not growing from an ass |
After installation of Debian Etch 4.0 I found the following issues
- sound card is not supported by kernel 2.6.18
- resolution 1280x800 is not supported
Sound
For resolving first issue you must change kernel to version 2.6.20+, because sound card is not supported by kernel 2.6.18. You should download kernel 2.6.20 from www.kernel.org and compile it using the following command:
# make-kpkg --append_to_version -smp --initrd kernel_image modules_image
Then you should install it:
# dpkg -i kernel_blablabla.deb
and add "model" parameter into file /etc/modprobe.d/sound:
options snd-hda-intel index=0 model=acer
and reboot linux. When you run amarok or another audio player sound will rise from the dead :)
Video
We need to install 915resolution package so open up a terminal and type:
# apt-get install 915resolution
Reboot X11 and enjoy with new resolution.
Hotkeys
To make the functionals keys work (fn+fxx, fn+up, fn+down) you should add the following code to the .bashrc or to an another place:
xmodmap -e 'keycode 160 = F16' # mute
xmodmap -e 'keycode 176 = F17' # volume up
xmodmap -e 'keycode 174 = F18' # volume down
xev utility can help you to retrieve a keycode of any key.
Useful links
- KDE multimedia installation
- Opera browser (if you hate a slow mozilla firefox, fortunately, you can use konqueror)
- Tuning Debian Sarge (russian language)
- http://wiki.debian-fr.net/materiel/portable/acer/aspire1642zwlmi