https://wiki.archlinux.org/api.php?action=feedcontributions&user=Quark+zju&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:20:45ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Sup&diff=446891Sup2016-08-17T14:49:39Z<p>Quark zju: Update Website URL - the old one is dead</p>
<hr />
<div>[[Category:Email clients]]<br />
[[zh-TW:Sup]]<br />
'''Sup''' is a powerful new mail client developed for people who manage lots of mail. It can be viewed as a cross between Mutt and Gmail, with very fast operation and search, tagging, automatic contact management, support for a wide variety of accounts at once, and more.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|sup-git}} from the [[AUR]]. Although the developers suggest that you install Sup via:<br />
<br />
$ gem install xapian-ruby<br />
$ gem install sup<br />
<br />
As you get the latest version directly from the developers.<br />
<br />
== Configuration ==<br />
<br />
Sup comes with an easy to use configuration tool called {{Ic|sup-config}}. To use it, start it in the console and walk through the steps, which are as follows:<br />
<br />
# Enter your full name.<br />
# Enter your primary e-mail address, as well as any alternate e-mail addresses.<br />
# Enter the path to your signature file, if you have one.<br />
# Enter the editor that should be used to compose new mail, as well as any arguments that should be passed to it.<br />
# Add sources for your mail, including:<br />
## mbox files<br />
## maildir directories<br />
<br />
Support for remote sources (POP3, IMAP, IMAPS, and mbox+ssh) was removed in the 0.12 release. <br />
<br />
Sup is for the most part only an MUA (mail user agent) and cannot handle downloading mail on its own. You can use tools like offlineimap, fetchmail, and rsync to transfer email to the local system mbox or maildir folders. <br />
<br />
The [https://github.com/sup-heliotrope/sup/wiki/Complete-gmail-configuration sup wiki has an example] for configuring a gmail+imap source using offlineimap. The [[Mutt#POP3]] subsection shows some additional mail transfer methods.<br />
<br />
After the email sources have been added, {{Ic|sup-config}} will execute the {{Ic|sup-sync}} command to import mail into your mailbox.<br />
<br />
== Usage ==<br />
<br />
Execute the {{ic|sup}} command to start the Sup mail client. The program should show the messages imported by {{ic|sup-config}}.<br />
<br />
The most important key for new users to remember is the {{ic|?}} key. This will display a full list of keyboard commands at any point, reminding new users how to navigate the program.<br />
<br />
To navigate between threads, use the arrow keys or the {{ic|j}} and {{ic|k}} keys ({{ic|Shift+j}} and {{ic|Shift+k}} work like the Page Up and Page Down keys). To jump between threads with new messages, press the Tab key. Sup doesn't load all threads by default; press {{ic|Shift+m}} to load more (more messages will automatically load to fill the window).<br />
<br />
To view a thread, select it and press the {{ic|Enter}} key. To expand or collapse an individual message while viewing a thread, select the message and press the {{ic|Enter}} key. Press {{ic|Shift+n}} to expand only new messages (the default view) or {{ic|Shift+e}} to toggle the state of all messages. Press {{ic|o}} to show or hide hidden parts of a message (such as signatures).<br />
<br />
To navigate between messages in a thread, press the {{ic|n}} and {{ic|p}} keys. To display the headers on a message, press the {{ic|h}} key.<br />
<br />
To cycle through buffers, press the {{ic|b}} key, or press the {{ic|;}} key to view a list of all of the open buffers. To kill a buffer, press the {{ic|x}} key.<br />
<br />
To archive a thread, press the {{ic|a}} key. This will hide it from the inbox until someone replies to it, at which point it will reappear. To kill a thread, press the {{ic|&}} key. This is equivalent to Gmail's "mute" function, which hides a message even if people reply to it. It will never re-appear in the inbox, but it will still show up in search results.<br />
<br />
To star a thread, press the {{ic|*}} key. To mark a thread as spam, press the {{ic|Shift+s}} key. Sup doesn't have any built-in spam filter; for that, consider a program such as {{pkg|spamassassin}}.<br />
<br />
To tag a thread, press the {{ic|t}} key. To label the messages in a thread, press the {{ic|l}} key. To search labels, press the {{ic|Shift+l}} key. {{ic|Enter}} a label for which to search or press the {{ic|Enter}} key to call up a list of labels. To perform a full text search, press the {{ic|\}} key.<br />
<br />
To view a list of contacts, press the {{ic|Shift+c}} key. To e-mail one of the people on the list, select his or her name and press the {{ic|Enter}} key.<br />
<br />
== Back-up and Restore ==<br />
<br />
Backing-up e-mail is very important. To ensure that you do not lose anything, first back up the sources, such as mbox files and maildir directories, then run:<br />
<br />
$ sup-dump > ''filename''<br />
<br />
This will back-up all message states in a text file. To restore your message states from this text file, simply run:<br />
<br />
$ sup-sync [<source>+] --restored --restore ''filename''<br />
<br />
Just remember that the commands above only back-up and restore message states. The messages themselves will need to be backed-up separately.<br />
<br />
== List of Keybindings ==<br />
<br />
=== Keybindings from inbox-mode ===<br />
<br />
a : Archive thread (remove from inbox)<br />
A : Archive thread (remove from inbox) and mark read<br />
<br />
=== Keybindings from thread-index-mode ===<br />
<br />
M : Load 20 more threads<br />
!! : Load all threads (may list a _lot_ of threads)<br />
^G : Cancel current search<br />
@ : Refresh view <br />
* : Star or unstar all messages in thread<br />
N : Toggle new/read status of all messages in thread<br />
l : Edit or add labels for a thread <br />
e : Edit message (drafts only) <br />
S : Mark/unmark thread as spam<br />
d : Delete/undelete thread <br />
& : Kill thread (never to be seen in inbox again)<br />
$ : Save changes now <br />
tab : Jump to next new thread<br />
r : Reply to latest message in a thread<br />
f : Forward latest message in a thread <br />
t : Tag/untag selected thread<br />
T : Tag/untag all threads<br />
g : Tag matching threads<br />
+, = : Apply next command to all tagged threads<br />
# : Force tagged threads to be joined into the same thread<br />
u : Undo the previous action<br />
<br />
=== Keybindings from thread-view-mode ===<br />
<br />
h : Toggle detailed header<br />
H : Show full message header<br />
V : Show full message (raw form)<br />
<enter> : Expand/collapse or activate item<br />
E : Expand/collapse all messages<br />
e : Edit draft<br />
y : Send draft<br />
l : Edit or add labels for a thread<br />
o : Expand/collapse all quotes in a message<br />
n : Jump to next open message<br />
p : Jump to previous open message<br />
z : Align current message in buffer<br />
* : Star or unstar message<br />
N : Toggle unread/read status of message<br />
r : Reply to a message<br />
f : Forward a message or attachment<br />
i : Edit alias/nickname for a person<br />
D : Edit message as new<br />
s : Save message/attachment to disk<br />
S : Search for messages from particular people<br />
m : Compose message to person<br />
( : Subscribe to/unsubscribe from mailing list<br />
) : Subscribe to/unsubscribe from mailing list<br />
| : Pipe message or attachment to a shell command<br />
.a : Archive this thread and kill buffer<br />
.d : Delete this thread and kill buffer<br />
.s : Mark this thread as spam and kill buffer<br />
.N : Mark this thread as unread and kill buffer<br />
,a : Archive this thread, kill buffer, and view next<br />
,d : Delete this thread, kill buffer, and view next<br />
,s : Mark this thread as spam, kill buffer, and view next<br />
,N : Mark this thread as unread, kill buffer, and view next<br />
,n : Kill buffer, and view next<br />
]a : Archive this thread, kill buffer, and view previous<br />
]d : Delete this thread, kill buffer, and view previous<br />
]s : Mark this thread as spam, kill buffer, and view previous<br />
]N : Mark this thread as unread, kill buffer, and view previous<br />
]n : Kill buffer, and view previous<br />
<br />
=== Keybindings from contact-list-mode ===<br />
<br />
M : Load 10 more contacts<br />
D : Drop contact list and reload<br />
a, i : Edit alias/or name for contact<br />
t : Tag/untag current line<br />
+ : Apply next command to all tagged items<br />
S : Search for messages from particular people<br />
<br />
=== Keybindings from line-cursor-mode ===<br />
<br />
<down arrow>, j : Move cursor down one line<br />
<up arrow>, k : Move cursor up one line<br />
<enter> : Select this item<br />
<br />
=== Keybindings from scroll-mode ===<br />
<br />
J, ^E : Down one line<br />
K, ^Y : Up one line<br />
<left arrow>, h : Left one column<br />
<right arrow> : Right one column<br />
<page down>, <space>, ^F : Down one page<br />
<page up>, p, <backspace>, ^B : Up one page<br />
^D : Down one half page<br />
^U : Up one half page<br />
<home>, ^, 1 : Jump to top<br />
<end>, 0 : Jump to bottom<br />
[ : Jump to the left<br />
/ : Search in current buffer<br />
n : Jump to next search occurrence in buffer<br />
<br />
=== Global keybindings ===<br />
<br />
q : Quit Sup, but ask first<br />
Q : Quit Sup immediately<br />
? : Show help<br />
b : Switch to next buffer<br />
B : Switch to previous buffer<br />
x : Kill the current buffer<br />
; : List all buffers<br />
C : List contacts<br />
^L : Redraw screen<br />
\, F : Search all messages<br />
U : Show all unread messages<br />
L : List labels<br />
P : Poll for new messages<br />
m, c : Compose new message<br />
^G : Do nothing<br />
R : Edit most recent draft message<br />
<br />
== Troubleshooting ==<br />
<br />
=== Crashing with: Illegal instruction (core dumped) ===<br />
{{Ic|sup}} uses a search engine called Xapian which is being compiled to use SSE2 instructions. If your CPU does not support SSE2 instructions you will encounter the error message:<br />
<br />
Illegal instruction (core dumped)<br />
<br />
To solve this you have to compile Xapian with the flag {{Ic|--disable-sse}}.<br />
<br />
1. Looking at the {{Ic|PKGBUILD}} for {{AUR|ruby-xapian-ruby}} you can see that it downloads a gem from https://rubygems.org/gems/xapian-ruby. Download the gem.<br />
<br />
2. run these commands<br />
<br />
gem unpack xapian-ruby.gem<br />
gem unpack --spec xapian-ruby.gem<br />
mv xapian-ruby.gemspec xapian-ruby/<br />
cd xapian-ruby<br />
<br />
3. You are suppose to edit the {{Ic|Rakefile}}. Your goal is to change the 2 lines where it runs the config changes. All you have to do is to append {{Ic|--disable-sse}} to the end of those configuration commands:<br />
<br />
system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --disable-sse"<br />
system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby --disable-sse"<br />
<br />
And save those changes.<br />
<br />
4. run<br />
<br />
gem build xapian-ruby.gemspec<br />
gem install --local xapian-ruby.gem<br />
<br />
This should solve the problem with Xapian not running on old CPUs. It should also be mentioned that if it is your first time you run {{Ic|sup-config}} and you have done everything correctly but still end up wih the error message<br />
<br />
This Sup version expects a v4 index, but you have an existing v0 index. Please run sup-dump to save your labels, move /home/user/.sup/xapian out of the way, and run sup-sync --restore. (RuntimeError)<br />
Rats, that failed. You may have to do it manually.<br />
<br />
it is possible that you also have this issue, try to run the other executables such as {{Ic|sup}} or {{Ic|sup-dump}} to see if you get the Illegal instruction (core dumped) error message.<br />
<br />
== See also ==<br />
<br />
* [http://sup-heliotrope.github.io/ Website]<br />
* [https://github.com/sup-heliotrope/sup/wiki Wiki]<br />
* [https://github.com/sup-heliotrope/sup/blob/develop/README.md README]<br />
* [https://github.com/sup-heliotrope/sup/blob/develop/doc/FAQ.txt FAQ]<br />
* [https://github.com/sup-heliotrope/sup/blob/develop/doc/Philosophy.txt Philosophical statement]</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Systemd-boot&diff=403858Systemd-boot2015-10-09T09:34:32Z<p>Quark zju: Mention the "editor" config option, introduced in commit 4db7e6d on Mar 11, 2015. The "Add security" section holds no valid point any more thus removed.</p>
<hr />
<div>{{lowercase title}}<br />
[[Category:Boot loaders]]<br />
[[de:Gummiboot]]<br />
[[es:Gummiboot]]<br />
[[ja:Systemd-boot]]<br />
[[ru:Gummiboot]]<br />
{{Related articles start}}<br />
{{Related|Arch boot process}}<br />
{{Related|Boot loaders}}<br />
{{Related|Unified Extensible Firmware Interface}}<br />
{{Related articles end}}<br />
<br />
'''systemd-boot''' (previously called '''gummiboot'''), is a simple UEFI boot manager which executes configured EFI images. The default entry is selected by a configured pattern (glob) or an on-screen menu. It is included with systemd since {{Pkg|systemd}} 220-2.<br />
<br />
It is simple to configure, but can only start EFI executables, such as the Linux kernel [[EFISTUB]], UEFI Shell, GRUB, the Windows Boot Manager, and such.<br />
<br />
{{Warning|systemd-boot simply provides a boot menu for EFISTUB kernels. In case you have issues booting EFISTUB kernels like in {{Bug|33745}}, you should use a boot loader which does not use EFISTUB, like [[GRUB]], [[Syslinux]] or [[Boot loaders#ELILO|ELILO]].}}<br />
<br />
{{Note|In the entire article {{ic|$esp}} denotes the mountpoint of the [[UEFI#EFI System Partition|EFI System Partition]] aka ESP.}}<br />
<br />
== Installation ==<br />
<br />
=== EFI boot ===<br />
First, make sure you are booted in UEFI mode, [[Unified_Extensible_Firmware_Interface#Requirements_for_UEFI_variable_support|your EFI variables are accessible]], your EFI System Partition is properly mounted and your kernel and initramfs are copied onto that ESP as systemd-boot cannot load EFI binaries from other partitions. It is therefore strongly recommended to mount your ESP to {{ic|/boot}}. See [[#Updating]] for more information and work-around, in case you want to separate {{ic|/boot}} from the ESP. <br />
<br />
Finally, type the following command to copy the systemd-boot binary to your EFI System Partition and add systemd-boot itself as the default EFI application (default boot entry) loaded by the EFI Boot Manager. If you are not booted in UEFI mode and your EFI variables are not accessible, creating the boot entry will fail. You should however still be able to boot systemd-boot as it copies the binary to the default EFI binary location on your ESP ({{ic|$esp/EFI/boot/systemd-bootx64.efi}} on x64 systems) unless a non-systemd-boot EFI application is already present as the same filename.<br />
<br />
# bootctl --path=''$esp'' install<br />
<br />
=== Legacy boot ===<br />
{{Warning|This is not the recommended process}}<br />
You can also successfully install systemd-boot if booted with a legacy OS. However, this requires that you later on tell your firmware to launch systemd-boot's EFI file on boot:<br />
* you either have a working EFI shell somewhere;<br />
* or your firmware interface provides you with a way of properly setting the EFI file that will be loaded at boot time.<br />
{{Note|E.g. on Dell's Latitude series, the firmware interface provides everything you need to setup EFI boot, and the EFI Shell won't be able to write to the computer's ROM.}}<br />
If you can do so, the installation is easier: go into your EFI shell or your firmware configuration interface, and change your machine's default EFI file to {{ic|/$esp/EFI/boot/systemd-bootx64.efi}} ({{ic|systemd-bootia32.efi}} on i686 systems).<br />
<br />
=== Updating ===<br />
<br />
systemd-boot (bootctl(1), systemd-efi-boot-generator(8)) assumes that your EFI System Partition is mounted on {{ic|/boot}}. Unlike the previous separate ''gummiboot'' package, which updated automatically on a new package release with a {{ic|post_install}} script, updates of new systemd-boot versions are now handled manually by the user: <br />
<br />
# bootctl update <br />
<br />
If the ESP is not mounted on {{ic|/boot}}, the {{ic|1=--path=}} option can pass it. For example: <br />
<br />
# bootctl --path=/boot/$esp update<br />
<br />
== Configuration ==<br />
<br />
=== Basic configuration ===<br />
<br />
The basic configuration is kept in {{ic|$esp/loader/loader.conf}}, with just two possible configuration options:<br />
<br />
* {{ic|default}} – default entry to select (without the {{ic|.conf}} suffix); can be a wildcard like {{ic|arch-*}}<br />
<br />
* {{ic|timeout}} – menu timeout in seconds. If this is not set, the menu will only be shown when you hold the space key while booting.<br />
<br />
* {{ic|editor}} - whether to enable the kernel parameters editor or not. {{ic|1}} (default) is to enable, {{ic|0}} is to disable. Since the user can add {{ic|1=init=/bin/bash}} to bypass root password and gain root access, it's strongly recommended to set this option to {{ic|0}}.<br />
<br />
Example:<br />
<br />
{{hc|$esp/loader/loader.conf|<br />
default arch<br />
timeout 4<br />
editor 0<br />
}}<br />
<br />
Note that the first 2 options can be changed in the boot menu itself, which will store them as EFI variables.<br />
<br />
=== Adding boot entries ===<br />
{{Note|bootctl will automatically check for "'''Windows Boot Manager'''" ({{ic|\EFI\Microsoft\Boot\Bootmgfw.efi}}), "'''EFI Shell'''" ({{ic|\shellx64.efi}}) and "'''EFI Default Loader'''" ({{ic|\EFI\Boot\bootx64.efi}}). Where detected, entries will also automatically be generated for them as well. However, it does not auto-detect other EFI applications (unlike [[rEFInd]]), so for booting the kernel, manual configuration entries must be created.<br />
If you dual-boot Windows, it is strongly recommended to disable its default [[Windows_and_Arch_dual_boot#Fast_Start-Up|Fast Start-Up]] option.}}<br />
<br />
{{Tip|You can find the PARTUUID for your Root partition with the command {{ic|1=blkid -s PARTUUID -o value /dev/sdxY}}, where 'x' is the device letter and 'Y' is the partition number. This is required only for your Root partition, not $esp.}}<br />
<br />
bootctl searches for boot menu items in {{ic|$esp/loader/entries/*.conf}} – each file found must contain exactly one boot entry. The possible options are:<br />
<br />
* {{ic|title}} – operating system name. '''Required.'''<br />
<br />
* {{ic|version}} – kernel version, shown only when multiple entries with same title exist. Optional.<br />
<br />
* {{ic|machine-id}} – machine identifier from {{ic|/etc/machine-id}}, shown only when multiple entries with same title and version exist. Optional.<br />
<br />
* {{ic|efi}} – EFI program to start, relative to your ESP ({{ic|$esp}}); e.g. {{ic|/vmlinuz-linux}}. Either this or {{ic|linux}} (see below) is '''required.'''<br />
<br />
* {{ic|options}} – command line options to pass to the EFI program. Optional, but you will need at least {{ic|1=initrd=''efipath''}} and {{ic|1=root=''dev''}} if booting Linux.<br />
<br />
For Linux, you can specify {{ic|linux ''path-to-vmlinuz''}} and {{ic|initrd ''path-to-initramfs''}}; this will be automatically translated to {{ic|efi ''path''}} and {{ic|1=options initrd=''path''}} – this syntax is only supported for convenience and has no differences in function. <br />
<br />
==== Standard root installations ====<br />
<br />
Here is an example entry for a root partition without LVM or LUKS:<br />
<br />
{{hc|$esp/loader/entries/arch.conf|2=<br />
title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /initramfs-linux.img<br />
options root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 rw<br />
}}<br />
<br />
Please note in the example above that PARTUUID/PARTLABEL identifies a GPT partition, and differs from UUID/LABEL, which identifies a filesystem. Using the PARTUUID/PARTLABEL is advantageous because it is invariant (i.e. unchanging) if you reformat the partition with another filesystem, or if the /dev/sd* mapping changed for some reason. It is also useful if you do not have a filesystem on the partition (or use LUKS, which does not support LABELs).<br />
<br />
==== LVM root installations ====<br />
<br />
Here is an example for a root partition using [[LVM|Logical Volume Management]]:<br />
<br />
{{hc|$esp/loader/entries/arch-lvm.conf|2=<br />
title Arch Linux (LVM)<br />
linux /vmlinuz-linux<br />
initrd /initramfs-linux.img<br />
options root=/dev/mapper/<VolumeGroup-LogicalVolume> rw<br />
}}<br />
<br />
Replace {{ic|<VolumeGroup-LogicalVolume>}} with the actual VG and LV names (e.g. {{ic|1=root=/dev/mapper/volgroup00-lvolroot}}). Alternatively, it is also possible to use a UUID instead:<br />
....<br />
options root=UUID=<UUID identifier> rw<br />
<br />
Note that {{ic|1=root='''UUID'''=}} is used instead of {{ic|1=root='''PARTUUID'''=}}, which is used for Root partitions without LVM or LUKS.<br />
<br />
==== Encrypted Root Installations ====<br />
<br />
Here is an example configuration file for an encrypted root partition ([[Dm-crypt|DM-Crypt / LUKS]]):<br />
<br />
{{hc|$esp/loader/entries/arch-encrypted.conf|2=<br />
title Arch Linux Encrypted<br />
linux /vmlinuz-linux<br />
initrd /initramfs-linux.img<br />
options cryptdevice=UUID=<UUID>:<mapped-name> root=/dev/mapper/<mapped-name> quiet rw<br />
}}<br />
<br />
UUID is used in this example; PARTUUID should be able to replace the UUID, if so desired. You may also replace the /dev path with a regular UUID. See [[Dm-crypt/System configuration#Boot loader]].<br />
<br />
You can also add other EFI programs such as {{ic|\EFI\arch\grub.efi}}.<br />
<br />
==== btrfs subvolume root installations ====<br />
<br />
If booting a [[btrfs]] subvolume as root, amend the {{ic|options}} line with {{ic|rootflags<nowiki>=</nowiki>subvol<nowiki>=</nowiki><root subvolume>}}. In the example below, root has been mounted as a btrfs subvolume called 'ROOT' (e.g. {{ic|mount -o subvol<nowiki>=</nowiki>ROOT /dev/sdxY /mnt}}):<br />
<br />
{{hc|$esp/loader/entries/arch-btrfs-subvol.conf|2=<br />
title Arch Linux<br />
linux /vmlinuz-linux<br />
initrd /initramfs-linux.img<br />
options root=PARTUUID=14420948-2cea-4de7-b042-40f67c618660 rw rootflags<nowiki>=</nowiki>subvol<nowiki>=</nowiki>ROOT<br />
}}<br />
<br />
A failure to do so will otherwise result in the following error message: {{ic|ERROR: Root device mounted successfully, but /sbin/init does not exist.}}<br />
<br />
==== EFI Shells or other EFI apps ====<br />
<br />
In case you installed EFI shells and other EFI application into the ESP, you can use the following snippets:<br />
<br />
{{hc|$esp/loader/entries/uefi-shell-v1-x86_64.conf|2=<br />
title UEFI Shell x86_64 v1<br />
efi /EFI/shellx64_v1.efi<br />
}}<br />
<br />
{{hc|$esp/loader/entries/uefi-shell-v2-x86_64.conf|2=<br />
title UEFI Shell x86_64 v2<br />
efi /EFI/shellx64_v2.efi<br />
}}<br />
<br />
{{Expansion|Add example on how to boot into EFI firmware setup.}}<br />
<br />
=== Support hibernation ===<br />
<br />
See [[Suspend and hibernate]].<br />
<br />
== Keys inside the boot menu ==<br />
<br />
The following keys are used inside the menu:<br />
* {{ic|Up/Down}} - select entry<br />
* {{ic|Enter}} - boot the selected entry<br />
* {{ic|d}} - select the default entry to boot (stored in a non-volatile EFI variable)<br />
* {{ic|-/T}} - decrease the timeout (stored in a non-volatile EFI variable)<br />
* {{ic|+/t}} - increase the timeout (stored in a non-volatile EFI variable)<br />
* {{ic|e}} - edit the kernel command line. has no effect if the {{ic|editor}} config option is set to {{ic|0}}.<br />
* {{ic|v}} - show the gummiboot and UEFI version<br />
* {{ic|Q}} - quit<br />
* {{ic|P}} - print the current configuration<br />
* {{ic|h/?}} - help<br />
<br />
These hotkeys will, when pressed inside the menu or during bootup, directly boot<br />
a specific entry:<br />
<br />
* {{ic|l}} - Linux<br />
* {{ic|w}} - Windows<br />
* {{ic|a}} - OS X<br />
* {{ic|s}} - EFI Shell<br />
* {{ic|1-9}} - number of entry<br />
<br />
== Troubleshooting ==<br />
<br />
=== Manual entry using efibootmgr ===<br />
<br />
If {{ic|bootctl install}} command failed, you can create a EFI boot entry manually using {{Pkg|efibootmgr}}:<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/systemd/systemd-bootx64.efi -L "Linux Boot Manager"<br />
<br />
where {{ic|/dev/sdXY}} is the [[UEFI#EFI System Partition|EFI System Partition]].<br />
<br />
=== Menu does not appear after Windows upgrade ===<br />
<br />
For example, if you upgraded from Windows 8 to Windows 8.1, and you no longer see a boot menu after the upgrade (i.e., Windows boots immediately):<br />
<br />
* Make sure Secure Boot (UEFI setting) and [[Windows_and_Arch_dual_boot#Fast_Start-Up|Fast Startup]] (Windows power option setting) are both disabled.<br />
* Make sure your UEFI prefers Linux Boot Manager over Windows Boot Manager (UEFI setting like Hard Drive Disk Priority).<br />
<br />
{{Note|Windows 8.x+, including Windows 10, will overwrite any UEFI choices you make and install itself as the priority boot choice after every boot. Changing the boot order in the UEFI firmware will only last until the next Windows 10 boot. Know what the ''Change Boot Option'' key is for your motherboard.}}<br />
<br />
To make Windows 8.X and above respect your boot order, you must enter a Windows group policy and have it execute a batch (''.bat'') file on startup. In Windows:<br />
<br />
# Open a command prompt with admin privlages. Type in {{ic|bcdedit /enum firmware}}<br />
# Find the Firmware Application that has "Linux" in the description, e.g. "Linux Boot Manager"<br />
# Copy the Identifier, including the brackets, e.g. {{ic|<nowiki>{31d0d5f4-22ad-11e5-b30b-806e6f6e6963}</nowiki>}}<br />
# Open ''gpedit'' and under ''Local Computer Policy > Computer Configuration > Windows Settings > Scripts(Startup/Shutdown)'', choose ''Startup''. That should open a window named ''Startup Properties''.<br />
# Under the ''Scripts'' tab, choose the ''Add'' button<br />
# Give your script a name, e.g. {{ic|bootorder.bat}}.<br />
# Under ''Script Parameters'', type {{ic|bcdedit /set {fwbootmgr} DEFAULT {''identifier_copied_in_step_3''<nowiki>}</nowiki>}} (e.g. {{ic|<nowiki>bcdedit /set {fwbootmgr} DEFAULT {31d0d5f4-22ad-11e5-b30b-806e6f6e6963}</nowiki>}}).<br />
<br />
If this does not work, create a batch file somewhere on your Windows system with the {{ic|bcdedit /set {fwbootmgr} DEFAULT {''identifier_copied_in_step_3''<nowiki>}</nowiki>}} line in it and go back to step 6 and ''Browse'' for that file.<br />
<br />
Alternatively, you can make the default Windows boot loader load systemd-boot instead. In an administrator command prompt in Windows, one can change this entry as follows:<br />
<br />
bcdedit /set {bootmgr} path \EFI\systemd\systemd-bootx64.efi<br />
<br />
== See also ==<br />
<br />
* http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Bluetooth&diff=364088Bluetooth2015-03-05T17:15:15Z<p>Quark zju: Add rfkill unblock in bluetoothctl no controller troubleshoot</p>
<hr />
<div>[[Category:Bluetooth]]<br />
[[cs:Bluetooth]]<br />
[[de:Bluetooth]]<br />
[[es:Bluetooth]]<br />
[[fr:Bluetooth]]<br />
[[it:Bluetooth]]<br />
[[ja:Bluetooth]]<br />
[[ru:Bluetooth]]<br />
[[zh-CN:Bluetooth]]<br />
{{Related articles start}}<br />
{{Related|Bluez4}}<br />
{{Related|Bluetooth mouse}}<br />
{{Related|Bluetooth headset}}<br />
{{Related|Blueman}}<br />
{{Related articles end}}<br />
[http://www.bluetooth.org/ Bluetooth] is a standard for the short-range wireless interconnection of cellular phones, computers, and other electronic devices. In Linux, the canonical implementation of the Bluetooth protocol stack is [http://www.bluez.org/ BlueZ].<br />
<br />
== Installation ==<br />
<br />
Install the Bluetooth protocol stack {{Pkg|bluez}} and the {{Pkg|bluez-utils}} package which provides the {{ic|bluetoothctl}} utility from the [[official repositories]]. The {{ic|dbus}} daemon, which is started automatically by ''systemd'', is used to read settings and for PIN pairing, while the {{ic|bluetooth}} daemon is required for the Bluetooth protocol. <br />
<br />
Load the generic bluetooth driver, if not already loaded:<br />
# modprobe btusb<br />
<br />
Then [[start]] the bluetooth service. You can [[enable]] it to start automatically at boot time.<br />
<br />
{{Note|By default the bluetooth daemon will only give out bnep0 devices to users that are a member of the lp group. Make sure to add your user to that group if you intend to connect to a bluetooth tether. You can change the group that is required in the file {{ic|/etc/dbus-1/system.d/bluetooth.conf}}.}}<br />
<br />
{{Note|Some Bluetooth adapters are bundled with a Wi-Fi card (e.g. [http://www.intel.com/content/www/us/en/wireless-products/centrino-advanced-n-6235.html Intel Centrino]). These require that the Wi-Fi card is first enabled (typically a keyboard shortcut on a laptop) in order to make the Bluetooth adapter visible to the kernel.}}<br />
<br />
{{Note|Some Bluetooth cards (e.g. Broadcom) conflict with the network adapter. Thus, you need to make sure that your Bluetooth device get connected before the network service boot.}}<br />
<br />
== Configuration via the CLI ==<br />
=== Bluetoothctl ===<br />
Pairing a device from the shell is one of the simplest and most reliable options. The exact procedure depends on the devices involved and their input functionality. What follows is a general outline of pairing a device using {{ic|/usr/bin/bluetoothctl}}:<br />
<br />
Start the {{ic|bluetoothctl}} interactive command. There one can input {{ic|help}} to get a list of available commands. <br />
* Turn the power to the controller on by entering {{ic|power on}}. It is off by default.<br />
* Enter {{ic|devices}} to get the MAC Address of the device with which to pair.<br />
* Enter device discovery mode with {{ic|scan on}} command if device is not yet on the list.<br />
* Turn the agent on with {{ic|agent on}}.<br />
* Enter {{ic|pair ''MAC Address''}} to do the pairing (tab completion works).<br />
* If using a device without a PIN, one may need to manually trust the device before it can reconnect successfully. Enter {{ic|trust ''MAC Address''}} to do so.<br />
* Finally, use {{ic|connect ''MAC_address''}} to establish a connection.<br />
<br />
An example session may look this way:<br />
# bluetoothctl <br />
[NEW] Controller 00:10:20:30:40:50 pi [default]<br />
[bluetooth]# agent KeyboardOnly <br />
Agent registered<br />
[bluetooth]# default-agent <br />
Default agent request successful<br />
[bluetooth]# scan on<br />
Discovery started<br />
[CHG] Controller 00:10:20:30:40:50 Discovering: yes<br />
[NEW] Device 00:12:34:56:78:90 myLino<br />
[CHG] Device 00:12:34:56:78:90 LegacyPairing: yes<br />
[bluetooth]# pair 00:12:34:56:78:90<br />
Attempting to pair with 00:12:34:56:78:90<br />
[CHG] Device 00:12:34:56:78:90 Connected: yes<br />
[CHG] Device 00:12:34:56:78:90 Connected: no<br />
[CHG] Device 00:12:34:56:78:90 Connected: yes<br />
Request PIN code<br />
[agent] Enter PIN code: 1234<br />
[CHG] Device 00:12:34:56:78:90 Paired: yes<br />
Pairing successful<br />
[CHG] Device 00:12:34:56:78:90 Connected: no<br />
<br />
In order to have the device active after a reboot, a udev rule is needed:<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|2=<br />
# Set bluetooth power up<br />
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"}}<br />
<br />
After a suspend/resume-cycle, the device can be powered on automatically using something like this ''systemd'' service:<br />
<br />
{{hc|/etc/systemd/system/bluetooth-auto-power@.service|<nowiki><br />
[Unit]<br />
Description=Bluetooth auto power on<br />
After=bluetooth.service sys-subsystem-bluetooth-devices-%i.device suspend.target<br />
<br />
[Service]<br />
Type=oneshot<br />
#We could also do a 200 char long call to bluez via dbus. Except this does not work since bluez does not react to dbus at this point of the resume sequence and I do not know how I get this service to run at a time it does. So we just ignore bluez and force %i up using hciconfig. Welcome to the 21st century.<br />
#ExecStart=/usr/bin/dbus-send --system --type=method_call --dest=org.bluez /org/bluez/%I org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true<br />
ExecStart=/usr/bin/hciconfig %i up<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
</nowiki>}}<br />
<br />
== Configuration with a Graphical Front-end ==<br />
<br />
The following packages allow for a graphical interface to customize Bluetooth.<br />
<br />
=== GNOME Bluetooth ===<br />
<br />
{{Note|GNOME Bluetooth no longer provides a tray applet. A fork of the GNOME Bluetooth applet can be installed from the {{AUR|gnome-bluetooth-applet-git}} package however, as of April 2014, this package no longer compiles.}}<br />
<br />
[https://wiki.gnome.org/Projects/GnomeBluetooth GNOME Bluetooth] is a fork of the old ''bluez-gnome'' and is focused on integration with the [[GNOME]] desktop environment. The {{Pkg|gnome-bluetooth}} package provides the back-end, {{Pkg|gnome-shell}} provides the status monitor applet, and {{Pkg|gnome-control-center}} provides the configuration front-end GUI that can be accessed by typing Bluetooth on the Activities overview, or with the {{ic|gnome-control-center bluetooth}} command.<br />
<br />
You can also launch the following commands directly:<br />
* {{ic|bluetooth-sendto}}: send files to a remote device<br />
* {{ic|bluetooth-wizard}}: for new devices to be paired<br />
<br />
To add a Bluetooth entry to the ''SendTo'' menu in Thunar's file properties menu, see instructions [http://docs.xfce.org/xfce/thunar/send-to here]. (The command that needs to be configured is {{ic|bluetooth-sendto %F}}).<br />
<br />
To receive files, you must install the {{Pkg|obexfs}} and {{Pkg|gnome-user-share}} packages. You can then go to ''Settings->Sharing'' to authorize receiving files from paired devices over bluetooth.<br />
<br />
=== BlueDevil ===<br />
<br />
The Bluetooth tool for [[KDE]] is [https://projects.kde.org/projects/extragear/base/bluedevil BlueDevil]. It can be installed with the package {{Pkg|bluedevil}}, available in the [[official repositories]].<br />
<br />
Make sure {{ic|bluetooth}} daemon is running, as described above. A Bluetooth icon should be visible in both Dolphin and in the system tray, from which users may configure BlueDevil and detect Bluetooth devices by clicking the icon. An interface is also available from the KDE System Settings.<br />
<br />
=== Blueman ===<br />
<br />
See [[Blueman]].<br />
<br />
== Using Obex for sending and receiving files ==<br />
=== ObexFS ===<br />
Another option, rather than using KDE or Gnome Bluetooth packages, is ObexFS which allows for the mounting of phones which are treated like any other filesystem.<br />
{{Note|To use ObexFS, one needs a device that provides an ObexFTP service.}}<br />
<br />
Install {{Pkg|obexfs}} and mount supported phones by running:<br />
$ obexfs -b ''MAC_address_of_device'' /mountpoint<br />
<br />
Once you have finished, to unmount the device use the command:<br />
$ fusermount -u /mountpoint<br />
<br />
For more mounting options see http://dev.zuckschwerdt.org/openobex/wiki/ObexFs<br />
<br />
{{Note|Ensure that the bluetooth device you are mounting is '''not''' set to mount ''read-only''. You should be able to do this from the device's settings. If the device is mounted ''read-only'' you may encounter a permissions error when trying to transfer files to the device.}}<br />
<br />
=== ObexFTP Transfers ===<br />
If your device supports the Obex FTP service but you do not wish to mount the device you can transfer files to and from the device using the obexftp command.<br />
<br />
{{Note|If you installed {{pkg|obexfs}} earlier then {{pkg|obexftp}} should have also been installed as a dependency.}}<br />
<br />
To send a file to a device run the command:<br />
<br />
$ obexftp -b ''MAC_address_of_device'' -p /path/to/file<br />
<br />
To retrieve a file from a device run the command:<br />
<br />
$ obexftp -b ''MAC_address_of_device'' -g filename<br />
<br />
{{Note|Ensure that the file you are retrieving is in the device's ''exchange folder''. If the file is in a subfolder of the exchange folder then provide the correct path in the command.}}<br />
<br />
=== Obex Object Push ===<br />
For devices that do not support Obex FTP service, check if Obex Object Push is supported.<br />
<br />
# sdptool browse ''XX:XX:XX:XX:XX:XX''<br />
<br />
Read the output, look for Obex Object Push, remember the channel for this service. If supported, one can use {{pkg|ussp-push}} to send files to this device:<br />
<br />
# ussp-push ''XX:XX:XX:XX:XX:XX''@''CHANNEL'' ''file'' ''wanted_file_name_on_phone''<br />
<br />
== Examples ==<br />
<br />
All examples have been moved to the [[bluez4]] article. They need to be checked and fixed for use with bluez5.<br />
<br />
== Troubleshooting ==<br />
<br />
=== bluetoothctl ===<br />
If bluetoothctl cannot find any controller, the bluetooth device may be blocked. Try to unblock it using rfkill:<br />
<br />
# rfkill unblock all<br />
<br />
=== gnome-bluetooth ===<br />
<br />
If you see this when trying to enable receiving files in bluetooth-properties:<br />
Bluetooth OBEX start failed: Invalid path<br />
Bluetooth FTP start failed: Invalid path<br />
Then install {{Pkg|xdg-user-dirs}} and issue:<br />
$ xdg-user-dirs-update<br />
You can edit the paths using:<br />
$ vi ~/.config/user-dirs.dirs<br />
<br />
=== Bluetooth USB Dongle ===<br />
<br />
If you are using a USB dongle, you should check that your Bluetooth dongle is recognized. You can do that by running {{ic|journalctl -f}} when you have plugged in the USB dongle (or inspecting {{ic|/var/log/messages.log}}). It should look something like the following (look out for hci):<br />
<br />
{{bc|<br />
Feb 20 15:00:24 hostname kernel: [ 2661.349823] usb 4-1: new full-speed USB device number 3 using uhci_hcd<br />
Feb 20 15:00:24 hostname bluetoothd[4568]: HCI dev 0 registered<br />
Feb 20 15:00:24 hostname bluetoothd[4568]: Listening for HCI events on hci0<br />
Feb 20 15:00:25 hostname bluetoothd[4568]: HCI dev 0 up<br />
Feb 20 15:00:25 hostname bluetoothd[4568]: Adapter /org/bluez/4568/hci0 has been enabled<br />
}}<br />
<br />
If you only get the first two lines, you may see that it found the device but you need to bring it up.<br />
Example:<br />
<br />
{{hc|hciconfig -a hci0|<br />
hci0: Type: USB<br />
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0<br />
DOWN <br />
RX bytes:0 acl:0 sco:0 events:0 errors:0<br />
TX bytes:0 acl:0 sco:0 commands:0 errors:<br />
}}<br />
<br />
# hciconfig hci0 up<br />
<br />
{{hc|hciconfig -a hci0|<br />
hci0: Type: USB<br />
BD Address: 00:02:72:C4:7C:06 ACL MTU: 377:10 SCO MTU: 64:8<br />
UP RUNNING <br />
RX bytes:348 acl:0 sco:0 events:11 errors:0<br />
TX bytes:38 acl:0 sco:0 commands:11 errors:0<br />
}}<br />
<br />
If this fails with an error like:<br />
Operation not possible due to RF-kill<br />
it could be due either to the {{ic|rfkill}} utility, in which case it should be resolved with<br />
# rfkill unblock all<br />
or, it could simply be the hardware switch of the computer. The hardware bluetooth switch (at least sometimes) controls access to USB bluetooth dongles also. Flip/press this switch and try bringing the device up again.<br />
<br />
To verify that the device was detected you can use {{ic|hcitool}} which is part of the {{ic|bluez-utils}}. You can get a list of available devices and their identifiers and their MAC address by issuing:<br />
<br />
{{hc|$ hcitool dev|<br />
Devices:<br />
hci0 00:1B:DC:0F:DB:40<br />
}}<br />
<br />
More detailed information about the device can be retrieved by using {{ic|hciconfig}}.<br />
<br />
{{hc|$ hciconfig -a hci0|<br />
hci0: Type: USB<br />
BD Address: 00:1B:DC:0F:DB:40 ACL MTU: 310:10 SCO MTU: 64:8<br />
UP RUNNING PSCAN ISCAN<br />
RX bytes:1226 acl:0 sco:0 events:27 errors:0<br />
TX bytes:351 acl:0 sco:0 commands:26 errors:0<br />
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80<br />
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3<br />
Link policy: RSWITCH HOLD SNIFF PARK<br />
Link mode: SLAVE ACCEPT <br />
Name: 'BlueZ (0)'<br />
Class: 0x000100<br />
Service Classes: Unspecified<br />
Device Class: Computer, Uncategorized<br />
HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c<br />
Manufacturer: Cambridge Silicon Radio (10)<br />
}}<br />
<br />
=== Logitech Bluetooth USB Dongle ===<br />
<br />
There are Logitech dongles (ex. Logitech MX5000) that can work in two modes Embedded and HCI. In embedded mode dongle emulates a USB device so it seems to your PC that you are using a normal USB mouse/keyoard.<br />
<br />
If you hold the little red Button on the USB BT mini-receiver it will enable the other mode. Hold the red button on the BT dongle and plug it into the computer, and after 3-5 seconds of holding the button, the Bluetooth icon will appear in the system tray. [http://ubuntuforums.org/showthread.php?t=1332197 Discussion]<br />
<br />
Alternatively, you can install the {{Pkg|bluez-hid2hci}} package. When you connect your Logitech dongle it will automatically switch.<br />
<br />
=== hcitool scan: Device not found ===<br />
<br />
* On some Dell laptops (e.g. Studio 15) you have to switch the Bluetooth mode from HID to HCI. Install the {{Pkg|bluez-hid2hci}} package, then [[udev]] should do this automatically. Alternatively, you can run this command to switch to HCI manually:<br />
# /usr/lib/udev/hid2hci<br />
<br />
* If the device will not show up and you have a Windows operating system on your machine, try booting it and enable the bluetooth adapter from windows.<br />
<br />
* Sometimes also this simple command helps:<br />
# hciconfig hci0 up<br />
<br />
=== rfkill unblock: Do not unblock ===<br />
<br />
If your device still soft blocked and you run connman, try this:<br />
<br />
$ connmanctl enable bluetooth<br />
<br />
=== My computer is not visible ===<br />
<br />
Cannot discover computer from your phone? Enable PSCAN and ISCAN:<br />
# enable PSCAN and ISCAN<br />
$ hciconfig hci0 piscan <br />
# check it worked<br />
{{hc|$ hciconfig|<br />
hci0: Type: USB<br />
BD Address: 00:12:34:56:78:9A ACL MTU: 192:8 SCO MTU: 64:8<br />
'''UP RUNNING PSCAN ISCAN'''<br />
RX bytes:20425 acl:115 sco:0 events:526 errors:0<br />
TX bytes:5543 acl:84 sco:0 commands:340 errors:0<br />
}}<br />
<br />
{{Note|Check DiscoverableTimeout and PairableTimeout in {{ic|/etc/bluetooth/main.conf}}}}<br />
<br />
Try changing device class in {{ic|/etc/bluetooth/main.conf}} as following:<br />
# Default device class. Only the major and minor device class bits are<br />
# considered.<br />
#Class = 0x000100 (from default config)<br />
Class = 0x100100<br />
<br />
This was the only solution to make my computer visible for my phone.<br />
<br />
=== Logitech keyboard does not pair ===<br />
<br />
If you do not get the passkey when you try to pair your Logitech keyboard, type the following command:<br />
# hciconfig hci0 sspmode 0<br />
<br />
If after pairing, the keyboard still does not connect, check the output of {{ic|hcidump -at}}. If the latter indicates repeatedly connections-disconnections like the following message:<br />
<br />
status 0x00 handle 11 reason 0x13<br />
Reason: Remote User Terminated Connection<br />
<br />
then, the only solution for now is to install [[bluez4|the old Bluetooth stack]].<br />
<br />
=== HSP/HFP profiles ===<br />
<br />
bluez5 has no support for the HSP/HFP profiles (telephony headset for [[TeamSpeak]], [[Skype]], etc.), see [[Talk:bluez4|bluez4 discussion]] for details.<br />
<br />
Until support is implemented, it is necessary to downgrade to [[bluez4]] and install {{AUR|pulseaudio-bluez4}} from the [[AUR]] or to install {{AUR|pulseaudio-git}} from the [[AUR]] which has added native support.<br />
<br />
=== Thinkpad Bluetooth Laser Mouse problems ===<br />
<br />
If you are experiencing that your Thinkpad Bluetooth Laser Mouse rapidly connects and then (after a few milliseconds) disconnects again every few seconds (when you move the mouse or press a button), try pairing it with the code {{ic|0000}} instead pairing without a code.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=176033Timidity++2011-12-27T09:44:15Z<p>Quark zju: /* Troubleshooting, add audio group part */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
{{i18n|Timidity}}<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work, you may want to add following command as an auto start program in your desktop environment. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ daemon mode won't start===<br />
First, make sure you are in audio group. If not, add yourself to audio group:<br />
<br />
# gpasswd audio -a yourusername<br />
<br />
After group change, you should re-login.<br />
<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO<br />
<br />
If you want to run timidity++ in background, do not use timidity++'s daemonize option, use & instead.<br />
<br />
===timidity++ daemon mode plays sound out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
And test it using aplaymidi. If this does not work, you may want to configure [[JACK]] and set timidity++'s output to jack.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=LVM&diff=176031LVM2011-12-27T09:39:53Z<p>Quark zju: /* Introduction, fix format */</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:File systems (English)]]<br />
{{i18n|LVM}}<br />
[[fr:LVM]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|This article will provide an example of how to install and configure Arch Linux with Logical Volume Manager (LVM).}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|Software|}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Software RAID and LVM}}<br />
{{Article summary wiki|System Encryption with LUKS}}<br />
{{Article summary end}}<br />
<br />
==Introduction==<br />
{{Wikipedia|Logical Volume Manager (Linux)}}<br />
<br />
[[LVM]] (Logical Volume Management) makes use of the [http://sources.redhat.com/dm/ device-mapper] feature of the Linux kernel to provide a system of partitions that is independent of the underlying disk's layout. With LVM you can abstract your storage space and have "virtual partitions" which makes it easier to extend and shrink partitions (subject to the filesystem you use allowing this) and add/remove partitions without worrying about whether you have enough contiguous space on a particular disk, without getting caught up in the problems of fdisking a disk that is in use (and wondering whether the kernel is using the old or new partition table) and without having to move other partition out of the way. This is strictly an ease-of-management issue: it does not provide any addition security. However, it sits nicely with the other two technologies we are using.<br />
<br />
Note that LVM is not used for the boot partition, because of the bootloader problem.<br />
<br />
The basic building blocks of LVM are:<br />
<br />
* '''Physical volume (PV)''': Partition on hard disk (or even hard disk itself or loopback file) on which you can have volume groups. It has a special header and is divided into physical extents. Think of physical volumes as big building blocks which can be used to build your hard drive.<br />
* '''Volume group (VG)''': Group of physical volumes that are used as storage volume (as one disk). They contain logical volumes. Think of volume groups as hard drives.<br />
* '''Logical volume (LV)''': A "virtual/logical partition" that resides in a volume group and is composed of physical extents. Think of logical volumes as normal partitions.<br />
* '''Physical extent (PE)''': A small part of a disk (usually 4MB) that can be assigned to a logical Volume. Think of physical extents as parts of disks that can be allocated to any partition.<br />
<br />
With LVM you can more easily handle your partitions (logical volumes) than normal hard drive partitions. For example, you can:<br />
<br />
* Use ''any number'' of disks as one big disk(VG)<br />
* Have partitions(LV) stretched ''over'' several disks (they can be as big as all of your disk storage together)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''as you like'' (it does not depend on position of the logical volumes within volume groups as with normal partitions)<br />
* Resize/create/delete partitions(LV) and disks(VG) ''online'' (filesystems on them still need to be resized, but some support online resizing)<br />
* ''Name'' your disks(VG) and partitions(LV) as you like<br />
* Create small partitions(LV) and resize them "''dynamically''" as they get more filled (growing must be still done by hand, but you can do it online with some filesystems)<br />
* ...<br />
<br />
Example: <br />
'''Physical disks'''<br />
<br />
Disk1 (/dev/sda):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 50GB (Physical volume) |Partition2 80GB (Physical volume) |<br />
|/dev/sda1 |/dev/sda2 |<br />
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
Disk2 (/dev/sdb):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _<br />
|Partition1 120GB (Physical volume) |<br />
|/dev/sdb1 |<br />
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _|<br />
<br />
'''LVM logical volumes'''<br />
<br />
Volume Group1 (/dev/MyStorage/ = /dev/sda1 + /dev/sda2 + /dev/sdb1):<br />
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br />
|Logical volume1 15GB |Logical volume2 35GB |Logical volume3 200GB |<br />
|/dev/MyStorage/rootvol|/dev/MyStorage/homevol |/dev/MyStorage/mediavol |<br />
|_ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |<br />
<br />
To sum it all up: With LVM you can use all your storage space as one big disk (volume group) and have more flexibility over your partitions (logical volumes).<br />
<br />
==Installation==<br />
Before doing anything we need to load the appropriate module:<br />
# modprobe dm-mod<br />
If you already have Arch Linux installed and you just want to add/try a partition with LVM, jump to [[Lvm#Partition_disks|partition disks]].<br />
<br />
===Installing Arch Linux on LVM===<br />
Prior to running Arch Linux install scripts (/arch/setup) to install Arch Linux, you need to partition your disk with {{Ic|cfdisk}} (or any other tool of your liking). Because grub legacy (grub with version less than 1.0) cannot boot from LVM logical volumes you cannot have {{ic|/boot}} in LVM, so you need to create a boot partition. 100MB should be enough. The other solution would be to use lilo or grub with version 1.95 or newer.<br />
<br />
===Partition disks===<br />
Next you need to create a partition for LVM. Its filesystem type should be 'Linux LVM', so use a partition id 0x8e (filesystem type: 8e). You need to create only one LVM partition on each disk you want to use with LVM. Your logical volumes will reside inside these partitions so size them accordingly. If you will use only LVM and no other external partitions, use all the free space on each disk.<br />
<br />
{{Warning|/boot cannot reside in an LVM partition because grub (version<1.95) does not support LVM.}}<br />
<br />
{{Tip|All LVM partitions on all disks can be configured to appear as one big disk.}}<br />
<br />
===Create Physical volumes===<br />
Now you need to initialize these partitions so they can be used by LVM. Use {{Ic|fdisk -l}} to find out which partitions have filesystem type 'Linux LVM' and create a physical volume on them:<br />
# pvcreate /dev/sda2<br />
Substitute {{ic|/dev/sda2}} with all your partitions to create physical volumes on all of them. This command creates a header on each partition so it can be used for LVM.<br />
You can track created physical volumes with:<br />
# pvdisplay<br />
<br />
===Create Volume group(s)===<br />
Next step is to create a volume group on this physical volume. First you need to create a volume group on one of the new partitions and then add to it all other physical volumes you want to have in it:<br />
# vgcreate VolGroup00 /dev/sda2<br />
# vgextend VolGroup00 /dev/sdb1<br />
Also you can use any other name you like instead of VolGroup00 for a volume group when creating it. You can track how your volume group grows with:<br />
# vgdisplay<br />
<br />
{{Note|You can create more than one volume group if you need to, but then you will not have all your storage presented as one disk.}}<br />
<br />
===Create Logical Volumes===<br />
Now we need to create logical volumes on this volume group. You create a logical volume with the next command by giving the name of a new logical volume, its size, and the volume group it will live on:<br />
# lvcreate -L 10G VolGroup00 -n lvolhome<br />
This will create a logical volume that you can access later with {{ic|/dev/mapper/Volgroup00-lvolhome}} or {{ic|/dev/VolGroup00/lvolhome}}. Same as with the volume groups, you can use any name you want for your logical volume when creating it.<br />
<br />
To create swap on a logical volume, an additional argument is needed:<br />
# lvcreate -C y -L 10G VolGroup00 -n lvolswap<br />
The {{Ic|-C y}} is used to create a contiguous partition, which means that your swap space does not get partitioned over one or more disks nor over non-contiguous physical extents.<br />
<br />
If you want to fill all the free space left on a volume group, use the next command:<br />
# lvcreate -l +100%FREE VolGroup00 -n lvolmedia<br />
<br />
You can track created logical volumes with:<br />
# lvdisplay<br />
<br />
{{Note|You may need to load the ''device-mapper'' kernel module ('''modprobe dm-mod''') for the above commands to succeed:}}<br />
<br />
{{Tip|You can start out with relatively small logical volumes and expand them later if needed. For simplicity, leave some free space in the volume group so there is room for expansion.}}<br />
<br />
===Create filesystem and mount logical volumes===<br />
Your logical volumes should now be located in {{ic|/dev/mapper/}} and {{ic|/dev/YourVolumeGroupName}}. If you cannot find them, use the next commands to bring up the module for creating device nodes and to make volume groups available:<br />
# modprobe dm-mod<br />
# vgscan<br />
# vgchange -ay<br />
Now you can create filesystems on logical volumes and mount them as normal partitions (if you are installing Arch linux, skip this step. Use the arch installer to pick the LVM partitions that you have created):<br />
# mkfs.ext3 /dev/mapper/VolGroup00-lvolhome<br />
# mount /dev/mapper/VolGroup00-lvolhome /home<br />
If you are installing Arch linux, start /arch/setup, go to ''Prepare Hard Drive'' directly to step 3 ''Set Filesystem Mountpoints'' and '''''read the [[Lvm#Important|Important]] section below before proceeding with installation!'''''<br />
<br />
=== Important ===<br />
There are just a few things you need to be careful with while using/installing Arch Linux with LVM.<br />
<br />
==== Set Filesystem Mountpoints ====<br />
* When choosing mountpoints, just select your newly created logical volumes (use: {{ic|/dev/mapper/Volgroup00-lvolhome}}).<br>Do NOT select the actual partitions on which logical volumes were created (do not use: {{ic|/dev/sda2}}).<br />
<br />
==== Configure System ====<br />
*Make sure you change {{Ic|<nowiki>USELVM="no"</nowiki>}} to {{Ic|<nowiki>USELVM="yes"</nowiki>}} in {{ic|/etc/rc.conf}}. The {{ic|rc.sysinit}} script that parses the {{Ic|USELVM}} variable entry will accept either {{Ic|yes}} or {{Ic|YES}}, however it will not accept mixed case.<br />
* Make sure that ''lvm2'' is in the HOOKS section of {{ic|/etc/mkinitcpio.conf}} just before the ''filesystems'' so that your kernel will find LVM volumes at boot time.<br />
* If your root filesystem ( "/" ) is put onto a logical volume, make sure regenerate kernel image based on above modified {{ic|/etc/mkinitcpio.conf}} by using below command so that bootloader can find your root during booting <br />
cd /boot <br />
mkinitcpio -p linux <br />
* Make sure {{ic|/boot/grub/menu.lst}} uses the right volumes for root. It should look something like this: (''Install Bootloader'')<br />
...<br />
(0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz26 '''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro<br />
initrd /kernel26.img<br />
...<br />
* If you are using LILO check {{ic|/etc/lilo.conf}}:<br />
image=/boot/vmlinuz26<br />
label=arch<br />
append="'''root=/dev/mapper/VolGroup00-lvolroot''' resume=/dev/mapper/VolGroup00-lvolswap ro"<br />
initrd=/boot/kernel26.img<br />
<br />
== Configuration ==<br />
=== Grow logical volume ===<br />
To grow a logical volume you first need to grow the logical volume and then the filesystem to use the newly created free space. Let us say we have a logical volume of 15GB with ext3 on it and we want to grow it to 20G. We need to do the following steps: <br />
# lvextend -L 20G VolGroup00/lvolhome (or lvresize -L +5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
You may use {{Ic|lvresize}} instead of {{Ic|lvextend}}.<br />
<br />
If you want to fill all the free space on a volume group, use the next command:<br />
# lvextend -l +100%FREE VolGroup00/lvolhome<br />
<br />
{{Warning|Not all filesystems support growing without loss of data and/or growing online.}}<br />
<br />
{{Note|If you do not resize your filesystem, you will still have a volume with the same size as before (volume will be bigger but partly unused).}}<br />
<br />
=== Shrink logical volume ===<br />
Because your filesystem is probably as big as the logical volume it resides on, you need to shrink the filesystem first and then shrink the logical volume. Depending on your filesystem, you may need to unmount it first. Let us say we have a logical volume of 15GB with ext3 on it and we want to shrink it to 10G. We need to do the following steps: <br />
# resize2fs /dev/VolGroup00/lvolhome 9G<br />
# lvreduce -L 10G VolGroup00/lvolhome (or lvresize -L -5G VolGroup00/lvolhome)<br />
# resize2fs /dev/VolGroup00/lvolhome<br />
Here we shrunk the filesystem more than needed so that when we shrunk the logical volume we did not accidentally cut off the end of the filesystem. After that we normally grow the filesystem to fill all free space left on logical volume. You may use {{Ic|lvresize}} instead of {{Ic|lvreduce}}.<br />
<br />
{{Warning|<br />
*Do not reduce the filesystem size to less than the amount of space occupied by data or you risk data loss.<br />
*Not all filesystems support shrinking without loss of data and/or shrinking online.}}<br />
<br />
{{Note|It is better to reduce the filesystem to a smaller size than the logical volume, so that after resizing the logical volume, we do not accidentally cut off some data from the end of the filesystem.}}<br />
<br />
=== Remove logical volume ===<br />
{{Warning|Before you remove a logical volume, make sure to move all data that you want to keep somewhere else, otherwise it will be lost!}}<br />
<br />
First, find out the name of the logical volume you want to remove. You can get a list of all logical volumes installed on the system with:<br />
<br />
{{bc|# lvs}}<br />
<br />
Next, look up the mountpoint for your chosen logical volume...:<br />
<br />
{{bc|$ df -h}}<br />
<br />
... and unmount it:<br />
<br />
{{bc|# umount /your_mountpoint}}<br />
<br />
Finally, remove the logical volume:<br />
<br />
{{bc|# lvremove /dev/yourVG/yourLV}}<br />
<br />
Confirm by typing "y" and you are done.<br />
<br />
Dont forget, to update /etc/fstab:<br />
<br />
{{bc|# sudo nano /etc/fstab}}<br />
<br />
You can verify the removal of your logical volume by typing "lvs" as root again (see first step of this section).<br />
<br />
=== Add partition to a volume group ===<br />
To add a partition to your volume group you must first make its type 'Linux LVM' (for example with {{Ic|cfdisk}}). Then you need to create a physical volume on it and extend the volume group over it:<br />
# pvcreate /dev/sdb1<br />
# vgextend VolGroup00 /dev/sdb1<br />
Now you have free space in your volume group that can be used by logical volumes in this group.<br />
<br />
{{Tip|You can add partitions from any disks to volume groups.}}<br />
<br />
=== Remove partition from a volume group ===<br />
All of the data on that partition needs to be moved to another partition. Fortunately, LVM makes this easy:<br />
# pvmove /dev/sdb1<br />
If you want to have the data on a specific physical volume, specify that as the second argument to {{Ic|pvmove}}:<br />
# pvmove /dev/sdb1 /dev/sdf1<br />
Then the physical volume needs to be removed from the volume group:<br />
# vgreduce myVg /dev/sdb1<br />
Or remove all empty physical volumes:<br />
# vgreduce --all vg0<br />
<br />
And lastly, if you want to use the partition for something else, and want to avoid LVM thinking that the partition is a physical volume:<br />
# pvremove /dev/sdb1<br />
<br />
=== Snapshots ===<br />
====Introduction====<br />
LVM allows you to take a snapshot of your system in a much more efficient way than a traditional backup. It does this efficiently by using a COW (copy-on-write) policy. The initial snapshot you take simply contains hard-links to the inodes of your actual data. So long as your data remains unchanged, the snapshot merely contains its inode pointers and not the data itself. Whenever you modify a file or directory that the snapshot points to, LVM automatically clones the data, the old copy referenced by the snapshot, and the new copy referenced by your active system. Thus, you can snapshot a system with 35GB of data using just 2GB of free space so long as you modify less than 2GB (on both the original and snapshot).<br />
<br />
====Configuration====<br />
You create snapshot logical volumes just like normal ones.<br />
<br />
# lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv<br />
With that volume, you may modify less than 100M of data, before the snapshot volume fills up.<br />
<br />
It is important to have the ''dm-snapshot'' module listed in the MODULES variable of {{ic|/etc/mkinitcpio.conf}}, otherwise the system will not boot. If you do this on an already installed system, make sure to rebuild the image with<br />
# mkinitcpio -g /boot/kernel26.img<br />
<br />
Todo: scripts to automate snapshots of root before updates, to rollback... updating {{ic|menu.lst}} to boot snapshots (separate article?)<br />
<br />
snapshots are primarily used to provide a frozen copy of a filesystem to make backups; a backup taking two hours provides a more consistent image of the filesystem than directly backing up the partition.<br />
<br />
== Troubleshooting ==<br />
===LVM commands do not work===<br />
*Load proper module:<br />
# modprobe dm_mod<br />
*Try preceding commands with ''lvm'' like this:<br />
# lvm pvdisplay<br />
<br />
=== Set Filesystem Mountpoints page does not show logical volumes ===<br />
If you are installing on a system where there is an existing volume group, you may find that even after doing "modprobe dm-mod" you do not see the list of logical volumes.<br />
<br />
In this case, you may also need to do:<br />
# vgscan<br />
or:<br />
# vgchange -ay <volgroup><br />
<br />
in order to activate the volume group and make the logical volumes available.<br />
<br />
===Receiving Input/Output Errors after plugging in a removable device with LVM partitions===<br />
Symptoms:<br />
~$ sudo vgscan<br />
Reading all physical volumes. This may take a while...<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 319836585984: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 319836643328: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 0: Input/output error<br />
/dev/backupdrive1/backup: read failed after 0 of 4096 at 4096: Input/output error<br />
Found volume group "backupdrive1" using metadata type lvm2<br />
Found volume group "networkdrive" using metadata type lvm2<br />
<br />
Cause:<br />
:Removing an external LVM drive without deactivating the volume group(s) first. Before you disconnect, make sure to:<br />
# vgchange -an <volume group name><br />
<br />
Fix: (assuming you already tried to activate the volume group with vgchange -ay <vg>, and are receiving the Input/output errors<br />
# vgchange -an <volume group name><br />
:Unplug the external drive and wait a few minutes<br />
# vgscan<br />
# vgchange -ay <volume group name><br />
<br />
== Additional resources ==<br />
* [http://sourceware.org/lvm2/ LVM2 Resource Page] on SourceWare.org<br />
* [http://tldp.org/HOWTO/LVM-HOWTO/ LVM HOWTO] article at The Linux Documentation Project<br />
* [http://www.gentoo.org/doc/en/lvm2.xml Gentoo LVM2 installation] guide at Gentoo Documentation<br />
* [http://en.gentoo-wiki.com/wiki/LVM LVM] article at Gentoo Wiki<br />
* [http://www.joshbryan.com/blog/2008/01/02/lvm2-mirrors-vs-md-raid-1LVM2 Mirrors vs. MD Raid 1] post by Josh Bryan</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175893Timidity++2011-12-26T00:51:29Z<p>Quark zju: /* timidity++ daemon mode plays sound out of pace, fix JACK link */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work, you may want to add following command as an auto start program in your desktop environment. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ daemon mode plays sound out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
And test it using aplaymidi. If this does not work, you may want to configure [[JACK]] and set timidity++'s output to jack.<br />
<br />
===timidity++ daemon mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO<br />
<br />
If you want to run timidity++ in background, do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175892Timidity++2011-12-26T00:50:50Z<p>Quark zju: /* timidity++ daemon mode plays sound out of pace, add links for jack */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work, you may want to add following command as an auto start program in your desktop environment. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ daemon mode plays sound out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
And test it using aplaymidi. If this does not work, you may want to configure [[jack]] and set timidity++'s output to jack.<br />
<br />
===timidity++ daemon mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO<br />
<br />
If you want to run timidity++ in background, do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175891Timidity++2011-12-26T00:49:35Z<p>Quark zju: /* Troubleshooting */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work, you may want to add following command as an auto start program in your desktop environment. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ daemon mode plays sound out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
And test it using aplaymidi. If this does not work, you may want to configure jack and set timidity++'s output to jack.<br />
<br />
===timidity++ daemon mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO<br />
<br />
If you want to run timidity++ in background, do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175890Timidity++2011-12-26T00:45:59Z<p>Quark zju: /* Daemon mode, reorder sentences */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work, you may want to add following command as an auto start program in your desktop environment. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ ALSA seq server mode output out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
===timidity++ ALSA seq server mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO &<br />
<br />
Do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175889Timidity++2011-12-26T00:43:24Z<p>Quark zju: /* Alsa daemon mode, explain why use this mode and add pulseaudio notes */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Daemon mode===<br />
Timidity can run as a daemon (ALSA sequencer client) providing MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.<br />
<br />
To do this (if you are not using PulseAudio):<br />
<br />
# rc.d start timidity++<br />
<br />
Add timidity++ to your daemon list in /etc/rc.conf to have permanent MIDI support:<br />
<br />
DAEMONS=(... timidity++ ...)<br />
<br />
If you are using PulseAudio, above methods may not work. Or if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:<br />
<br />
$ timidity -iA<br />
<br />
If you are using PulseAudio, add above command as one of your Desktop Environment auto start programs.<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ ALSA seq server mode output out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
===timidity++ ALSA seq server mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO &<br />
<br />
Do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175888Timidity++2011-12-26T00:27:57Z<p>Quark zju: /* Troubleshooting, add 2 situations related to timidity alsa seq mode */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Alsa daemon mode===<br />
If you want timidity to run as ALSA daemon, just use:<br />
# /etc/rc.d/timidity++ start<br />
<br />
If you want to have permanent MIDI support, add timidity to your daemon list in /etc/rc.conf:<br />
DAEMONS=(... timidity++ ...)<br />
<br />
Or if you just want to run timidity with ALSA support once, you can use the following command which will make console output viewable:<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===timidity++ ALSA seq server mode output out of pace===<br />
timidity++'s ALSA output module (default) may cause this issue in ALSA server mode. Try another output option, for example, libao:<br />
<br />
$ timidity -iA -OO<br />
<br />
===timidity++ ALSA seq server mode won't start===<br />
If you are using PulseAudio, instead of<br />
<br />
# rc.d start timidity++<br />
<br />
Start timidity++ in your Desktop Environment:<br />
<br />
$ timidity -iA -OO &<br />
<br />
Do not use timidity++'s daemonize option, use & instead.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175887Timidity++2011-12-26T00:17:31Z<p>Quark zju: /* Alsa daemon mode, fix a typo */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Alsa daemon mode===<br />
If you want timidity to run as ALSA daemon, just use:<br />
# /etc/rc.d/timidity++ start<br />
<br />
If you want to have permanent MIDI support, add timidity to your daemon list in /etc/rc.conf:<br />
DAEMONS=(... timidity++ ...)<br />
<br />
Or if you just want to run timidity with ALSA support once, you can use the following command which will make console output viewable:<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can now play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zjuhttps://wiki.archlinux.org/index.php?title=Timidity%2B%2B&diff=175886Timidity++2011-12-26T00:17:04Z<p>Quark zju: /* Alsa daemon mode, add aplaymidi as client example */</p>
<hr />
<div>[[Category: Audio/Video (English)]]<br />
timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.<br />
<br />
==Installing timidity++==<br />
The first step is to install timidity++ itself. It can be installed via pacman from the [[Pacman#Repositories|extra repository]]:<br />
# pacman -S timidity++<br />
<br />
'''However, timidity++ will not produce any sound yet'''. This is because timidity++ does not include any instrument samples. To produce sound, instrument patches and/or soundfonts need to be installed and timidity++ configured so it knows where to find them. This guide shows two ways of getting sound samples: [[Timidity#Freepats|Freepats]] and [[Timidity#Soundfonts|soundfonts]].<br />
<br />
==Setting up the sound samples==<br />
<br />
===Freepats===<br />
The [http://freepats.zenvoid.org/ Freepats] project provides a set of instrument samples which are compatible with timidity++. It can be installed from the [[Pacman#Repositories|community repository]]:<br />
# pacman -S timidity-freepats<br />
<br />
To use Freepats with timidity, add the following lines to /etc/timidity++/timidity.cfg:<br />
<br />
<pre><br />
dir /usr/share/timidity/freepats<br />
source /etc/timidity++/freepats/freepats.cfg<br />
</pre><br />
<br />
Then timidity++ is ready for use.<br />
<br />
===Soundfonts===<br />
There are many soundfonts available. This example will show how to install the fluidr3 soundfont, which is accessible via the [[AUR]].<br />
:'''Note:''' It will be assumed that you know how to build packages from the AUR. If you have never used the AUR before, please take a look at the [[AUR_User_Guidelines|AUR User Guidelines]].<br />
<br />
As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first. Notice that it is accessible via the [[AUR]].<br />
<br />
After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.<br />
<br />
If fluidr3 has been installed properly, we have to add its path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:<br />
soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
Then timidity++ is ready for use.<br />
<br />
==How to use timidity++==<br />
There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to [[ALSA]].<br />
<br />
===Standalone mode===<br />
You can simply use timidity++ to play MIDI files:<br />
$ timidity example.midi<br />
<br />
Add option -in or -ig for a text mode/gtk+ interface. E.g. as a Xfce/GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.<br />
<br />
===Alsa daemon mode===<br />
If you want timidity to run as ALSA daemon, just use:<br />
# /etc/rc.d/timidity++ start<br />
<br />
If you want to have permanent MIDI support, add timidity to your daemon list in /etc/rc.conf:<br />
DAEMONS=(... timidity++ ...)<br />
<br />
Or if you just want to run timidity with ALSA support once, you can use the following command which will make console output viewable:<br />
$ timidity -iA<br />
<br />
This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):<br />
<br />
$ aconnect -o<br />
client 128: 'TiMidity' [type=user]<br />
0 'TiMidity port 0 '<br />
1 'TiMidity port 1 '<br />
2 'TiMidity port 2 '<br />
3 'TiMidity port 3 '<br />
<br />
You can not play MIDI files using aplaymidi:<br />
<br />
$ aplaymidi filename.mid --port 128:0<br />
<br />
Another example is vkeybd, a virtual MIDI keyboard for X.<br />
<br />
You can install [http://aur.archlinux.org/packages.php?ID=19775 vkeybd] from the [[AUR]].<br />
<br />
$ vkeybd --addr 128:0<br />
<br />
Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages [http://aur.archlinux.org/packages.php?do_Details=1&ID=9668 patchage], [http://aur.archlinux.org/packages.php?ID=13818 kaconnect]. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes. See also [[USB_Midi_Keyboards|USB Midi Keyboards]].<br />
<br />
==Troubleshooting==<br />
===timidity++ does not play MIDI files===<br />
It may be that your soundfile is not set up correctly. Just run:<br />
$ timidity example.midi<br />
<br />
If you find a line like this in the terminal output, your soundfile is not set up properly.<br />
No instrument mapped to tone bank 0, program XX - \<br />
this instrument will not be heard<br />
<br />
Make sure you've installed some samples and your soundfile is added to /etc/timidity++/timidity.cfg. See [[Timidity#Setting up the sound samples|Setting up the sound samples]] above for more details.<br />
<br />
===How to make DOSBox use Timidity++===<br />
The following method is tested in version DOSBox 0.72 (don't know if this works for OLDER or NEWER!).<br />
<br />
First of all, you need to write a config file. Input the following in DOSBox to create a configuration file:<br />
config -writeconf dosbox.conf<br />
you can replace ''dosbox.conf'' by anyname that you want, add a dot in front of it if you want to hide it.<br />
<br />
Make sure you statred Timidity++ as DAEMON as the instructions above, use the ''aconnect'' command.<br />
<br />
Edit this configuration file with any editor, go to the section:<br />
[midi]<br />
mpu401=intelligent<br />
device=default<br />
config=<br />
put the ALSA connection port into the back of ''config='', in default:<br />
config=128:0<br />
<br />
Restart DOSBox within a terminal so you can see its debug messages, by no accident you should see a successful initiation on port 128:0.</div>Quark zju