пятница, 24 октября 2014 г.
test from Vlad
пятница, 1 января 2010 г.
alsa<->pulse
alsa<->pulse
I finally get partly what was happening with my sound.
After upgdading to Ubuntu 9.10 I've removed pulse (there was some problems with it, don't remember now).
But some programs was not working.
$ strace pykaraoke karaoke/Abba/Chiquitita.kar 2> 3.log
Trying to use pulse even when I ordered them to use alsa 3.log:
write(2, "ALSA lib pulse.c:229:(pulse_conn"..., 37ALSA lib pulse.c:229:(pulse_connect) ) = 37
write(2, "PulseAudio: Unable to connect: C"..., 50PulseAudio: Unable to connect: Connection refused
Then I went up along 3.log:
access("/etc/asound.conf", R_OK) = -1 ENOENT (No such file or directory)
access("/home/rewlad/.
asoundrc", R_OK) = 0
In ~/.asoundrc:
pcm.card0 {
type hw
card 0
}
pcm.sound-in {
type asym
playback.pcm "pulse"
capture.pcm "card0"
}
pcm.sound-out {
type pulse
}
pcm.ringing {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
Who has created this config?? Some GUI config tool? m. b. userful-multiplier?
$ lsof | grep /dev/snd
firefox 5497 rewlad mem CHR 116,6 3893 /dev/snd/pcmC0D0p
Why does it use /pcm* and block other apps ?
(though alsa itself is able to mix sounds)
... however that's minor problem
I finally get partly what was happening with my sound.
After upgdading to Ubuntu 9.10 I've removed pulse (there was some problems with it, don't remember now).
But some programs was not working.
$ strace pykaraoke karaoke/Abba/Chiquitita.kar 2> 3.log
Trying to use pulse even when I ordered them to use alsa 3.log:
write(2, "ALSA lib pulse.c:229:(pulse_conn"..., 37ALSA lib pulse.c:229:(pulse_connect) ) = 37
write(2, "PulseAudio: Unable to connect: C"..., 50PulseAudio: Unable to connect: Connection refused
Then I went up along 3.log:
access("/etc/asound.conf", R_OK) = -1 ENOENT (No such file or directory)
access("/home/rewlad/.
asoundrc", R_OK) = 0
In ~/.asoundrc:
pcm.card0 {
type hw
card 0
}
pcm.sound-in {
type asym
playback.pcm "pulse"
capture.pcm "card0"
}
pcm.sound-out {
type pulse
}
pcm.ringing {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
Who has created this config?? Some GUI config tool? m. b. userful-multiplier?
$ lsof | grep /dev/snd
firefox 5497 rewlad mem CHR 116,6 3893 /dev/snd/pcmC0D0p
Why does it use /pcm* and block other apps ?
(though alsa itself is able to mix sounds)
... however that's minor problem
четверг, 24 декабря 2009 г.
SMS Export
I had a problem, how to get SMS out of my E51, while migrating to N900.
I was not able to use PC Suite, because it does not have Linux version.
The solution for me was to use SMS Export symbian utility:
http://www.nokia.com.hk/get-support-and-software-en/download-software/s60/s60-phone-and-application-download/nokia-n73
It exports messages to the memory card as simple text files.
У меня была проблема, достать SMS-ки из E51 при переходе на N900.
PC Suite не пошел.
Поставил SMS Export на symbian:
http://www.nokia.com.hk/get-support-and-software-en/download-software/s60/s60-phone-and-application-download/nokia-n73
На выходе -- text files.
суббота, 21 ноября 2009 г.
perl vs python
perl vs python
мысли по http://michurin.com.ru/python-vs-perl.shtml
На перле работаю несколько лет, на питоне пока непробовал.
Статья в целом очень занимательная.
Обработка исключений, перегрузка операторов, проверка типов -- действительно полезные фичи питона, с которыми в перле мне было бы веселей.
Многие сравнения с перлом проводятся на основе его "по умолчанию",
которые переделываются в "по своему" парой строк на проект.
Например, всегда работаю в "use strict" и объявляю локальные "my" переменные.
В перле можно реализовать любое вообразимое ООП под себя (включая аналоги тех же декоратор-ов),
например с помощью AUTOLOAD и препроцессора.
А вот реализация, изначально и намертво встроенная в другой ООП-язык, скорее всего будет менее гибка.
Синтаксис и грамматика питона выглядит положительно, но тут пробовать надо.
Итог:
Стимул к переползанию с перла выглядит недостаточно сильным.
А вот для начинающих с нуля выбор питона более очевиден.
мысли по http://michurin.com.ru/python-vs-perl.shtml
На перле работаю несколько лет, на питоне пока непробовал.
Статья в целом очень занимательная.
Обработка исключений, перегрузка операторов, проверка типов -- действительно полезные фичи питона, с которыми в перле мне было бы веселей.
Многие сравнения с перлом проводятся на основе его "по умолчанию",
которые переделываются в "по своему" парой строк на проект.
Например, всегда работаю в "use strict" и объявляю локальные "my" переменные.
В перле можно реализовать любое вообразимое ООП под себя (включая аналоги тех же декоратор-ов),
например с помощью AUTOLOAD и препроцессора.
А вот реализация, изначально и намертво встроенная в другой ООП-язык, скорее всего будет менее гибка.
Синтаксис и грамматика питона выглядит положительно, но тут пробовать надо.
Итог:
Стимул к переползанию с перла выглядит недостаточно сильным.
А вот для начинающих с нуля выбор питона более очевиден.
воскресенье, 15 ноября 2009 г.
linux firefox webdav integration
linux firefox webdav integration
We can integrate firefox with many programs without going deep into system programming using mozplugger.
Install mozplugger; see man; see "about:plugins";
edit /etc/mozpluggerrc or ~/.mozilla/mozpluggerrc:
application/test:test:test
embed swallow(xeyes) stream: xeyes
application/davmount+xml:davmount:WebDAV
embed swallow(kkk) stream: plasmoidviewer --name kkk folderview "$fragment"
# links stream: dolphin "$fragment"
To make changes take effect:
$ rm ~/.mozilla/firefox/some.profile/pluginreg.dat
Here we add config to view WebFolder inside the web page;
stream: this command can take an url;
swallow(name): move window with the specified name;
name is obtained by: $ xprop WM_CLASS;
$fragment was used intead of $file, because the $file required to be real one;
multiple embed-s on one page was not working properly.
Page will include a code like this:
<embed
type="application/davmount+xml"
src="#webdav://myhost.ee:8080/pub"
width="600" height="600">
</embed>
Further look:
in X: XReparentWindow(...). XEmbed over it; in Qt QX11EmbedContainer, QX11EmbedWidget; Gtk Socket.
Nice utils was also found:
tabbed manager: http://torjian.blogspot.com/2009/11/tabbed-terminal-xembed.html
wmctrl -l
ActiveState Komodo uses plugins to embed the Scintilla editor in its XUL-based UI.
Search gnash for --disable-kparts / --disable-nsapi, because it supports both kpart and nsplugin
The same (file list?) kpart is used in dolphin and konqueror.
Some integration in new SUSE: http://opensuse.org/OpenSUSE_11.2
We can integrate firefox with many programs without going deep into system programming using mozplugger.
Install mozplugger; see man; see "about:plugins";
edit /etc/mozpluggerrc or ~/.mozilla/mozpluggerrc:
application/test:test:test
embed swallow(xeyes) stream: xeyes
application/davmount+xml:davmount:WebDAV
embed swallow(kkk) stream: plasmoidviewer --name kkk folderview "$fragment"
# links stream: dolphin "$fragment"
To make changes take effect:
$ rm ~/.mozilla/firefox/some.profile/pluginreg.dat
Here we add config to view WebFolder inside the web page;
stream: this command can take an url;
swallow(name): move window with the specified name;
name is obtained by: $ xprop WM_CLASS;
$fragment was used intead of $file, because the $file required to be real one;
multiple embed-s on one page was not working properly.
Page will include a code like this:
<embed
type="application/davmount+xml"
src="#webdav://myhost.ee:8080/pub"
width="600" height="600">
</embed>
Further look:
in X: XReparentWindow(...). XEmbed over it; in Qt QX11EmbedContainer, QX11EmbedWidget; Gtk Socket.
Nice utils was also found:
tabbed manager: http://torjian.blogspot.com/2009/11/tabbed-terminal-xembed.html
wmctrl -l
ActiveState Komodo uses plugins to embed the Scintilla editor in its XUL-based UI.
Search gnash for --disable-kparts / --disable-nsapi, because it supports both kpart and nsplugin
The same (file list?) kpart is used in dolphin and konqueror.
Some integration in new SUSE: http://opensuse.org/OpenSUSE_11.2
вторник, 10 ноября 2009 г.
dual-seat
Hi,
I have dual-head ATI card and want to configure dual-seat for me and Vika.
So that when working alone to use 2 monitors, but when she comes to give the second one to her.
Usually multi-seat implies display manager configuration and multiply instances of Xorg server.
But there was problem to share the card between servers,
and no really need to maintain security between me and her.
So I found, that nested X server can be used here.
Nested X server is a (fullscreen) client of the main one.
Second keyboard and mouse need to be used by the nested server and ignored by the main one
------- actions -------------------------------------------------------------
configure the card, 2 screens for single user, and restart to apply changes:
$ aticonfig --initial=dual-head --resolution=1,1024x768
$ servise gdm restart
install xserver-xephyr
see, what input devices do we have:
$ hal-device
compose /etc/hal/fdi/policy/input.fdi to disable chosen devices
restart hal
replug devices
add .../bin/Xep.sh
use or make shortcut with gksu:
$ sudo Xep.sh
---------- input.fdi -----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<match key="info.product" contains="Converter">
<merge key="input.x11_driver" type="string"></merge>
</match>
</match>
<match key="info.capabilities" contains="input.keys">
<match key="info.product" contains="Converter">
<merge key="input.x11_driver" type="string"></merge>
</match>
</match>
</device>
</deviceinfo>
------------- Xep.sh -----------------------------------------------------------
#!/bin/bash
DISPLAY=:0.1
Xephyr :1 -fullscreen \
-mouse evdev,,device=/dev/input/by-id/usb-Composite_USB_PS2_Converter_USB_to_PS2_Adaptor_v1.12-event-mouse \
-keybd evdev,,device=/dev/input/by-id/usb-Composite_USB_PS2_Converter_USB_to_PS2_Adaptor_v1.12-event-kbd &
DISPLAY=:1
DBUS_SESSION_BUS_ADDRESS=''
HOME=/home/vika
sleep 2
sudo -u vika startkde
-------------- explain ---------------------------------------------------------
in .fdi we need to reset input.x11_driver from 'evdev' to '',
so Xorg will ignore the device
:0.1 is xserver_number.screen_number --
Xephyr starts as client on :0.1 (main Xorg server) and then serves on :1
/dev/input/eventX are changing,
.../by-id/...-event-... are stable (at least if all devices are different)
kde needed DBUS_SESSION_BUS_ADDRESS and HOME reset and delay to start
test xephyr with input devices by:
$ xeyes -display :1
not yet seen, what is #XAUTHORITY="/var/lib/gdm/:0.Xauth"
not yet able to stop xephyr without killall
not yet tried: xfce4-session
also useful:
cat /proc/bus/input/devices
--------- links ----------------------------------------------------------------
idea to use xephyr for multiseat:
http://netpatia.blogspot.com/search/label/multiseat
xephyr mouse options:
http://lists.freedesktop.org/archives/xorg/2008-November/040253.html
mdm ready solution (not tried):
http://wiki.c3sl.ufpr.br/multiseat/index.php/Live-CD
very good story about xorg, hal, fdi:
http://who-t.blogspot.com/2008/07/input-configuration-in-nutshell.html
I have dual-head ATI card and want to configure dual-seat for me and Vika.
So that when working alone to use 2 monitors, but when she comes to give the second one to her.
Usually multi-seat implies display manager configuration and multiply instances of Xorg server.
But there was problem to share the card between servers,
and no really need to maintain security between me and her.
So I found, that nested X server can be used here.
Nested X server is a (fullscreen) client of the main one.
Second keyboard and mouse need to be used by the nested server and ignored by the main one
------- actions -------------------------------------------------------------
configure the card, 2 screens for single user, and restart to apply changes:
$ aticonfig --initial=dual-head --resolution=1,1024x768
$ servise gdm restart
install xserver-xephyr
see, what input devices do we have:
$ hal-device
compose /etc/hal/fdi/policy/input.fdi to disable chosen devices
restart hal
replug devices
add .../bin/Xep.sh
use or make shortcut with gksu:
$ sudo Xep.sh
---------- input.fdi -----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
<match key="info.product" contains="Converter">
<merge key="input.x11_driver" type="string"></merge>
</match>
</match>
<match key="info.capabilities" contains="input.keys">
<match key="info.product" contains="Converter">
<merge key="input.x11_driver" type="string"></merge>
</match>
</match>
</device>
</deviceinfo>
------------- Xep.sh -----------------------------------------------------------
#!/bin/bash
DISPLAY=:0.1
Xephyr :1 -fullscreen \
-mouse evdev,,device=/dev/input/by-id/usb-Composite_USB_PS2_Converter_USB_to_PS2_Adaptor_v1.12-event-mouse \
-keybd evdev,,device=/dev/input/by-id/usb-Composite_USB_PS2_Converter_USB_to_PS2_Adaptor_v1.12-event-kbd &
DISPLAY=:1
DBUS_SESSION_BUS_ADDRESS=''
HOME=/home/vika
sleep 2
sudo -u vika startkde
-------------- explain ---------------------------------------------------------
in .fdi we need to reset input.x11_driver from 'evdev' to '',
so Xorg will ignore the device
:0.1 is xserver_number.screen_number --
Xephyr starts as client on :0.1 (main Xorg server) and then serves on :1
/dev/input/eventX are changing,
.../by-id/...-event-... are stable (at least if all devices are different)
kde needed DBUS_SESSION_BUS_ADDRESS and HOME reset and delay to start
test xephyr with input devices by:
$ xeyes -display :1
not yet seen, what is #XAUTHORITY="/var/lib/gdm/:0.Xauth"
not yet able to stop xephyr without killall
not yet tried: xfce4-session
also useful:
cat /proc/bus/input/devices
--------- links ----------------------------------------------------------------
idea to use xephyr for multiseat:
http://netpatia.blogspot.com/search/label/multiseat
xephyr mouse options:
http://lists.freedesktop.org/archives/xorg/2008-November/040253.html
mdm ready solution (not tried):
http://wiki.c3sl.ufpr.br/multiseat/index.php/Live-CD
very good story about xorg, hal, fdi:
http://who-t.blogspot.com/2008/07/input-configuration-in-nutshell.html
вторник, 9 июня 2009 г.
goofs
пятница, 14 ноября 2008 г.
RFe linux as a mobile platform (pub)
RFe Linux as a mobile platform (pub)
Smartphone and OS Markets -- financial review.
Review needs some membership, but it's table of content is interesting itself.
http://www.abiresearch.com/products/market_research/Smartphones
Processors:
- Atom (x86)
- ARM
Devices:
- MID (Mobile Internet Device)
- smartphone
OS:
- Symbian
- Windows Mobile
- Palm OS /ACCESS
- RIM
- Linux
- iPhone OS
Projects / platforms / alliances about Linux for mobile:
- Moblin
- Maemo
- LiMo
- OHA / Android
- ACCESS Linux
- OpenMoko
Moblin is a Linux-based software platform fo devices based on Intel Atom.
Research is focused on minimizing energy consumption, boot time, adopting to small screens.
Intel CEO: Linux to dominate MIDs:
http://www.linuxdevices.com/news/NS9783019417.html?kc=rss
Sample of MID:
http://www.linuxdevices.com/news/NS6059837915.html
Booting in 5s:
http://moblin.org/projects/fast-boot
Maemo Linux-based platform has been developed by Nokia in collaboration with many open source projects.
http://maemo.org/
http://www.slideshare.net/silpol/nokia-and-maemo-next-iteration-presentation/
LiMo Foundation is an industry consortium dedicated to creating Linux-based operating system for mobile devices.
(NEC, Panasonic, LG ...)
Android против LiMo: в чем разница?
http://www.opennet.ru/opennews/art.shtml?num=15939
The Access Linux Platform (ALP), sometime referred to as a "next-generation version of the Palm OS".
It includes execution environments for Java, classic Palm OS, and GTK+-based native Linux applications.
http://www.access-company.com/products/platforms/linux/alp_mini.html
http://www.linuxdevices.com/news/NS3782477708.html
Android: the first complete, open, and free mobile platform.
It's developed by The Open Handset Alliance, a group of more than 30 technology and mobile companies (main is Google).
First official android phone:
http://www.t-mobileg1.com/
http://www.linuxdevices.com/news/NS6126688892.html
Motorola, LG, Samsung, Asus and others are planning to produce their models soon.
Android may be installed to many existing phones:
clonedroidphone.com
Android includes Dalvik java-machine (developed by Google). We can write programs for it.
Android has an SDK, including emulator.
Google encourage software development by taking The Android Developer Challenge.
SDK tutorial:
http://code.google.com/android/intro/tutorial.html
OpenMoko
"Free Your Phone..."
The idea is, that not only software for a phone is open, but the phone itself.
Schematics is available for everyone to explore and further develop:
http://www.openmoko.com/
Openmoko has launched an educational program about mobile device design at National Tsing Hua University of Taiwan:
http://www.linuxdevices.com/news/NS8959938447.html?kc=rss
There are examples of devices derived from OpenMoko design.
Handset that can receive datacasting signals:
http://www.linuxdevices.com/news/NS6565189083.html
Network security testing device:
http://www.linuxdevices.com/news/NS7711465653.html
And the last thing to boost an imagination:
VMware Brings Virtualization to Mobile Phones:
http://www.linuxdevices.com/news/NS2180232237.html?kc=rss
*****
Plans for the further lessons:
It would be nice to go some deeper and experiment with these platforms.
- I'd try to play with Moblin on my notebook
- I'd try to play with Android SDK and emulator
- I propose Jing Fu to explore OpenMoko case.
May be there are some materials on mentioned educational program at National Tsing Hua University.
Smartphone and OS Markets -- financial review.
Review needs some membership, but it's table of content is interesting itself.
http://www.abiresearch.com/products/market_research/Smartphones
Processors:
- Atom (x86)
- ARM
Devices:
- MID (Mobile Internet Device)
- smartphone
OS:
- Symbian
- Windows Mobile
- Palm OS /ACCESS
- RIM
- Linux
- iPhone OS
Projects / platforms / alliances about Linux for mobile:
- Moblin
- Maemo
- LiMo
- OHA / Android
- ACCESS Linux
- OpenMoko
Moblin is a Linux-based software platform fo devices based on Intel Atom.
Research is focused on minimizing energy consumption, boot time, adopting to small screens.
Intel CEO: Linux to dominate MIDs:
http://www.linuxdevices.com/news/NS9783019417.html?kc=rss
Sample of MID:
http://www.linuxdevices.com/news/NS6059837915.html
Booting in 5s:
http://moblin.org/projects/fast-boot
Maemo Linux-based platform has been developed by Nokia in collaboration with many open source projects.
http://maemo.org/
http://www.slideshare.net/silpol/nokia-and-maemo-next-iteration-presentation/
LiMo Foundation is an industry consortium dedicated to creating Linux-based operating system for mobile devices.
(NEC, Panasonic, LG ...)
Android против LiMo: в чем разница?
http://www.opennet.ru/opennews/art.shtml?num=15939
The Access Linux Platform (ALP), sometime referred to as a "next-generation version of the Palm OS".
It includes execution environments for Java, classic Palm OS, and GTK+-based native Linux applications.
http://www.access-company.com/products/platforms/linux/alp_mini.html
http://www.linuxdevices.com/news/NS3782477708.html
Android: the first complete, open, and free mobile platform.
It's developed by The Open Handset Alliance, a group of more than 30 technology and mobile companies (main is Google).
First official android phone:
http://www.t-mobileg1.com/
http://www.linuxdevices.com/news/NS6126688892.html
Motorola, LG, Samsung, Asus and others are planning to produce their models soon.
Android may be installed to many existing phones:
clonedroidphone.com
Android includes Dalvik java-machine (developed by Google). We can write programs for it.
Android has an SDK, including emulator.
Google encourage software development by taking The Android Developer Challenge.
SDK tutorial:
http://code.google.com/android/intro/tutorial.html
OpenMoko
"Free Your Phone..."
The idea is, that not only software for a phone is open, but the phone itself.
Schematics is available for everyone to explore and further develop:
http://www.openmoko.com/
Openmoko has launched an educational program about mobile device design at National Tsing Hua University of Taiwan:
http://www.linuxdevices.com/news/NS8959938447.html?kc=rss
There are examples of devices derived from OpenMoko design.
Handset that can receive datacasting signals:
http://www.linuxdevices.com/news/NS6565189083.html
Network security testing device:
http://www.linuxdevices.com/news/NS7711465653.html
And the last thing to boost an imagination:
VMware Brings Virtualization to Mobile Phones:
http://www.linuxdevices.com/news/NS2180232237.html?kc=rss
*****
Plans for the further lessons:
It would be nice to go some deeper and experiment with these platforms.
- I'd try to play with Moblin on my notebook
- I'd try to play with Android SDK and emulator
- I propose Jing Fu to explore OpenMoko case.
May be there are some materials on mentioned educational program at National Tsing Hua University.
суббота, 29 декабря 2007 г.
regexp
среда, 26 декабря 2007 г.
исполнитель Робот
Попросили меня помочь первокурсникам с программированием. Посмотрел, что дают в универе -- атас -- решение задач линейной алгебры на языке С. Оно конечно идеологически верно, но для обычного вчерашнего школьника, попавшего на инфотех, жестковато. Решил попробовать в направлении "программирования для детей" от Полякова Константина. Может польза будет.
Intel-конкурс
Конкурс фантастических рассказов "один день 2017 года" -- рассказы с комментариями замечательного современного писателя
Леонида Каганова.
Леонида Каганова.
м и р
А вот и ваша дверь! А за ней... |
Ваш мир милый, но немного рассеяный. Он любит совмещать несовмещаемое, так что ничему не удивляйтесь. Ветер приносит с востока розовый песок и запах жасмина. |
Пройти тест |
Nokia N76
Пролетал мимо телефон, попользовался. Ощущения неоднозначные:
+) Куча наворотов, Symbian OS и, следовательно, море софта.
-) Раскладывается двумя руками. Большой, хоть и тонкий. Слабый будильник.
Пока игрался поузнавал, что же внутри, и как под него пишут софт.
Сайт для разработчика
+) Куча наворотов, Symbian OS и, следовательно, море софта.
-) Раскладывается двумя руками. Большой, хоть и тонкий. Слабый будильник.
Пока игрался поузнавал, что же внутри, и как под него пишут софт.
Сайт для разработчика
Сталкер
Некоторое время назад поиграл в Сталкера. Замечательно. Незабываемая атмосфера зоны. Порадовало, что игруха пошла на компе с интелевской видео картой. Тут добрые люди солюшн написали.
Nikon D50
Заимел, вот, фотик, БУ. Помаленьку разбираюсь.
1) Хорошо бы русскую инструкцию. Тут продают, но пока платить неохота, может за так попадётся.
2) Хорошо бы за одно использовать его, как веб-камеру высокого качества. Может Camera Control поможет?
1) Хорошо бы русскую инструкцию. Тут продают, но пока платить неохота, может за так попадётся.
2) Хорошо бы за одно использовать его, как веб-камеру высокого качества. Может Camera Control поможет?
e-paper
Заинтересовался e-paper устройствами. Если кто пользовался таковыми -- поделитесь вечатлениями. Есть ли преимущества перед субноутбуком (кроме времени автономной работы)? Пока дошёл до пары ссылок ... это, вроде, владельцы технологии, от которых всё идёт; тут реализация с Линуксом.
Подпишитесь на каналы Сообщения [Atom]