/
Debian%2Fcs.mw
629 lines (487 loc) · 28.1 KB
/
Debian%2Fcs.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
{{Languages|Debian}}
{|align=right
|__TOC__
|}
Debian je používán na mnoha embedded zařízeních. Použití Debianu na FreeRunneru zpřístupňuje spoustu balíčků se softwarem z repozitářů Debianu, již zkompilovaných pro procesory ARM. Navíc, každý si může sestavit vlastní programy, aniž by se musel učit jak na to s pomocí OpenEmbedded. Například nativní kompilace je v Debianu otázkou pouhého apt-get gcc&libc-dev.
Dříve bylo nutné, aby si každý nainstaloval Debian [[Manual Debian|ručně]]. Nyní je již k dispozici instalační skript. "Oficiální" instrukce jak nainstalovat [http://wiki.debian.org/DebianOnFreeRunner Debian na FreeRunner] nebo [http://wiki.debian.org/DebianOnNeo1973 Debian na Neo1973] jsou umístěny na Debian wiki. Tato stránka je o poinstalačních nastaveních, a tipech speciálně pro FreeRunner. Pro podporu nebo hlášení chyb si prosím přečtěte sekci [[Debian#Support|podpora]].
= Konfigurace základního systému =
== Heslo ==
Přednastavené heslo pro uživatele root je prázdné. Měli byste jej změnit co nejdříve
<pre>
# passwd
</pre>
== Suspend ==
Pro uspání (suspend) stiskněte tlačítko power, nebo spusťte 'apm -s'-
Ke změnění času pro ztmavení nebo vypnutí displeje, editujte
/usr/share/python-support/fso-frameworkd/framework/subsystems/odeviced/idlenotifier.py
sekci
self.timeouts = { \
"idle": 10,
"idle_dim": 20,
"idle_prelock": 12,
"lock": 2,
"suspend": 20, \
''idle_dim'' je čas v sekundách ke ztmavení displeje (přičítá se k "idle" času), ''idle_prelock'' je čas, po kterém se displej vypne. Poté spusťte:
mv /var/lib/python-support/python2.5/framework/subsystems/odeviced/idlenotifier.pyc
/var/lib/python-support/python2.5/framework/subsystems/odeviced/idlenotifier.pyc.old
Uspávání (suspend) můžete kompletně vypnout zakomentováním celé sekce "Idleness Brightness Handling" v souboru
/etc/freesmartphone/oevents/rules.yaml
== Čas ==
Přednastavená časová zóna je UTC. Přenastavte ji spuštěním
<pre>
# dpkg-reconfigure tzdata
</pre>
Pro ruční nastavení času použijte něco jako
<pre>
# date -s 00:33
</pre>
Nebo pokud máte připojení k internetu, třeba takto
<pre>
# apt-get install ntpdate
# ntpdate-debian
</pre>
Pokud si přejete synchronizovat hodiny s GPS časem, můžete použít takovýto skript
<pre>
#!/usr/bin/env python
#
# Set the gps time
# Be sure your GPS is active before to launch this script
import dbus
import subprocess
import time
proxy = dbus.SystemBus().get_object('org.freesmartphone.frameworkd', '/org/freedesktop/Gypsy') # bus name, object name
interface = dbus.Interface(proxy, 'org.freedesktop.Gypsy.Time');
subprocess.call(['date',time.strftime( '%m%d%H%M%Y.%S', time.localtime(interface.GetTime()))])
</pre>
== Wifi ==
=== Použití GUI ===
Pokud se nechcete otravovat s konfiguračními soubory, a hledáte jednoduché GUI pro konfiguraci wifi, pak wifi-radar nebo wicd je právě to, co hledáte.
<pre>apt-get install wifi-radar
wifi-radar</pre>
nebo
<pre>apt-get install wicd
wicd-client -n</pre>
Pokud chcete víc, čtěte dále...
=== Použití /etc/network/interfaces (jednoduchý mód) ===
Ujistěte se, že máte nainstalovány následující balíčky:
<pre>apt-get install wireless-tools wpasupplicant dhcp3-client</pre>
Za předpokladu, že váš bezdrátový router používá WPA a DHCP, editujte <code>/etc/network/interfaces</code> a vložte sekci podobnou této:
<pre>
auto eth0
iface eth0 inet dhcp
wpa-driver wext
wpa-ssid "MyWirelessName"
wpa-psk "MyWirelessPassword"
</pre>
Kde pochopitelně místo MyWirelessName a MyWirelessPassword použijete název a heslo vlastní wifi sítě.
Můžete to otestovat pomocí
<pre>
# ifup eth0
</pre>
Můžete určit svou IP adresu pomocí
<pre>
# ifconfig eth0
</pre>
Problémy:
* funguje pouze v přítomnosti bezdrátové sítě při bootu, nebo když se ručně spustí <code>ifup eth0</code>
* bootování mimo dosah bezdrátové sítě je pomalejší, protože systém čeká na IP adresu z DHCP až po time out
* neobnoví spojení, když opustíte oblast dosahu vaší wifi sítě a následně se vrátíte
* nepodporuje vícenásobné wifi sítě nebo otevřené hotspoty, mezi kterými můžete cestovat
Jakmile wpa_supplicant jednou začal řídit vaše wifi rozhraní, měli byste psát "wpa_action eth0 stop" namísto "ifdown eth0".
=== Použití wpa-supplicant (roaming mód)===
K nakonfigurování WPA k "potulování se" mezi bezdrátovými sítěmi, budete potřebovat vytvořit následující soubor:
<pre>/etc/wpa_supplicant/wpa_supplicant.conf</pre>
vzorový soubor (a více dokumentace) je dostupný v:
<pre>/usr/share/doc/wpasupplicant/examples/wpa-roam.conf</pre>
Nyní potřebujete do tohoto souboru přidat bezdrátové sítě. Například:
* WEP:
<pre>
network={
ssid="MySSID"
key_mgmt=NONE
wep_key0="abcdefghijklm"
# wep_key0=6162636465 # <- bez uvozovek, takže hex číslo
wep_tx_keyidx=0
id_str="MySSID"
}
</pre>
* Bez klíče:
<pre>
network={
ssid="SomeNetwork"
key_mgmt=NONE
}
</pre>
* WPA:
<pre>
network={
ssid="Example WPA Network"
psk="mysecretpassphrase"
id_str="home"
}
</pre>
Dále budete potřebovat upravit /etc/network/interfaces. To vám umožní nakonfigurovat wifi, aby používala dhcp, nebo jiné odpovídající nastavení:
<pre>
auto eth0
iface eth0 inet manual
wpa-driver wext
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
# MySSID comes from an id_str above.
iface MySSID inet dhcp
# default is what's used if there is no id_str setting.
# so the 'SomeNetwork' network will use DHCP.
iface default inet dhcp
iface home inet static
# static interface settings, or whatever...
</pre>
Nakonec, pokud chcete zkusit výchozí přístup na internet přes eth0 (a ne usb0), pak zakomentujte tento řádek v konfiguraci usb0 adaptéru:
<pre>
gateway 192.168.0.200
</pre>
* Přebíhání mezi sítěmi není automatické. Místo toho musíte ručně spustit "wpa_action eth0 stop; ifup eth0" k přepnutí na jinou síť.
Z nějakého důvodu jsem musel restartovat, aby se projevilo nastavené id_str. Avšak, měli byste nyní být schopni použít "ifup eth0" k asociaci s přípojným bodem wifi sítě a "wpa_action eth0 stop" k vypnutí wifi adaptéru.
{{todo|Which of the issues that single network configurations suffer from are addressed by WPA roaming mode? Would ifplugd / guessnet help, or just make things more complicated?}}
=== Dále si přečtěte ===
K využití všech možností <code>wpasupplicant</code> jako roaming a automatické připojování na různé sítě byste si měli přečíst <code>/usr/share/doc/wpasupplicant/README.Debian.gz</code>
== [[Bluetooth]] ==
FreeRunner používá standardní Linuxový bluez stack, nainstalovaný pomocí
<pre>
# apt-get install bluez-utils
</pre>
V němž je i chybějící modul z /etc/modules, který je nutný pro rozpoznání zařízení. (kudos to johnsu01 on irc.freenode.net:#openmoko-debian for the find)
<pre>
# echo ohci-hcd >> /etc/modules
</pre>
The first time you try this, you can also
<pre>
# modprobe ohci-hcd
</pre>
Jediná atypická část používání bluetooth na FreeRunnerovi je jeho zapnutí, které se provádí následovně
<pre>
# mdbus -s org.freesmartphone.frameworkd /org/freesmartphone/Device/PowerControl/Bluetooth SetPower 1
</pre>
Nyní by zařízení mělo být vidět
<pre>
# hcitool dev
</pre>
{{todo|A co dále?}}
== Správce balíčků ==
Můžete nainstalovaet <tt>[http://packages.debian.org/search?keywords=dselect dselect]</tt>(~2.2MB) nebo <tt>[http://packages.debian.org/search?keywords=aptitude aptitude]</tt>(~12MB) pro vizuální prohlížení dostupných balíčků pomocí desktopové konzole.<br>
Na GTK postavený správce balíčků <tt>[http://packages.debian.org/search?keywords=synaptic synaptic]</tt>(~15.7MB) po instalaci <tt>[http://packages.debian.org/search?keywords=lsb-release lsb-release]</tt> a <tt>[http://packages.debian.org/search?keywords=hicolor-icon-theme hicolor-icon-theme]</tt> také funguje, ale je velmi pomalý.<br>
Nakonec, na omezeném systému, prostě použijte příkaz:
<pre>grep -e Package: -e Description /var/lib/dpkg/available|more</pre>
== Xglamo acceleration ==
Ve výchozím nastavení debian používá fbdev, ale můžete použít Xglamo pro lepší výkon:
<pre>apt-get install xserver-xglamo</pre>
poté upravte soubor /etc/X11/xorg.conf a změňte řádek
<pre>Driver "fbdev"</pre>
na:
<pre>Driver "Xglamo"</pre>
a v případě spouštění X serveru normálním uživatelem:
<pre>chmod u+s /usr/bin/Xglamo</pre>
Pro stejné písmo jako s fbdev je nutné vnutit X serveru 96dpi. Přidejte "-dpi 96" do proměnné X_OPTIONS v '''/etc/init.d/nodm''':<pre>X_OPTIONS="vt4 -nolisten tcp -dpi 96"</pre>
s tímto:
*můžete používat xrandr
*nemáte chybu s kalibrací obrazovky v otočeném módu (rotated mode)
*máte lepší výkon
Při používání xglamo si musíte pamatovat, že:
*Nemůžete v xorg.conf použít "Option Rotate" pro otáčení obrazovky
*Nemůžete použít tslib patch pro simulaci pravého tlačítka
== Running X as normal user ==
1. Vytvořte nového uživatele
<pre>
# useradd -m -G audio,dialout,floppy,video,staff username
# passwd username
</pre>
2. Editujte /etc/init.d/nodm a změňte v něm USER=root na USER=username. Then to make sure changes are not lost on upgrade, run
<pre>
dpkg-divert --add /etc/init.d/nodm
</pre>
This will make new versions of /etc/init.d/nodm be written to /etc/init.d/nodm.distrib
3. Edit <code>/etc/X11/Xwrapper.config</code> and change <code>allowed_users=console</code> to <code>allowed_users=anybody</code> (Or use <code>dpkg-reconfigure x11-common</code>)
4. Copy /root/.xsession into ~username/
5. Note that, if you ran zhone as root first, you may have to change ownership or remove /tmp/zhone.log, as a normal user is not able to write to a file owned by root.
6. If you have already configured to use Xglamo as a driver, <tt>chmod u+s /usr/bin/Xglamo</tt> (as can be read below)
== Using dbus as a normal user ==
If you want to make calls or interact with the gps daemon through a dbus interface, you user will have to have the rights to do that. [http://lists.linuxtogo.org/pipermail/smartphones-userland/2009-January/000902.html One way] of adding these rights is as follows:
* '''copy''' /etc/dbus-1/system.d/frameworkd.conf to /etc/dbus-1/system.d/my-frameworkd.conf
* open /etc/dbus-1/system.d/my-frameworkd.conf and replace all instances of 'user="root"' with 'user="youruser"'
Alternatively, replace all instances of 'user="root"' with 'group="messagebus"' and add your user to the messagebus group.
== Zvuk ==
Musíte přidat vašeho uživatele do skupiny audio ("adduser <username> audio").
Pokud stále nemáte žádný zvuk, vyzkoušejte tyto stavové soubory:
[[Talk:Manual_Debian#Sound]]
== Klávesnice a jiné metody vstupu ==
Jako výchozí klávesnice je nainstalován Matchbox, který můžete použít pro vkládání znaků do vašeho nea. Jako alternativu můžete nainstalovat CellWriter. Má také plně vyvinutou klávesnici na obrazovce.
Instalace:
<pre>
apt-get install cellwriter
</pre>
Více informací najdete zde [http://risujin.org/cellwriter/ homepage].
== Kernel ==
=== Debian way ===
When Debian is installed, the kernel is provided by the package <code>linux-image-2.6.24-openmoko-gta02</code>. This package can be installed only in POSIX compliant filesystems, so it can not be used if your boot partition is a vfat one. Your kernel will be keep updated like the other packages of the system. You should use this way if you are unsure and you need an (almost) stable system.
=== Openmoko way ===
Otherwise you can choose to manual install an OM kernel. But only do this if you know what you are doing.
At the moment there is a little problem in the question which kernel to use. Hopefully it will be solved in the near future.
The original openmoko kernel works fine inclusive suspending and supports different really nice usb gadgets (not all working at the moment). :)<br>
download stable: http://downloads.openmoko.org/releases/Om2008.9/<br>
download testing: http://downloads.openmoko.org/daily/
The new FSO4 kernel works fine and suspend/resume is also possible. But this kernel still has no loadable usb gadget modules (10-Nov-2008). :/<br>
download testing: http://downloads.freesmartphone.org/fso-testing/images/<br>
download unstable: http://downloads.freesmartphone.org/fso-unstable/images/
# Download a recent'' kernel'' and ''rootfs'' (tar.gz) from one of the above mentioned sources. It's your decision if you want suspend or usb gadget modules at the moment.
# Backup your running kernel like <code>mv /boot/uImage.bin /boot/uImage.bin.old</code>, then <br>copy the downloaded uImage file to the freerunner as <tt>/boot/uImage.bin</tt>.
# Backup your actual modules like <code>mv /lib/modules/2.6.24 /lib/modules/2.6.24.old</code>, then <br>extract the downloaded rootfs tar.gz to a temporary directory and copy <tt>lib/modules/2.6.24</tt> from the temp directory to <tt>/lib/modules/2.6.24</tt> on the FreeRunner.
# Do a <code>chown -R root.root /lib/modules/2.6.24</code> because the owner from the tar.gz is something else (for me).
# Run a <code>depmod -a</code>.
# This step is only needed for the OM kernel but it doesn't harm the FSO kernel setup. Add "g_ether" Module to /etc/modules like <code>echo g_ether >> /etc/modules</code>. I read in an email, that the module "ohci-hcd" is also needed for some bluetooth functions, but i don't know this for real. I inserted it to my modules file to be on the safe side.
# Reboot and hope everything works as expected. :)
= Desktop environments =
== Matchbox with fbpanel ==
It is not really a Desktop environment, but using fbpanel with Matchbox you can have a fast, lightweight, gtk2 desktop panel.
[[Image:Debian_fbpanel_zhone.png|right|thumb|300px|Debian with fbpanel, matchbox-window-manager and Zhone running]]
<ol><li>Install fbpanel:
<pre>sudo apt-get install fbpanel</pre></li>
<li>Customize the X startup process:
<pre>~/.xsession</pre>
<pre>
#!/bin/sh
export GTK_MODULES=libgtkstylus.so
zhone &
xsetroot -solid black
matchbox-keyboard-toggle &
matchbox-window-manager -use_titlebar yes &
# -use_titlebar yes to minimize & toggle between apps
# fbpanel's taskbar does not work with matchbox-window-manager
#~/bin/auxlaunch &
while true;
do
fbpanel;
sleep 1;
done;
</pre></li>
<li>Read http://fbpanel.sourceforge.net/docs.html#config
<pre>~/.fbpanel/default</pre>
<pre>
mkdir ~/.fbpanel
cp /etc/fbpanel/default ~/.fbpanel/default
nano ~/.fbpanel/default
</pre>
Remove section with 'taskbar' plugin - it's useless with matchbox-window-manager. You may add plugin 'cpu'
<pre>Plugin {
type = cpu
}</pre>
Also, plugin 'genmon' is useful:
<pre>Plugin {
type = genmon
config {
Command = echo -e $(grep "MemFree" /proc/meminfo | awk '{printf "%0.2f", $2 / 1024}') "|"\
$(cat /proc/loadavg | awk '{print $3}') "|" $(apm | awk '{print $5}')
PollingTime = 60
TextSize = small
TextColor = darkblue
}
}</pre>
After 'killall fbpanel' it will show: free mem in megabytes | loadavg | battery % left.</li>
<li>Default theme is ugly. You can change it and / or make font's bigger:
<pre>~/.gtkrc-2.0</pre>
<pre>sudo apt-cache search gtk2-engines
sudo apt-get install gtk2-engines gtk-theme-switch
DISPLAY=:0 gtk-theme-switch2</pre>
Now choose your theme, font and save it. To see changes do 'killall fbpanel'.</li></ol>
In order to use killall, install the psmisc package:
apt-get install psmisc
Some of the icons rely on the hicolor-icon-theme:
apt-get install hicolor-icon-theme
== XFCE ==
The debian installation script installs by default the matchbox window manager. It doesn't feature a desktop environment. '''xfce''' is a small and lightweight desktop environment and so is quite fast for the FreeRunner.
<pre>apt-get install xfce4</pre>
Edit your .xsession to launch xfce4 at X startup :
<pre>#!/bin/sh
xfce4-session</pre>
Edit section [Failsafe Session] of /etc/xdg/xfce4-session/xfce4-session.rc (or ~/.config/xfce4-session/xfce4-session.rc) to handle the auto-started apps. For example:
<pre>[Failsafe Session]
Count=3
Client0_Command=xfce4-panel
Client0_PerScreen=False
Client1_Command=xfdesktop
Client1_PerScreen=False
Client2_Command=zhone
Client2_PerScreen=True</pre>
Start XFCE !
<pre>/etc/init.d/nodm restart</pre>
The desktop takes a while to start but once up was snappy as can be expected.
I've not yet looked at the reason for the seemingly too slow start for the desktop.
zhone is available from the "Office" menu in xfce.
The matchbox keyboard is available in "Accessories".
If you want to display the screen on the long side (ie rotated, 4:3 aspect), add the following to the /etc/X11/xorg.conf in both the Device and InputDevice sections :
<pre>Option "Rotate" "CCW"</pre>
and then (re)start xfce.
If you want to be able to shutdown/restart the device, add the following line to ''/etc/sudoers'' (don't forget to replace ''username'' with your actual username):
<pre>username localhost = NOPASSWD: /usr/sbin/xfsm-shutdown-helper</pre>
=== Using matchbox-window-manager with XFCE ===
XFCE's window manager is poorly configured for use with the FreeRunner. Fortunately, matchbox's window manager is compatible with xfce. To use the matchbox window manager, modify ~/.xsession as follows:
<pre>#!/bin/sh
exec matchbox-window-manager -use_titlebar no -use_cursor no &
xfce4-session</pre>
== LXDE ==
I you want a really nice desktop enviroment but you think XFCE is too fat, you can try to install [http://en.wikipedia.org/wiki/LXDE LXDE]. It give to you the GTK comfort, but use only a fraction of the ram needed by XFCE.
To install it:
<pre>apt-get install lxde</pre>
to launch it create a <code>/etc/init.d/lxde</code> script in the same way descripted for xfce4, replacing <code>startxfce4</code> accorence with <code>startlxde</code>.
= Additional Software =
== Web Browser ==
[http://lists.openmoko.org/nabble.html#nabble-td781547 Arne Anka suggested] trying the light-weight webkit-based [http://en.wikipedia.org/wiki/Midori_(browser) midori] browser:
<pre>apt-get install midori</pre>
Another light-weight browser is [http://en.wikipedia.org/wiki/Dillo Dillo]. It can be easily installed with:
<pre>apt-get install dillo</pre>
If you think the previous options are quite slow on Freerunner try Links2.
<pre>apt-get install links2</pre>
Run as:
<pre>xlinks2</pre>
== GPS ==
Openmoko Freerunner má integrovaný AGPS čip, který může být použit k určení polohy telefonu. Nejvíce známé bezplatné aplikace pro použití GPS s grafickými mapami jsou:
*{{main|TangoGPS}}
*{{main|Navit}} (Upozornění: Navit není v repozitáři Debianu)
== E-Book reader ==
To read an E-Book you have diffent possibilities:
* [[FBReader]] a good reader that can display txt, fb2, html and various other formats.
* [[Epdfview]] a simple and lightweight PDF viewer, it can be installed from Debian repository.
* [http://en.wikipedia.org/wiki/Evince Evince] the official Gnome viewer, it can display pdf, djvu, cbz, and other formats.
There is also an hack to convert drm protected adobe ebooks to .cbz files readable as mentioned on the mailing list.
= Miscellaneous =
== Making the cursor invisible ==
=== Using matchbox ===
Matchbox has an option, <code>use_cursor</code>, that can be used to control whether to show the cursor.
For the default setup, edit <code>/usr/bin/zhone-session</code> and change the matchbox command to
matchbox-window-manager -use_titlebar no -use_cursor no
=== Using unclutter ===
Unclutter is a program that hides the cursor after a period of inactivity. To use unclutter, install it
#apt-get install unclutter
and choose ''Yes'' to the question <code>Start unclutter automatically?</code>. To change settings edit
<code>/etc/default/unclutter</code>.
=== Changing the cursor ===
To make the cursor invisible create a file called empty.cursor with this content:
<pre>
#define empty.cursor_width 16
#define empty.cursor_height 16
static unsigned char empty.cursor_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
</pre>
Now you can execute:
xsetroot -cursor empty.cursor empty.cursor
and the cursor will be invisible. To make this permanent you have to invent something ;) It must be executed after zhone has finished starting up.
== Running X applications on your desktop in nested X server ==
Sometimes it is helpful to have a big screen, keyboard and mouse. You can run X applications in a nested X server window.
On your desktop install the nested X server application Xephyr (better that Xnest)
apt-get install xserver-xephyr
Run a nested X server as display=:1
Xephyr :1 -ac -br -screen 480x640 -reset -terminate &
Now you are able to run apps on your Neo which will display on your desktop PC. Make sure to set the display, for example if "mydesktop" is your desktop hostname
DISPLAY=mydesktop:1 xfce4-session &
== Simulating right click with stylus ==
=== With fbdev driver from xserver-xorg ===
To have the right click with stylus an easy way is to use the Sebastian Ohl's tslib patch: you can find it [http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-1+fso1_armel.deb here] until it will not enter in the official Debian package.
You can install it with:
<pre>
wget http://www.ohli.de/download/xserver-xorg-input-tslib_0.0.5-1+fso1_armel.deb
dpkg --install xserver-xorg-input-tslib
</pre>
This patch makes it necessary to add a new line to your xorg.conf.
Option "EmulateRightButton" "1"
Just add it to you InputDevice section. Without this line the old behavior of the tslib driver is restored -> this means no right click.
'''Warning''': this patch is external to Debian repository and is not (yet) supported by Debian comunity.
In this way, to get a right click you can simply tap and hold the stylus and after a while a right click will occurs.
'''Warning''': tslib patch is incompatible with <code>xserver-xglamo</code>. Use <code>libgtkstylus</code> instead (see below).
=== With Xglamo driver from xserver-xglamo ===
# <pre>apt-get install libgtkstylus</pre>
# Insert this line at the beginning of '''~/.xsession''':<pre>export GTK_MODULES=libgtkstylus.so &</pre>
== Using the mouse and keyboard from your desktop on the OM device ==
=== Method 1: xsession export (works with a linux host) ===
If you are running Linux (or a similar xorg capable operating system) on your Desktop, you can export your xsession to the openmoko device and use your mouse and keyboard on the Neo screen. A little program called x2x makes it even possible to do this simultaneously on the fly. When activated you just move your mouse to the edge of your monitor and then the mouse cursor continues on the screen of your openmoko device. If you select a window on the OM, the input of your keyboard is automatically entered in that window. You can even use the clipboard to copy data from tour desktop to OM and in the reverse direction.
Configure your desktop computer to export your xsession:
On your desktop (with root permissions):
Make sure that sshd is installed and in /etc/ssh/sshd_config you have set
X11Forwarding yes
In K/Ubuntu sshd is in the package openssh-server.
On your OM device install x2x (with root permissions)
apt-get install xauth x2x
Now open a new X terminal on your desktop computer. You MUST be the same user that is running the xsession on your desktop (i.e. do not su to root or another user in your x terminal!). Use the same username that is running an xsession on your OM device. Assuming that you have a usb networking connection to OM (with standard configuration) on the user prompt of your desktop type:
user@desktop:~$ ssh -X openmoko@192.168.0.202 "/usr/bin/x2x -east -to :0.0"
Hit return and enter your password. The xterm window will be unresponsive after that, but keep it open until you disconnect your OM device.
Now move your mouse cursor across the right edge of your monitor. It should enter the screen of your OM device from the left. Of course you can also use -west, -north or -south, depending on your preference where you place your OM.
If computer says:
sh: /usr/X11R6/bin/xauth: No such file or directory
X11 connection rejected because of wrong authentication.
x2x - error: can not open display localhost:11.0
It means you haven't installed xauth on your OM. So on your OM (with root permissions)
apt-get install xauth
=== Method 2: synergy (works with a windows/linux host) ===
With this method you can have the following functionality:
* Mouse moves from screen edge to the next screen
* Keyboard types on the focused window
* Clipboard is transferred as well
* Connect as many computers and screens you wish
* Connect windows computers too
All devices/computers in question should be able to install [http://synergy2.sourceforge.net synergy].
Windows computers can use an installer exe.
Debian devices have a package ready to be used.
<pre>
apt-get install synergy quicksynergy
</pre>
quick synergy will appear in your XFCE programs menu (Accessories->QuickSynergy).
Run it, switch to the "Use" tab, enter the IP address of the computer with the mouse and keyboard you wish to use, and press Execute.
In the windows host, (or linux) run the synergy after installation,
and configure it to share its keyboard and mouse(server),
configuration is fairly simple, you add all the hostnames of the devices/computers that ever would be joined to the "screens" list, and create 2 links for each connection.
If your desktop's hostname is homepc, and the device's is debian_gta02, and i place the device to the left of the desktop, the links would look like this:
<pre>
homepc is right of debian_gta02
debian_gta02 is left of homepc
</pre>
Now move back to the main screen, and press Start.
That should be it, in windows you should have an icon with a yellow lightning in it when synergy is connected and working.
Synergy supports connection of more then one screen so one could set up a full lab with only one keyboard and mouse :)
= See also=
== Support ==
To have more information about Debian go to [http://www.debian.org Debian homepage].
If you have some problems, you can find support in [http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland smartphone mailing list]. Report your discovered bugs to this list but remember to put [mailto:nomeata@debian.org Joachim Breitner] in CC.
If you'd like to help the packaging activities, you can join the [http://lists.alioth.debian.org/mailman/listinfo/pkg-fso-maint fso mainteiner list].
Consider a swap partition [http://lists.openmoko.org/pipermail/community/2008-September/031106.html]
[http://lists.openmoko.org/pipermail/community/2008-October/032964.html].
== Známé problémy ==
== Problém při použití install.sh ==
Pokud vytváření tabulky oddílů hlásí chybu, použijte následující patch:
<pre>
--- install.sh 2009-01-19 17:36:26.000000000 +0300
+++ install_good.sh 2009-01-19 17:44:51.000000000 +0300
@@ -405,9 +405,9 @@
echo " * Waiting for partitions to appear"
SLEEP_SECONDS=3
-while ! ([ "$SINGLE_PART" = "true" ] && test -e ${SD_DEVICE}p1) ||\
- test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2; do
- if [ "$SLEEP_SECONDS" = 15 ]; then
+while ! (([ "$SINGLE_PART" = "true" ] && test -e ${SD_DEVICE}p1) ||\
+ test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2); do
+ if [ "$SLEEP_SECONDS" = 30 ]; then
echo "E: Partitioning has failed, partitions have not been created"
exit 1
fi
@@ -598,7 +598,7 @@
rootfs / auto defaults,errors=remount-ro,noatime 0 1
__END__
-if ![ "$SINGLE_PART" = "true" ]; then
+if [ "$SINGLE_PART" != "true" ]; then
cat >> $INST_DIR/etc/fstab <<__END__
/dev/mmcblk0p1 /boot auto defaults,noatime 0 2
__END__
</pre>
'''apt-get segmentation fault''' Kdykoli dostanete segmentation fault při používání apt-get nebo aptitude, vyčistěte databázi, a ta bude znova sestavena
rm /var/cache/apt/*.bin
'''Pokud nechce Zhone nastartovat''' je to nejpravděpodobněji kvůli chybě v balíčku python-evas [http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/b5c47db469394e98/1b529e538774d3e0?lnk=raot] (fixed in new install). Nainstalujte balíček:
wget http://www.ginguppin.de/files/python-evas_0.2.1-2_armel.deb
dpkg -i python-evas_0.2.1-2_armel.deb
[[Category:Debian/cs]]