https://wiki.archlinux.org/api.php?action=feedcontributions&user=Janotus&feedformat=atomArchWiki - User contributions [en]2024-03-28T23:33:12ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Radicale&diff=511267Radicale2018-02-17T13:42:52Z<p>Janotus: Package moved from AUR to community</p>
<hr />
<div>[[Category:WebDAV]]<br />
[[ja:Radicale]]<br />
{{Related articles start}}<br />
{{Related|DAViCal}}<br />
{{Related|Kcaldav}}<br />
{{Related|AgenDAV}}<br />
{{Related articles end}}<br />
<br />
[http://radicale.org/ Radicale] is a server designed to support the CalDav and CardDav protocols. It requires at least Python 3.3.<br />
<br />
== Installation ==<br />
<br />
{{warning|Radicale got a major release change. You need to export old version 1.x calendars *before* you install version 2.x. Please, [http://radicale.org/1to2/ read].}}<br />
<br />
[[Install]] the {{Pkg|radicale}} package.<br />
<br />
== Configuration ==<br />
<br />
The main configuration file is located at {{ic|/etc/radicale/config}}.<br />
<br />
Many of the configuration options can be changed on the command-line:<br />
<br />
$ radicale --help<br />
<br />
=== Integration ===<br />
<br />
Radicale can be integrated with HTTP webservers like Apache which support the mod_wgsi interface.<br />
This causes several options for the configuration of Radicale to be ignored, including: hosts, daemon, pid, ssl, certificate, key, protocol and ciphers keys in the [server] section of the config.<br />
Install the radicale module in the python path and write the .wgsi file (to document root).<br />
<br />
{{bc|1=<br />
# import radicale<br />
# radicale.log.start()<br />
# application = radicale.Application()}}<br />
<br />
The next step is to set up a virtual host for radicale.<br />
An example:<br />
<br />
{{bc|1=<br />
<VirtualHost *:80><br />
ServerName cal.yourdomain.org<br />
<br />
WSGIDaemonProcess radicale user=http group=http threads=1<br />
WSGIScriptAlias / /srv/http/radicale.wsgi<br />
<br />
<Directory /var/www><br />
WSGIProcessGroup radicale<br />
WSGIApplicationGroup %{GLOBAL}<br />
AllowOverride None<br />
Order allow,deny<br />
allow from all<br />
</Directory><br />
</VirtualHost>}}<br />
<br />
== Client support ==<br />
Since it uses the CalDav and CardDav protocols, it should support most clients. Currently, the officially supported list is this:<br />
* [[Thunderbird#Extensions|Thunderbird Lightning extension]]<br />
* [[GNOME/Evolution]]<br />
* KOrganizer {{Pkg|korganizer}}<br />
* InfCloud {{Aur|infcloud}}, CalDavZAP {{Aur|caldavzap}}, CardDavMATE {{Aur|carddavmate}}<br />
* syncEvolution {{Aur|syncevolution}}<br />
* aCal, ContactSync, CalendarSync, CalDAV-Sync CardDAV-Sync and DAVdroid for Google Android<br />
* Apple iOS<br />
* Mac OSX Calendar/Contacts<br />
<br />
== See also ==<br />
* [http://radicale.org/ Project Website radicale.org]</div>Janotushttps://wiki.archlinux.org/index.php?title=CPU_frequency_scaling&diff=257681CPU frequency scaling2013-05-19T02:48:15Z<p>Janotus: /* Privilege Granting Under GNOME */ Update for the use of logind</p>
<hr />
<div>[[Category:Power management]]<br />
[[Category:CPU]]<br />
[[cs:CPU Frequency Scaling]]<br />
[[de:Cpufrequtils]]<br />
[[el:CPU Frequency Scaling]]<br />
[[es:CPU Frequency Scaling]]<br />
[[fr:Cpufreq]]<br />
[[it:CPU Frequency Scaling]]<br />
[[pt:CPU Frequency Scaling]]<br />
[[ru:CPU Frequency Scaling]]<br />
[[sk:CPU Frequency Scaling]]<br />
[[tr:Işlemci_frekansını_ölçekleme]]<br />
[[zh-CN:CPU Frequency Scaling]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of the popular userspace tools for the kernel [http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq-info.html CPUfreq] subsystem.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Laptop Mode Tools|Laptop_Mode_Tools}}<br />
{{Article summary wiki|pm-utils}}<br />
{{Article summary wiki|PHC}}<br />
{{Article summary end}}<br />
<br />
{{Accuracy|This article needs cleanup in sections: acpid, laptop-mode-tools, and bios limitations.}}<br />
<br />
cpufreq refers to the kernel infrastructure that implements CPU frequency scaling. This technology enables the operating system to scale the CPU speed up or down in order to save power. CPU frequencies can be scaled automatically depending on the system load, in response to ACPI events, or manually by userspace programs.<br />
<br />
Since kernel 3.4 the necessary modules are loaded automatically and the recommended [[CPU_Frequency_Scaling#Scaling_governors|ondemand governor]] is enabled by default. However, userspace applications like [[#cpupower|cpupower]], [[acpid]], [[laptop-mode-tools]], or GUI tools provided for your desktop environment, may still be used for advanced configuration. <br />
<br />
== Userspace tools (cpupower) ==<br />
{{Pkg|cpupower}} is a set of userspace utilities designed to assist with ''CPU frequency scaling''. The package is not required to use scaling, but is highly recommended because it provides useful command-line utilities and a service to change the governor at boot.<br />
The configuration file for {{Pkg|cpupower}} is located in {{ic|/etc/default/cpupower}}. This configuration file is read by a bash script in {{ic|/usr/lib/systemd/scripts/cpupower}} which is activated by {{ic|systemd}} with {{ic|cpupower.service}}. To enable {{Pkg|cpupower}} on boot with {{Pkg|systemd}}, run<br />
<br />
# systemctl enable cpupower.service<br />
<br />
A frontend for gnome-shell can be found at [https://extensions.gnome.org/extension/444/cpu-freq/ CPU Freq].<br />
<br />
=== CPU frequency driver ===<br />
{{Note|As of kernel 3.4; the native cpu module is loaded automatically}}<br />
<br />
{{Pkg|cpupower}} requires modules (see table below) to know the limits of the native cpu. To see a full list of available modules, run<br />
<br />
$ ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq/<br />
<br />
{{Tip|To load the module at boot, run<br />
{{bc|<nowiki><br />
# echo <module> >/etc/modules-load.d/<module>.conf<br />
</nowiki>}}}}<br />
{{Note|Loading the wrong module will result in an error "No such device"}}<br />
Load the appropriate module with<br />
<br />
# modprobe <module><br />
<br />
{| border="1"<br />
!Module!!Description<br />
|-<br />
| acpi-cpufreq || CPUFreq driver which utilizes the ACPI Processor Performance States. This driver also supports Intel Enhanced SpeedStep (previously supported by the deprecated speedstep-centrino module).<br />
|-<br />
| speedstep-lib || CPUFreq drive for Intel speedstep enabled processors (mostly atoms and older pentiums (< 3)) <br />
|-<br />
| powernow-k8 || CPUFreq driver for K8/K10 Athlon64/Opteron/Phenom processors. '''Deprecated since linux 3.7 - Use acpi_cpufreq.'''<br />
|-<br />
| pcc-cpufreq || This driver supports Processor Clocking Control interface by Hewlett-Packard and Microsoft Corporation which is useful on some Proliant servers.<br />
|-<br />
| p4_clockmod || CPUFreq driver for Intel Pentium 4 / Xeon / Celeron processors. When enabled it will lower CPU temperature by skipping clocks.<br>You probably want to use a Speedstep driver instead.<br />
|}<br />
<br><br />
<br />
Once the appropriate cpufreq driver is loaded, detailed information about the CPU(s) can be displayed by running<br />
<br />
$ cpupower frequency-info<br />
<br />
=== Scaling governors ===<br />
<br />
Governors (see table below) are power schemes for the cpu. Only one may be active at a time. For details, see the [https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt official documentation] in the kernel source.<br />
<br />
{{Note|The kernel loads {{ic|on_demand}} by default.}}<br />
{| border="1"<br />
!Module!!Description<br />
|-<br />
| cpufreq_ondemand || Dynamically switch between CPU(s) available if at 95% cpu load<br />
|-<br />
| cpufreq_performance || Run the cpu at max frequency<br />
|-<br />
| cpufreq_conservative || Dynamically switch between CPU(s) available if at 75% load<br />
|-<br />
| cpufreq_powersave|| Run the cpu at the minimum frequency<br />
|-<br />
| cpufreq_userspace || Run the cpu at user specified frequencies<br />
|}<br />
<br><br />
<br />
{{Tip| To monitor cpu speed in real time, run:<br />
{{bc|<nowiki><br />
$ watch grep \"cpu MHz\" /proc/cpuinfo<br />
</nowiki>}}}}<br />
<br />
==== With cpupower ====<br />
To load and activate a particular governor, one should run <br />
<br />
# cpupower frequency-set -g <governor_without cpufreq_><br />
<br />
==== Without cpupower ====<br />
{{Tip|To load a governor at boot, run <br />
{{bc|<nowiki><br />
# echo <module> > /etc/modules-load.d/<module><br />
</nowiki>}}}}<br />
<br />
To load a particular governor, one should run<br />
<br />
# modprobe <governor><br />
<br />
=== Tuning governors (with cpupower) ===<br />
{{Tip|Add the following commands below to {{ic|/etc/default/cpupower}}. <percent> is the percentage of cpu load; <governor> is the cpupower governor}}<br />
To set the threshold for stepping up to another frequency<br />
<br />
# echo -n <percent> > /sys/devices/system/cpu/cpufreq/<governor>/up_threshold<br />
<br />
To set the threshold for stepping down to another frequency<br />
<br />
# echo -n <percent> > /sys/devices/system/cpu/cpufreq/<governor>/down_threshold<br />
<br />
===== Sampling rate =====<br />
The sampling rate determines how frequently the governor checks to tune the cpu<br />
Setting {{ic|sampling_down_factor}} greater than 1 improves performance by reducing the overhead of load evaluation and keeping the CPU at its highest clock frequency due to high load. This tunable has no effect on behavior at lower CPU frequencies/loads.<br />
<br />
To read the value (default = 1), run<br />
<br />
$ cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
<br />
To set the value, run <br />
<br />
# echo -n <value> > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
<br />
=== Setting Maximum and Minimum Frequencies ===<br />
<br />
{{Note|The governor, maximum, and minimum frequencies can be set in {{ic|/etc/default/cpupower}}. To adjust for only a single cpu core: {{ic| -c <core #>}}. <clock_freq> is a clock frequency with units : GHz,MHz}}<br />
To set the maximum clock frequency<br />
<br />
# cpupower frequency-set -u <clock_freq><br />
<br />
To set the minimum clock frequency<br />
<br />
# cpupower frequency-set -d <clock_freq><br />
<br />
To set the cpu to run at a specified frequency<br />
<br />
# cpupower frequency-set -f <clock_freq><br />
<br />
== Interaction with ACPI events ==<br />
<br />
Users may configure scaling governors to switch automatically based on different ACPI events such as connecting the AC adapter or closing a laptop lid. A quick example is given below, however it may be worth reading full article on [[acpid]].<br />
<br />
Events are defined in {{ic|/etc/acpi/handler.sh}}. If the {{Pkg|acpid}} package is installed, the file should already exist and be executable. For example, to change the scaling governor from {{ic|performance}} to {{ic|conservative}} when the AC adapter is disconnected and change it back if reconnected:<br />
<br />
{{hc<br />
|/etc/acpi/handler.sh<br />
|<nowiki><br />
[...]<br />
<br />
ac_adapter)<br />
case "$2" in<br />
AC*)<br />
case "$4" in<br />
00000000)<br />
echo "conservative" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor <br />
echo -n $minspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode start<br />
;;<br />
00000001)<br />
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
echo -n $maxspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode stop<br />
;;<br />
esac<br />
;;<br />
*) logger "ACPI action undefined: $2" ;;<br />
esac<br />
;;<br />
<br />
[...]<br />
</nowiki>}}<br />
<br />
<br />
== Privilege Granting Under GNOME ==<br />
{{Note|Systemd introduced logind which handles consolekit and policykit actions. The following code below does not work. With logind, simply edit in the file /usr/share/polkit-1/actions/org.gnome.cpufreqselector.policy the <defaults> elements according to your needs and the polkit manual [http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html].}}<br />
<br />
[[GNOME]] has a nice applet to change the governor on the fly. To use it without the need to enter the root password, simply create {{ic|/var/lib/polkit-1/localauthority/50-local.d/org.gnome.cpufreqselector.pkla}} and populate it with the following:<br />
<br />
{{bc|<nowiki>[org.gnome.cpufreqselector]<br />
Identity=unix-user:USER<br />
Action=org.gnome.cpufreqselector<br />
ResultAny=no<br />
ResultInactive=no<br />
ResultActive=yes</nowiki>}}0<br />
<br />
Where the word {{ic|USER}} is replaced with the username of interest.<br />
<br />
The {{AUR|desktop-privileges}} package in the [[Arch User Repository|AUR]] contains a similar {{ic|.pkla}} file for authorizing all users of the {{ic|power}} [[Users and Groups|group]] to change the governor.<br />
<br />
== Laptop Mode Tools ==<br />
If you are already using or plan to use [[Laptop Mode Tools]] for other power saving solutions, then you may want to let it also manage CPU frequency scaling. To do so, you just have to insert the appropriate frequency driver to the {{ic|/etc/modules.d/}} directory. (see [[#CPU frequency driver]] above) and then go through the {{ic|/etc/laptop-mode/conf.d/cpufreq.conf}} file to define governors, frequencies and policies. You will not need to load other modules and daemons or to set up scaling governors and interaction with ACPI events. Please refer to [[Laptop Mode Tools]] for more details.<br />
<br />
== Troubleshooting ==<br />
{{accuracy}}<br />
* Some applications, like [[ntop]], do not respond well to automatic frequency scaling. In the case of ntop it can result in segmentation faults and lots of lost information as even the {{ic|on-demand}} governor cannot change the frequency quickly enough when a lot of packets suddenly arrive at the monitored network interface that cannot be handled by the current processor speed.<br />
<br />
* Some CPU's may suffer from poor performance with the default settings of the {{ic|on-demand}} governor (e.g. flash videos not playing smoothly or stuttering window animations). Instead of completely disabling frequency scaling to resolve these issues, the aggressiveness of frequency scaling can be increased by lowering the ''up_threshold'' [[sysctl]] variable for each CPU. See [[#Changing the on-demand governor's threshold]].<br />
<br />
* Sometimes the on-demand governor may not throttle to the maximum frequency but one step below. This can be solved by setting max_freq value slightly higher than the real maximum. For example, if frequency range of the CPU is from 2.00 GHz to 3.00 GHz, setting max_freq to 3.01 GHz can be a good idea.<br />
<br />
* Some combinations of [[ALSA]] drivers and sound chips may cause audio skipping as the governor changes between frequencies, switching back to a non-changing governor seems to stop the audio skipping.<br />
<br />
=== BIOS frequency limitation ===<br />
Some CPU/BIOS configurations may have difficulties to scale to the maximum frequency or scale to higher frequencies at all. This is most likely caused by BIOS events telling the OS to limit the frequency resulting in {{ic|/sys/devices/system/cpu/cpu0/cpufreq/bios_limit}} set to a lower value.<br />
<br />
Either you just made a specific Setting in the BIOS Setup Utility, (Frequency, Thermal Management, etc.) you can blame a buggy/outdated BIOS or the BIOS might have a serious reason for throttling the CPU on it's own.<br />
<br />
Reasons like that can be (assuming your machine's a notebook) that the battery is removed (or near death) so you're on AC-power only. In this case a weak AC-source might not supply enough electricity to fulfill extreme peak demands by the overall system and as there is no battery to assist this could lead to data loss, data corruption or in worst case even hardware damage!<br />
<br />
Not all BIOS'es limit the CPU-Frequency in this case, but for example most IBM/Lenove Thinkpads do. Refer to thinkwiki for more [http://www.thinkwiki.org/wiki/Problem_with_CPU_frequency_scaling thinkpad related info on this topic].<br />
<br />
If you checked there's not just an odd BIOS setting and you know what you're doing you can make the Kernel ignore these BIOS-limitations.<br />
<br />
{{Warning|Make sure you read and understood the section above. CPU frequency limitation is a safety feature of your BIOS and you should not need to work around it.}}<br />
<br />
A special parameter has to be passed to the processor module.<br />
<br />
For trying this temporarily change the value in {{ic|/sys/module/processor/parameters/ignore_ppc}} from {{ic|0}} to {{ic|1}}.<br />
<br />
For setting it permanent refer to [[Kernel_modules#Configuration|Kernel modules]] or just read on.<br />
Add {{ic|1=processor.ignore_ppc=1}} to your kernel boot line or create<br />
{{hc|/etc/modprobe.d/ignore_ppc.conf|2=# If the frequency of your machine gets wrongly limited by BIOS, this should help<br />
options processor ignore_ppc=1}}</div>Janotushttps://wiki.archlinux.org/index.php?title=MIDI&diff=252102MIDI2013-03-27T16:02:27Z<p>Janotus: added the necessity of having fluidsynth installed for playing midi files in vlc</p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[ru:MIDI]]<br />
MIDI itself, which stands for "Musical Instrument Digital Interface", is just a protocol and standard for communication between musical instruments and any device that understands the language. It can be used to control an array of synthesizers, make a tin can sound like a drum, or even operate industrial equipments.<br />
<br />
The scope of this article, however, will mainly focus on the usage of MIDI in computer systems for playback of files that contain MIDI data. These files usually come with the '''.mid''' extension, and were hugely popular in the golden days of multimedia computing to share music. In professional music composition/arrangement, it still plays a vital role.<br />
<br />
== MIDI File ==<br />
Without going into the details of what the format is composed of, you just need to understand that a MIDI file eg. '''foobar.mid''' does not contain any digital audio data, hence no "PCM stream". It is a common misconception that MIDI is a sound file format, and as such you usually see people complaining that music players like Amarok cannot play the file. Here is a very newbie-friendly outline of what a MIDI/MID file contains:<br />
<br />
'''# FOOBAR.MID'''<br />
Note ON<br />
''Use Instrument #1''<br />
''Play Note C1''<br />
''Set Volume at 100''<br />
''Set Pitch at 50''<br />
<br />
In order for such a file to be useful, there needs to be an "engine" that can translate the data to music. This engine will have a "tone generator", and this is what we call a "synthesizer". So any player that can play back a MIDI file without MIDI-capable hardware (your computer's sound device), has a synthesizer built-in or uses an external one. A typical keyboard (not the thing you are typing on) is actually made up of two components - a MIDI "controller" (the keys) and a synthesizer (tone generator/module; the thing that makes sound).<br />
<br />
So up to this point, you should be able to understand that:<br />
<br />
* There needs to be a synthesizer to play a MIDI file.<br />
* A synthesizer can be hardware or software.<br />
* Most computer soundcards/chipsets do NOT have synthesizers.<br />
* You need a synthesizer with a proper "bank" (collection of sounds) to be able to enjoy all the glory of MIDI files.<br />
* If a certain instrument is not in the bank, your synthesizer will not play anything for notes using that instrument.<br />
* If a certain instrument in the file corresponds to a different one in the bank, your synthesizer will play a different sound (obviously).<br />
<br />
== GM Bank ==<br />
General MIDI (GM) is a specification to standardise numerous MIDI-related matters, particularly that of instruments layout in a collection of sounds. A "soundbank" which is GM-compatible means that it meets the criteria of General MIDI, and as long as the MIDI file is also GM-compatible (as in nothing extraordinary is defined - such as introducing a new instrument or having one in a different location of the bank), the playback will be as intended since the bank has the correct instrument/handler for the MIDI message/event. One of the most popular soundbank formats is that of '''SoundFont''', particularly ''SF2''.<br />
<br />
* If you have a soundcard which can make use of soundfonts, you can load a '''.sf2''' file onto it.<br />
<br />
* If you do not have a soundcard which can make use of soundfonts (basically no hardware synthesizer), you can use a software synthesizer and load the SF2 file. In turn, you can find some way to globally make use of this synthesizer.<br />
<br />
= Playback =<br />
"Why can I play MIDI with Windows Media Player, then?"<br />
<br />
Well, because Windows has a default software synthesizer which acts globally. Even then, it lacks the quality which should be expected of modern computers. If there were a way to do it on Linux, you would be able to play back MIDI from any player too. Perhaps a MIDI server (which will hold a synthesizer of choice like {{pkg|TiMidity++}} or {{pkg|FluidSynth}}) that sits within the sound server, like Phonon or PulseAudio. Nevertheless, nothing of this sort has been implemented and you can only play MIDI with a player that has a plug-in to source a synthesizer (for example {{pkg|XMMS}} or {{pkg|Audacious}}) or has a synthesizer itself.<br />
<br />
== Hardware ==<br />
''(More details on soundcards and MIDI, possibly links to SBLive MIDI here...)''<br />
====SB Audigy 1 - Emu10k1 WaveTable====<br />
First, make sure that the '''Synth''' mixer control is not muted and that '''Audigy Analog/Digital output Jack''' is set to '''[Off]'''.<br><br />
To check and adjust them, use {{ic|alsamixer}} or your mixer of choice.<br />
<br />
Next, build and install the {{AUR|awesfx}} package from the [[AUR]]. Then, load a SoundFont file on the Emux WaveTable, like so:<br />
$ asfxload /path/to/any/file.sf2<br />
The .SF2 file can be any SoundFont. If you have access to ''2GMGSMT.SF2'' on Windows, you can use that one.<br />
<br />
<br />
You should be all set now. If you want to play your .mid files in [[Audacious]], you will need to configure it as follows:<br />
* File > Preferences > Plugins > Input > AMIDI-Plug > Preferences<br />
** AMIDI PLug (tab) > Backend selection > ALSA Backend<br />
** ALSA Backend (tab)<br />
*** 17:0 Emu10k1 WaveTable Emu10k1 Port 0<br />
*** 17:1 Emu10k1 WaveTable Emu10k1 Port 1<br />
*** 17:2 Emu10k1 WaveTable Emu10k1 Port 2<br />
*** 17:3 Emu10k1 WaveTable Emu10k1 Port 3<br />
*** Mixer settings > Soundcard > SB Audigy 1 [SB0092]<br />
*** Mixer control > Synth<br />
<br />
== Software ==<br />
(Details on options available, like TiMidity++ or FluidSynth. Can be merged or linked if page exists, eg. there's an article for [[Timidity]] already.)<br />
=== VLC ===<br />
You can play MIDI files on VLC if you configure the location of the Sound Font file. Previously you need to install a [[Timidity#Soundfonts|sound sample]], as well as the [https://www.archlinux.org/packages/?q=fluidsynth fluidsynth] package.<br />
<br />
On VLC -> Tools -> Preferences<br />
<br />
You have to show all settings. Then, go to input/codecs -> audio codecs -> FluidSynth.<br />
<br />
And, if you installed fluidr3 as wiki says, set the location to:<br />
<br />
/usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
=== [[Timidity|Timidity++]] ===<br />
MIDI to WAVE converter and player.<br />
<br />
=== [[FluidSynth|FluidSynth]] ===<br />
MIDI player and a daemon adding MIDI support to ALSA.<br />
<br />
= External Links =<br />
[http://home.roadrunner.com/~infofiles/midi.html set up midi]</div>Janotushttps://wiki.archlinux.org/index.php?title=MIDI&diff=252060MIDI2013-03-27T06:53:15Z<p>Janotus: Undo revision 251981 by Janotus (talk) : irrelevant modification deleted</p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[ru:MIDI]]<br />
MIDI itself, which stands for "Musical Instrument Digital Interface", is just a protocol and standard for communication between musical instruments and any device that understands the language. It can be used to control an array of synthesizers, make a tin can sound like a drum, or even operate industrial equipments.<br />
<br />
The scope of this article, however, will mainly focus on the usage of MIDI in computer systems for playback of files that contain MIDI data. These files usually come with the '''.mid''' extension, and were hugely popular in the golden days of multimedia computing to share music. In professional music composition/arrangement, it still plays a vital role.<br />
<br />
== MIDI File ==<br />
Without going into the details of what the format is composed of, you just need to understand that a MIDI file eg. '''foobar.mid''' does not contain any digital audio data, hence no "PCM stream". It is a common misconception that MIDI is a sound file format, and as such you usually see people complaining that music players like Amarok cannot play the file. Here is a very newbie-friendly outline of what a MIDI/MID file contains:<br />
<br />
'''# FOOBAR.MID'''<br />
Note ON<br />
''Use Instrument #1''<br />
''Play Note C1''<br />
''Set Volume at 100''<br />
''Set Pitch at 50''<br />
<br />
In order for such a file to be useful, there needs to be an "engine" that can translate the data to music. This engine will have a "tone generator", and this is what we call a "synthesizer". So any player that can play back a MIDI file without MIDI-capable hardware (your computer's sound device), has a synthesizer built-in or uses an external one. A typical keyboard (not the thing you are typing on) is actually made up of two components - a MIDI "controller" (the keys) and a synthesizer (tone generator/module; the thing that makes sound).<br />
<br />
So up to this point, you should be able to understand that:<br />
<br />
* There needs to be a synthesizer to play a MIDI file.<br />
* A synthesizer can be hardware or software.<br />
* Most computer soundcards/chipsets do NOT have synthesizers.<br />
* You need a synthesizer with a proper "bank" (collection of sounds) to be able to enjoy all the glory of MIDI files.<br />
* If a certain instrument is not in the bank, your synthesizer will not play anything for notes using that instrument.<br />
* If a certain instrument in the file corresponds to a different one in the bank, your synthesizer will play a different sound (obviously).<br />
<br />
== GM Bank ==<br />
General MIDI (GM) is a specification to standardise numerous MIDI-related matters, particularly that of instruments layout in a collection of sounds. A "soundbank" which is GM-compatible means that it meets the criteria of General MIDI, and as long as the MIDI file is also GM-compatible (as in nothing extraordinary is defined - such as introducing a new instrument or having one in a different location of the bank), the playback will be as intended since the bank has the correct instrument/handler for the MIDI message/event. One of the most popular soundbank formats is that of '''SoundFont''', particularly ''SF2''.<br />
<br />
* If you have a soundcard which can make use of soundfonts, you can load a '''.sf2''' file onto it.<br />
<br />
* If you do not have a soundcard which can make use of soundfonts (basically no hardware synthesizer), you can use a software synthesizer and load the SF2 file. In turn, you can find some way to globally make use of this synthesizer.<br />
<br />
= Playback =<br />
"Why can I play MIDI with Windows Media Player, then?"<br />
<br />
Well, because Windows has a default software synthesizer which acts globally. Even then, it lacks the quality which should be expected of modern computers. If there were a way to do it on Linux, you would be able to play back MIDI from any player too. Perhaps a MIDI server (which will hold a synthesizer of choice like {{pkg|TiMidity++}} or {{pkg|FluidSynth}}) that sits within the sound server, like Phonon or PulseAudio. Nevertheless, nothing of this sort has been implemented and you can only play MIDI with a player that has a plug-in to source a synthesizer (for example {{pkg|XMMS}} or {{pkg|Audacious}}) or has a synthesizer itself.<br />
<br />
== Hardware ==<br />
''(More details on soundcards and MIDI, possibly links to SBLive MIDI here...)''<br />
====SB Audigy 1 - Emu10k1 WaveTable====<br />
First, make sure that the '''Synth''' mixer control is not muted and that '''Audigy Analog/Digital output Jack''' is set to '''[Off]'''.<br><br />
To check and adjust them, use {{ic|alsamixer}} or your mixer of choice.<br />
<br />
Next, build and install the {{AUR|awesfx}} package from the [[AUR]]. Then, load a SoundFont file on the Emux WaveTable, like so:<br />
$ asfxload /path/to/any/file.sf2<br />
The .SF2 file can be any SoundFont. If you have access to ''2GMGSMT.SF2'' on Windows, you can use that one.<br />
<br />
<br />
You should be all set now. If you want to play your .mid files in [[Audacious]], you will need to configure it as follows:<br />
* File > Preferences > Plugins > Input > AMIDI-Plug > Preferences<br />
** AMIDI PLug (tab) > Backend selection > ALSA Backend<br />
** ALSA Backend (tab)<br />
*** 17:0 Emu10k1 WaveTable Emu10k1 Port 0<br />
*** 17:1 Emu10k1 WaveTable Emu10k1 Port 1<br />
*** 17:2 Emu10k1 WaveTable Emu10k1 Port 2<br />
*** 17:3 Emu10k1 WaveTable Emu10k1 Port 3<br />
*** Mixer settings > Soundcard > SB Audigy 1 [SB0092]<br />
*** Mixer control > Synth<br />
<br />
== Software ==<br />
(Details on options available, like TiMidity++ or FluidSynth. Can be merged or linked if page exists, eg. there's an article for [[Timidity]] already.)<br />
=== VLC ===<br />
You can play MIDI files on VLC if you configure the location of the Sound Font file. Previously you need install a [[Timidity#Soundfonts|sound sample]].<br />
<br />
On VLC -> Tools -> Preferences<br />
<br />
You have to show all settings. Then, go to input/codecs -> audio codecs -> FluidSynth.<br />
<br />
And, if you installed fluidr3 as wiki says, set the location to:<br />
<br />
/usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
=== [[Timidity|Timidity++]] ===<br />
MIDI to WAVE converter and player.<br />
<br />
=== [[FluidSynth|FluidSynth]] ===<br />
MIDI player and a daemon adding MIDI support to ALSA.<br />
<br />
= External Links =<br />
[http://home.roadrunner.com/~infofiles/midi.html set up midi]</div>Janotushttps://wiki.archlinux.org/index.php?title=MIDI&diff=251981MIDI2013-03-26T15:08:50Z<p>Janotus: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[ru:MIDI]]<br />
MIDI itself, which stands for "Musical Instrument Digital Interface", is just a protocol and standard for communication between musical instruments and any device that understands the language. It can be used to control an array of synthesizers, make a tin can sound like a drum, or even operate industrial equipments.<br />
<br />
The scope of this article, however, will mainly focus on the usage of MIDI in computer systems for playback of files that contain MIDI data. These files usually come with the '''.mid''' extension, and were hugely popular in the golden days of multimedia computing to share music. In professional music composition/arrangement, it still plays a vital role.<br />
<br />
== MIDI File ==<br />
Without going into the details of what the format is composed of, you just need to understand that a MIDI file eg. '''foobar.mid''' does not contain any digital audio data, hence no "PCM stream". It is a common misconception that MIDI is a sound file format, and as such you usually see people complaining that music players like Amarok cannot play the file. Here is a very newbie-friendly outline of what a MIDI/MID file contains:<br />
<br />
'''# FOOBAR.MID'''<br />
Note ON<br />
''Use Instrument #1''<br />
''Play Note C1''<br />
''Set Volume at 100''<br />
''Set Pitch at 50''<br />
<br />
In order for such a file to be useful, there needs to be an "engine" that can translate the data to music. This engine will have a "tone generator", and this is what we call a "synthesizer". So any player that can play back a MIDI file without MIDI-capable hardware (your computer's sound device), has a synthesizer built-in or uses an external one. A typical keyboard (not the thing you are typing on) is actually made up of two components - a MIDI "controller" (the keys) and a synthesizer (tone generator/module; the thing that makes sound).<br />
<br />
So up to this point, you should be able to understand that:<br />
<br />
* There needs to be a synthesizer to play a MIDI file.<br />
* A synthesizer can be hardware or software.<br />
* Most computer soundcards/chipsets do NOT have synthesizers.<br />
* You need a synthesizer with a proper "bank" (collection of sounds) to be able to enjoy all the glory of MIDI files.<br />
* If a certain instrument is not in the bank, your synthesizer will not play anything for notes using that instrument.<br />
* If a certain instrument in the file corresponds to a different one in the bank, your synthesizer will play a different sound (obviously).<br />
<br />
== GM Bank ==<br />
General MIDI (GM) is a specification to standardise numerous MIDI-related matters, particularly that of instruments layout in a collection of sounds. A "soundbank" which is GM-compatible means that it meets the criteria of General MIDI, and as long as the MIDI file is also GM-compatible (as in nothing extraordinary is defined - such as introducing a new instrument or having one in a different location of the bank), the playback will be as intended since the bank has the correct instrument/handler for the MIDI message/event. One of the most popular soundbank formats is that of '''SoundFont''', particularly ''SF2''.<br />
<br />
* If you have a soundcard which can make use of soundfonts, you can load a '''.sf2''' file onto it.<br />
<br />
* If you do not have a soundcard which can make use of soundfonts (basically no hardware synthesizer), you can use a software synthesizer and load the SF2 file. In turn, you can find some way to globally make use of this synthesizer.<br />
<br />
= Playback =<br />
"Why can I play MIDI with Windows Media Player, then?"<br />
<br />
Well, because Windows has a default software synthesizer which acts globally. Even then, it lacks the quality which should be expected of modern computers. If there were a way to do it on Linux, you would be able to play back MIDI from any player too. Perhaps a MIDI server (which will hold a synthesizer of choice like {{pkg|TiMidity++}} or {{pkg|FluidSynth}}) that sits within the sound server, like Phonon or PulseAudio. Nevertheless, nothing of this sort has been implemented and you can only play MIDI with a player that has a plug-in to source a synthesizer (for example {{pkg|XMMS}} or {{pkg|Audacious}}) or has a synthesizer itself.<br />
<br />
== Hardware ==<br />
''(More details on soundcards and MIDI, possibly links to SBLive MIDI here...)''<br />
====SB Audigy 1 - Emu10k1 WaveTable====<br />
First, make sure that the '''Synth''' mixer control is not muted and that '''Audigy Analog/Digital output Jack''' is set to '''[Off]'''.<br><br />
To check and adjust them, use {{ic|alsamixer}} or your mixer of choice.<br />
<br />
Next, build and install the {{AUR|awesfx}} package from the [[AUR]]. Then, load a SoundFont file on the Emux WaveTable, like so:<br />
$ asfxload /path/to/any/file.sf2<br />
The .SF2 file can be any SoundFont. If you have access to ''2GMGSMT.SF2'' on Windows, you can use that one.<br />
<br />
<br />
You should be all set now. If you want to play your .mid files in [[Audacious]], you will need to configure it as follows:<br />
* File > Preferences > Plugins > Input > AMIDI-Plug > Preferences<br />
** AMIDI PLug (tab) > Backend selection > ALSA Backend<br />
** ALSA Backend (tab)<br />
*** 17:0 Emu10k1 WaveTable Emu10k1 Port 0<br />
*** 17:1 Emu10k1 WaveTable Emu10k1 Port 1<br />
*** 17:2 Emu10k1 WaveTable Emu10k1 Port 2<br />
*** 17:3 Emu10k1 WaveTable Emu10k1 Port 3<br />
*** Mixer settings > Soundcard > SB Audigy 1 [SB0092]<br />
*** Mixer control > Synth<br />
<br />
== Software ==<br />
(Details on options available, like TiMidity++ or FluidSynth. Can be merged or linked if page exists, eg. there's an article for [[Timidity]] already.)<br />
=== VLC ===<br />
{{Note|Current VLC package (2.0.5-4) isn't compiled with the --enable-fluidsynth option, and therefore won't allow the following setting (which remains correct on a properly compiled package). See [https://bugs.archlinux.org/task/34453 this feature request] for more details.}}<br />
You can play MIDI files on VLC if you configure the location of the Sound Font file. Previously you need install a [[Timidity#Soundfonts|sound sample]].<br />
<br />
On VLC -> Tools -> Preferences<br />
<br />
You have to show all settings. Then, go to input/codecs -> audio codecs -> FluidSynth.<br />
<br />
And, if you installed fluidr3 as wiki says, set the location to:<br />
<br />
/usr/share/soundfonts/fluidr3/FluidR3GM.SF2<br />
<br />
=== [[Timidity|Timidity++]] ===<br />
MIDI to WAVE converter and player.<br />
<br />
=== [[FluidSynth|FluidSynth]] ===<br />
MIDI player and a daemon adding MIDI support to ALSA.<br />
<br />
= External Links =<br />
[http://home.roadrunner.com/~infofiles/midi.html set up midi]</div>Janotushttps://wiki.archlinux.org/index.php?title=PCManFM&diff=225413PCManFM2012-09-26T23:03:01Z<p>Janotus: /* No "Applications" */ --> More details on how to fix the problem</p>
<hr />
<div>[[Category:File managers]]<br />
[[cs:PCManFM]]<br />
[[fr:PCManFM]]<br />
[[id:PCManFM]]<br />
[[pl:PCManFM]]<br />
[[ru:PCManFM]]<br />
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).<br />
<br />
==Installation==<br />
Run the following command to install:<br />
# pacman -S pcmanfm<br />
<br />
You will also require [[gamin]] (a replacement for [[FAM]], which required a daemon) to pick up events such as file and directories changes:<br />
<br />
# pacman -S gamin<br />
<br />
==Volume handling==<br />
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as [[pmount]]. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.<br />
{{Note|You must have a {{ic|/media}} folder.}}<br />
===Mounting with udisks===<br />
The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the [[D-Bus]] page for details. Note that you will most likely need to start dbus-launch from your [[xinitrc|.xinitrc]] or the autostart script of your window manager. Instructions on how to do so can be found on the [[D-Bus]] page or the page for your [[window manager]].<br />
<br />
===Mounting with gvfs===<br />
If you prefer to use the Gnome Virtual FileSystem, the procedure is the same as before but requires additional packages:<br />
<br />
* [[gvfs]] (and dependencies);<br />
* (optional) gvfs-smb, gvfs-obexftp, gvfs-afc, etc. in order to support additional features.<br />
<br />
===Mounting as normal user===<br />
To be able to mount devices like removeable USB harddisks, flashdrives or DVDs as a normal user, the [[PolicyKit]] toolkit needs to be configured accordingly. The configuration files can be found in the subdirectories of {{ic|/etc/polkit-1}}. The rest of this section will show you how to configure PolicyKit to allow users belonging to the "storage" group to mount and umount temporary devices.<br />
{{ Note | If you use a [[Display Manager]] ([[SLiM]], for example), you may find that this method does not work. Adding '''''ck-launch-session dbus-launch''''' after the exec statement in the login_cmd option (or a similar option in a different DM) usually helps.}}<br />
{{Note | Currently PolicyKit is configured to allow (un)mounting for users in group ''storage'' by default. Therefore this step is not necessary.}}<br />
<br />
As root create {{ic|/etc/polkit-1/localauthority/50-local.d/55-myconf.pkla}} (or some other filename of your choosing ending with .pkla) containing:<br />
<pre style='overflow:auto'><br />
[Storage Permissions]<br />
Identity=unix-group:storage<br />
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown<br />
ResultAny=yes<br />
ResultActive=yes<br />
ResultInactive=no<br />
</pre><br />
<br />
{{Note | If udisks2 is installed instead of udisks, use this line instead of the above: <br><br />
Action&#61;org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.drive-eject;org.freedesktop.udisks2.drive-detach;org.freedesktop.udisks2.luks-unlock;org.freedesktop.udisks2.inhibit-polling;org.freedesktop.udisks2.drive-set-spindown;org.freedesktop.udisks2.modify-device }}<br />
<br />
PolicyKit will notice the changes in the file and update its behavior without any action from you. Last thing to do is making every user that should have the ability to mount drives a member of the storage group:<br />
# usermod -a -G storage USERNAME<br />
<br />
If you want to grant other permissions instead of granting them to members of the storage group, or simply want to know what you were just doing, check out the manpage:<br />
$ man pklocalauthority<br />
<br />
==Tips & troubleshooting==<br />
===No "Applications"===<br />
# pacman -S gnome-menus<br />
You can try this method: Delete all files in the $HOME/.cache/menus directory, and run PCManFM again.<br />
<br />
PCManFM requires the environment variable "XDG_MENU_PREFIX" to be set. The value of the variable should match the beginning of a file present in the "/etc/xdg/menus/" directory. In case you have installed the "gnome-menus" package, you can set the value in your .xinitrc file with the line :<br />
$ export XDG_MENU_PREFIX=gnome-<br />
See these threads for more informations : [https://bbs.archlinux.org/viewtopic.php?pid=1110903], and especially this post from the Linux Mint Forums [http://forums.linuxmint.com/viewtopic.php?f=175&t=53986#p501920]<br />
<br />
===Trashcan not working?===<br />
# pacman -S gvfs consolekit<br />
Make sure that you also add "ck-launch-session dbus-launch" (in this order) to the exec statement which launches your window manager/desktop environment in{{ic|.xinitrc}}.<br />
<br />
So for example<br />
<br />
exec openbox-session<br />
<br />
would become<br />
<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
Be aware, gvfs requires many gnome dependencies.<br />
<br />
=== "Not authorized to perform operation" ===<br />
If this message pups up when mounting internal devices, then install {{pkg|polkit-gnome}} which provides an authentication.<br />
# pacman -S polkit-gnome <br />
<br />
===Not able to mount USB or other devices?===<br />
# pacman -S consolekit<br />
Make sure that you also add "ck-launch-session dbus-launch"(in this order) to {{ic|.xinitrc}}. Paradoxically, sometimes you can enable mounting by removing <br />
"ck-launch-session dbus-launch" from {{ic|.xinitrc}}.<br />
<br />
===No icons?===<br />
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:<br />
# pacman -S tangerine-icon-theme<br />
<br />
Then edit {{ic|~/.gtkrc-2.0}} '''or''' {{ic|/etc/gtk-2.0/gtkrc}} and add the following line:<br />
gtk-icon-theme-name = "Tangerine"<br />
<br />
===NTFS Read/Write Support===<br />
Install ntfs-3g (See [[NTFS-3G]]):<br />
# pacman -S ntfs-3g<br />
<br />
===gnome-open opens "Find" dialog instead of the directory===<br />
Remove or rename the file {{ic|/usr/share/applications/pcmanfm-find.desktop}}. If you're running pcmanfm-mod from AUR, remove or rename the file {{ic|/usr/share/applications/pcmanfm-mod-find.desktop}}.<br />
<br />
===No "Previous/Next Folder" functionality with mouse buttons===<br />
A method to fix this is with [[Xbindkeys]]:<br />
<br />
Install xbindkeys:<br />
# pacman -S xbindkeys<br />
Edit ~/.xbindkeysrc to contain the following:<br />
# Sample .xbindkeysrc for a G9x mouse.<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"<br />
b:8<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"<br />
b:9<br />
Actual button codes can be obtained with xev[http://www.archlinux.org/packages/extra/i686/xorg-xev/].<br />
<br />
Add<br />
xbindkeys &<br />
to your {{ic|~/.xinitrc}} to execute xbindkeys on log-in.<br />
<br />
===--desktop parameter not working / crashing X-server===<br />
Make sure you have ownership and write permissions on {{ic|~/.config/pcmanfm}}<br />
<br />
Setting the wallpaper either by using the --desktop-pref parameter or editing {{ic|~/.config/pcmanfm/default/pcmanfm.config}} solves the problem.<br />
<br />
===Terminal emulator advanced configuration not saved===<br />
Make sure you have rights on libfm configuration file:<br />
<br />
# chmod -R 755 ~/.config/libfm<br />
# chmod 777 ~/.config/libfm/libfm.conf<br />
<br />
===Make PCManFM remember your preferred Sort Files settings===<br />
You can use View | Sort Files to change the order in which PCManFM lists the files, but PCManFM won't remember that the next time you start it. To make it remember, go to Edit | Preferences and Close. That will write your current sort_type and sort_by values into ~/.config/pcmanfm/LXDE/pcmanfm.conf.<br />
<br />
==Available Versions==<br />
There are several versions of PCManFM currently available:<br />
<br />
===PCManFM2===<br />
This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as [https://aur.archlinux.org/packages.php?ID=33601 pcmanfm-git]. More information is available on the [http://forum.lxde.org/viewforum.php?f=22 LXDE Forum].<br />
<br />
===PCManFM 0.5.2===<br />
The legacy PCManFM (version 0.5.2, which is currently "pcmanfm-gtk220" in the AUR repository) is frozen and is no longer being maintained by the original author. This version uses HAL for mounting. More information is available on the [http://pcmanfm.sourceforge.net/intro.html project page].<br />
<br />
===PCManFM-Mod===<br />
PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system. This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs. PCManFM-Mod is available in the [https://aur.archlinux.org/packages.php?ID=34819 AUR as pcmanfm-mod] and as [https://aur.archlinux.org/packages.php?ID=39547 pcmanfm-mod-prov] (latter provides pcmanfm). More information is available at [http://igurublog.wordpress.com/downloads/mod-pcmanfm/ IgnorantGuru's Blog].<br />
<br />
===PCManFM_with_Search===<br />
Latest PCmanFM version with search dialog in the [[AUR]] as {{aur|pcmanfm_with_search}}.</div>Janotushttps://wiki.archlinux.org/index.php?title=User:Janotus&diff=224734User:Janotus2012-09-23T14:10:03Z<p>Janotus: Created page with "Why are you here ?"</p>
<hr />
<div>Why are you here ?</div>Janotushttps://wiki.archlinux.org/index.php?title=VirtualBox&diff=224733VirtualBox2012-09-23T14:07:08Z<p>Janotus: Replacing 'virtualbox-guest-additions' (pkg no longer exists) by 'virtualbox-guest-utils'</p>
<hr />
<div>[[Category:Emulators]]<br />
[[Category:Virtualization]]<br />
[[cs:VirtualBox]]<br />
[[es:VirtualBox]]<br />
[[fr:VirtualBox]]<br />
[[hu:VirtualBox]]<br />
[[it:VirtualBox]]<br />
[[pt:VirtualBox]]<br />
[[ru:VirtualBox]]<br />
[[zh-CN:VirtualBox]]<br />
{{Article summary start}}<br />
{{Article summary text|This article is about basic usage of VirtualBox, including running the VirtualBox software within an Arch ''host'', and running an Arch ''guest'' inside a VirtualBox virtual machine.}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|VirtualBox|https://www.virtualbox.org}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|VirtualBox Extras}}<br />
{{Article summary wiki|PhpVirtualBox}}<br />
{{Article summary wiki|VirtualBox Arch Linux Guest On Physical Drive}}<br />
{{Article summary wiki|Advanced VirtualBox Networking}}<br />
{{Article summary wiki|Installing Arch Linux from VirtualBox}}<br />
{{Article summary end}}<br />
<br />
'''VirtualBox''' is a virtual PC emulator like [[VMware]]. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a [[Qt]] GUI interface, as well as headless and [[Wikipedia:SDL|SDL]] command line tools for managing and running virtual machines. It includes ''guest additions'' for some guest operating systems, which integrate functions of the guest and host systems, including sharing files, the clipboard, video acceleration and a “seamless” window integration mode.<br />
<br />
{{Wikipedia|VirtualBox}}<br />
<br />
== Installation on host ==<br />
<br />
The basic GPL-licensed VirtualBox suite can be [[pacman|installed]] with the {{Pkg|virtualbox}} package, found in the [[official repositories]]. You will need to install {{pkg|virtualbox-host-modules}} separately, if it is not installed with the the {{Pkg|virtualbox}} package, which contains the precompiled modules for the stock archlinux kernel. For custom kernels, read [[#Hosts running a custom kernel|the section below]].<br />
<br />
In order to use the graphical interface, based on [[Qt]] ({{ic|VirtualBox}} command), you will also need to install the {{Pkg|qt}} package. This is not required for the simpler SDL-only GUI ({{ic|VBoxSDL}} command) nor for the {{ic|VBoxHeadless}} command.<br />
<br />
If you are using the {{pkg|linux-lts}} kernel you should install also the {{pkg|virtualbox-host-modules-lts}} package.<br />
<br />
=== Hosts running a custom kernel ===<br />
<br />
VirtualBox works just fine with custom kernels such as [[Linux-ck]] ''without'' the need to keep any of the official ARCH kernel packages on the system. The trick to keeping pacman from bringing down the ARCH kernel packages is to install virtualbox with the {{Pkg|virtualbox-host-source}} package, which contains the source for the virtualbox kernel modules. See {{Bug|26721}} for further explanations.<br />
<br />
Once {{Pkg|virtualbox-host-source}} is installed, simply generate the kernel modules for your custom kernel by running:<br />
<br />
# dkms install vboxhost/<virtualbox-host-source version> -k <your custom kernel's version>/<your architecture><br />
<br />
Which for the lazy is the command:<br />
<br />
# dkms install vboxhost/$(pacman -Q virtualbox|awk {'print $2'}|sed 's/\-.\+//') -k $(uname -rm|sed 's/\ /\//')<br />
<br />
and load it:<br />
<br />
# modprobe vboxdrv<br />
<br />
{{Note|(Not working currently) To load/compile virtualbox modules automatically at startup you can install and add {{pkg|dkms}} in your DAEMONS array.}}<br />
<br />
==== Automatic re-compilation of the virtualbox modules with every update of a custom kernel====<br />
<br />
{{Note|The hook has been updated to run dkms (not as a daemon) instead of vboxbuild.}}<br />
This is possible thanks to {{AUR|virtualbox-hook}} from the [[AUR]]. In '''virtualbox-hook''', the 'automatic re-compilation' functionality is done by a '''vbox hook''' on [[mkinitcpio]] after forcing to update the '''linux-headers''' package. You will need to add 'vbox' to the HOOKS array in /etc/mkinitcpio.conf as well as 'linux-headers' and your custom kernel(s) headers to the SyncFirst array in /etc/pacman.conf for this to work.<br />
<br />
The hook will call the '''dkms''' command to update the virtualbox modules for the version of your new kernel.<br />
<br />
{{Note|If you are using this functionality it's '''important''' to look at the installation process of the linux (or any other kernel) package. vbox hook will tell you if anything goes wrong.}}<br />
<br />
== Setup ==<br />
<br />
Add the desired username to the '''vboxusers''' [[group]]. Everything may work fine without this step but shared folders and possibly some other optional stuff require it to work. The new group does not automatically apply to existing sessions; the user has to log in again or start a new environment with a command like {{Ic|newgrp}} or {{Ic|sudo -u ''username'' -s}}.<br />
<br />
# gpasswd -a ''username'' vboxusers<br />
<br />
VirtualBox running on Linux uses its own [[kernel modules]], including a mandatory one called '''vboxdrv''', which must be loaded before virtual machines can run. It can be automatically loaded when Arch Linux starts up, or it can be loaded manually when necessary.<br />
<br />
To load the VirtualBox driver at startup, add a file with the {{ic|*.conf}} suffix in the {{ic|/etc/[[Kernel_modules#Loading|modules-load.d]]}} directory (e.g. ''virtualbox.conf'') that reads "vboxdrv":<br />
<br />
# tee /etc/modules-load.d/virtualbox.conf <<< "vboxdrv"<br />
<br />
{{Note|You may need to update the kernel modules db in order to avoid 'no such file or directory' error when loading vboxdrv. Run: {{ic|depmod -a}}.}}<br />
<br />
To load the module manually:<br />
<br />
# modprobe vboxdrv<br />
<br />
To start the VirtualBox graphical manager:<br />
<br />
$ VirtualBox<br />
<br />
=== Guest additions disc ===<br />
<br />
The {{ic|virtualbox}} package also suggests installing {{Pkg|virtualbox-guest-iso}} on the host (Arch Linux) running VirtualBox. It is a disc image that can be used to install the guest additions onto guest systems.<br />
<br />
=== Booting a live disc ===<br />
<br />
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).<br />
<br />
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.<br />
<br />
=== Advanced setup ===<br />
<br />
See [[VirtualBox Extras]] for advanced configuration.<br />
<br />
== Arch Linux guests ==<br />
<br />
Installing Arch under VirtualBox is straightforward, and additions should be installed through pacman (not through "Install Guest Additions" in VirtualBox, or from a mounted ISO image).<br />
<br />
=== Install the Guest Additions ===<br />
<br />
Install the {{Pkg|virtualbox-guest-utils}} package:<br />
<br />
# pacman -S virtualbox-guest-utils<br />
Manually load the modules with:<br />
<br />
# modprobe -a vboxguest vboxsf vboxvideo<br />
<br />
Create a {{ic|*.conf}} file (e.g. {{ic|virtualbox.conf}}) in {{ic|/etc/modules-load.d/}} with these lines:<br />
<br />
{{hc|/etc/modules-load.d/virtualbox.conf|<br />
vboxguest<br />
vboxsf<br />
vboxvideo}}<br />
<br />
=== Using USB webcam / microphone ===<br />
<br />
{{Note|You will need to have VirtualBox extension pack installed before following the steps below. See [[VirtualBox_Extras#Extension_pack]] for details.}}<br />
<br />
# Make sure the virtual machine is not running and your webcam / microphone is not being used.<br />
# Bring up the main VirtualBox window and go to settings for Arch machine. Go to USB section.<br />
# Make sure "Enable USB Controller" is selected. Also make sure that "Enable USB 2.0 (EHCI) Controller" is selected too.<br />
# Click the "Add filter from device" button (the cable with the '+' icon).<br />
# Select your USB webcam/microphone device from the list.<br />
# Now click OK and start your VM.<br />
<br />
=== Using Arch under Virtualbox EFI mode ===<br />
<br />
My experience with this configuration was pretty terrible, but it does work.<br />
<br />
First, {{ic|efibootmgr}} does *not* work. It will appear to work, but all changes it makes appear to be overwritten on reboot. After performing a standard UEFI/GPT installation, reboot and you should get dumped to the EFI shell. Type exit and you will get a menu. Select the Boot Management Manager, Boot Options, Add Boot Option. Use the file browser to find the grub efi file and select it. Add a label if you want. Afterwards, select Change Boot Order from the menu, use arrow keys to select your Arch option, and + to move it up to the top. GRUB should boot by default now.<br />
<br />
{{Note|Another useful way to get back to the EFI menu after autobooting is working is to press the {{Keypress|C}} key inside GRUB and type {{ic|exit}}. Obviously, this will only work with {{ic|grub-efi}}, not {{ic|grub-bios}}.<br><br />
Regenerating the {{ic|grub.cfg}} file may also be required to fix broken UUIDs. Check with the {{ic|lsblk -f}} command that they match.}}<br />
<br />
== Shared Folders as Arch Linux Guest ==<br />
<br />
Shared folders are managed via the VirtualBox program on the host. They may be added, auto-mounted and made read-only from there. Creating a shared folder from the VirtualBox program in the host locates that folder in {{Ic|/media/sf_''SHAREDFOLDERNAME''}}. At this time an additional step is needed to have that folder created in the Arch Guest because Arch use a package for Guest Additions. To create and access this shared folder from the Arch Guest, this must also be done at the command line after installing the Guest Additions package(s) from pacman:<br />
<br />
# groupadd vboxsf<br />
# gpasswd -a $USER vboxsf<br />
<br />
If you wish, a symbolic link may be made to another folder in your home directory for easy access. As an example, if a shared folder named "Dropbox" was created in the VirtualBox program on the host machine, then /media/sf_Dropbox is automatically created in the guest so this could be done:<br />
<br />
$ ln -s /media/sf_Dropbox/* ~/dropbox<br />
<br />
The .run script provided in the Guest Additions iso does this for you, however, Arch does not recommend using that script so this step must be done manually. The instructions for it were found here: (pastebin: [http://pastebin.com/6cUE3kjF]) .<br />
<br />
If shared folders are not auto-mounted, try [https://bbs.archlinux.org/viewtopic.php?id=70780 manually mount] or read the next section.<br />
<br />
To prevent startup problems when you're using [[systemd]], you should add ''comment=systemd.automount'' to you're fstab-entries. This way they got mounted only when you access those mountpoints and not during startup. Otherwise your system might become unusable after a kernel upgrade (if you install your guest additions manually).<br />
<br />
desktop /media/desktop vboxsf uid=user,gid=group,rw,dmode=700,fmode=600,comment=systemd.automount 0 0<br />
<br />
Don't waste your time to test the ''nofail''-option. mount.vboxsf is not able to handle this (2012-08-20).<br />
<br />
desktop /media/desktop vboxsf uid=user,gid=group,rw,dmode=700,fmode=600,nofail 0 0<br />
<br />
=== Synchronise guest date with host ===<br />
<br />
To keep sync date and time:<br />
<br />
==== Systemd ====<br />
<br />
Run:<br />
<br />
# systemctl enable vboxservice.service<br />
<br />
To enable the service for next boot. To start immediately, run<br />
<br />
# systemctl start vboxservice.service<br />
<br />
==== Initscripts ====<br />
<br />
Add the following to the guest ''/etc/rc.conf'' in DAEMONS entry:<br />
<br />
DAEMONS=(... vbox-service ...)<br />
or<br />
DAEMONS=(... vboxservice ...) # as tested 2012/07/28 with virtualbox-guest-additions 4.1.18-1 and kernel 3.4.6-1-ARCH x86_64<br />
<br />
You also need run this daemon in order to use auto-mounting feature of shared folders that are mentioned above.<br />
<br />
== Troubleshooting ==<br />
<br />
=== USB subsystem is not working on the host ===<br />
<br />
Sometimes the usb subsystem is not auto-detected resulting in an error, even when the user is in the '''vboxusers''' group. See this topic [https://bbs.archlinux.org/viewtopic.php?id=125785] for details.<br />
<br />
Adding an entry in {{Ic|/etc/fstab}} should resolve this issue:<br />
<br />
none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=664 0 0<br />
<br />
=== Failed to create the host-only network interface ===<br />
<br />
To be able to create a Host-Only Network Adapter or a Bridged Network Adapter the kernel modules {{ic|vboxnetadp}} and {{ic|vboxnetflt}} need to be loaded. It's possible to load these kernel modules manually with<br />
<br />
# modprobe -a vboxnetadp vboxnetflt<br />
<br />
To load them automatically at boot, add a new line for each module to {{ic|/etc/modules-load.d/virtualbox.conf}}:<br />
<br />
vboxdrv<br />
vboxnetadp<br />
vboxnetflt<br />
<br />
{{Note|These used to be added to the {{ic|MODULES}} array in {{ic|/etc/rc.conf}}. This is now deprecated.}}<br />
<br />
More information in [https://bbs.archlinux.org/viewtopic.php?id=130581 this] topic.<br />
<br />
=== WinXP: Bit-depth cannot be greater than 16 ===<br />
<br />
If you are running at 16-bit color depth, then the icons may appear fuzzy/choppy. However, upon attempting to change the color depth to a higher level, the system may restrict you to a lower resolution or simply not enable you to change the depth at all. To fix this, run {{ic|regedit}} add the following key to the Virtual Windows XP registry:<br />
<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]<br />
"ColorDepth"=dword:00000004<br />
<br />
Then update the color depth in the desktop properties window. If nothing happens, force the screen to redraw through some method (i.e. {{Keypress|Host+F}} to redraw/enter full screen).<br />
<br />
=== Mounting .vdi Images ===<br />
<br />
This just work with '''static''' size vdi images! '''Dynamic size won't''' be easy mountable! First we need one information from your .vdi image:<br />
<br />
$ VBoxManage internalcommands dumphdinfo Arch_64min.vdi |grep offData<br />
Header: offBlocks=4096 offData=69632<br />
<br />
Now, '''add to your''' {{ic|offData}} 32256. e.g. 32256 + 69632 = 101888<br />
<br />
Now you can mount your vdi image:<br />
<br />
# mount -t ext4 -o rw,noatime,noexec,loop,offset=101888 Arch_64min.vdi /mnt/<br />
<br />
=== Startup problems because of mount failures ===<br />
<br />
If you experience problems in a [[systemd] setup after a kernel upgrade, you should start the system with ''init=/bin/bash'' (if the emergency shell doesn't work for you).<br />
<br />
root=/dev/mapper/vg_main-lv_root ro vga=792 resume=/dev/mapper/vg_main-lv_swap init=/bin/bash<br />
<br />
Then mount the ''root''-filesystem with write access:<br />
<br />
# mount / -o remount,rw<br />
<br />
Change /etc/fstab according to [[VirtualBox#Shared Folders as Arch Linux Guest]]. Then exec systemd with in the bash shell:<br />
<br />
# exec /bin/systemd<br />
<br />
== External links ==<br />
<br />
* [http://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]</div>Janotus