https://wiki.archlinux.org/api.php?action=feedcontributions&user=Statix&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:26:03ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Google_Authenticator&diff=330801Google Authenticator2014-08-17T18:26:50Z<p>Statix: </p>
<hr />
<div>[[Category:Secure Shell]]<br />
The [http://code.google.com/p/google-authenticator/ Google Authenticator project] provides a two-step authentication procedure using one-time passcodes (OTP). The OTP generator application is available for iOS, Android and Blackberry. Similar to [[S/KEY_Authentication]] the authentication mechanism integrates into the Linux PAM system. This guide shows the installation and configuration of this mechanism.<br />
<br />
==Installation==<br />
<br />
The required software is available in the {{AUR|google-authenticator-libpam-git}} or {{AUR|libpam-google-authenticator}} package in the [[AUR]].<br />
<br />
==Setting up the PAM==<br />
<br />
{{Warning|If you do all configuration via SSH do not close the session before you tested that everything is working, else you may lock yourself out. Furthermore consider generating the key file before activating the PAM.}}<br />
<br />
Usually one demands two-pass authentication only for remote login. The corresponding PAM configuration file is {{ic|/etc/pam.d/sshd}}. In case you want to use Google Authenticator globally you would need to change {{ic|/etc/pam.d/system-auth}}, however, in this case proceed with extreme caution to not lock yourself out.<br />
In this guide we proceed with editing {{ic|/etc/pam.d/sshd}} which is most safely (but not necessarily) be done in a local session.<br />
<br />
To enter both, your unix password and your OTP add {{ic|pam_google_authenticator.so}} the following way (above the four default lines).<br />
<br />
auth required pam_google_authenticator.so<br />
auth required pam_unix.so<br />
auth required pam_env.so<br />
<br />
This will ask for the OTP before prompting for your Unix password. Changing the order of the two modules will reverse this order.<br />
<br />
{{Warning|Only users that have generated a secret key file (see below) will be allowed to log in using SSH.}}<br />
<br />
To allow login with either the OTP or your Unix password use<br />
<br />
auth sufficient pam_google_authenticator.so<br />
auth sufficient pam_unix.so<br />
auth required pam_env.so<br />
<br />
Finally enable challenge-response authentication in {{ic|/etc/ssh/ssh'''d'''_config}}:<br />
ChallengeResponseAuthentication yes<br />
and reload {{ic|sshd}}'s configuration<br />
# systemctl reload sshd<br />
<br />
==Generating a secret key file==<br />
<br />
Every user who wants to use two-pass authentication needs to generate a secret key file in his home folder.<br />
This can very easily be done using {{ic|google-authenticator}} as included in {{AUR|google-authenticator-libpam-git}}.<br />
<br />
$ google-authenticator<br />
Do you want authentication tokens to be time-based (y/n) y<br />
https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/username@hostname%3Fsecret%3DZVZG5UZU4D7MY4DH<br />
Your new secret key is: ZVZG5UZU4D7MY4DH<br />
Your verification code is 269371<br />
Your emergency scratch codes are:<br />
70058954<br />
97277505<br />
99684896<br />
56514332<br />
82717798<br />
<br />
Do you want me to update your "/home/username/.google_authenticator" file (y/n) y<br />
<br />
Do you want to disallow multiple uses of the same authentication<br />
token? This restricts you to one login about every 30s, but it increases<br />
your chances to notice or even prevent man-in-the-middle attacks (y/n) y<br />
<br />
By default, tokens are good for 30 seconds and in order to compensate for<br />
possible time-skew between the client and the server, we allow an extra<br />
token before and after the current time. If you experience problems with poor<br />
time synchronization, you can increase the window from its default<br />
size of 1:30min to about 4min. Do you want to do so (y/n) n<br />
<br />
If the computer that you are logging into is not hardened against brute-force<br />
login attempts, you can enable rate-limiting for the authentication module.<br />
By default, this limits attackers to no more than 3 login attempts every 30s.<br />
Do you want to enable rate-limiting (y/n) y<br />
<br />
It is recommended to '''store the emergency scratch codes safely''' (print them out and keep them in a save location) as they are your only way to log in (via SSH) when you lost your mobile phone (i.e. your OTP-generator). They are also stored in {{ic|~/.google_authenticator}}, so you can look them up any time as long as you are logged in.<br />
<br />
==Setting up your OTP-generator==<br />
Install the corresponding generator application on your mobile phone from the corresponding store by browsing to [http://m.google.com/authenticator http://m.google.com/authenticator] from your mobile device.<br />
In the applications menu click the corresponding button to create a new account and either scan the QR code from the URL you were told when generating the secret key file, or enter the secret key (in the example above 'ZVZG5UZU4D7MY4DH') manually.<br />
<br />
Now you should see a new passcode token being generated every 30 seconds on your phone.<br />
<br />
==Testing==<br />
SSH to your host from another machine or from another terminal window and check if it works.<br />
<br />
$ssh username@hostname<br />
login as: username<br />
Verification code:<br />
Password:<br />
$<br />
<br />
{{Warning|OpenSSH will ignore all of this if you are authenticating with a key pair instead of a passphrase. If you want to force the use of one-time pass, you will have to disable key based authentication in {{ic|/etc/ssh/sshd_config}}.}}<br />
{{Note| As of OpenSSH 6.2, you can add {{ic|AuthenticationMethods}} to allow both two-factor authentication and key based authentication. See [[SSH keys#Two-factor_authentication_and_public_keys]] }}</div>Statixhttps://wiki.archlinux.org/index.php?title=TrueCrypt&diff=317081TrueCrypt2014-05-29T05:12:34Z<p>Statix: </p>
<hr />
<div>[[Category:Security]]<br />
[[Category:File systems]]<br />
[[de:TrueCrypt]]<br />
{{Related articles start}}<br />
{{Related|Disk encryption}}<br />
{{Related|Tcplay}}<br />
{{Related|Tomb}}<br />
{{Related articles end}}<br />
{{Warning|As of May 2014, development on TrueCrypt is discontinued and it is [http://truecrypt.sourceforge.net/ no longer considered secure]. Consider alternatives such as [[dm-crypt]].}}<br />
'''TrueCrypt''' is a free open source on-the-fly encryption (OTFE) program. Some of its features are:<br />
* Virtual encrypted disks within files that can be mounted as real disks.<br />
* Encryption of an entire hard disk partition or a storage device/medium.<br />
* All encryption algorithms use the LRW mode of operation, which is more secure than CBC mode with predictable initialization vectors for storage encryption.<br />
* "Hidden volumes" within a normal "outer" encrypted volume. A hidden volume can not be distinguished from random data without access to a passphrase and/or keyfile.<br />
<br />
For more details on how TrueCrypt compares to other disk encryption solution, see [[Disk encryption#Comparison table]].<br />
<br />
== Installation ==<br />
<br />
{{Note|For opening and accessing an existing TrueCrypt container [[#Accessing a TrueCrypt container using cryptsetup|cryptsetup]] is the preferred way, since it is well integrated with the rest of the system. Creating a new TrueCrypt container can be done using {{ic|truecrypt}}, after which it can be opened using {{ic|cryptsetup}}.}}<br />
<br />
[[pacman|Install]] {{Pkg|truecrypt}} from the [[official repositories]].<br />
If you use any kernel other than {{Pkg|linux}} install the corresponding kernel module.<br />
<br />
If you are using truecrypt to encrypt a virtual filesystem (e.g. a file), the module will be automatically loaded whenever you run the ''truecrypt'' command.<br />
<br />
If you are using truecrypt to encrypt a physical device (e.g. a hard disk or usb drive), you will likely want to load the module during the boot sequence:<br />
<br />
Add the module to {{ic|/etc/modules-load.d/}}:<br />
# tee /etc/modules-load.d/truecrypt.conf <<< "truecrypt"<br />
<br />
{{Note|<br />
* This didn't work for me (module truecrypt seems to be non-existent now), but adding "loop" module worked<br />
# tee /etc/modules-load.d/truecrypt.conf <<< "loop"<br />
# modprobe loop<br />
* It does not appear that loading a module applies with TrueCrypt 7.1a, the current version in Arch as of 4/19/2013. The above advice may be outdated with respect to the module, however it is still important to enable '''FUSE''', '''loop''' and your encryption algorithm (e.g. '''AES''', '''XTS''', '''SHA512''') in custom kernels.<br />
If you only want to open and access an existing truecrypt container, this can also be done with {{ic|cryptsetup}} i.e. without installing Truecrypt.<br />
}}<br />
<br />
== Accessing a TrueCrypt container using cryptsetup ==<br />
<br />
Since version 1.6, {{Pkg|cryptsetup}} supports opening TrueCrypt containers natively, without the need of the {{Pkg|truecrypt}} package. To do so, execute the following command:<br />
$ cryptsetup --type tcrypt open container-to-mount container-name<br />
<br />
Replace {{ic|container-to-mount}} with the device file under {{ic|/dev}} or the path to the file you wish to open. Upon successful opening, the plaintext device will appear as {{ic|/dev/mapper/container-name}}, which you can {{ic|mount}} like any normal device.<br />
<br />
If you are using key files, supply them using the {{ic|--key-file}} option, to open a hidden volume, supply the {{ic|--tcrypt-hidden}} option and for a partition or whole drive that is encrypted in system mode use the {{ic|--tcrypt-system}} option.<br />
<br />
See {{ic|man cryptsetup}} for more details and all supported options.<br />
<br />
=== Automounting using /etc/crypttab ===<br />
<br />
Since version 206, [[systemd]] supports (auto)mounting TrueCrypt containers at boot or runtime using {{ic|/etc/crypttab}}.<br />
<br />
The following example setup will mount {{ic|/dev/sda2}} in system encryption mode as soon as {{ic|/mnt/truecrypt-volume}} is accessed using systemd's automounting logic. The passphrase to open the volume is given in {{ic|/etc/volume.password}}. Note that the device file given in {{ic|/etc/fstab}} needs to be the one from {{ic|/dev/mapper/}} and not, for example, from {{ic|/dev/disk/by-uuid/}} for automounting logic to kick in. Other than that you can still reliably identify the encrypted volume itself inside of {{ic|/etc/crypttab}} using device file names from {{ic|/dev/disk/}}.<br />
<br />
{{hc|/etc/crypttab|<nowiki><br />
truecrypt-volume /dev/sda2 /etc/volume.password tcrypt-system,noauto</nowiki><br />
}}<br />
<br />
{{hc|/etc/fstab|<nowiki><br />
/dev/mapper/truecrypt-volume /mnt/truecrypt-volume auto noauto,x-systemd.automount 0 0</nowiki><br />
}}<br />
<br />
See {{ic|man crypttab}} for more details and options supported.<br />
<br />
== Encrypting a file as a virtual volume ==<br />
<br />
The following instructions will create a file that will act as a virtual filesystem, allowing you to mount it and store files within the encrypted file. This is a convenient way to store sensitive information, such as financial data or passwords, in a single file that can be accessed from Linux, Windows, or Macs.<br />
<br />
To create a new truecrypt file interactively, type the following in a terminal:<br />
$ truecrypt -t -c<br />
<br />
Follow the instructions, choosing the default values unless you know what you are doing:<br />
<br />
Volume type:<br />
1) Normal<br />
2) Hidden<br />
Select [1]: 1<br />
<br />
Enter file or device path for new volume: /home/user/''EncryptedFile''.tc<br />
<br />
Enter volume size (bytes - size/sizeK/sizeM/sizeG): 32M<br />
<br />
Encryption algorithm:<br />
1) AES<br />
2) Blowfish<br />
3) CAST5<br />
4) Serpent<br />
5) Triple DES<br />
6) Twofish<br />
7) AES-Twofish<br />
8) AES-Twofish-Serpent<br />
9) Serpent-AES<br />
10) Serpent-Twofish-AES<br />
11) Twofish-Serpent<br />
Select [1]: 1<br />
<br />
Hash algorithm:<br />
1) RIPEMD-160<br />
2) SHA-1<br />
3) Whirlpool<br />
Select [1]: 1 <br />
<br />
Filesystem:<br />
1) None<br />
2) FAT<br />
3) Linux Ext2<br />
4) Linux Ext3<br />
5) Linux Ext4<br />
Select [2]: <br />
<br />
Enter password for new volume '/home/user/''EncryptedFile''.tc': *****************************<br />
Re-enter password: *****************************<br />
<br />
Enter keyfile path [none]: <br />
<br />
Please type at least 320 randomly chosen characters and then press Enter:<br />
<br />
Done: 32.00 MB Speed: 10.76 MB/s Left: 0:00:00 <br />
Volume created.<br />
<br />
You can now mount the new encrypted file to a previously-created directory:<br />
$ truecrypt -t /home/user/''EncryptedFile''.tc /home/user/''EncryptedFileFolder''<br />
<br />
{{Note|Truecrypt requires root privileges and as such, running the above command as a user will attempt to use '''sudo''' for authentication. To work with files as a regular user, please see[[#Mount volumes as a normal user|Mount volumes as a normal user]].}}<br />
<br />
Once mounted, you can copy or create new files within the encrypted directory as if it was any normal directory. When you are you ready to re-encrypt the contents and unmount the directory, run:<br />
$ truecrypt -t -d<br />
<br />
Again, this will require administrator privileges through the use of '''sudo'''. After running it check if the files that are to be encrypted are indeed no longer in the directory. (might want to try unimportant data first) If they are still there, note that ''rm'' doesn't make the data unrecoverable.<br />
<br />
For more information about truecrypt in general, run:<br />
$ man truecrypt<br />
{{Note|As of 1:7.1a-1 dont see a man or info page.}}<br />
<br />
Several options can be passed at the command line, making automated access and creation a simple task. The man page is highly recommended reading.<br />
<br />
== Encrypting a physical volume ==<br />
<br />
{{Note|1= If you are having problems with the graphical interface, you can run in CLI mode with the -t flag.}}<br />
<br />
If you want to use a keyfile, create one with this command:<br />
truecrypt --create-keyfile /etc/disk.key<br />
By default both passphrase and key will be needed to unlock the volume.<br />
<br />
Create a new volume in the device {{ic|/dev/sda1}}:<br />
# truecrypt --volume-type=normal -c /dev/sda1<br />
<br />
Map the volume to {{ic|/dev/mapper/truecrypt1}}:<br />
# truecrypt -N 1 /dev/sda1<br />
<br />
If this command does not for you try this to map the volume:<br />
# truecrypt --filesystem=none --slot=1 /dev/sda1<br />
<br />
Simply format the disk like you normally would choosing your favourite [[File systems|file system]], except use the path {{ic|/dev/mapper/truecrypt1}}. E.g. for ext4 use:<br />
# mkfs.ext4 /dev/mapper/truecrypt1<br />
<br />
Mount the volume:<br />
# mount /dev/mapper/truecrypt1 /media/disk<br />
<br />
Map and mount a volume:<br />
# truecrypt /dev/sda1 /media/disk<br />
<br />
Unmount and unmap a volume:<br />
# truecrypt -d /dev/sda1<br />
<br />
== Creating a hidden volume ==<br />
<br />
First, create a normal outer volume as described in [[#Encrypting a physical volume]].<br />
<br />
Map the outer volume to {{ic|/dev/mapper/truecrypt1}}:<br />
# truecrypt -N 1 /dev/sda1<br />
<br />
Create a hidden truecrypt volume in the free space of the outer volume:<br />
# truecrypt --type hidden -c /dev/sda1<br />
You need to use another passphrase and/or keyfile here than the one you used for the outer volume.<br />
<br />
Unmap the outer truecrypt volume and map the hidden one:<br />
# truecrypt -d /dev/sda1<br />
# truecrypt -N 1 /dev/sda1<br />
Just use the passphrase you chose for the hidden volume and TrueCrypt will automatically choose it before the outer.<br />
<br />
Create a file system on it (if you have not already) and mount it:<br />
# mkfs.ext4 /dev/mapper/truecrypt1<br />
# mount /dev/mapper/truecrypt1 /media/disk<br />
<br />
Map and mount the outer volume with the hidden write-protected:<br />
truecrypt -P /dev/sda1 /media/disk<br />
<br />
== Mount a special filesystem ==<br />
<br />
{{Note|Current Versions of truecrypt seem to support NTFS write support by default so the {{ic|--filesystem}} flag no longer seems to be necessary.}}<br />
<br />
In the following example I want to mount a ntfs-volume, but TrueCrypt does not use ''ntfs-3g by'' default (so there is no write access; checked in version 6.1).<br />
The following command works for me:<br />
truecrypt --filesystem=ntfs-3g --mount /file/you/want/to/mount<br />
You may also want to mount ntfs volume without execute flag on all files<br />
truecrypt --filesystem=ntfs-3g --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002<br />
<br />
== Mount volumes via fstab ==<br />
<br />
First of all, we need to write a script which will handle the way mounting via fstab is done. Place the following in {{ic|/usr/bin/mount.truecrypt}}:<br />
{{bc|<nowiki><br />
#!/usr/bin/env sh <br />
DEV="$1"<br />
MNTPT="$2"<br />
OPTIONS=""<br />
TCOPTIONS=""<br />
shift 3<br />
IFS=','<br />
for arg in $*; do<br />
if [ "${arg}" == "system" ]; then<br />
TCOPTIONS="${TCOPTIONS}-m=system "<br />
elif [[ "${arg}" == fs=* ]]; then<br />
FS=${arg#*=}<br />
TCOPTIONS="${TCOPTIONS}--filesystem=${FS} "<br />
else<br />
OPTIONS="${OPTIONS}${arg},"<br />
fi<br />
done<br />
truecrypt ${DEV} ${MNTPT} ${TCOPTIONS% *} --fs-options="${OPTIONS%,*}"<br />
</nowiki>}}<br />
Also do not forget to make the file executable:<br />
<br />
# chmod +x /usr/bin/mount.truecrypt<br />
<br />
Finally, add the device to fstab somewhat like this:<br />
<br />
/dev/sdb3 /mnt truecrypt fs=vfat,defaults 0 0<br />
<br />
{{Tip|This script is also provided by the {{AUR|truecrypt-mount}} package.}}<br />
<br />
== Mount volumes as a normal user ==<br />
<br />
TrueCrypt needs root privileges to work: this procedure will allow normal users to use it, also giving writing permissions to mounted volumes.<br />
<br />
Both methods below require [[Sudo]]. Make sure it is configured before proceeding.<br />
<br />
=== Method 1: add a truecrypt group ===<br />
<br />
Create a new group called truecrypt and give it the necessary permissions. Any users that belongs to that group, will be able to use TrueCrypt.<br />
# groupadd truecrypt<br />
<br />
Edit the sudo configuration:<br />
# visudo<br />
<br />
Append the following lines at the bottom of the sudo configuration file:<br />
# Users in the truecrypt group are allowed to run TrueCrypt as root.<br />
%truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt<br />
<br />
You can now add your users to the truecrypt group:<br />
# gpasswd -M first_user,second_user,etc truecrypt<br />
<br />
{{Note|In order to make these changes active, any user that has been added to the truecrypt group have to logout.}}<br />
<br />
After that, you can mount your device by<br />
<br />
# truecrypt --mount ''/path/to/device'' ''/path/to/mountpoint''<br />
<br />
Default mountpoint is {{ic|/media/truecrypt1}}. Normally, it is not necessary to explicitly specify the filesystem of your device using the {{ic|--filesystem}} flag.<br />
<br />
It is definitely reasonable to give truecrypt some permission masks. Otherwise, every file on your mounted device will be executable. So instead of the above, you can use<br />
<br />
# truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount /PATH/TO/DEVICE /PATH/TO/MOUNTPOINT<br />
<br />
and add this line to your bash configuration file, {{ic|~/.bashrc}} as an alias:<br />
<br />
alias tc1='truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount ''/path/to/device"" ''/path/to/mountpoint'<br />
<br />
To mount this specific device, use<br />
<br />
# tc1<br />
<br />
as a normal user.<br />
<br />
=== Method 2: sudo simplified ===<br />
<br />
Simply enable desired user to run truecrypt without a password:<br />
# visudo<br />
<br />
Append the following:<br />
USERNAME ALL = (root) NOPASSWD:/usr/bin/truecrypt<br />
<br />
alternatively, if you make use of the wheel group:<br />
%wheel ALL = (root) NOPASSWD:/usr/bin/truecrypt<br />
<br />
If you have any difficulties with permissions as a normal user, just add the {{ic|-u}} flag to the truecrypt mount command, for example:<br />
$ truecrypt -u /home/user/''EncryptedFile''.tc /home/user/''EncryptedFileFolder''<br />
<br />
=== Automatic mount on login ===<br />
<br />
Simply add:<br />
{{bc|<br />
$ truecrypt /home/user/''Encrypted File''.tc /home/user/''Encrypted File Folder'' <<EOF<br />
''password''<br />
EOF<br />
}}<br />
to your startup procedure. Do not use the {{ic|-p}} switch, this method is more secure. Otherwise everyone can just look up the password via ''ps'' and similar tools, as it is in the process name! [http://thoughtyblog.wordpress.com/2009/07/05/truecrypt-linux-hide-password-from-ps/ source]<br />
<br />
The most recent truecrypt has a couple of followup questions. If you have expect installed, this will work (assuming no keyfile and no desire to protect hidden volume), saved to a file with root-only perms called from /etc/rc.local:<br />
<br />
{{bc|<nowiki><br />
#! /bin/bash<br />
expect << EOF<br />
spawn /usr/bin/truecrypt ''/path/to/EncryptedFile'' ''/mount/point''<br />
expect "Enter password"<br />
send "volume password\n"<br />
expect "Enter keyfile"<br />
send "\n"<br />
expect "Protect hidden volume"<br />
send "\n"<br />
expect eof;<br />
EOF<br />
</nowiki>}}<br />
<br />
Of course, this isn't as secure as entering your password manually. But for some use cases, such as when your TrueCrypt filesystem is in a file on shared storage, it's better than being unencrypted.<br />
<br />
== Safely unmount and unmap volumes (on shutdown) ==<br />
<br />
You can unmount a specific device by<br />
<br />
# truecrypt -d ''/path/to/mountpoint''<br />
<br />
or leave away the path to unmount all truecrypt volumes.<br />
<br />
If you want your truecrypt device to be unmounted automatically at shutdown, add the following to the file {{ic|/etc/rc.local.shutdown}}:<br />
<br />
if (/usr/bin/truecrypt --text --list)<br />
then {<br />
/usr/bin/truecrypt -d<br />
sleep 3<br />
}<br />
fi<br />
You can also leave away the ''sleep'' command, it is just to give the unmounting some time to complete before the actual shutdown.<br />
<br />
If you're using [[systemd]], there is a service trying to unmount truecrypt-encrypted filesystems at shutdown automatically on the [[systemd/Services]] page.<br />
<br />
== Errors ==<br />
<br />
=== TrueCrypt is already running ===<br />
<br />
If a messagebox ''TrueCrypt is already running'' appears when starting TrueCrypt, check for a hidden file in the home directory of the concerned user called ''.TrueCrypt-lock-username''. Substitute ''username'' with the individual username. Delete the file and start TrueCrypt again.<br />
<br />
=== Deleted stale lockfile ===<br />
<br />
If you always get a message "Delete stale lockfile [....]" after starting Truecrypt, the Truecrypt process with the lowest ID has to be killed during Gnome log out. Edit {{ic|/etc/gdm/PostSession/Default}} and add the following line before exit 0:<br />
kill $(ps -ef | grep truecrypt | tr -s ' ' | cut -d ' ' -f 2)<br />
<br />
=== Issues with Unicode file/folder names ===<br />
<br />
==== NTFS ====<br />
<br />
Should files resp. folders containing Unicode characters in their names be incorrectly or not at all displayed on TrueCrypt NTFS volumes (while e. g. being correctly handled on non-encrypted NTFS partitions), first verify that you have the [[NTFS-3G]] driver installed and then create the following symlink as root:<br />
ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs<br />
That will cause TrueCrypt to automatically use this driver for NTFS volumes, having the same effect as the explicit use of<br />
truecrypt --filesystem=ntfs-3g /path/to/volume<br />
via the console.<br />
<br />
One may also consider setting e.g.:<br />
rw,noatime<br />
amongst other options in the TrueCrypt GUI (''Settings > Preferences > Mount Options'').<br />
<br />
==== FAT ====<br />
<br />
Similarly, FAT32 volumes created using Windows may use Unicode rather than ISO 8859-1. In order to use UTF-8, set the mount option:<br />
iocharset=utf8<br />
when mounting such volumes, or globally as described above.<br />
<br />
=== Unmount error (device mapper) ===<br />
<br />
If you always get a message "device-mapper: remove ioctl failed: Device or resource busy" when attempting to dismount your truecrypt volume, the solution is to goto: Setting > Preferences > System Integration > Kernel Service and check the box<br />
Do not use kernel cryptographic services<br />
<br />
=== Mount error (device mapper, truecrypt partition) ===<br />
<br />
When attempting to mount your truecrypt volume, a message like this one may appear:<br />
<br />
Error: device-mapper: create ioctl failed: Device or resource busy<br />
Command failed<br />
If so, run:<br />
# cryptsetup remove /dev/mapper/truecrypt1<br />
<br />
=== Failed to set up a loop device ===<br />
<br />
If you get a message "Failed to set up a loop device" when trying to create/mount a TrueCrypt volume, it may be because you updated your kernel recently without rebooting.<br />
Rebooting should fix this error.<br />
<br />
Otherwise, check if ''loop'' has been loaded as kernel module:<br />
<br />
$ lsmod | grep loop<br />
<br />
If not listed, retry the TrueCrypt command after {{ic|modprobe loop}}. Should it work, consider to add ''loop'' to the modules in {{ic|/etc/modules-load.d}}:<br />
<br />
# tee /etc/modules-load.d/truecrypt.conf <<< "loop"<br />
<br />
{{Note|As of udev 181-5, the loop device module is no longer auto-loaded, and the procedure described here is necessary.}}<br />
<br />
With newer kernel versions there are no loop devices created at startup. If there are no loop devices the first time mounting a container file, TrueCrypt fails ("Failed to set up a loop device") but also creates the maximum number of loop devices (usually 256), mounting should now work.<br />
<br />
To avoid this you can create a loop device before mounting a file:<br />
<br />
# mknod -m 0660 /dev/loop8 b 7 8<br />
<br />
This creates {{ic|/dev/loop8}}. Or create some loop devices at startup:<br />
<br />
# echo "options loop max_loop=8" > /etc/modprobe.d/eightloop.conf<br />
<br />
Change {{ic|1=max_loop=8}} to the number of devices you need.<br />
<br />
=== System partition passwords need en_US keymap ===<br />
If you are using Xorg (which you most likely are, should you not know what that is), use the following command to use US keymap until restart:<br />
<br />
# setxkbmap us<br />
<br />
=== Permission denied on NTFS volume ===<br />
If you cannot modify the filesystem, although permissions seem to be correct, this can be a result of not having [[NTFS-3G]] installed, see [[#NTFS|NTFS]].<br />
<br />
== See also ==<br />
<br />
* [http://www.truecrypt.org/ TrueCrypt homepage]<br />
* [http://en.gentoo-wiki.com/wiki/TrueCrypt HOWTO: Truecrypt Gentoo wiki]<br />
* [http://www.howtoforge.com/truecrypt_data_encryption Truecrypt tutorial on HowToForge]<br />
* [http://www.privacylover.com/encryption/analysis-is-there-a-backdoor-in-truecrypt-is-truecrypt-a-cia-honeypot/ There is a good chance the CIA has a backdoor?] (via [https://secure.wikimedia.org/wikipedia/en/wiki/Truecrypt wp])</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=276466Snoopy2013-09-23T20:42:45Z<p>Statix: /* Snoopy script */</p>
<hr />
<div>[[Category:Gaming]]<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with [[WarCraft III]] on [[Wine]].<br />
<br />
== Installation ==<br />
<br />
Snoopy can be found in the [[AUR]] as package {{AUR|snoopy}}.<br />
<br />
== Getting started ==<br />
<br />
=== Snoopy programs ===<br />
<br />
Snoopy installs three programs in the {{ic|/usr/bin}} directory:<br />
<br />
* {{ic|snoopy-sh}} is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
* {{ic|snoopy-ping}} is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
* {{ic|snoopy-nox}} is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
=== Executing snoopy ===<br />
<br />
Snoopy can be executed in either of the following ways. The alias approach is a single-user solution, as opposed to the script which will work for all users.<br />
<br />
==== Snoopy alias ====<br />
<br />
A simple way to get snoopy working is to use an alias.<br />
<br />
* First edit your .bashrc file, add the following line as a new line with your interface (for example "enp1s0"):<br />
<br />
{{hc|~/.bashrc|2=<br />
alias snoopy-sh-local='sudo snoopy-nox enp1s0 $(id -u) $(id -g)'<br />
}}<br />
<br />
* For this time you have to run:<br />
<br />
$ source ~/.bashrc<br />
<br />
This command re-reads your .bashrc and is afterwards not necessary because your .bashrc is read on every login.<br />
<br />
==== Snoopy script ====<br />
<br />
You can make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be run as root. We'll make a launch script.<br />
<br />
First, if you do not know your network interface run:<br />
<br />
# ip a<br />
<br />
to determine what it is. A typical default ethernet interface name is enp1s0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using {{ic|id -u}} and {{ic|id -g}} respectively. I set the interface explicitly, enp1s0. sudo is used because snoopy must be run as root. Here is an example script:<br />
<br />
{{hc|/usr/bin/snoopy-sh-local|<br />
#!/bin/bash<br />
sudo snoopy-nox enp1s0 $(id -u) $(id -g)<br />
}}<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
Now snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file:<br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== See also ==<br />
<br />
* [http://snoopy.tuxfamily.org Snoopy website]</div>Statixhttps://wiki.archlinux.org/index.php?title=Lm_sensors&diff=254852Lm sensors2013-04-22T01:53:31Z<p>Statix: /* Testing your lm_sensors */</p>
<hr />
<div>[[Category:Status monitoring and notification]]<br />
[[Category:CPU]]<br />
[[cs:Lm sensors]]<br />
[[es:Lm sensors]]<br />
[[ru:Lm sensors]]<br />
[[uk:Lm sensors]]<br />
[[zh-CN:Lm sensors]]<br />
[[ja:Lm sensors]]<br />
{{lowercase title}}<br />
[http://www.lm-sensors.org/ lm_sensors] (Linux monitoring sensors) is a free and open-source application that provides tools and drivers for monitoring temperatures, voltage, and fans. This document explains how to install, configure, and use lm_sensors so that you can monitor CPU temperatures, motherboard temperatures, and fan speeds.<br />
<br />
== Usage ==<br />
=== Installation ===<br />
Install the {{Pkg|lm_sensors}} package from the [[Official Repositories|official repositories]].<br />
<br />
=== Setting up lm_sensors ===<br />
Use '''sensors-detect''' to detect and generate a list of kernel modules:<br />
# sensors-detect<br />
This will create the {{ic|/etc/conf.d/lm_sensors}} configuration file which is used by the {{ic|sensors}} daemon to automatically load kernel modules on boot. You will be asked if you want to probe for various hardware. The "safe" answers are the defaults, so just hitting {{Keypress|Enter}} to all the questions will generally not cause any problems. <br />
<br />
When the detection is finished, you will be presented with a summary of the probes. Here is an example summary from my system:<br />
{{hc|# sensors-detect|<nowiki><br />
Now follows a summary of the probes I have just done.<br />
Just press ENTER to continue:<br />
Driver `it87':<br />
* ISA bus, address 0x290<br />
Chip `ITE IT8718F Super IO Sensors' (confidence: 9)<br />
Driver `coretemp':<br />
* Chip `Intel Core family thermal sensor' (confidence: 9)<br />
</nowiki>}}<br />
If you plan on using the daemon, be sure to answer '''YES''' when asked if you want to to generate {{ic|/etc/conf.d/lm_sensors}}.<br />
<br />
To automatically load the kernel modules at boot time:<br />
systemctl enable lm_sensors.service<br />
<br />
Alternatively, instead of using the daemon, you can add the modules to the {{ic|MODULES}} array in {{ic|/etc/modules-load.d/lm_sensors.conf}}:<br />
coretemp<br />
it87<br />
acpi-cpufreq<br />
<br />
=== Automatic lm_sensors deployment ===<br />
If you wish to deploy lm-sensors on multiple diferent linux machines issue is that sensors-detect ask you quite a few questions. There are few tricks that you can use to automate replies.<br />
<br />
First one is if you wish to accept defaults which sensors-detect suggest you need just to press [ENTER] all the time. To automate this use this one liner:<br />
<br />
# yes "" | sensors-detect<br />
<br />
If you wish to override defaults and answer YES to all questions then use this oneliner:<br />
<br />
# yes | sensors-detect<br />
<br />
=== Testing your lm_sensors ===<br />
To test your setup, load the kernel modules manually or by using the {{ic|/etc/rc.d/sensors}} init script. You do '''NOT''' have to do both.<br />
Example manually adding them<br />
# modprobe it87<br />
# modprobe coretemp<br />
Example using the script<br />
# systemctl start lm_sensors<br />
<br />
You should see something like this when you run sensors<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0001<br />
Adapter: ISA adapter<br />
Core 1: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0002<br />
Adapter: ISA adapter<br />
Core 2: +32.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
coretemp-isa-0003<br />
Adapter: ISA adapter<br />
Core 3: +30.0°C (high = +76.0°C, crit = +100.0°C) <br />
<br />
it8718-isa-0290<br />
Adapter: ISA adapter<br />
in0: +1.17 V (min = +0.00 V, max = +4.08 V) <br />
in1: +1.31 V (min = +1.28 V, max = +1.68 V) <br />
in2: +3.28 V (min = +2.78 V, max = +3.78 V) <br />
in3: +2.88 V (min = +2.67 V, max = +3.26 V) <br />
in4: +2.98 V (min = +2.50 V, max = +3.49 V) <br />
in5: +1.34 V (min = +0.58 V, max = +1.34 V) ALARM<br />
in6: +2.02 V (min = +1.04 V, max = +1.36 V) ALARM<br />
in7: +2.83 V (min = +2.67 V, max = +3.26 V) <br />
Vbat: +3.28 V<br />
fan1: 1500 RPM (min = 3245 RPM) ALARM<br />
fan2: 0 RPM (min = 3245 RPM) ALARM<br />
fan3: 0 RPM (min = 3245 RPM) ALARM<br />
temp1: +18.0°C (low = +127.0°C, high = +64.0°C) sensor = thermal diode<br />
temp2: +32.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor<br />
temp3: +38.0°C (low = +127.0°C, high = +64.0°C) sensor = thermistor<br />
cpu0_vid: +2.050 V<br />
<br />
acpitz-virtual-0<br />
Adapter: Virtual device<br />
temp1: +18.0°C (crit = +64.0°C)<br />
</nowiki>}}<br />
<br />
=== Reading SPD values from memory modules (optional) ===<br />
<br />
To read the SPD timing values from your memory modules, install {{pkg|i2c-tools}} from the [[Official Repositories|official repositories]]. Once you have i2c-tools installed, you will need to load the {{ic|eeprom}} [[Kernel_modules|kernel module]].<br />
# modprobe eeprom<br />
Finally, you can view your memory information with {{ic|decode-dimms}}.<br />
<br />
Here is partial output from one machine:<br />
{{hc|$ decode-dimms|<nowiki><br />
# decode-dimms version 5733 (2009-06-09 13:13:41 +0200)<br />
<br />
Memory Serial Presence Detect Decoder<br />
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,<br />
Jean Delvare, Trent Piepho and others<br />
<br />
<br />
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050<br />
Guessing DIMM is in bank 1<br />
<br />
---=== SPD EEPROM Information ===---<br />
EEPROM CRC of bytes 0-116 OK (0x583F)<br />
# of bytes written to SDRAM EEPROM 176<br />
Total number of bytes in EEPROM 512<br />
Fundamental Memory type DDR3 SDRAM<br />
Module Type UDIMM<br />
<br />
---=== Memory Characteristics ===---<br />
Fine time base 2.500 ps<br />
Medium time base 0.125 ns<br />
Maximum module speed 1066MHz (PC3-8533)<br />
Size 2048 MB<br />
Banks x Rows x Columns x Bits 8 x 14 x 10 x 64<br />
Ranks 2<br />
SDRAM Device Width 8 bits<br />
tCL-tRCD-tRP-tRAS 7-7-7-33<br />
Supported CAS Latencies (tCL) 8T, 7T, 6T, 5T<br />
<br />
---=== Timing Parameters ===---<br />
Minimum Write Recovery time (tWR) 15.000 ns<br />
Minimum Row Active to Row Active Delay (tRRD) 7.500 ns<br />
Minimum Active to Auto-Refresh Delay (tRC) 49.500 ns<br />
Minimum Recovery Delay (tRFC) 110.000 ns<br />
Minimum Write to Read CMD Delay (tWTR) 7.500 ns<br />
Minimum Read to Pre-charge CMD Delay (tRTP) 7.500 ns<br />
Minimum Four Activate Window Delay (tFAW) 30.000 ns<br />
<br />
---=== Optional Features ===---<br />
Operable voltages 1.5V<br />
RZQ/6 supported? Yes<br />
RZQ/7 supported? Yes<br />
DLL-Off Mode supported? No<br />
Operating temperature range 0-85C<br />
Refresh Rate in extended temp range 1X<br />
Auto Self-Refresh? Yes<br />
On-Die Thermal Sensor readout? No<br />
Partial Array Self-Refresh? No<br />
Thermal Sensor Accuracy Not implemented<br />
SDRAM Device Type Standard Monolithic<br />
<br />
---=== Physical Characteristics ===---<br />
Module Height (mm) 15<br />
Module Thickness (mm) 1 front, 1 back<br />
Module Width (mm) 133.5<br />
Module Reference Card B<br />
<br />
---=== Manufacturer Data ===---<br />
Module Manufacturer Invalid<br />
Manufacturing Location Code 0x02<br />
Part Number OCZ3G1600LV2G <br />
<br />
...<br />
</nowiki>}}<br />
<br />
== Using sensor data ==<br />
=== Graphical Front-ends ===<br />
There are a variety of front-ends for sensors data.<br />
*{{Pkg|xsensors}} - X11 interface to lm_sensors<br />
*{{Pkg|xfce4-sensors-plugin}} - A lm_sensors plugin for the [[Xfce]] panel<br />
*[[conky]] - Conky is an advanced, highly configurable system monitor for X based on torsmo<br />
*{{Pkg|kdeutils-superkaramba}} - Superkaramba is a tool which gives posibility to create different widgets for KDE desktop. Check the [http://www.kde-look.org/index.php?xcontentmode=38 karamba section on kde-look.org] for examples of making karamba front-ends for sensors data.<br />
*{{pkg|sensors-applet}} - applet for the [[GNOME]] Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings.<br />
<br />
=== sensord ===<br />
There is an optional daemon called sensord (included with the {{Pkg|lm_sensors}} package) which can log your data to a round robin database (rrd) and later visualize graphically. See the sensord man page for details.<br />
<br />
==Troubleshooting==<br />
=== Renumbering Cores for Multi-CPU Systems ===<br />
In rare cases, the actual numbering of physical cores on multi-processor motherboards can be incorrect. Consider the following HP Z600 workstation with dual Xeons:<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 1: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 9: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 10: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core 0: +54.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 1: +56.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 9: +60.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core 10: +61.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
smsc47b397-isa-0480<br />
Adapter: ISA adapter<br />
fan1: 1730 RPM<br />
fan2: 1746 RPM<br />
fan3: 1224 RPM<br />
fan4: 2825 RPM<br />
temp1: +46.0°C<br />
temp2: +37.0°C<br />
temp3: +23.0°C<br />
temp4: -128.0°C<br />
</nowiki>}}<br />
<br />
Note the cores are numbered 0, 1, 9, 10 which is repeated into the second CPU. Most users want the core temperatures to report out in sequential order, i.e. 0,1,2,3,4,5,6,7. Fixing the order is accomplished in two steps.<br />
<br />
====Step 1. ID what each chip is reporting ====<br />
<br />
Run {{ic|sensors}} with the {{ic|-u}} switch to see what options are available for each physical chip:<br />
<br />
{{hc|$ sensors -u coretemp-isa-0000|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core 0:<br />
temp2_input: 61.000<br />
temp2_max: 85.000<br />
temp2_crit: 95.000<br />
temp2_crit_alarm: 0.000<br />
Core 1:<br />
temp3_input: 61.000<br />
temp3_max: 85.000<br />
temp3_crit: 95.000<br />
temp3_crit_alarm: 0.000<br />
Core 9:<br />
temp11_input: 62.000<br />
temp11_max: 85.000<br />
temp11_crit: 95.000<br />
Core 10:<br />
temp12_input: 63.000<br />
temp12_max: 85.000<br />
temp12_crit: 95.000<br />
</nowiki>}}<br />
<br />
{{hc|$ sensors -u coretemp-isa-0004|<nowiki><br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core 0:<br />
temp2_input: 53.000<br />
temp2_max: 85.000<br />
temp2_crit: 95.000<br />
temp2_crit_alarm: 0.000<br />
Core 1:<br />
temp3_input: 54.000<br />
temp3_max: 85.000<br />
temp3_crit: 95.000<br />
temp3_crit_alarm: 0.000<br />
Core 9:<br />
temp11_input: 59.000<br />
temp11_max: 85.000<br />
temp11_crit: 95.000<br />
Core 10:<br />
temp12_input: 59.000<br />
temp12_max: 85.000<br />
temp12_crit: 95.000<br />
</nowiki>}}<br />
<br />
==== Step 2. Redefine the cores ====<br />
<br />
Create {{ic|/etc/sensors.d/cores.conf}} wherein the new definitions are defined based on the output of step 1:<br />
<br />
{{hc|/etc/sensors.d/cores.conf|<nowiki><br />
chip "coretemp-isa-0000"<br />
<br />
label temp2 "Core 0"<br />
label temp3 "Core 1"<br />
label temp11 "Core 2"<br />
label temp12 "Core 3"<br />
<br />
chip "coretemp-isa-0004"<br />
<br />
label temp2 "Core 4"<br />
label temp3 "Core 5"<br />
label temp11 "Core 6"<br />
label temp12 "Core 7"</nowiki>}}<br />
<br />
Problem solved. Output after completing these steps:<br />
<br />
{{hc|$ sensors|<nowiki><br />
coretemp-isa-0000<br />
Adapter: ISA adapter<br />
Core0: +64.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core1: +63.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core2: +65.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core3: +66.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
coretemp-isa-0004<br />
Adapter: ISA adapter<br />
Core4: +53.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core5: +54.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core6: +59.0°C (high = +85.0°C, crit = +95.0°C)<br />
Core7: +60.0°C (high = +85.0°C, crit = +95.0°C)<br />
<br />
smsc47b397-isa-0480<br />
Adapter: ISA adapter<br />
fan1: 1734 RPM<br />
fan2: 1726 RPM<br />
fan3: 1222 RPM<br />
fan4: 2827 RPM<br />
temp1: +45.0°C <br />
temp2: +37.0°C <br />
temp3: +23.0°C <br />
temp4: -128.0°C <br />
</nowiki>}}<br />
<br />
=== Sensors not working since Linux 2.6.31 ===<br />
A change in version 2.6.31 has made some sensors stop working. See [http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31 this FAQ entry] for a detailed explanation and for some example errors. To fix sensors, add the following to your kernel boot line (e.g. in your [[GRUB]]/[[GRUB2]] configuration file) and reboot your machine:<br />
acpi_enforce_resources=lax<br />
{{Warning|In some situations, this may be dangerous. Consult the FAQ for details.}}<br />
<br />
Note that in most cases the information is still accessible via other modules (e.g. via ACPI modules) for the hardware in question. Many utilities and monitors (e.g. {{ic|/usr/bin/sensors}}) can gather information from either source. Where possible, this is the preferred solution.<br />
<br />
===K10Temp Module===<br />
<br />
Some K10 processors have issues with their temperature sensor. From the kernel documentation ({{ic|linux-&lt;version&gt;/Documentation/hwmon/k10temp}}):<br />
:''All these processors have a sensor, but on those for Socket F or AM2+, the sensor may return inconsistent values (erratum 319). The driver will refuse to load on these revisions unless you specify the {{ic|1=force=1}} module parameter.''<br />
<br />
:''Due to technical reasons, the driver can detect only the mainboard's socket type, not the processor's actual capabilities. Therefore, if you are using an AM3 processor on an AM2+ mainboard, you can safely use the {{ic|1=force=1}} parameter.''<br />
<br />
On affected machines the module will report "unreliable CPU thermal sensor; monitoring disabled". If you still want to use the module you can:<br />
# rmmod k10temp<br />
# modprobe k10temp force=1<br />
Confirm with [[Lm_sensors#Testing your lm_sensors]] that the sensor is in fact valid and reliable. If it is, you can edit {{ic|/etc/modprobe.d/k10temp.conf}} and add:<br />
options k10temp force=1<br />
This will allow the module to load at boot.<br />
<br />
==See also==<br />
*[[hddtemp]] - Software to read temperatures of hard drives.<br />
*[[monitorix]] - Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible.</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=99287Ventrilo2010-03-07T18:37:22Z<p>Statix: /* Finding the input device */</p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run {{Codeline|ventriloctrl /dev/input/[whatever]}} as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my {{Codeline|ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse}} shows:<br />
# ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called {{Filename|ventriloctrl+}}.<br />
<br />
# nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
# chmod +x /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the {{Filename|ventriloctrl+}} script run when ventrilo runs.<br />
<br />
=== Example Ventrilo Startup Script ===<br />
<br />
We previously made a script to start ventriloctrl. Now, you may wish to make a script that starts ventriloctrl after Ventrilo starts. The tough part about this is determining when ventrilo has started completely, as it is a wine app. If anyone else has a better way of doing this please add it. Otherwise, here is my method.<br />
<br />
Take a look at the first post in the [http://bbs.archlinux.org/viewtopic.php?id=56646 self-made command line utilities thread] on the Arch forums. The script we are going to use from that is the try script.<br />
<br />
Copy it into a script file such as {{Filename|/usr/bin/try}}. Make sure the script is executable.<br />
<br />
# chmod +x /usr/bin/try<br />
<br />
Now create another script to start Ventrilo named whatever you want. Mine will be called {{Filename|ventrilo}}.<br />
<br />
# nano /usr/bin/ventrilo<br />
<br />
In the script, you'll first want to cd to your Ventrilo install. By default, this should work for any users that have it installed to their default {{Filename|~/.wine}} directory. In my example, I run {{Filename|Ventrilo.exe}} and save its pid to the VENT variable, and then I use the try script to run {{Filename|ventriloctrl+}} and save its pid to the CTRL variable. Then I wait until VENT finishes, and kill CTRL. The effect? Ventrilo starts and ventriloctrl attempts to start until it does, then it runs until Ventrilo closes. Here's my script:<br />
<br />
#!/bin/bash<br />
cd ~/.wine/drive_c/Program\ Files/Ventrilo<br />
wine Ventrilo.exe 2>/dev/null & VENT=$!<br />
try ventriloctrl+ & CTRL=$!<br />
wait $VENT<br />
kill $CTRL<br />
<br />
Also make sure your ventrilo script is executable.<br />
<br />
# chmod +x /usr/bin/ventrilo<br />
<br />
That should be it. You should now be able to run Ventrilo with the ventrilo command.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file:<br />
<br />
# visudo<br />
<br />
Add a line like the following. {{Codeline|%wheel}} can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
== Additional Resources ==<br />
* [http://ubuntuforums.org/showpost.php?p=2662867&postcount=83 Ubuntu Forums Source]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=89495Snoopy2009-12-30T21:26:47Z<p>Statix: /* Snoopy Alias */</p>
<hr />
<div>== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with Warcraft III on wine.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR].<br />
<br />
== Getting Started ==<br />
<br />
===Snoopy Programs===<br />
<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
*<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
*<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
*<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
===Executing Snoopy===<br />
<br />
Snoopy can be executed in either of the following ways. The alias approach is a single-user solution, as opposed to the script which will work for all users.<br />
<br />
====Snoopy Alias====<br />
A simple way to get snoopy working is to use an alias.<br />
<br />
*First edit your .bashrc file<br />
<br />
$ nano ~/.bashrc<br />
<br />
*Add the following line as a new line with your interface (for example "eth0").<br />
<br />
alias snoopy-sh-local='sudo snoopy-nox eth0 `id -u` `id -g`'<br />
<br />
*Save and exit the file.<br />
<br />
*For this time you have to run<br />
<br />
$ . .bashrc<br />
<br />
This command re-reads your .bashrc and is afterwards not necessary because your .bashrc is read on every login.<br />
<br />
====Snoopy Script====<br />
You can make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
# nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
# ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Install_bundled_32-bit_system_in_64-bit_system&diff=70147Install bundled 32-bit system in 64-bit system2009-06-07T08:39:32Z<p>Statix: /* Configure the new installed system */</p>
<hr />
<div>[[Category:Arch64 (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|:Arch64_Install_bundled_32bit_system}}<br />
{{i18n_entry|Czech|:32bit chroot}}<br />
{{i18n_entry|Français|:32bit_chroot_(Français)}}<br />
{{i18n_links_end}}<br />
<br />
Note that this script doesn't try to change anything out of the 32bit directory. I'm no expert so there is maybe errors or some "bad things".<br />
<br />
This howto is just for those who really need to run 32 bit apps and to install it easily. As Arch64 tries to be a pure 64 bit distro, it seems the devs won't provide any compatibility libs, this system seems to me the cleaner.<br />
<br />
NOTE: If you have a custom kernel config, you need to make sure that this option is set: "CONFIG_IA32_EMULATION=y". Otherwise, your 64-bit kernel will not be able to access your 32-bit chrooted environment. The stock Arch64 kernels generally have this set properly by default.<br />
<br />
== Install the base 32 bit system ==<br />
We create the repository.<br />
mkdir /opt/arch32<br />
<br />
Replace 'x86_64' in /etc/pacman.d/mirrorlist with 'i686':<br />
<br />
'''Don't forget to revert it at the end of the howto or your system can be screwed when you install something.'''<br />
sed -i 's/x86_64/i686/g' /etc/pacman.d/mirrorlist<br />
<br />
As soon as you use the ''--root'' switch to the pacman command below, all the files ''/var/log/pacman.log'' ''/var/lib/pacman/db.lck'' will be created inside your ''/opt/arch32'' directory.<br />
So the log of pacman will be ''/opt/arch32/var/log/pacman.log'' and will NOT mess up with your 64bit installation. There is no need for a ''LogFile'' directive in ''/etc/pacman.conf'' or a ''--logfile'' switch unless you want the log file to be elsewhere.<br />
<br />
The ''--cachedir'' switch is for the package to be cached in the ''/opt/arch32/var/cache/pacman/pkg'' directory instead of /var/cache/pacman/pkg<br />
<br />
We now create that directory, just to be sure:<br />
<br />
mkdir -p /opt/arch32/var/{cache/pacman/pkg,lib/pacman}<br />
<br />
Now proceed to sync up pacman:<br />
<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg -Sy<br />
<br />
Now we can install the base packages:<br />
<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg -S base base-devel<br />
<br />
If you don't intend to compile packages inside this chroot, you can omit the base-devel group:<br />
<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg -S base<br />
<br />
'''Note:''' You may have to update pacman and install the base packages with one big swoop:<br />
<br />
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg -Sy base base-devel<br />
<br />
'''You can now revert your pacman.d/mirrorlist file to x86_64.'''<br />
<br />
== /etc/rc.d/arch32 rc script ==<br />
<br />
To initiate the 32bit environment at startup, create a script in /etc/rc.d/ called "arch32":<br />
<br />
#!/bin/bash<br />
<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
<br />
case $1 in<br />
start)<br />
stat_busy "Starting Arch32 chroot"<br />
mount --bind /proc /opt/arch32/proc<br />
mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb<br />
mount --bind /dev /opt/arch32/dev<br />
mount --bind /dev/pts /opt/arch32/dev/pts<br />
mount --bind /dev/shm /opt/arch32/dev/shm<br />
mount --bind /sys /opt/arch32/sys<br />
mount --bind /tmp /opt/arch32/tmp<br />
mount --bind /home /opt/arch32/home<br />
add_daemon arch32<br />
stat_done<br />
;;<br />
stop)<br />
stat_busy "Stopping Arch32 chroot"<br />
umount /opt/arch32/proc/bus/usb<br />
umount /opt/arch32/proc<br />
umount /opt/arch32/dev/pts<br />
umount /opt/arch32/dev/shm<br />
umount /opt/arch32/dev<br />
umount /opt/arch32/sys<br />
umount /opt/arch32/tmp<br />
umount /opt/arch32/home<br />
rm_daemon arch32<br />
stat_done<br />
;;<br />
restart)<br />
$0 stop<br />
sleep 1<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {start|stop|restart}"<br />
esac<br />
exit 0<br />
<br />
<br />
<br />
Then allow execution of this script:<br />
<br />
chmod +x /etc/rc.d/arch32<br />
<br />
And add it to "/etc/rc.conf":<br />
<br />
DAEMONS=(syslog-ng network netfs crond arch32 gdm)<br />
<br />
=== Additional mount option to allow 32-bit apps to access the 64-bit Pulseaudio server ===<br />
<br />
Add this line above {{Codeline|"add_daemon arch32"}}:-<br />
mount --bind /var/lib/dbus /opt/arch32/var/lib/dbus<br />
<br />
More information is available at the Pulseaudio article, especially the section on [http://wiki.archlinux.org/index.php/PulseAudio#Pulseaudio_from_within_a_chroot_.28ex._32-bit_chroot_in_64-bit_install.29 Pulseaudio from within a chroot].<br />
<br />
== Configure the new installed system ==<br />
First, copy some meaningful config files over....<br />
<br />
cd /opt/arch32/etc<br />
<br />
ln -f /etc/passwd* .<br />
ln -f /etc/shadow* .<br />
ln -f /etc/group* .<br />
<br />
ln -f /etc/rc.conf .<br />
ln -f /etc/resolv.conf .<br />
<br />
ln -f /etc/localtime .<br />
ln -f /etc/locale.gen .<br />
ln -f /etc/profile.d/locale.sh profile.d<br />
<br />
cp /etc/vimrc .<br />
cp /etc/mtab .<br />
<br />
Now chroot in your new system<br />
/etc/rc.d/arch32 start<br />
xhost +local:<br />
chroot /opt/arch32<br />
<br />
I recommend that you use a custom bash prompt inside your ''32bit chroot installation'' to know where you are (i.e. inside the 32bit chroot). You can, for example, add a '''ARCH32''' string to your '''PS1''' string that you may have defined in ''.bashrc'' or other config file.<br />
<br />
Fix some future locale issues<br />
/usr/sbin/locale-gen<br />
pacman -S ttf-bitstream-vera ttf-ms-fonts<br />
<br />
'''Note''' that you can install any other font. You just need one or your apps won't display any text.<br />
<br />
Also, keep in mind that the "/etc/pacman.conf" file from the 32bit environment is the default one. The [community] repo is enabled by default now.<br />
<br />
Make sure to uncomment some mirrors in "/etc/pacman.d/mirrorlist". If there are none uncommented, pacman will fail with an (unexpected error).<br />
<br />
Now you can install any apps you need (*note for firefox with the nonfree flash plugin, you will need to install libxmu as well! Apparently this dependency has not been taken care of yet; see [http://bugs.archlinux.org/task/5583 Flyspray]).<br />
<br />
pacman -S acroread opera<br />
pacman -S mozilla-firefox<br />
pacman -S libxmu flashplugin<br />
pacman -S mplayer-plugin<br />
<br />
You can also clean up to win back some space by removing some unnecessary packages.<br />
This cleanup is for your '''32 bit root" environment''' and must then be done inside it after '''chrooting'''!<br />
Below is a list of package you '''might''' want to remove...<br />
<br />
pacman -Rd mkinitcpio<br />
pacman -R kernel26<br />
pacman -R grub<br />
pacman -R dhcpcd<br />
pacman -R rp-pppoe<br />
pacman -R ppp<br />
pacman -R xfsprogs<br />
pacman -R reiserfsprogs<br />
pacman -R jfsutils<br />
pacman -R hdparm<br />
pacman -R hwdetect<br />
pacman -R syslog-ng<br />
pacman -R logrotate<br />
pacman -R lvm2<br />
pacman -R dcron<br />
pacman -R wpa_supplicant<br />
pacman -R pcmciautils<br />
<br />
===Consider also clearing out your pacman cache (regularly)===<br />
'''Note''': this is '''not''' a command that you'll only have to run just once. As packages accumulate, you'll have to keep doing this if you want to clear out the space from the pacman cache:<br />
pacman -Scc<br />
<br />
== Execute a 32bit apps from a 64bit env ==<br />
<br />
<br />
=== Download and install schroot ===<br />
<br />
Install "schroot" to your 64-bit installation from the community repository:<br />
<br />
pacman -S schroot<br />
<br />
=== Configuration ===<br />
<br />
Schroot is already configured for Arch32 chroot, so you just should check /etc/schroot/schroot.conf, section [Arch32] if all informations match your configuration.<br />
<br />
You will also want to edit {{Filename|/etc/schroot/mount-arch32}} to match the mounts you created within {{Filename|/etc/rc.d/arch32}}, as apps run through schroot won't be able to see mounts not listed in {{Filename|/etc/schroot/mount-arch32}}.<br />
<br />
<br />
=== Execute 32bit apps ===<br />
<br />
Finally, to use your 32bit apps:<br />
<br />
schroot -p -- opera -notrayicon<br />
<br />
It will launch Opera, without the systray icon, from your 32bit environment. <br />
<br />
If you want to, I wrote a small program to replace 64-bit version of firefox in your system, paste it into geany, save as cpp file named firefox.cpp and compile by pressing F9:<br />
#include <iostream><br />
#include <string><br />
#include <cstdlib><br />
using namespace std;<br />
<br />
int main(int argc, char **argv)<br />
{<br />
string temp="schroot -p firefox ";<br />
if (argc>=2) temp+=+argv[1];<br />
system(temp.c_str());<br />
return 0;<br />
}<br />
Now replace firefox binary file in /usr/lib/firefox-3.0.1 with the compiled file. (note: the directory may be different, because of version of firefox)<br />
<br />
=== Using sound ===<br />
The most used application in 32 bits is flash, for YouTube for example. <br />
<br />
To get sound from the flash player in firefox, open a terminal and chroot inside the 32-bit system:<br />
chroot /opt/arch32<br />
<br />
From there, install alsa-oss:<br />
pacman -S alsa-oss<br />
<br />
Then type:<br />
export FIREFOX_DSP="aoss"<br />
<br />
Every chroot into the 32-bit system will require this export command to be entered so it may be best to incorporate it into a script.<br />
<br />
Finally, launch Firefox.<br />
<br />
=== Example script for Firefox with sound ===<br />
Open a text editor and save the following in /usr/bin/firefox32 (as root, use sudo):<br />
<br />
<pre>#!/bin/sh<br />
schroot -p firefox $1;export FIREFOX_DSP="aoss"</pre><br />
<br />
Make it executable:<br />
<br />
sudo chmod +x /usr/bin/firefox32<br />
<br />
Now you can make an alias for firefox if you want:<br />
<br />
alias firefox="firefox32"<br />
<br />
Add this to your $HOME/.bashrc file at the end, and type it into bash to make the alias available immediately. Or you can just change all your DE launchers to firefox32 if you still want 64 bit firefox to be available.<br />
<br />
=== Note ===<br />
If you still use dchroot instead of current schroot, you should use ''-d'' switch instead of ''-s''.</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67423Ventrilo2009-04-22T19:49:08Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run {{Codeline|ventriloctrl /dev/input/[whatever]}} as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my {{Codeline|ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse}} shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called {{Filename|ventriloctrl+}}.<br />
<br />
# nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
# chmod +x /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the {{Filename|ventriloctrl+}} script run when ventrilo runs.<br />
<br />
=== Example Ventrilo Startup Script ===<br />
<br />
We previously made a script to start ventriloctrl. Now, you may wish to make a script that starts ventriloctrl after Ventrilo starts. The tough part about this is determining when ventrilo has started completely, as it is a wine app. If anyone else has a better way of doing this please add it. Otherwise, here is my method.<br />
<br />
Take a look at the first post in the [http://bbs.archlinux.org/viewtopic.php?id=56646 self-made command line utilities thread] on the Arch forums. The script we are going to use from that is the try script.<br />
<br />
Copy it into a script file such as {{Filename|/usr/bin/try}}. Make sure the script is executable.<br />
<br />
# chmod +x /usr/bin/try<br />
<br />
Now create another script to start Ventrilo named whatever you want. Mine will be called {{Filename|ventrilo}}.<br />
<br />
# nano /usr/bin/ventrilo<br />
<br />
In the script, you'll first want to cd to your Ventrilo install. By default, this should work for any users that have it installed to their default {{Filename|~/.wine}} directory. In my example, I run {{Filename|Ventrilo.exe}} and save its pid to the VENT variable, and then I use the try script to run {{Filename|ventriloctrl+}} and save its pid to the CTRL variable. Then I wait until VENT finishes, and kill CTRL. The effect? Ventrilo starts and ventriloctrl attempts to start until it does, then it runs until Ventrilo closes. Here's my script:<br />
<br />
#!/bin/bash<br />
cd ~/.wine/drive_c/Program\ Files/Ventrilo<br />
wine Ventrilo.exe 2>/dev/null & VENT=$!<br />
try ventriloctrl+ & CTRL=$!<br />
wait $VENT<br />
kill $CTRL<br />
<br />
Also make sure your ventrilo script is executable.<br />
<br />
# chmod +x /usr/bin/ventrilo<br />
<br />
That should be it. You should now be able to run Ventrilo with the ventrilo command.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file:<br />
<br />
# visudo<br />
<br />
Add a line like the following. {{Codeline|%wheel}} can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
== Additional Resources ==<br />
* [http://ubuntuforums.org/showpost.php?p=2662867&postcount=83 Ubuntu Forums Source]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=67365Snoopy2009-04-21T22:11:18Z<p>Statix: /* Snoopy Alias */</p>
<hr />
<div>== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with Warcraft III on wine.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR].<br />
<br />
== Getting Started ==<br />
<br />
===Snoopy Programs===<br />
<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
*<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
*<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
*<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
===Executing Snoopy===<br />
<br />
Snoopy can be executed in either of the following ways. The alias approach is a single-user solution, as opposed to the script which will work for all users.<br />
<br />
====Snoopy Alias====<br />
A simple way to get snoopy working is to use an alias.<br />
<br />
*First edit your .bashrc file<br />
<br />
$ nano ~/.bashrc<br />
<br />
*Add the following line as a new line with your interface (for example "eth0").<br />
<br />
alias snoopy-sh-local='sudo snoopy-nox eth0 `id -u` `id -g`'<br />
<br />
*Save and exit the file.<br />
<br />
*For this time you have to run<br />
<br />
$ . .bashrc<br />
<br />
This command re-reads your .bashrc and is no longer necessary because your .bashrc is read on every login.<br />
<br />
====Snoopy Script====<br />
You can make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
# nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
# ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67364Ventrilo2009-04-21T22:09:29Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called ventriloctrl+.<br />
<br />
# nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
# chmod +x /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the ventriloctrl+ script run when ventrilo runs.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file<br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
== Additional Resources ==<br />
* [http://ubuntuforums.org/showpost.php?p=2662867&postcount=83 Ubuntu Forums Source]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Talk:Snoopy&diff=67363Talk:Snoopy2009-04-21T22:07:29Z<p>Statix: </p>
<hr />
<div>Re-organized the page a bit to make up for additions. I hope you guys prefer it this way. If not, feel free to change things of course.<br />
--[[User:Statix|Statix]] 18:05, 21 April 2009 (EDT)</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=67362Snoopy2009-04-21T22:07:06Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with Warcraft III on wine.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR].<br />
<br />
== Getting Started ==<br />
<br />
===Snoopy Programs===<br />
<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
*<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
*<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
*<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
===Executing Snoopy===<br />
<br />
Snoopy can be executed in either of the following ways. The alias approach is a single-user solution, as opposed to the script which will work for all users.<br />
<br />
====Snoopy Alias====<br />
A simple way to get snoopy working is to use an alias.<br />
<br />
*First edit your .bashrc file<br />
<br />
$ nano ~/.bashrc<br />
<br />
*Add the following line as a new line with your interface (for example "eth0").<br />
<br />
$ alias snoopy-sh-local='sudo snoopy-nox eth0 `id -u` `id -g`'<br />
<br />
*Save and exit the file.<br />
<br />
*For this time you have to run<br />
<br />
$ . .bashrc<br />
<br />
This command re-reads your .bashrc and is no longer necessary because your .bashrc is read on every login.<br />
<br />
====Snoopy Script====<br />
You can make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
# nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
# ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67361Ventrilo2009-04-21T22:06:04Z<p>Statix: /* Startup Script */</p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called ventriloctrl+.<br />
<br />
# nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
# chmod +x /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the ventriloctrl+ script run when ventrilo runs.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file<br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67360Ventrilo2009-04-21T22:05:37Z<p>Statix: /* Startup Script */</p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called ventriloctrl+.<br />
<br />
nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
chmod +x /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the ventriloctrl+ script run when ventrilo runs.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file<br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Talk:Snoopy&diff=67359Talk:Snoopy2009-04-21T22:05:05Z<p>Statix: Created page with 'Re-organized the page a bit to make up for additions. Feel free to change things of course. :) --~~~~'</p>
<hr />
<div>Re-organized the page a bit to make up for additions. Feel free to change things of course. :)<br />
--[[User:Statix|Statix]] 18:05, 21 April 2009 (EDT)</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=67358Snoopy2009-04-21T22:02:37Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with Warcraft III on wine.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR].<br />
<br />
== Getting Started ==<br />
<br />
===Snoopy Programs===<br />
<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
*<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
*<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
*<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
===Executing Snoopy===<br />
<br />
Snoopy can be executed in either of the following ways. The alias approach is a single-user solution, as opposed to the script which will work for all users.<br />
<br />
====Snoopy Alias====<br />
A simple way to get snoopy working is to use an alias.<br />
<br />
*First edit your .bashrc file<br />
<br />
nano ~/.bashrc<br />
<br />
*Add the following line as a new line with your interface (for example "eth0").<br />
<br />
alias snoopy-sh-local='sudo snoopy-nox eth0 `id -u` `id -g`'<br />
<br />
*Save and exit the file.<br />
<br />
*For this time you have to run<br />
<br />
. .bashrc<br />
<br />
This command re-reads your .bashrc and is no longer necessary because your .bashrc is read on every login.<br />
<br />
====Snoopy Script====<br />
You can make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67357Ventrilo2009-04-21T21:55:25Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called ventriloctrl+.<br />
<br />
nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
chmod 755 /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the ventriloctrl+ script run when ventrilo runs.<br />
<br />
=== Allowing sudo for ventriloctrl ===<br />
You might also want to run ventriloctrl with nopasswd for sudo. To do this, edit sudo's config file<br />
<br />
# visudo<br />
<br />
Add a line like the following. %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/ventriloctrl<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=67356Ventrilo2009-04-21T21:51:54Z<p>Statix: </p>
<hr />
<div>== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== Startup Script ===<br />
Now we'll make a script to run ventriloctrl using the parameters you discovered. This could also be done with an alias or other user-specific methods. Edit your script with your favorite editor and call it whatever you want. Mine is going to be called ventriloctrl+.<br />
<br />
nano /usr/bin/ventriloctrl+<br />
<br />
By default, a normal user does not have the access to the /dev/input/ devices that ventriloctrl needs to use. To get around this you can either make a udev rule, or just use sudo. So far, I'm just going to show what your script should look like with sudo.<br />
<br />
#!/bin/sh<br />
sudo ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
Of course, the device and event number should be replaced with the ones you found earlier. Essentially you just want to add sudo to the front of your previous input device line.<br />
<br />
Make sure your script is executable:<br />
<br />
chmod 755 /usr/bin/ventriloctrl+<br />
<br />
All done. Now you just need to make the ventriloctrl+ script run when ventrilo runs.<br />
<br />
[[Category:HOWTOs (English)]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Lighttpd&diff=66442Lighttpd2009-04-08T06:31:17Z<p>Statix: /* Lighttpd Installation */</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
== What is Lighttpd? ==<br />
[http://trac.lighttpd.net/ The lighttpd website] gives a good definition:<br />
<br />
<blockquote><br />
"lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that suffers load problems."<br />
</blockquote><br />
<br />
== Lighttpd Installation ==<br />
[root@computer]# pacman -S lighttpd<br />
<br />
That's it, for a default installation of lighttpd! <br />
<br />
Configuration files are located '''/etc/lighttpd/lighttpd.conf''' but the defaults should produce a working test page by default.<br />
<br />
The default configuration file specifies '''/srv/http/''' as the document directory served.<br />
<br />
It may be necessary to add a user and group for http if you don't already have one. That user seems to need to have permissions to write to the /var/log/lighttpd as well, so we'll make it the owner of that folder.<br />
# groupadd http<br />
# adduser http<br />
# chown -R http /var/log/lighttpd<br />
<br />
To test the install --<br />
[root@computer]/etc/rc.d/lighttpd start<br />
[root@computer]touch /srv/http/index.html<br />
[root@computer]chmod 755 /srv/http/index.html<br />
[root@computer]echo "TestMe!" >> /srv/http/index.html<br />
<br />
Then point your browser to localhost, and you should see the test page. You may want to add lighttpd to the daemons list in '''/etc/rc.conf''' to start the server on boot.<br />
<br />
== FastCGI, PHP, Ruby on Rails, etc ==<br />
For additional setup and configuration of additional lighttpd components, please see the following articles:<br />
* [[Lighttpd_For_Both_SSL_And_Non-SSL]]<br />
* [[Fastcgi_and_lighttpd]]</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=66003Ventrilo2009-03-30T18:40:17Z<p>Statix: /* Finding the input device */</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever] as root, and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== UDev Rule ===<br />
<br />
Ventriloctrl needs access to your input event. This can be done by running ventriloctrl as root, or preferably by setting a udev rule so it can be accessed by a user. First off, find out what input device you want to use. If you don't mind running it with sudo, skip this section and simply put sudo in front of the command in the next section.</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=63547Ventrilo2009-03-02T08:52:29Z<p>Statix: </p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X input to Ventrilo.<br />
<br />
=== Finding the input device ===<br />
The acceptable input devices are in /dev/input/. If you want to use a mouse use the event-mouse in /dev/input/by-id/. For a keyboard use /dev/input/event[#].<br />
<br />
You'll probably need to do a bit of trial and error to find the proper event number or device. The best way to do this is just to run ventriloctrl /dev/input/[whatever], and press keys or click your mouse and see if it is detected by the program. If it is detected, it will show an example line with a number at the end. That number is the button number that you will use to run ventriloctrl in the future.<br />
<br />
For example, my <tt>ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse</tt> shows:<br />
ventriloctrl /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse 272<br />
<br />
If that was the button I wanted to use, I would run ventriloctrl with that line in the future.<br />
<br />
=== UDev Rule ===<br />
<br />
Ventriloctrl needs access to your input event. This can be done by running ventriloctrl as root, or preferably by setting a udev rule so it can be accessed by a user. First off, find out what input device you want to use. If you don't mind running it with sudo, skip this section and simply put sudo in front of the command in the next section.</div>Statixhttps://wiki.archlinux.org/index.php?title=Ventrilo&diff=63543Ventrilo2009-03-02T06:30:12Z<p>Statix: Created page with 'Category:HOWTOs (English) == Introduction == Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few worka...'</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
Ventrilo is a voice communication program for Windows that runs quite well on the latest wine. This article outlines a few workarounds necessary to using Ventrilo naturally on Linux.<br />
<br />
== Global Push to Talk Hotkey ==<br />
One problem that wine Ventrilo users face is that the push to talk hotkey only being detected when a wine window (such as Ventrilo itself) is in focus. The solution to this is using [http://aur.archlinux.org/packages.php?ID=18058 ventriloctrl], a simple program that sends X key input to Ventrilo.<br />
<br />
Ventriloctrl needs access to your keyboard event. This can be done by running ventriloctrl as root, or preferably by setting a udev rule so it can be accessed by a user. First off, <br />
<br />
... to be continued. :)</div>Statixhttps://wiki.archlinux.org/index.php?title=Hibernate-script&diff=57478Hibernate-script2009-01-09T01:50:59Z<p>Statix: /* Suspending and Resuming */ Replaced SERVICES array with DAEMONS, as that's what it is</p>
<hr />
<div>[[Category:Power management (English)]]<br />
[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
This article describes how to suspend a computer (usually a laptop) to disk. This means that all the running processes are saved to the hard drive and the power is completely shut down. The article discusses the two main methods to accomplish this task, that is userspace suspension (uswsusp) and tuxonice (formerly known as suspend2). See the [http://suspend.sourceforge.net/ ususpend website] and the [http://www.tuxonice.net/ tuxonice website] for complete documentation. There is a third method: using the kernelspace functionalities of the vanilla kernel. However, this method is the least developed, the slowest and the less reliable. On the contrary, tuxonice and ususpend are competing in features and stability. The only method to decide which method is better for you is to try both of them. From a general point of view, we can say that uswsusp does not force you to patch, configure and compile a kernel, while tuxonice does. However, tuxonice can be used without an initrd/initramfs, while using ususpend without an initrd/initramfs is discouraged; moreover, tuxonice allows you to suspend on a regular file if you have not a swap partition, while uswsusp give this possibility only if you run an experimental and unstable mm kernel.<br />
<br />
It is important to distinguish the core method of suspension to disk from the userspace application which you use to hibernate your machine to disk. A userspace application is required because the large majority of the laptops require some quirks in order to accomplish a proficient, successful hibernation cycle: unloading modules, restarting services, unmount windows partitions and usb keys, and so on.<br />
<br />
There are two widely used userspace applications for this purpose: [[pm-utils]] and hibernate-script. You can find both of them in the extra repo. However, since in this guide we need to describe two different, competing core methods, we will focus on the hibernate-script, since only this script allows the user to choose the core method he prefers. On the contrary, [[pm-utils]], at least in the version actually distributed by arch, forces you silently to use the old vanilla method. On the other side, the script, developed by the tuxonice development team, can be used nonetheless also to hibernate your machine with the ususpend method, and even to suspend the machine to ram (actually it is an excellent tool also for this task, but we are not going to discuss this aspect in this document, see [[Suspend to RAM]]).<br />
<br />
If you prefer to use pm-utils, refer to the specific [[pm-utils|wiki article]]. You should note that the pm-utils-opensuse package includes some patches from opensuse which allow the user to choose uswsusp as a core method. In the web you can find other patches which allow you to use tuxonice as a method. The upcoming release of pm-utils will include all these patches and pm-utils will be a serious competitor of the hibernate-script. Nonetheless, the hibernate-script is still much more configurable and documented, so this guide still assumes that you are using it (although it is very easy to translate each info for pm-utils).<br />
<br />
Thus:<br />
<br />
# pacman -S hibernate-script<br />
<br />
The discussion will be articulated in four parts. First of all, we will discuss the userspace method, secondly the tuxonice one, thirdly we will see how to use the power of the hibernate-script in order to circumvent some problems which could impair your ability to accomplish successful suspend/resume cycles. These last tips can be used with both methods. On the contrary, the first two parts will include instructions to use the hibernate-script in order to accomplish the basic operations with the two methods. In the fourth and last part, we will see how to combine suspension to disk and [[Suspend to RAM]] . <br />
<br />
When there is the need to modify the configuration of the bootloader, we will be always under the assumption that you use grub, but it should not be difficult to act analogously on the configuration of lilo.<br />
<br />
=Uswsusp method=<br />
<br />
The userspace method lets you resort to some advanced suspension abilities included in vanilla kernels > 2.6.17. You need two userspace tools, called s2disk and resume, which do what their names say. They are both included in the uswsusp package (which includes also s2ram, see [[Suspend to RAM]] ). You can find uswsusp in the AUR. The package in the AUR includes also an initramfs hook which allows you to resume properly using an initramfs.<br />
<br />
==Obtaining uswsusp==<br />
The first thing to do is to [http://aur.archlinux.org/packages/uswsusp/uswsusp.tar.gz download the tarball] from the [http://aur.archlinux.org/packages.php?ID=14093 AUR page]. Compile the source and create the package with makepkg and install it with pacman -U.<p><b>Please note:</b> the uswsusp package currently (as of 2008.12.22) does not build correctly with a standard Arch installation (errors about libgcrypt not being found even if it is installed on the system). See recent comments on the AUR page for this package for details. The simple solution is to add the option "--disable-resume-static" to the configure script invocation in the PKGBUILD file.<br />
<br />
==Editing /etc/suspend.conf==<br />
On the contrary, you need to edit the s2disk configuration file, called /etc/suspend.conf. It is essential that you modify the resume device parameter:<br />
<br />
resume device = /dev/sda3<br />
<br />
It needs to point to your swap partition: in this case, the third partition of a primary pata-sata drive. It is also a good thing to enable compression, because this speeds up greatly your suspension/resume routine.<br />
<br />
Note that it is important that this configuration file be edited *before* recreating the initramfs (done below). Presently, the initramfs build process reads this configuration file, and embeds the current resume parameter. If not changed from the default '<path_to_resume_device_file>', this causes problems such as seeing, on bootup:<br />
<br />
# Could not stat the resume device file '<path_to_resume_device_file>'<br />
# Please type in the full path name to try again or press ENTER to boot the system.<br />
<br />
If you have experiencing this problem, simply edit the file as appropriate, and then rebuild the initramfs.<br />
<br />
==Recreate the intramfs==<br />
Now you need to recreate an initramfs with the new hook. So edit the /etc/mkinitcpio.conf file. In the HOOKS list add the '''uresume''' hook ('''it is different from the resume hook, which is on the contrary required by the tuxonice method'''). You should put it immediately before the filesystem hook. When the hook is executed the device file for the swap partition (which you have defined in /etc/suspend.conf) needs to exist (the standard udev hook will take care of this). Now proceed to regenerate your initramfs:<br />
<br />
# mkinitcpio -p kernel26<br />
<br />
You need to adjust this command according to the kernel you plan to use and the name of the initramfs in the grub configuration. Anyway you should not need to modify anything in the grub configuration.<br />
<br />
==Support for encryption==<br />
The package in the AUR does already support encryption. You need to:<br />
* generate a key with the suspend-keygen utility included in the uswsusp package;<br />
* write the name of the key in /etc/suspend.conf;<br />
* uncomment or add the following line in /etc/suspend.conf<br />
<br />
encrypt = y<br />
RSA key file = <path_to_keyfile><br />
* build a new initramfs with the uresume hook just before the filesystem one.<br />
<br />
==Support for splash screens and suspension to file==<br />
<br />
The AUR package does not provide support for splash screens: uswsusp would support splashy and fbsplash, but you need to modify the PKGBUILD in order to recompile uswsusp with libsplashy or fbsplash support: see the HOWTO and README in the source tarball for details.<br />
<br />
Please note that uswsusp can also suspend to a file, but only if you use an experimental mm-patched kernel. If you want to suspend to file, tuxonice is probably the way to go. In the case you like experimental things, see the instructions in the HOWTO of the uswsusp source tarball.<br />
<br />
==Suspending==<br />
<br />
Now you could try to suspend directly calling s2disk from the command line:<br />
<br />
# s2disk<br />
<br />
However, this is highly likely to fail, because some services could need to be stopped, some modules unloaded, etc. Thus it is probably necessary to resort to a userspace tool which calls internally s2disk, like [[Pm-utils]] since version 1.1 (which is now in core) or hibernate-script. See [[Suspend to Disk#Editing /etc/hibernate/hibernate.conf|below]] about details for defining the ususpend-disk method as default in /etc/hibernate/hibernate.conf. For the moment being, remember that you can define specific options in /etc/hibernate/ususpend-disk.conf and, after having configured also /etc/hibernate/common.conf, you can suspend to disk with the uswsusp method with the following command:<br />
<br />
# hibernate -F /etc/hibernate/ususpend-disk.conf<br />
<br />
=Tuxonice method=<br />
<br />
==Obtaining tuxonice==<br />
Tuxonice consists of a kernel patch, plus a user interface. Only the kernel patch is necessary, the user interface provides merely a semi-graphical interface displayed during the hibernation/resume cycle. <br />
<br />
Arch Linux used to deliver a binary tuxonice-patched kernel, but none of the devs want currently to maintain it. <br />
<br />
However you can use the kernel26-ice in AUR unsupported. It automatizes all the patch routine, the compilation and installation of the kernel, the regeneration of the initramfs with an appropriate hook. <br />
<br />
Otherwise, you need to patch, configure and compile your own kernel. You can do this either with the ABS method (starting from the arch default kernel PKGBUILD and adding the tuxonice patchset, or with the plain, old, reliable, venerable routine of <br />
<br />
# make menuconfig<br />
# make<br />
# make modules_install<br />
# cp arch/i386/boot/bzImage /boot/kernel-tuxonice-2.6.*<br />
<br />
See [[Kernel Compilation From Source]] and [[Kernel Compilation with ABS]] for instructions.<br />
In both cases, you need to configure the options added by the patchset, which you can find in the ACPI section of make menuconfig. Anyway, the defaults should be suitable for the large majority of scenarios. You can also hardcode in the kernel the path of your swap partition. In this case you can skip the below [[Suspend to Disk#Editing the Grub menu.lst]] .<br />
<br />
Please note that, if you spend the time to reconfigure completely the kernel (and in particular if you compile into the kernel the stuff necessary to boot your machine), you can be dispensed by the necessity to generate and use an initramfs: tuxonice will be able to resume properly also without an initrd/initramfs.<br />
<br />
==Editing the Grub menu.lst==<br />
Before your can use the suspend function, you need to boot your computer with the "resume" parameter, unless you have hardcoded your swap partition during the kernel configuration. The resume parameter points to the swap partition or swap file. The parameter is a kernel boot parameter, that is it should be added, if you use GRUB, to the line of /boot/grub/menu.lst where the location of your kernel is specified. <br />
For example:<br />
<br />
# tuxonice kernel<br />
title Arch Linux<br />
kernel /boot/vmlinuz26-ice root=/dev/sda2 ro resume=swap:/dev/sda3<br />
initrd /boot/kernel26-ice.img<br />
<br />
This assumes that you installed Arch Linux onto the second hard drive partition, that your swap partition is the third, that you have not a separate /boot partition and that you are using an initrd with pata/sata enabled. Adjust accordingly to your case.<br />
<br />
==Recreating the initramfs==<br />
<br />
If you use an initramfs, you need to add the resume hook (which is the same as used for vanilla kernel suspension) in the HOOKS in the configuration of mkinitcpio. Additionally, if you want to speed things up by using LZF compression, you must add the module lzf to the MODULES in the same file.<br />
<br />
/etc/mkinitcpio.conf Example:<br />
<br />
MODULES="lzf"<br />
HOOKS="base udev autodetect pata scsi sata resume filesystems"<br />
<br />
Once you have added the resume hook, and all needed modules you need to regenerate your initramfs, with a command like the following:<br />
<br />
# /sbin/mkinitcpio -p kernel26-ice<br />
<br />
==Using userui - a user interface for tuxonice==<br />
<br />
Optionally, you can use a text or fbsplash interface with a progress bar with tuxonice. To do this, install the userui package in the extra repo:<br />
<br />
# pacman -S userui<br />
<br />
In ''/etc/hibernate/suspend2.conf'', configure the user interface:<br />
<br />
## Specify a userui like this:<br />
# text interface<br />
ProcSetting user_interface/program /usr/sbin/tuxoniceui_text<br />
<br />
or<br />
<br />
## Specify a userui like this:<br />
# fbsplash interface interface<br />
ProcSetting user_interface/program /usr/sbin/tuxoniceui_fbsplash<br />
<br />
The ''fbsplash'' interface also needs a fbsplash theme in ''/etc/splash/suspend2/''.<br />
<br />
The text interface may be good for debugging suspend2, as it displays some messages.<br />
You won't see a user interface for the first few seconds of the resume process unless you add the ''userui'' hook to your mkinitcpio (before the ''resume'' hook) configuration and regenerate your initramfs, but this is also optional. <br />
When you use the kernel26tp 2.6.25 (or any other newer kernel versions, I guess), you have to edit /lib/initcpio/hooks/userui so that it searches for tuxonice at the right place, make it look like this:<br />
# vim:set ft=sh:<br />
run_hook ()<br />
{<br />
if [ -d "/sys/power/tuxonice" ]; then<br />
suspend2ui="/sys/power/tuxonice/user_interface/program"<br />
else<br />
suspend2ui="/proc/suspend2/userui_program"<br />
fi<br />
if [ -e ${suspend2ui} ]; then<br />
echo "/sbin/suspend2ui" > ${suspend2ui}<br />
fi<br />
}<br />
Then run mkinitcpio -p kernel26tp or similar<br />
<br />
==Suspending and Resuming==<br />
<br />
Now you need to tweak the hibernate script. See [[Suspend to Disk#Editing /etc/hibernate/hibernate.conf|below]] for instructions about defining the tuxonice method as the default hibernation method. <br />
The specific file is /etc/hibernate/suspend2.conf (the hibernate-script still uses the old name of tuxonice):<br />
<br />
Make sure that the following lines are uncommented and appropriately configured:<br />
UseSuspend2 yes<br />
Reboot no<br />
EnableEscape yes<br />
DefaultConsoleLevel 1<br />
Compressor lzf<br />
<br />
Encryptor none<br />
<br />
Once you have tweaked what you want/need (also in /etc/hibernate/common.conf), you can try tuxonice hibernation with the following method:<br />
<br />
# hibernate -F /etc/hibernate/suspend2.conf<br />
<br />
You can abort a suspend cycle if you press the escape key. If you press a capital r, you will force the system to reboot after hibernation.<br />
If all goes well, you should be able to resume using the same Grub menu selection. If you make that option the default for Grub, you will always default to resuming if a resume image is available. '''Do never use a different kernel to resume than you used to suspend! If pacman updates your kernel, don't suspend before you have rebooted properly.''' It is recommended that you test the suspend/hibernate from a text console first and then once you have confirmed that it works try it from within X.<br />
<br />
You can make this practice safer adding the hibernate-cleanup daemon to your DAEMONS array in /etc/rc.conf. This script will make sure that any stale image is deleted from your swap partition at boot time. This should make your system safe also in the case that you have chosen the mistaken kernel at the grub prompt. The hibernate-cleanup service is included in the hibernate-script package.<br />
<br />
== References ==<br />
<br />
*The [http://www.tuxonice.net tuxonice website] and the [http://wiki.tuxonice.net/ tuxonice wiki] are excellent sources of documentation.<br />
*There is a good [http://gentoo-wiki.com/HOWTO_Software_Suspend_v2 Gentoo wiki article] that covers a lot of the same material.<br />
<br />
<br />
=Hibernate tricks with the hibernate.script=<br />
<br />
WARNING: With kernel26-ice 2.6.25-6 I needed to bump hibernat-script to 1.99 (using ABS) --kujub<br />
<br />
/var/abs/local/hibernate-script/PKGBUILD (quick-and-dirty)<br />
<br />
pkgname=hibernate-script<br />
pkgver=1.99<br />
pkgrel=1<br />
pkgdesc="Scripts needed for software suspend aka hibernate"<br />
arch=(i686 x86_64)<br />
options=(!strip)<br />
backup=('etc/hibernate/hibernate.conf' 'etc/hibernate/suspend2.conf' \<br />
'etc/hibernate/disk.conf' 'etc/hibernate/ram.conf' \<br />
'etc/hibernate/common.conf' 'etc/hibernate/blacklisted-modules' \<br />
'etc/hibernate/ususpend-both.conf' 'etc/hibernate/sysfs-ram.conf' \<br />
'etc/hibernate/ususpend-ram.conf' 'etc/hibernate/sysfs-disk.conf' \<br />
'etc/hibernate/ususpend-disk.conf')<br />
url="http://www.suspend2.net"<br />
source=(http://www.suspend2.net/downloads/all/hibernate-script-$pkgver.tar.gz \<br />
hibernate-script-1.96-arch.patch hibernate.rc)<br />
# hibernate-script-${pkgver}-arch.patch hibernate.rc)<br />
md5sums=('11832e77edc4a13330aaced8cea52dfb'<br />
'92893c780fdf1820c8f9e55294d2ac7f'<br />
'7e470bc1f8090c41f57f50b63aba6d29')<br />
depends=(bash kbd)<br />
<br />
<br />
build() {<br />
cd $startdir/src/hibernate-script-$pkgver<br />
# Fix scriptlets to work properly with Arch Linux<br />
# patch -Np1 -i ../hibernate-script-${pkgver}-arch.patch || return 1<br />
patch -Np1 -i ../hibernate-script-1.96-arch.patch || return 1<br />
## remove stale file (filename with dot breaks eval)<br />
rm -f scriptlets.d/suspend2.orig<br />
export BASE_DIR=${startdir}/pkg<br />
export PREFIX=/usr<br />
mkdir -p $startdir/pkg/etc/{rc,logrotate}.d<br />
./install.sh || return 1<br />
install -m 755 ../hibernate.rc $startdir/pkg/etc/rc.d/hibernate-cleanup<br />
}<br />
<br />
<br />
This is a brief overview of the hibernate script. If you want to tweak it further, examine the ''common.conf'' and ''suspend2.conf'' files further and read the excellent and exhaustive man pages for hibernate and hibernate.conf.<br />
<br />
==Editing /etc/hibernate/hibernate.conf==<br />
<br />
In order to call directly the hibernate command without the -F option, you need to define your preferred hibernation method. This should be done in this file. If you list several methods, the first one will be used. Note that ''hibernate'' can also be used with [[Suspend to RAM]] or vanilla swsusp, but this is not part of this HOWTO).<br />
<br />
Then either:<br />
<br />
TryMethod ususpend-disk.conf<br />
<br />
or: <br />
<br />
TryMethod suspend2.conf<br />
<br />
==Editing /etc/hibernate/common.conf==<br />
<br />
The options in this file are used with any hibernation method (actually, the file is sourced by the configuration files of each method) and also by [[Suspend to RAM]] when accomplished with the hibernate-script. This file is complex and well commented. The man page hibernate.conf describes adequately all the options. Here, we can only stress the most commonly useful parts.<br />
<br />
Uncomment the lines for any filesystems that have the potential to change while your computer is suspended (for example shared partitions with windows like vfat or ntfs ones). They will be remounted upon resume. Otherwise you would risk corrupting the filesystems.<br />
<br />
### filesystems<br />
# Unmount /nfsshare /windows /mnt/sambaserver<br />
# UnmountFSTypes smbfs nfs<br />
# UnmountGraceTime 1<br />
# Mount /windows<br />
<br />
If you don't explicitly restore the volume levels, ALSA may have the sound channels muted after resuming. If this happens, look for<br />
<br />
### services<br />
<br />
in /etc/hibernate/common.conf and change the line just below to<br />
<br />
RestartServices alsa<br />
<br />
The alsa service will be stopped before suspension and restarted after resuming: the sound channels and volumes will be as before.<br />
You may want to restart other problematic services here.<br />
<br />
A common issue is that some drivers do not support suspension, that is they do not work properly after a suspension cycle or even they prevent the system from suspending or resuming properly. <br />
In these cases (which should be reported - at least for modules in the vanilla kernel - to the suspend-devel@lists.sourceforge.net mailing list, so that they can be fixed upstream) you can unload the module before suspension and reload it after resuming: the hibernate-script can automatize this routine with the LoadModules and UnloadModules options. Actually, the hibernate-script already unload some problematic modules, listed in /etc/hibernate/blacklisted-modules, so you can also add the modules in that file.<br />
<br />
<br />
To re-connect to networks after rebooting, you may want to add<br />
OnResume 25 netcfg2 -a<br />
OnResume 20 netcfg-auto-wireless <your-network-interface><br />
This will disconnect from all networks, then should automatically choose the correct one. If you use another way to connect to a network (such as netcfg2 <profile-name> then of-course, put that there instead.<br />
<br />
If you need/want to eject all PcCards before suspending and reinsert them after resuming, change the ''EjectCards'' setting in ''common.conf'':<br />
<br />
### pcmcia<br />
EjectCards yes<br />
<br />
This is necessary on some laptops, if the pccards stop working after resume.<br />
<br />
Finally, the most problematic aspect is constituted by the video card: its status needs often to be restored after resuming. In other cases, it is necessary to switch from X to the console.<br />
The following options in /etc/hibernate/common.conf will probably fix these issues (whose symptom could be a frozen machine or only a black display after resuming):<br />
<br />
### vbetool<br />
#EnableVbetool yes<br />
#RestoreVbeStateFrom /var/lib/vbetool/vbestate<br />
#VbetoolPost yes<br />
# RestoreVCSAData yes<br />
<br />
### xhacks<br />
#SwitchToTextMode yes<br />
#UseDummyXServer yes<br />
#DummyXServerConfig xorg-dummy.conf<br />
<br />
You can uncomment one or many of them in order to see if the problem is solved. In order to use the first block of options, you need to install the vbetool package from the extra repository. Each of the option is documented in man hibernate.conf. <br />
Please note that it is very important to try all the different combinations of these options before than anything else, becaause the problems with the display are the most common source of troubles in a suspension cycle.<br />
<br />
== NVidia specific settings ==<br />
If you have an NVidia graphics card and are using the binary driver by NVidia with an AGP card, you have to add the following line to your /etc/X11/xorg.conf:<br />
<br />
Option "NvAGP" "1"<br />
<br />
NVidia also suggest this setting for the hibernate script:<br />
<br />
ProcSetting extra_pages_allowance 0<br />
<br />
to the file /etc/hibernate/common.conf. This setting also seems to help with the binary ATI driver. At last, you need to uncomment the nvidia module in /etc/hibernate/blacklisted-modules.<br />
<br />
== Suspending with fglrx ==<br />
Following addition to /etc/hibernate/suspend2.conf is required:<br />
<br />
# For fglrx<br />
ProcSetting extra_pages_allowance 20000<br />
<br />
== Dropping Disk Caches ==<br />
<br />
As a way to speed up suspending, you can free the memory used for disk caches. so there will be less to write to the disk. The downside is the risk of crashing your system. but I have had no trouble with it so far, while reducing the size of the suspended image by half. Just run this before hibernating:<br />
<br />
sync; echo 3 > /proc/sys/vm/drop_caches<br />
[http://www.linuxinsight.com/proc_sys_vm_drop_caches.html drop_caches introduction]<br />
<br />
=Combining suspend to disk with suspend to RAM=<br />
<br />
If your motherboard or laptop supports [[Suspend to RAM]], you can combine it with suspend2. This will result in the following behavior:<br />
<br />
* When you call hibernate, your system will suspend to disk and after that suspend to RAM instead of powering down.<br />
* When you turn your system back on, it will resume directly from RAM (which only takes a few seconds)<br />
* If your battery fails in the meantime (and the image in your memory is therefore lost), you will be able to resumes from disk.<br />
<br />
This can be done both with uswsusp and with tuxonice. <br />
<br />
With uswsusp, you should use s2both. You can also call s2both from the hibernate script (with all its richness of options), resorting to the ususpend-both.conf method. Please note that s2both works only if s2ram (see [[Suspend to RAM]]) works in your system. There is no way to force it to work if your laptop model is not whitelisted in s2ram. See [[Suspend to RAM]] for instructions about how to whitelist your laptop in the local copy of s2ram and how to report that your laptop suspend to ram properly so that it is whitelisted in the next uswsusp release.<br />
<br />
To do it with tuxonice, edit ''/etc/hibernate/suspend2.conf'':<br />
<br />
## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff<br />
PowerdownMethod 3<br />
<br />
For this to work, your computer must be able to use suspend to RAM also without s2ram.<br />
<br />
=Take Action Based on Events=<br />
<br />
==After Pressing Power Button==<br />
Edit the following file <code>/etc/acpi/events/power</code><br />
# This is called when the user presses the power button <br />
event=button/power (PWR.||PBTN) <br />
# To Hibernate uncomment the following line<br />
#action=hibernate <br />
# To Suspend uncomment the following line<br />
#action=suspend<br />
<br />
<br />
<br />
==After Closing Lid==<br />
Edit the following file <code>/etc/acpi/events/lid</code><br />
# This is called when the user closes the lid<br />
event=button/lid <br />
# To Hibernate uncomment the following line<br />
#action=hibernate <br />
# To Suspend uncomment the following line<br />
#action=suspend<br />
<br />
Alternatively you can edit <code>/etc/acpi/actions/lm_lid.sh</code> this is the file that is executed when the lid state is changed<br />
<br />
Example:<br />
<br />
#!/bin/bash<br />
# lid button pressed/released event handler<br />
#laptop mode helps minimized hdd activity<br />
test -x /usr/sbin/laptop_mode && /usr/sbin/laptop_mode auto<br />
#get the -xauth variable so we can access the display<br />
XAUTH="$( ps -C X f | sed -n 's/.*-auth \(.*\)/\1/p' )"<br />
if [[ -z $XAUTH ]]<br />
then<br />
# if XAUTH is blank try another way to get it <br />
XAUTH="$( ps -C xinit f | sed -n 's/.*-auth \(.*\)serverauth.*/\1Xauthority/p' )"<br />
fi<br />
#Find out if the lid is open or closed<br />
if grep -q open /proc/acpi/button/lid/LID/state<br />
then<br />
#the screen is on, forces it to be on<br />
ACTION="on"<br />
XAUTHORITY=$XAUTH /usr/bin/xset -display :0.0 dpms force $ACTION <br />
else<br />
#screen is off, forces off<br />
ACTION="off"<br />
XAUTHORITY=$XAUTH /usr/bin/xset -display :0.0 dpms force $ACTION<br />
#script waits for 10 minutes<br />
sleep 10m<br />
#checks to make sure screen is still closed<br />
if grep -q closed /proc/acpi/button/lid/LID/state<br />
then<br />
#if it is, then it suspends to disk<br />
s2disk<br />
else<br />
#or it turns it back on<br />
XAUTHORITY=$XAUTH /usr/bin/xset -display :0.0 dpms force on<br />
fi<br />
fi<br />
<br />
This script is derived from [http://gentoo-wiki.com/HOWTO_Automatically_turn_off_your_monitor The Gentoo Wiki]. The script turns the monitor off or on. But if the screen is left shut for 10 minutes, it will suspend to the disk automatically. <code> man sleep</code> for more info on the sleep command.</div>Statixhttps://wiki.archlinux.org/index.php?title=TightVNC&diff=56604TightVNC2008-12-31T06:54:05Z<p>Statix: /* Adding a Desktop to a VNC server */</p>
<hr />
<div>[[Category:Security (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
<br />
== What is it? ==<br />
'''TightVNC''' is a VNC (Virtual Network Computing) Unix server and viewer. <br />
It is a remote display program that allows you to view the desktop of a remote computer from anywhere on a LAN or over the Internet.<br />
To improve security of sessions VNC can be piped through SSH (Secure SHell).<br />
<br />
== How to Install on Arch ==<br />
To install TightVNC type the following:<br />
# pacman -S tightvnc<br />
<br />
Now you need to set it up to work as either a server or client/viewer.<br />
<br />
== VNC Server on Linux (Arch) ==<br />
First open up a terminal and type in:<br />
$ vncserver<br />
<br />
You will now be prompted for a password:<br />
<pre><br />
You will require a password to access your desktops.<br />
<br />
Password: <br />
Verify: <br />
</pre><br />
<br />
Then you will be asked if you would like to enter a view only password. This allows two different ways of accessing a desktop on your system.<br />
* Allow a user to log into your VNC server and be able to fully use the desktop.<br />
* Allow a user to log into your VNC server and be only allow to view the desktop.<br />
I chose 'n' no for this example.<br />
<br />
<pre><br />
Would you like to enter a view-only password (y/n)? n<br />
<br />
Now the vnc server desktop is created:<br />
<br />
New 'X' desktop is hostname:1<br />
<br />
Creating default startup script /home/user/.vnc/xstartup<br />
Starting applications specified in /home/user/.vnc/xstartup<br />
Log file is /home/user/.vnc/hostname:1.log<br />
</pre><br />
<br />
The problem now is that the VNC server is running but it is not running any desktop. If you were to log in now from a different computer you would only see the console.<br />
<br />
== Adding a Desktop to a VNC server ==<br />
<br />
Since we want to use desktop with the VNC server kill the existing server that is running:<br />
$ vncserver -kill :1<br />
<br />
Since it was the first VNC server we created it had the number :1. On Linux systems you can have as many VNC servers running as you want.<br />
To kill a specific server you will need to specify its number.<br />
<br />
The first time we ran the vncserver, the .vnc directory was created with some files inside of it. We will now go into this directory and edit these files as to add a desktop to the VNC server.<br />
$ cd /home/user/.vnc<br />
$ nano xstartup<br />
<br />
<pre><br />
#!/bin/sh<br />
xrdb $HOME/.Xresources<br />
xsetroot -solid grey<br />
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &<br />
twm &<br />
</pre><br />
<br />
The xstartup file works just like a [[.xinitrc]] file. Clear it out and add the appropriate exec line for your desktop environment, and whatever other programs you wish to start. The following setup is for a gnome session.<br />
<br />
<pre><br />
#!/bin/sh<br />
xrdb $HOME/.Xresources&<br />
exec gnome-session<br />
#exec openbox-session #for an openbox desktop<br />
#startxfce4 #for an xfce desktop<br />
#exec icewm #for an icewm desktop<br />
#startkde #for a kde desktop<br />
</pre><br />
<br />
== Connecting to the root (:0) desktop ==<br />
<br />
When you connect to vncserver with your client, by default you are given a new X session with your own desktop. This means that a person who is physically sitting in front of the server will not see your remote session, and vice-versa you cannot see or interact with the root (:0) or physical desktop.<br />
<br />
If you would like to remote into a machine with vnc and actually see and interact with the root desktop you can use [http://wiki.archlinux.org/index.php/X11vnc '''x11vnc'''], which provides access to the root (:0) desktop by default. A person sitting in front of the server will see your actions, such as the mouse moving etc.<br />
<br />
x11vnc is very similar to setup, and you can use the same clients as vncserver.</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=54160Snoopy2008-11-26T06:07:28Z<p>Statix: /* Introduction */</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more. Snoopy is a native program built to use with Warcraft III on wine.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR], or installed with yaourt:<br />
yaourt -S snoopy<br />
<br />
== Getting Started ==<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
<br />
<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
<br />
<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
<br />
<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
<br />
The quickest way to get snoopy up and running is to make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following: %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]</div>Statixhttps://wiki.archlinux.org/index.php?title=Snoopy&diff=54159Snoopy2008-11-26T06:06:18Z<p>Statix: New page: Category:HOWTOs (English) == Introduction == Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focus...</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
<br />
== Introduction ==<br />
Snoopy is a program similar to Warcraft III Banlist, aimed at improving the experience of Warcraft III players on Battle.net. Though focused on hosting, snoopy can be useful for any users as it allows for pinging, location checks, friends list following, and more.<br />
<br />
== Installation ==<br />
Snoopy can be found in the [http://aur.archlinux.org/packages.php?ID=20199 AUR], or installed with yaourt:<br />
yaourt -S snoopy<br />
<br />
== Getting Started ==<br />
Snoopy installs three programs in the /usr/bin directory, snoopy-sh, snoopy-ping, and snoopy-nox. <br />
<br />
<br />
<tt>snoopy-sh</tt> is a not so useful on arch script intended to run snoopy-nox for the current user. Ignore this.<br />
<br />
<tt>snoopy-ping</tt> is a frontend to the ping command that snoopy uses to ping. Feel free to ignore this too.<br />
<br />
<tt>snoopy-nox</tt> is the primary program that snoopy runs. This is all we're really going to worry about.<br />
<br />
<br />
The quickest way to get snoopy up and running is to make your own script to run snoopy-nox. It takes three parameters: your network device, your uid, and your gid. These are necessary because snoopy must be ran as root. We'll make a new script. Call it whatever you want. I'll call mine snoopy-sh-local.<br />
<br />
nano /usr/bin/snoopy-sh-local<br />
<br />
If you don't know your network interface run<br />
<br />
ifconfig<br />
<br />
to determine what it is. My interface (default ethernet) is eth0.<br />
<br />
How you make your script is ultimately up to you. In my example I get the user's uid and gid using <tt>id -u</tt> and <tt>id -g</tt> respectively. I set the interface explicitly, eth0. Sudo is used because snoopy must be run as root. My script looks like this:<br />
<br />
#!/bin/bash<br />
sudo snoopy-nox eth0 `id -u` `id -g`<br />
<br />
When you've finished your simple script make sure it is executable:<br />
<br />
# chmod 755 /usr/bin/snoopy-sh-local<br />
<br />
That's it. Snoopy should now work properly. It is up to you how you want to run it with regards to Warcraft 3. It shouldn't matter whether you start snoopy before or after Warcraft 3. Perhaps you'll want to change your script to run Warcraft 3 as well after snoopy starts.<br />
<br />
=== Allowing sudo for snoopy ===<br />
You might want to allow nopassword sudo for snoopy. First, edit the sudo config file <br />
<br />
# visudo<br />
<br />
Add a line like the following: %wheel can be replaced with specific usernames if desired, otherwise it'll work for any users in the wheel group.<br />
<br />
%wheel ALL=NOPASSWD:/usr/bin/snoopy-nox<br />
<br />
== Additional Resources ==<br />
* [http://snoopy.tuxfamily.org Snoopy Website]</div>Statixhttps://wiki.archlinux.org/index.php?title=Mac&diff=53215Mac2008-11-12T04:42:14Z<p>Statix: /* Fan Speed */</p>
<hr />
<div>[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
This article attempts to annotate the installation and configuration of Arch Linux on the Apple MacBook. All generations are supported, and relevant details concerning individual specifications have tried to be incorporated wherever necessary.<br />
==Partitioning in OS X==<br />
This section attempts to cover the most practical paths one can take in creating an ideal partition layout in OS X for the MacBook. If one prefers a Linux environment for setting up his or her partitions, the section, [[MacBook#Partitioning in Arch|Partitioning in Arch]], below will cover the specific points that need to be taken into consideration when implementing a partitioning layout on the MacBook. References to more user-friendly applications, such as Apple's "Boot Camp," will be mentioned here, but the depth will not be as great as that knowledge has already been documented extensively elsewhere.<br />
<br />
Before attempting any of the following pre-installation procedures, it is advisable to upgrade your firmware to the latest state released by Apple. You can achieve this either through the "Software Update" application bundled with OS X, or through the downloads on the support section of Apple's [http://www.apple.com/support/downloads/ home page]. ''Note'': The "Software Update" in OS X may not pick up all the firmware updates available for your computer. Therefore, it is possible your chance of having the most update firmware code will be increased by searching through Apple's official download page.<br />
===Single Boot===<br />
Dedicating your MacBook to Arch Linux permits you to follow the [[Official Arch Linux Install Guide]] as in a typical installation. If using rEFIt on a small partition without OS X, be sure not to install your boot loader of choice in the MBR (/dev/sda), but instead to the /boot partition or root partition if you are not going to reserve a separate partition for /boot.<br />
<br />
Also note that the "Auto-Prepare" feature available on the Installation CD will allow you to erase and format your hard drive just fine, but the manual installer uses cfdisk to partition your drive, and it does not have the capability to recognize the GUID partition scheme that your MacBook will be in if formatted with "Disk Utility" (used by default in a normal OS X installation). In that case, it might be best to not use the installer to partition your disk and instead use a GPT-capable partitioner such as parted.<br />
<br />
Furthermore, there are a few caveats discussed below that you should be familiar with in order to avoid any unpleasant outcomes:<br />
* ''Note'': The points discussed below do not apply if you choose to keep a small partition containing OS X and a small EFI System Partition on the same GPT-scheme hard disk you will be installing Arch Linux to. The section that follows assumes you do not want any trace of OS X on your MacBook.<br />
* '''Firmware Updates''' - You will not be able to update the firmware on your MacBook without a hard disk layed out with the GUID Partition Table (GPT) containing an OS X installation and a separate EFI System Partition. If you do not have access to an external OS X environment, it may be best to include a small partition containing OS X as well as an EFI System Partition on the hard drive Arch Linux will be installed onto. With this method, you have the choice of booting Arch Linux through a boot menu, such as rEFIt, or via the firmware default isolated in your MacBook's PRAM (discussed in the second caveat below).<br />
* '''Delayed Boot''' - The mechanism the MacBook uses to boot an operating system does not have the ability to quickly recognize a disk laid out solely with the MBR scheme. Instead, it searches for a familiar GUID partition table that holds an EFI System Partition to transfer its rights to. This scanning can take anywhere between twenty and thirty seconds, in contrast to the process normally taking around ten seconds when the default operating system is selected through Apple's "Startup Disk." Since the "Startup Disk" application on both the OS X Install Disk and the default OS X installation cannot locate an operating system installed within the MBR scheme, there are a few alternative solutions that solve this problem:<br />
:1. Modify the code held in your MacBook's PRAM to skip checking for the GUID Partition Table and boot straight from the MBR. Following this method, you will have a system that boots normally, just like any other would, with an estimated time of around ten seconds from power-on to GRUB. This is actually what Apple's "Startup Disk" does, which is the graphical front-end for the application about to be described.<br />
<br />
'''''Warning:''''' ''If you have adjusted the startup sound on your MacBook to something other than the default it came with, then the startup sound may be reset back to its factory default after the following modifications are made to your system's PRAM. You may have to boot into an external OS X environment in order to change the startup sound back to what you had before.''<br />
<br />
First, boot from an OS X Install Disk (this procedure may not work from an external OS X installation) and open up "Terminal." Use "diskutil list" to obtain the identifier of the disk Arch Linux will be installed onto.<br />
diskutil list<br />
The top part of the output should look something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: FDisk_partition_scheme *111.8 GB disk0<br />
The following command will install the code to your MacBook's PRAM that allows it to boot from the MBR. Replace "[disk identifier]" with the identifier obtained from the above command:<br />
bless --device /dev/[disk identifier] --setBoot -legacy<br />
Using the previous example the command would be:<br />
bless --device /dev/disk0 --setBoot -legacy<br />
Note: The device /dev/disk0 does not actually represent the MBR, even though that is what we type in for the command. The device echoed with the below command, "bless --getBoot", should not be /dev/disk0 but another main block device nomination, such as /dev/disk2. To insure you have correctly set the proper pointer that can boot the MBR, such as /dev/disk2, type the following command:<br />
bless --getBoot<br />
:2. Another option you have is to partition your hard disk with the GPT scheme and keep rEFIt installed on a small partition. This method does not result in as fast of a boot as the above does, but it gives you a boot menu that shows up on startup, allowing you to choose a valid operating system to boot from. This can be achieved by booting your MacBook into Target Disk Mode (Firewire); connecting to another disk with OS X installed, and partitioning your drive with the GPT scheme while creating a small HFS+ partition to hold rEFIt; installing rEFIt onto that partition; and finally typing "cd /efi/refit; ./enable-always.sh". It may be wise to set up '''''all''''' your partitions during this process, so as to avoid having to choose from a very select few partitioners that support the GPT scheme your disk will be laid out in. Furthermore, if you set up your partitions with "Disk Utility" or its back-end diskutil, there is no need to use gptsync to synchronize your partition tables. You can continue the installation process like you normally would (starting with the install step dedicated to filesystem creation), but be sure at the very end to install GRUB onto your boot partition or, if you do not want a separate boot slice, the root partition. You do not want to install onto /dev/sda or else this might prevent rEFIt from acting the way it was designed to.<br />
:3. A third option to counter the delayed boot is to hold the "Option" key on boot to bring up a menu that can transfer control to the MBR (the menu item will be titled "Windows"). Your MacBook will then boot to the MBR as fast as it physically can with the total time it takes to boot dependent upon how fast you confirm your selection at the menu. Holding the "Menu" button on a compatible Apple Remote during boot will also perform this same function.<br />
* '''Startup Sound''' - There is no available method for changing the startup sound on your MacBook without the presence of OS X. If you would like the startup sound on boot to be muted or at a specific volume output when single-booting Arch Linux, then an easy way is to adjust or mute the volume in OS X before Arch is installed. If the startup sound has returned after a firmware upgrade or PRAM modification, or you have already erased OS X and installed Arch Linux and would like to make adjustments now, boot from an external OS X drive (select it from the startup menu by holding "Option" on boot), and make arrangements from there.<br />
<br />
===Dual Boot===<br />
This portion of the article makes the assumption that one wants to install Arch Linux on top of an already-existing OS X configured MacBook. A higher success rate and smoother installation may be achieved by installing OS X from scratch and then following these steps. If this is the preferred option, then you may also decide to setup your partitions through "Disk Utility" before OS X is installed. In the case of a layout incorporating a shared partition, make sure to choose a filesystem that is writable from both OS X and Linux, for example: HFS+ (non-journaled) or FAT32 (more about dual boots with a shared partition [[MacBook#With Shared Partition|below]]). In any case, you always have the option of disabling journaling on the default HFS+ filesystem in OS X in order to allow read/writes from Arch Linux.<br />
====No Shared Partition====<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X, while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
'''1. Partitioning with diskutil:'''<br />
* Note: diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chances of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* To partition using diskutil, open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.)<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Next, type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition. Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2), and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space calculated via the total amount of space your original OS X partition takes up. Last, replace ["Partition label"] with a name for your new Arch Linux partition.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] "Linux" ["Partition label"] [partition size]<br />
* The example command below resizes the initial OS X partition (disk0s2) to 55.5 gigabytes and then creates the partition assigned to Arch Linux with the free space that was left over. The amount of free space that was left over after the resizing was calculated with the "diskutil list" command used above. "Linux" is the GPT recognized name for any of the possible filesystems most attributed to Linux.<br />
sudo diskutil resizeVolume disk0s2 55.5G "Linux" "Phrakture" 56G<br />
* Reboot.<br />
* Verify your disk was formatted correctly.<br />
diskutil list<br />
'''2. Partitioning with "Boot Camp":'''<br />
The "Boot Camp" application released by Apple is considered by some to be more user-friendly due to its graphical interface and simple procedure.<br />
* ''Note'': Apple no longer officially hosts the "Boot Camp" beta software; you can still obtain the last publicly released version, "Boot Camp 1.4b," from an unofficial mirror site. If you have 10.5 "Leopard," the "Boot Camp" final release comes bundled with the default installation and can be found in /Applications/Utilities. The software can also be extracted from the 10.5 Install Disk and installed onto any supported version of OS X.<br />
* Install "Boot Camp" if it is not already installed, and run the "Boot Camp Assistant" from the /Applications/Utilities folder.<br />
* Partition your hard drive however you like.<br />
<br />
====With Shared Partition====<br />
The easiest way to go about dual booting Arch Linux and OS X with a shared partition is by using Apple's diskutil application, the CLI back-end for "Boot Camp." Partitioning with diskutil keeps you from having to install Arch Linux through the FTP disk in order to use parted to partition and gptsync to sync the GPT and MBR partition tables (diskutil recognizes both the new GPT scheme and the old MBR and creates and syncs them for you upon write). In addition to using diskutil to partition, you will also have a choice of whether or not you want the shared partition to be a "shared" /home folder for both operating systems or a smaller partition while allowing both Arch Linux and OS X to have their own /home folders. You will also have to decide what filesystem to format your shared partition with. The non-journaled HFS+ and FAT32 filesystems are popular for sharing files between Linux and OS X due to both operating systems being able to read/write to them well. In the case of a shared /home, the Case-sensitive HFS+ (Non-Journaled) filesystem is a good way to go considering read/write support for non-journaled HFS+ filesystems is good in Linux, and the "case-sensitive" aspect of the HFS+ filesystem permits good interoperability between Arch Linux and OS X. '''Also, do not forget to synchronize your Arch and OS X UIDs, otherwise you will not have write access to your /home directory from both Arch and OS X;''' the [[MacBook#Home Sharing|Home Sharing]] section of this article describes how to do this.<br />
* Optional Step: Install rEFIt. This will give you a boot menu to choose between OS X and Arch Linux on every boot. Download the ".dmg" from the [http://refit.sourceforge.net/ Refit Homepage] and install it. Make sure to install your Linux boot loader (i.e. GRUB or LILO) on your /boot partition or on your root partition if you are not going to have separate partitions for both. Be careful about installing a boot loader to /dev/sda as this can lead to unexpected results with rEFIt.<br />
* Note: You can either partition your hard disk with the command-line application, diskutil, or its GUI front-end, "Boot Camp." Diskutil comes embedded into OS X while "Non-Leopard" users may find themselves having to download and pay for the latest "Boot Camp" release.<br />
* ''Further note'': diskutil partitions a disk differently than most other applications. It creates new partitions by resizing an exisiting partition and creating new ones out of the remaining free space (in the case below the partition to be split is the second one located on /dev/disk0s2). Furthermore, your chance of success will almost always be guaranteed when performing the following operations after a clean OS X installation.<br />
* Open the "Terminal" application found in the /Applications/Utilities folder. The following steps can be performed while your OS X volume is mounted.<br />
* Disable journaling on your about-to-be-resized OS X partition. You can do this with "Disk Utility" in OS X or with diskutil through the following command. (Type "ls /Volumes/" to obtain the label of your OS X partition.) <br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
* Type "diskutil list" and you should see something like this:<br />
/dev/disk0<br />
#: type name size identifier<br />
0: GUID_partition_scheme *111.8 GB disk0<br />
1: EFI 200.0 MB disk0s1<br />
2: Apple_HFS Macintosh HD 111.5 GB disk0s2<br />
* Below is the command usage for resizing a partition and reclaiming the remaining free space by creating a new partition(s). Note the disk identifier from the "diskutil list" command you typed (in the example above it would be disk0s2) and replace [disk identifier] with that identifier. Replace "[disk size]" with the new size of your OS X partition and "[partition size]" with the remaining space you want each individual partition to take up, calculated via the total amount of space your original OS X partition takes up. Last, fill in the ["Partition label"] fields with names for your new partitions.<br />
sudo diskutil resizeVolume [disk identifier] [disk size] [partition type] ["Partition label"] [partition size] [partition type] ["Partition label"] [partition size]<br />
* The following example resizes the original OS X partition (disk0s2) to 30GB and sets up a 71.5GB shared, non-journaled HFS+ (Case Sensitive) /home partition and a 10GB Arch Linux root partition:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* If you would rather use the FAT filesystem on a small shared partition and keep separate /home folders on the Arch Linux and OS X partitions, then you could use something like:<br />
sudo diskutil resizeVolume disk0s2 50G "MS-DOS FAT32" "Shared" 11.5G "Linux" "Arch" 50G<br />
* The commands above do not actually format the partitions. They only store the proper information that the GUID Partition Table needs so it can be read from by applications and the native EFI bootloader. You will now have to format any partitions that can not be formatted in Linux with the desired filesystem. If you chose the Non-Journaled Case-sensitive HFS+ filesystem for your shared partition then you will need to format it with the below command after you reboot. You will then have to run "diskutil list" again to get the identifier for the new shared partition (following the example above it would be disk0s3).<br />
* Reboot<br />
diskutil list<br />
diskutil eraseVolume "Case-sensitive HFS+" "Shared" [disk identifier]<br />
* If you chose the FAT filesystem for your shared partition you can also choose to format it from OS X, but you may end up doing it over again in the Arch Linux installer when it comes time to mount and format your filesystems. To format from OS X type:<br />
newfs_msdos -F 32 -v "Shared" /dev/[disk identifier]<br />
* If throughout this procedure you get a "chosen size is invalid..." error try expressing the size of the partitions in megabytes instead of gigabytes. The original command for a FAT32 formatted shared partition would then look like:<br />
sudo diskutil resizeVolume disk0s2 50000M "MS-DOS FAT32" "Shared" 11500M "Linux" "Arch" 50000M<br />
* If you get a "Resizing encountered error No space left on device (28) on disk" error even though you have verified the total size of the partition you are splitting with "diskutil list", then first resize only the soon-to-be-split partition:<br />
sudo diskutil resizeVolume disk0s2 30G<br />
* Reboot, and then create the rest of the partitions:<br />
sudo diskutil resizeVolume disk0s2 30G "Case-sensitive HFS+" "Shared" 71.5G "Linux" "Arch" 10G<br />
* After using any of the above commands to repartition your MacBook, you can reboot and verify your partitions have been created with "diskutil list".<br />
* ''Note'': It may be best at this point to synchronize the UID of your main account in OS X with the default in Arch Linux. Skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article for directions on how to do this.<br />
<br />
==Partitioning in Arch==<br />
If you prefer to partition in Linux, there are two tools available to Arch end-users that faciliate this process on the MacBook: parted and refit. GNU Parted will allow the repartitioning of your disk even if it is laid out in GPT format, while the refit package, <strike>available in the Arch community repository</strike>, allows the synchronization of the MBR table that is created by parted and the GUID Partition Table that is originally on a default OS X installation. If your hard disk is not layed out with the GPT scheme, then you can use the partitioner available through the Arch installer, cfdisk, and you need not follow the rest of the details covered in this section. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
<br />
[''Note'': The [http://aur.archlinux.org/packages.php?ID=14837 refit package] was moved from [community] to [unsupported] at the end of January 2008; see [http://bbs.archlinux.org/viewtopic.php?id=43043 this forum thread]. This means that it can '''not''' be installed with the simple pacman command below!]<br />
<br />
''Note'': If you are going to resize the HFS+ partition used by default in OS X, it may be wise to disable journaling prior to the task. You can do this with "Disk Utility" in OS X or with diskutil through the following command:<br />
sudo diskutil disableJournal /Volumes/[LABEL]<br />
Type "ls /Volumes/" to obtain the label of your OS X partition.<br />
<br />
'''Prepare the Arch environment for partitioning:'''<br />
<br />
* Get the latest [http://www.archlinux.org/download/ Arch Linux FTP Install CD] and burn it.<br />
* Reboot, and hold down "C" during startup, so it will boot from the CD, or hold "Option" to select it from the firmware menu. If you installed rEFIt, you can select the Install CD from the boot menu that automatically comes up.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* [[Configuring network|Configure your network]] through bash or through the normal Arch install procedure that follows:<br />
/arch/setup<br />
* Select "FTP/HTTP" as the installation source when asked.<br />
* Select "Configure Network" from the "Main Menu."<br />
* Probe and/or select your network interface and either confirm the usage of DHCP or set up your interface statically.<br />
* Exit by selecting "Exit Install" at the "Main Menu."<br />
* Open /etc/pacman.conf in your favorite editor and uncomment the "[community]" header and its "Include" path to enable the repository:<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/community<br />
* Since "ftp://ftp.archlinux.org/" is throttled, configure /etc/pacman.d/core, /etc/pacman.d/community, and /etc/pacman.d/extra for a less slow download by moving a fast mirror to the top in those files. If you do not know which mirrors are the quick ones for you, then any mirror other than "ftp://ftp.archlinux.org/" will do for now.<br />
* Bring the available list of packages up to date, and install the latest versions of refit and parted along with their dependencies. This can be done with one command:<br />
pacman -Sy refit parted<br />
* Continue with the instructions below that are relevant to your particular table layout, either a single boot or dual boot. If you do not have rEFIt installed '''''and''''' you do not plan on dual booting Arch and OS X, feel free to partition how you normally would, possibly ignoring the rest of this section.<br />
<br />
===Single Boot===<br />
<br />
This section '''only''' describes how to prepare your hard disk with parted if you are '''single booting Arch, while keeping rEFIt installed on a small partition.''' If you do not have rEFIt installed on a HFS+ partition and your drive is not layed out in the GPT format, there are no special modifications to consider during the single boot process. If your whole drive is configured with the MBR scheme, then you are advised to use whatever partitioner you feel most comfortable with, as there are no usual restrictions upon how you may partition your drive.<br />
* Note: If you had decided to partition your disk back when you installed rEFIt onto a small partition, these instructions are not relevant; you may move on to the actual installation process described in the [[MacBook#Installation|Installation]] section of this article and select the "Partition Hard Drives" step in the "Prepare Hard Drive" menu on the installer, in order to format your assigned partitions.<br />
* Run the parted application on your hard drive:<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If you installed rEFIt onto a small partition but did not create the other partitions you want, you can now create all the other partitions you desire. If you installed rEFIt on a partition taking up the whole drive, you will have to resize the partition with the following command. ''Note'': The command is based upon the assumption that rEFIt is installed on the '''first''' partition of the hard drive. If rEFIt is installed on any other partition, simply change the number "1" to whichever one it is on.<br />
(parted) resize 1 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* To create a swap partition type:<br />
(parted) mkpart primary linux-swap <START> <END><br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition.<br />
* ''Further note'': If you are single booting Arch on a MacBook layed out with the MBR scheme, you will be able to create a logical partition like you would be able to during any other typical pre-installation process. If your hard disk is not layed out MBR-style and instead layed out with the GPT scheme, you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Since you are using rEFIt on a small partition without OS X, synchronize your GUID Partition Table with the newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
===Dual Boot===<br />
<br />
* Run the parted application to partition your hard disk for a dual boot.<br />
parted /dev/sda<br />
* Type "p" to view the current partition table.<br />
(parted) p<br />
* If repartitioning from an OS X configured MacBook that holds an EFI System Partition, resize the current OS X partition first in order to free up space for your new partitions. ''Note'': If you do not have an EFI System Partition and only have an OS X partition, change the number "2" in the following command to whichever partition OS X is on (probably "1").<br />
(parted) resize 2 <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* If you have any partitions on your disk other than the EFI System Partition and the partition that holds OS X, then remove them with the "rm" command:<br />
(parted) rm <NUMBER><br />
* Replace <NUMBER> with the position the partition rests on your drive. For example, to remove the third partition that comes after the OS X and EFI System Partition, according to your partition table shown with "p", type:<br />
(parted) rm 3<br />
* ''Note'': Be sure not to accidently remove the first or second partitions if that is where OS X and your EFI System Partition reside. Review your work carefully. <br />
* You may now, if you choose, make a partition for swap.<br />
(parted) mkpart primary linux-swap <START> <END><br />
* For <START> and <END>, use the count in MBs of where you want your partition to start and end.<br />
* The same goes for any other regular partition:<br />
(parted) mkpart primary ext2 <START> <END><br />
* ''Note'': Parted only has the ability to format via the ext2, FAT16, FAT32, and linux-swap filesystems. It has the ability to create reiserfs partitions if libreiserfs is installed (not available through the Arch repositories). If you desire to use a filesystem such as ext3, reiserfs, xfs, or jfs, partition your hard drives in the parted application and format them as ext2. Then, during the actual Arch installation process, you will be given the opportunity to perform any other necessary filesystem creation over the original ext2 partition. '''Parted does not have the ability to ''create'' HFS+ filesystems, as may be the case if you desire a shared /home; you need to perform this type of creation in OS X.'''<br />
* ''Further note'': If your hard disk is not layed out MBR-style and layed out with the GPT scheme (the default standard on a typical OS X installation), you cannot create a logical partition as the GPT standard does not support the implementation needed to do so. You can find the scheme your drive is laid out in with Apple's "Disk Utility" or by trying to use cfdisk (the default application run from the Arch installer): if the drive is laid out GPT-style, you will be informed by cfdisk and possibly denied readable and/or writable access to the table.<br />
* Quit parted.<br />
(parted) quit<br />
* Synchronize your GUID Partition Table with your newly created MBR partition table.<br />
gptsync /dev/sda<br />
* Jump to the [[MacBook#Installation|Installation]] section of this article, and start the installation (/arch/setup).<br />
<br />
==rEFIt==<br />
* You can now install the optional rEFIt if you have not done so already. ''Note'': This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.<br />
* In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
* If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.<br />
* Open up "Terminal" and enter:<br />
cd /efi/refit; ./enable.sh<br />
<br />
==Installation==<br />
This section assumes you have already finished partitioning your MacBook in preparation for an Arch installation. If you are single booting Arch Linux '''''and''''' you are not using rEFIt, you may follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] with no special modifications, ignoring the rest of this section. '''If you are using rEFIt either in a single boot or dual boot setup, you will need to install your boot loader of choice onto your /boot partition or on your root partition if you are not opting for separation.''' The procedure for doing so is what follows.<br />
* Type "arch" at the boot prompt or "arch vga=773" if you prefer a higher console resolution.<br />
boot: arch vga=773<br />
* Note: Due to a bug in the Apple firmware ([http://refit.sourceforge.net/doc/c4s3_keyboard.html Note from rEFIt FAQ]), some MacBook Pro Core 2 Duo users have reported that the keyboard often does not work at the Arch Linux boot prompt. The only options are to either get a USB keyboard, which should work all the time, or keep rebooting until it works.<br />
* Note: Some MacBook (Pro) Core Duo users report strange keyboard output such as long delays and character doubling. If this is your situation, entering the following at the boot prompt should alleviate any such symptoms:<br />
boot: arch noapic irqpoll acpi=force<br />
* Run the Arch installer:<br />
/arch/setup<br />
* Be sure to work your way down through the menu, and do not forget to select the "Partition Hard Drives" step under the "Prepare Hard Drive" menu to format your partitions and mount them so Arch can be installed onto them. For the rest of the installation, you can follow the [[Official Arch Linux Install Guide#Common Installation Procedure|Official Arch Linux Install Guide]] and install everything normally '''''until you make it to the menu item titled "Install Bootloader."'''''<br />
* ''Note'': The following procedure is unique to GRUB. The GRUB boot loader now has the complete ability to boot your Arch Linux system, is considered stable, and is now recommended more often for Linux installation on a MacBook then LILO. If you wish to use the LILO boot loader, you will have to consult further documentation as the article's contributors have not yet attempted to boot Arch on the MacBook with LILO.<br />
* Select "Install Bootloader" from the "Main Menu" of the installer.<br />
* Choose the option "Use the GRUB bootloader" when asked.<br />
* When you review your GRUB configuration file, make sure that both "root" fields point to the correct partitions and the kernel and initrd paths are correct for your partition setup. If you plan on using a separate boot partition, do not have "/boot" in front of "/vmlinuz26" and "/kernel26.img" on the "kernel" and "initrd" fields respectively. The following example boots Arch Linux from the fourth partition on the hard drive devoted to the root file system. This could pertain to those dual booting OS X with Arch while having an EFI System Partition and a shared home.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,3)<br />
kernel /boot/vmlinuz26 root=/dev/sda4 ro vga=773<br />
initrd /boot/kernel26.img<br />
* The example below boots Arch from the second partition on the hard drive assigned to /boot, while the third partition is assigned to root (/). This could be an example for those having only rEFIt installed on a small partition and no OS X.<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
* '''If you are using rEFIt, make sure you install GRUB onto ''a partition'', either your /boot or your /root (i.e. /dev/sda4) if you are not using separate partitions for both.'''<br />
* '''Do not install GRUB onto /dev/sda! Doing so is likely to lead to an unstable post-environment.'''<br />
* If GRUB was successfully installed, choose "Exit Install" from the "Main Menu."<br />
* If you did not partition your disk from OS X using diskutil or "Disk Utility" and instead partitioned with another third-party program or from Linux, sync your partition tables one more time for good measure.<br />
gptsync /dev/sda<br />
* ''NOTE'': If you get an error that GRUB was not installed successfully, it sometimes works if you go through the same steps a second time. If you receive an error message again stating that GRUB was not successfully installed, run the following commands, and then attempt to install GRUB again:<br />
! Replace the "3" with whatever your root partition is (i.e. sda4 -> 4)<br />
! 83 is for ext2/3. If you have something else, type "sfdisk -T" for a list of supported partition types. <br />
# sfdisk -c /dev/sda 3 83<br />
# gptsync /dev/sda<br />
* If you still get an error message when installing GRUB, keep trying those commands. It should work eventually.<br />
* You may now reboot your system. If rEFIt is setup correctly, you will be able to choose the correct icon in the boot menu on startup. If you do not have rEFIt installed, you will have to either hold the "Option" key during startup (or the "Menu" button on a compatable Apple Remote), or follow the instructions below to allow your MacBook to transfer its pre-control rights directly to GRUB (this will save the maximum time possible during a normal boot).<br />
reboot<br />
* If you are single booting without rEFIt and need to save a new instruction set in the PRAM to boot straight from the MBR instead of spending time searching for the GUID Partition Table, hold the "Option" key during startup or the "Menu" button on a compatable Apple Remote and boot into your new Arch Linux setup.<br />
* Then, synchronize your local package database with the one on the FTP/HTTP server you chose as your default during the install process, and install the "eject" package via pacman to eject your Arch installation media. This can all be done with one command:<br />
pacman -Sy eject<br />
* Eject the disk.<br />
eject<br />
* Insert an OS X Install Disk, and reboot while holding either the "C" or "Option" keys to initiate the loading of the DVD.<br />
* Follow the instructions in this article titled "Delayed Boot" under the [[MacBook#Single Boot|Single Boot (Partitioning from OS X)]] section to reconfigure your firmware's default boot device.<br />
* ''Note'': If you are sharing your Arch /home folder with OS X, skip down to the [[MacBook#Home Sharing|Home Sharing]] section of this article before you create your first user account.<br />
* Enjoy your new Arch MacBook!<br />
<br />
==Post Install==<br />
<br />
===Wifi===<br />
====Ndiswrapper====<br />
* Note that ndiswrapper only works on 32 bit systems.<br />
* First, install the ndiswrapper package like so:<br />
$ pacman -Sy ndiswrapper<br />
* The Lenovo Thinkpad 802.11abgn driver works well with the MacBook. The driver can be obtained through the manufacturer's [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-66449 own page], or directly with the following command:<br />
$ wget -c ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7iwc28ww.exe<br />
* Or you can use the drivers found in your OSX Dvd. I had success with the file broadcomxpinstaller.exe.<br />
* You need cabextract to extract the file. Get it with pacman.<br />
pacman -S cabextract<br />
* Create a new directory for the soon-to-be extracted files, change the cwd to it, and extract the main file.<br />
mkdir 7iwc28ww; cd 7iwc28ww/; cabextract 7iwc28ww.exe<br />
* Install the driver where <path/to/driver> is the .inf file from the extracted .exe. If you are using the Lenovo Thinkpad 802.11abgn driver, replace <path/to/driver> with ''WINXP_2K/NET5416.INF''.<br />
ndiswrapper -i <path/to/driver><br />
* The below command may have already been executed during installation of the ndiswrapper application, but run it anyway just to be sure the correct alias for wlan0 is written to /etc/modprobe.conf.<br />
ndiswrapper -m<br />
* Verify your driver has been installed properly:<br />
ndiswrapper -l<br />
* Now, you can add "ndiswrapper" to your MODULES array in /etc/rc.conf, and load the module manually:<br />
modprobe ndiswrapper<br />
<br />
====Madwifi====<br />
'''Primary installation through the Arch repositories:'''<br />
* First, install the madwifi driver and madwifi-utils:<br />
pacman -Sy madwifi madwifi-utils<br />
* Then, load the "ath_pci" module. You can also add it to the MODULES list in /etc/rc.conf if you want it to load on a normal boot.<br />
modprobe ath_pci<br />
* And if everything is ok, you should see something like this:<br />
ifconfig <br />
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX <br />
inet6 addr: fe80::219:e3ff:fed4:be51/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0 <br />
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)<br />
* Some MacBook users have reported more success when downloading and installing from SVN. There is a madwifi-svn package in the [[AUR]], which can be found [http://aur.archlinux.org/packages.php?do_Details=1&ID=10492&O=0&L=0&C=0&K=madwifi&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here].<br />
** The problems one may encounter when using madwifi drivers on MacBook is that wifi suddenly stops working. This may happen after the system is awaken or just after some random period of time (see the ticket here http://madwifi.org/ticket/1017) and using /etc/rc.d/network restart doesn't always help. Some people have reported success when they unloaded all the madwifi modules and loaded them back again.<br />
<br />
===Fan Speed===<br />
* The fan doesn't seem to change speeds with the temperature. We can (somewhat) fix this<br />
* Add ''applesmc'' to your ''MODULES'' array in ''/etc/rc.conf''<br />
** Also run:<br />
modprobe applesmc<br />
* This creates a bunch of magic files in ''/sys/devices/platform/applesmc.768''<br />
* As root type <br />
echo 1 > /sys/devices/platform/applesmc.768/fan1_manual<br />
* As root type <br />
echo 3500 > /sys/devices/platform/applesmc.768/fan1_output<br />
** You may want to add this to your ''/etc/rc.local''<br />
** The number can be anywhere from 1800 to 6200.<br />
** I find that for normal use, 3500-4000 is good.<br />
** When it gets really hot, 4500-5000 is good.<br />
** (after you add ''applesmc'' to your modules, running ''sensors'' will give you a lot more output)<br />
** I'm going to try and write a script to deal with this better. <br />
::''(I've wrote a [http://phpfi.com/246225 simple app in C] to keep my MacBook cold. It's written for xfce4-genmon-plugin, but you can also use it with conky, cron or anything else.) -- [[User:Husio|Husio]] 16:38, 30 June 2007 (EDT)''<br />
<br />
===Temperature Sensors===<br />
* To go along with this, we should be able to read from the temperature sensors.<br />
* Type <br />
pacman -S lm_sensors<br />
* To autodetect sensors type 'sensors-detect'<br />
* In ''/etc/modprobe.conf'' add:<br />
alias ''char-major-89 i2c-dev''<br />
* In ''/etc/rc.conf'' add:<br />
i2c-i801, eeprom, and coretemp to your MODULES() line.<br />
* In ''/etc/rc.local'' add:<br />
sensors -s<br />
* Now you can type ''sensors'' to see your core temperatures.<br />
<br />
===Suspend===<br />
====Suspend to Ram====<br />
If you want to get your macbook suspend to ram on closing it and you're using acpi, just add to ''/etc/acpi/actions/lm_lid.sh'':<br />
<pre><br />
# Suspend<br />
if [[ `cat /proc/acpi/button/lid/LID0/state | tr -s " " | cut -d" " -f2` = "closed" ]]<br />
then<br />
pm-suspend<br />
fi<br />
</pre><br />
There's some problem with mpd if you suspend when mpd is playing. It can't connect to localhost after waking up.<br />
<br />
===Backlight Control===<br />
====pommed====<br />
<br />
* Install the 'pommed' program from community<br />
* Put 'pommed' in your DAEMONS array in /etc/rc.conf<br />
* Start it manually with '/etc/rc.d/pommed start'<br />
You may also want to install gpomme which is GUI for pommed daemon. Edit then ~/.gpommerc and add gpomme to startup (it's not a daemon).<br />
<br />
By default the F1, F2 ... FX keys are disabled and act like Fn+F1, Fn+F2 ... To enable the keys and make use of Fn+FX, modify /etc/pommed.conf.mactel or /etc/pommed.conf.pmac by changing fnmode = 1 to fnmode = 2. Save it as pommed.conf and restart pommed with /etc/rc.d/pommed restart.<br />
<br />
To enable the sound keys (Fn+F3, Fn+F4 and Fn+F5), you have to modify /etc/pommed.conf : change init = -1 to init = 80 and (at least on Macbook 2) change volume = "PCM" to volume = "Front" and after that restart pommed with /etc/rc.d/pommed restart. (Thanks to the [http://wiki.debian.org/MacBook#head-7adc5d72650afca10f8983c100c25ca6a73df7fd Debian Wiki])<br />
<br />
====macbook-backlight====<br />
If you want to control your backlight from console, install macbook-backlight (it's in [[AUR]]). <br />
If you're using acpi, you may also want your ''/etc/acpi/actions/lm_battery.sh'' to look like this:<br />
<pre>if [[ -z $(acpi | grep discharging) ]]<br />
then<br />
/usr/bin/macbook-backlight +80<br />
else<br />
/usr/bin/macbook-backlight -80<br />
fi</pre><br />
<br />
Now you can also set it in pommed.<br />
<br />
===Frequency Scaling===<br />
* Run 'pacman -S cpufrequtils'<br />
* Add speedstep-centrino (be careful, since a recent update it seems to be "acpi_cpufreq"), cpufreq_conservative to your MODULES array in /etc/rc.conf<br />
** Modprobe them manually too.<br />
* Run 'cpufreq-set -c 0 -g conservative' and 'cpufreq-set -c 1 -g conservative'<br />
** Put them in /etc/rc.local to set them on boot<br />
<br />
===X11===<br />
* '''NOTE:''' 915resolution is deprecated, and the xf86-video-intel driver should work out of the box (at least on the Macbook 2.1). I couldn't get xf86-video-810 to do 1280x800.<br />
* Type 'pacman -S xorg xf86-video-i810 915resolution'<br />
(it is sometimes better to use xf86-video-intel driver instead of xf86-video-i810, for example if you need to use xrandr features)<br />
* Type 'X -configure'<br />
* Open /etc/conf.d/915resolution in your editor, uncomment the 'MODE' and 'RESOLUTION'.<br />
* Set the RESOLUTION to '1280 800'<br />
* Add 915resolution to your DAEMONS array in /etc/rc.conf<br />
** Start it manually with /etc/rc.d/915resolution start<br />
<br />
====Touchpad====<br />
With 7.3 version of x.org and kernel 2.6.22 or later, it should work out of the box. If it doesn't follow these instructions for loading the kernel modules:<br />
<br />
* First you must add, appletouch, usbhid, and tsdev modules to the MOD_BLACKLIST array in rc.conf. (This is because udev loads the modules in random order)<br />
* Then add appletouch, usbhid to MODULES array IN THAT ORDER.<br />
<br />
By default the touchpad operates in compatibility mode by emulating a standard mouse. Many users though will find these default settings problematic as the touchpad is too sensitive and will cause accidental cursor jumping and clicking. However, by using a dedicated driver, more advanced features and fine tuning of the touchpad become available.<br />
<br />
* Type 'pacman -S synaptics' to install the driver<br />
* Load the synaptics driver by adding the following line to the Module section of your xorg.conf:<br />
Load "synaptics"<br />
* Add the touchpad to the ServerLayout section:<br />
InputDevice "Synaptics Touchpad" "CorePointer"<br />
* Add this section to your xorg.conf. I will enable horizontal two-finger-scrolling and a right click by tapping the top right hand corner of the touchpad. It switches off mouse clicks for tapping the touchpad, like OSX does.<br />
Section "InputDevice"<br />
Identifier "Synaptics Touchpad"<br />
Driver "synaptics"<br />
Option "CorePointer" <br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "auto-dev"<br />
Option "LeftEdge" "100"<br />
Option "RightEdge" "1100"<br />
Option "TopEdge" "50"<br />
Option "BottomEdge" "300"<br />
Option "FingerLow" "20"<br />
Option "FingerHigh" "30"<br />
#We don't want the palm to trigger a tap, therefore a tap has to be quite fast<br />
Option "MaxTapTime" "100"<br />
Option "MaxTapMove" "100"<br />
Option "MaxDoubleTapTime" "200"<br />
Option "VertScrollDelta" "25"<br />
Option "HorizScrollDelta" "60"<br />
Option "VertTwoFingerScroll" "true"<br />
Option "HorizTwoFingerScroll" "0"<br />
Option "FastTaps" "true"<br />
#Tapping the top right-hand corner will trigger a right click<br />
Option "RTCornerButton" "3" <br />
#An ordinary tap will not trigger a click <br />
Option "TapButton1" "0"<br />
Option "TapButton2" "0"<br />
Option "TapButton3" "0"<br />
Option "MinSpeed" "0.5"<br />
Option "MaxSpeed" "3.5"<br />
Option "AccelFactor" "0.05"<br />
EndSection<br />
<br />
* Finally, restart your X server.<br />
<br />
* The [http://wiki.debian.org/MacBook#head-b5e4b425668a24b46ead13b652f997f38318678b Debian Wiki] has also a few suggestions on how to configure right-clicking and scrolling.<br />
* Also, see [[Touchpad_Synaptics|Touchpad Synaptics]] or the synaptics manpages for many more options.<br />
<br />
===Sound===<br />
If you follow the arch wiki on ALSA it pretty much covers the instructions and specifics. However, there is a noticeable crackling sound from the left channel. I fixed this with the following: (as root/sudo)<br />
# mkdir /etc/modprobe.d/<br />
# nano /etc/modprobe.d/options<br />
<br />
Add this line:<br />
# options snd-hda-intel position_fix=1<br />
<br />
<br />
The above commands creates a options file, then specifies a fix. You Must REBOOT!<br />
<br />
===iSight===<br />
There is linux-uvc-isight in the AUR. Some people for whom the normal release didn't work had success with linux-uvc-isight-svn, but if you use that, install linux-uvc-utils-svn as well.<br />
Then, follow the instructions :<br />
<br />
You *must* install and load the firmware to /lib/firmware, e.g:<br />
# mkdir -p /lib/firmware<br />
<br />
Then, as you need apple's firmware you have to copy it form your mac partition (or get it from the internet) :<br />
# cp ${OSX_MOUNT}/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /lib/firmware<br />
<br />
Make sure you installed ift (isight-firmware-tools, also in AUR) and :<br />
# ift-extract --apple-driver AppleUSBVideoSupport<br />
<br />
A udev rule "/etc/udev/rules.d/isight.rules" should have been installed with ift which should load the isight firmware on bootup from /lib/firmware.<br />
<br />
Reboot or reload your udev rules :<br />
# udevcontrol reload_rules<br />
<br />
If the firmware doesn't load you can try doing it manually:<br />
# /usr/lib/udev/ift-load -b 005 -d 006 --firmware /lib/firmware/isight.fw<br />
Check the two numbers for they should match "lsusb | grep 05ac:8501"<br />
<br />
You can also manually create a udev rule in "/etc/udev/rules.d/isight_manual.rules"<br />
# ACTION=="add", SYSFS{idVendor}=="05ac", SYSFS{idProduct}=="8501",<br />
# RUN+="/usr/lib/udev/ift-load -b 005 -d 006 --firmware /lib/firmware/isight.fw"<br />
<br />
Alternately for a slightly more dynamic approach, which allows other usb devices to be plugged in when booting.<br />
# ACTION=="add", SYSFS{idVendor}=="05ac", SYSFS{idProduct}=="8501",<br />
# RUN+="/usr/lib/udev/ift-load -b `lsusb | gawk '{if ($6 == "05ac:8501") {sub (/:/,"", $4); print $2 " -d " $4}}'` --firmware /lib/firmware/isight.fw"<br />
<br />
Load the 'uvcvideo' module and add it to your ''/etc/rc.conf'' if you want it to load at boot.<br />
<br />
Everything should work, if you have mplayer, you can test with :<br />
# mplayer tv:// -tv driver=v4l2:width=1280:height=1024:device=/dev/video0 -fps 20<br />
<br />
If you see your face, then it's ok (if you don't, check that you are in front of your iSight).<br />
<br />
===Apple Remote===<br />
====lirc====<br />
Because ''lirc'' and ''lirc-utils'' from default repository won't work with macbook, you have to compile them with ''macmini'' driver. Both [[PKGBUILD]]s can be found in [[ABS]]. After installation, record your remote signal with:<br />
$ /usr/bin/irrecord --driver=macmini --device=/dev/usb/hiddev0 /etc/lircd.conf<br />
Here's how the ''/etc/lircd.conf'' might looks like:<br />
begin remote<br />
name /etc/lircd.conf<br />
bits 8<br />
eps 30<br />
aeps 100<br />
one 0 0<br />
zero 0 0<br />
pre_data_bits 24<br />
pre_data 0x87EED4<br />
gap 211976<br />
toggle_bit_mask 0x87EED402<br />
<br />
begin codes<br />
# key_name signal_<br />
up 0x0B<br />
down 0x0D<br />
prev 0x08<br />
next 0x07<br />
play 0x04<br />
menu 0x02<br />
end codes <br />
<br />
end remote<br />
Set your bindings in ''~/.lircrc'' or in ''/etc/lircrc'' for global configuration. Example setting for [[mplayer]]:<br />
begin<br />
prog = mplayer<br />
button = play<br />
config = pause<br />
repeat = 15<br />
end<br />
<br />
begin<br />
prog = mplayer<br />
button = menu<br />
config = stop<br />
repeat = 15<br />
end<br />
<br />
begin<br />
prog = mplayer<br />
button = prev<br />
config = seek -10<br />
repeat = 10<br />
end<br />
<br />
begin<br />
prog = mplayer<br />
button = next<br />
config = seek +10<br />
repeat = 10<br />
end<br />
begin<br />
prog = mplayer<br />
button = up<br />
config = volume 1<br />
repeat = 1<br />
end<br />
<br />
begin<br />
prog = mplayer<br />
button = down<br />
config = volume -1<br />
repeat = 1<br />
end<br />
<br />
====appleir ====<br />
'''This patch is only for kernel < 2.6.22. '''<br />
<br />
Load the ''appleir'' module (or add it to the MODULES array in ''/etc/rc.conf''). Then run xev to check the signals, or copy this to ''~/.Xmodmap'':<br />
keycode 153 = XF86AudioNext<br />
keycode 144 = XF86AudioPrev<br />
keycode 176 = XF86AudioRaiseVolume<br />
keycode 174 = XF86AudioLowerVolume<br />
keycode 162 = XF86AudioPlay<br />
keycode 158 = XF86Favorites<br />
and run xmodmap ''~/.Xmodmap''.<br />
<br />
===Home Sharing (incomplete !)===<br />
<br />
====UID Synchronization====<br />
<br />
'''In OS X:'''<br />
<br />
''Note'': It is recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.<br />
<br />
'''''Step 1: Change UID and GID(s)'''''<br />
<br />
Pre-Leopard:<br />
<br />
# Open NetInfo Manager located in the /Applications/Utilities folder.<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
# Navigate to /users/<new user name> where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
# Change the UID value to 1000 (the value used by default for first user created in Arch).<br />
# Change the GID value to 1000 also.<br />
# Navigate to /groups/<new user name>, automatically saving the changes you have made so far, where <new user name> is, again, the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch. ''Note'': If you get an error message that the transaction is not allowed, log out and log back in.<br />
# Change the GID value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
Leopard:<br />
<br />
In Leopard, the NetInfo Application is not present. A different set of steps is required for UID synchronization:<br />
# Open System Preferences.<br />
# Click on Accounts.<br />
# Unlock the pane if not already done so.<br />
# Right-click on the desired user and select "Advanced Options."<br />
# Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
'''''Step 2: Change "home" permissions'''''<br />
<br />
# Open up "Terminal" in the /Applications/Utilities folder.<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name> and <your user group> with the user name whose UID and GID values you just changed and the group name whose GID value you just changed, respectively.<br />
chown -R <your user name>:<your user group> /Users/<your user name><br />
<br />
'''In Arch:'''<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account.'' It is therefore recommended that you do this as soon as you install Arch Linux, but if you have already set up a normal .... ''(Will finish the rest later--burned out)''<br />
<br />
====fstab Line====<br />
<br />
...</div>Statixhttps://wiki.archlinux.org/index.php?title=Talk:Music_Player_Daemon&diff=50658Talk:Music Player Daemon2008-10-05T05:01:30Z<p>Statix: New page: I think this article needs to be reworked. Right now it's just single user with weird permissions (which did not work for me.) This needs to be more generalized for multiple users so it ca...</p>
<hr />
<div>I think this article needs to be reworked. Right now it's just single user with weird permissions (which did not work for me.) This needs to be more generalized for multiple users so it can be done properly. I'll look into it and consider some major modifications.<br />
--[[User:Statix|Statix]] 01:01, 5 October 2008 (EDT)</div>Statixhttps://wiki.archlinux.org/index.php?title=Apache_OpenOffice&diff=50569Apache OpenOffice2008-10-03T00:48:46Z<p>Statix: </p>
<hr />
<div>[[Category:Office (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|OpenOffice}}<br />
{{i18n_entry|Italiano|OpenOffice_(Italiano)}}<br />
{{i18n_entry|Ελληνικά|OpenOffice (Ελληνικά)}}<br />
{{i18n_entry|简体中文|OpenOffice_(简体中文)}}<br />
{{i18n_entry|Português|OpenOffice_(Português)}}<br />
{{i18n_links_end}}<br />
==Arch offers 3 different OpenOffice branches==<br />
Arch offers 3 trees of binary packages for OpenOffice with different pkg names:<br />
* openoffice-base<br />
This will always be the last released stable version of OpenOffice. <br><br />
Current version: 2.4.1 <br><br />
start it with "soffice" or from Desktop menu <br><br />
spell checking packages and localisation packages will always belong to this package<br />
* openoffice-base-beta<br />
This package will be only present when a new release is not far away. It will be the alpha, beta, and release candidates packages for the next stable release. <br><br />
Current version: 3.0_ooo300_m6 (a version past 3.0 RC1 that will lead to stable 3.0 release) <br><br />
start it with "soffice-beta" or from Desktop menu <br><br />
It's safe to install it together with the stable and devel version.<br><br />
Please test it carefully and report upstream bugs to OpenOffice and packaging bugs in our flyspray <br><br />
see http://wiki.services.openoffice.org/wiki/OOoRelease30 for roadmap<br />
* openoffice-base-devel<br />
This packages will be updated from time to time and is a playground for the packager and for testing latest features. Please test and file upstream issues at http://www.openoffice.org/issues/query.cgi<br><br />
Current version: 3.0_dev300_m31 / snapshot DEV300_m31 (snapshots past branching the 3.0 stable tree that will lead to 3.1 release and beyond) <br><br />
start it with "soffice-devel" or from Desktop menu <br><br />
It's safe to install it together with the stable and beta version<br />
Attention: if you play with more than one openoffice-base version it's highly recommended to always backup your<br />
configuration directory ~/.openoffice{2,3} !<br />
<br />
==Installation==<br />
* First, install a Java Runtime Environment (optional, highly recommended):<br />
# pacman -S openjdk6 (still in testing) or<br />
# pacman -S jre<br />
* Download the base for stable and/or beta and/or devel:<br />
# pacman -S openoffice-base openoffice-base-beta openoffice-base-devel<br />
===language packages and spell checking for stable releases===<br />
* Install one or more language packs. This is optional as English ''is'' already included in the base:<br />
# pacman -S openoffice-XX (where XX is a language)<br />
* Install spellchecker files (optional):<br />
# pacman -S openoffice-spell-XX (where XX is a language)<br />
* Spellcheckers and language packs for other languages can be found in [[AUR]]. File feature request in flyspray and try to get votes if you want a language pkg to become officially supported in extra.<br />
<br />
===Extension management and spell checking for OpenOffice 3.x===<br />
* see [http://extensions.services.openoffice.org/getmore?cid=920794 OpenOffice Extension site]<br />
* Old openoffice-spell packages are obsolete. <br />
* Spell checking is done via new [http://extensions.services.openoffice.org/dictionary extensions]. There are three ways to install such a extension:<br />
* 1) Use the Extension manager from OOo menu for download and installation - installs only for the user into his ~/.openoffice.org/3/user/uno_packages/cache<br />
* 2) Download the extension and install it using "unopkg add extension" for the user or<br />
* 3) Download the extension and install it using "unopkg add --shared extension" for every user on the system (requires root permission)<br />
* 4) The Arch package is now shipped with some dictionaries and these get deployed automatically. Check Extension manager if your language is already there.<br />
<br />
===Set OOo environment variable===<br />
OpenOffice2 introduced the ability to use several toolkits for drawing and integrates into different desktop environments in a clean way. To choose by hand, you need to set the OOO_FORCE_DESKTOP environment variable, either system-wise (like put it in /etc/profile, rc.local, or ~/.bashrc or something like /etc/profile.d/openoffice) or in the specific shell OpenOffice.org is running in (see message when you install/update openoffice-base).<br />
<br />
To run OpenOffice.org in GTK2 mode, you can issue (using bash):<br />
# OOO_FORCE_DESKTOP=gnome soffice<br />
To run OpenOffice.org in QT/KDE3 mode, you can issue (using bash):<br />
# OOO_FORCE_DESKTOP=kde soffice<br />
<br />
KDE look will be removed in Openoffice3. It's highly recommended to export OOO_FORCE_DESKTOP=gnome for all users (yes, also under kde4) with versions from >=3.x or you will see soon glib/gtk related crashes.<br />
<br />
====Environment variable scripts====<br />
Some non-gnome/kde users may wish to launch their openoffice from a menu like the *box menu. To do this an alternative to the above should be used, as such menus don't seem to like environment variables.<br />
<br />
This script by Odd-rationale will run openoffice using the GTK look while still accepting command line options like -writer.<br />
#!/bin/bash<br />
<br />
#### openoffice-gtk.sh - A script to start start openoffice with the GNOME/GTK environment<br />
<br />
export OOO_FORCE_DESKTOP=gnome<br />
/opt/openoffice/program/soffice $1<br />
Just use this script as a command (e.g, /usr/bin/soffice-gtk) for your menu or whatever other sort of launcher you use.<br />
<br />
=== Adding media support to OpenOffice.org 2 ===<br />
<br />
If you want to be able to use sound and video in OpenOffice.org Impress presentations, you need to install the [[Java Media Framework]] and [[Java_Media_Framework#Adding_media_support_to_OpenOffice.org|configure OpenOffice.org to use it]]<br />
<br />
=== Manual dictionary installation ===<br />
<br />
If you for some reason want to install dictionaries manually (e.g. there are no dictionary packages available in your language) follow these instructions:<br />
* Download a dictionary pack for your language. A list of dictionaries is available at [http://wiki.services.openoffice.org/wiki/Dictionaries OOoDictionaries]<br />
* Extract the dictionaries to /opt/openoffice/share/dict/ooo/ <br />
The necessary files are normally named like en_US.dic and en_US.aff for spellchecking, hyph_en_US.dic for hyphenation dictionaries, and th_en_US.dat and th_en_US.idx for the thesaurus files.<br />
* Open /opt/openoffice/share/dict/ooo/dictionary.lst with your favorite text editor. Add the dictionaries to the list using the following rules:<br />
# List of All Dictionaries to be Loaded by OpenOffice<br />
# ---------------------------------------------------<br />
# Each Entry in the list have the following space delimited fields<br />
#<br />
# Field 1: Entry Type "DICT" - spellchecking dictionary<br />
# "HYPH" - hyphenation dictionary<br />
# "THES" - thesaurus files<br />
#<br />
# Field 2: Language code from Locale "en" or "de" or "pt" ... <br />
#<br />
# Field 3: Country Code from Locale "US" or "GB" or "PT"<br />
#<br />
# Field 4: Root name of file(s) "en_US" or "hyph_de" or "th_en_US<br />
# (do not add extensions to the name)<br />
<br />
* An example using the American dictionaries would look like:<br />
### start en<br />
DICT en US en_US<br />
HYPH en US hyph_en_US<br />
THES en US th_en_US<br />
### end en<br />
* Save the file and restart OpenOffice. Make sure all the Openoffice processes is properly killed. Otherwise the newly installed dictionaries won't show up.<br />
<br />
==Running==<br />
<br />
If you want to run a specific module of OpenOffice.org (instead of the soffice default), for example the word processor (Write), spreadsheet application (Calc) or presentation program (Impress), check for the following script front-ends:<br />
<br />
Writer<br />
/opt/openoffice/program/swriter<br />
<br />
Calc<br />
/opt/openoffice/program/scalc<br />
<br />
Impress<br />
/opt/openoffice/program/simpress<br />
<br />
Math (Formula Editor)<br />
/opt/openoffice/program/smath<br />
<br />
Base (Database frontend)<br />
/opt/openoffice/program/sbase<br />
<br />
Printer Administration (Recommended to run as root)<br />
/opt/openoffice/program/spadmin<br />
<br />
==Known Problems==<br />
* extension handling in versions >=3.0<br />
* qt look'n feel since kde4 release</div>Statixhttps://wiki.archlinux.org/index.php?title=Mouse_buttons&diff=50473Mouse buttons2008-10-02T04:43:38Z<p>Statix: /* binding + and - in logitech G5 mouse */</p>
<hr />
<div>[[Category:X Server (English)]]<br />
[[Category:HOWTOs (English)]]<br />
[[Category:Input devices (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Get All Mouse Buttons Working}}<br />
{{i18n_entry|正體中文|Mouse Buttons 如何設定滑鼠上的滾輪}}<br />
{{i18n_links_end}}<br />
<br />
=== About / Prerequisites ===<br />
<br />
This article is for users that have a mouse with more than 7 mouse buttons and want to be able to use all of them. Logitech makes several of these (if you have a [http://www.logitech.com/index.cfm/mice_pointers/trackballs/devices/156&cl=us,en Logitech Marble&reg; Mouse] you can also look at [[Logitech_Marble_Mouse|this page]]), and Microsoft makes a few as well. If you have one of these mice, read on!<br />
<br />
*NOTE: These are helper comments, and can be ignored if you are looking for nothing but raw information. Due to community feedback, I decided to add a bit more commenting that describes what's going on "behind the scenes" with this configuration.<br />
<br />
We will be using the <tt>evdev</tt> driver for Xorg. EVentDEVice is an advanced driver for USB input devices which offers much greater power over the standard Xorg <tt>mouse</tt> driver. It's also more "direct" than the <tt>mouse</tt> driver, allowing lower latency and less translation issues.<br />
<br />
*Note that <tt>evdev</tt> is both a kernel module and an Xorg input driver. All the Arch kernels come with the <tt>evdev</tt> module.<br />
<br />
With the newer xorg 11R7.0 it seems only the following changes to /etc/X11/xorg.conf need to be made with nothing else needing to be done.<br />
<br />
=== Installing the evdev Drivers ===<br />
<br />
The first thing you need to do is install Xorg evdev package. The package can be found in <code>[Extra]</code> and is<br />
named [http://www.archlinux.org/packages/10240 xf86-input-evdev]. <br />
<br />
pacman -S xf86-input-evdev<br />
<br />
After it has been installed, modprobe the evdev module. <br />
<br />
modprobe evdev<br />
<br />
Now check the output of <tt>dmesg</tt> and make sure that evdev didn't have any errors. If everything worked, move on to the next section.<br />
<br />
=== Finding the Mouse Name ===<br />
'''Note:''' To get accurate information it is sometimes required to execute this command from a boot where no Xorg or mouse drivers have been loaded.<br />
<br />
The first step is to find the name of the mouse. To do this, execute the following command:<br />
<br />
egrep "Name|Handlers" /proc/bus/input/devices<br />
<br />
This should output something like this:<br />
<br />
N: Name="Logitech USB Gaming Mouse"<br />
H: Handlers=mouse0 event0 ts0 <br />
N: Name="HID 0566:3002"<br />
H: Handlers=kbd event1 <br />
<br />
The mouse is the one that has the <tt>Handlers=mouse0</tt>, so the name of the device is <tt>Logitech USB Gaming Mouse</tt>.<br />
<br />
* My mouse is a Logitch G5, your mouse is probably different, and therefore the Name will be different.<br />
<br />
Copy the name of the device, and open up <tt>/etc/X11/xorg.conf</tt>.<br />
<br />
=== Configuring Xorg ===<br />
Now, we need an entry in xorg.conf that tells X how to use this mouse. It should look something like this:<br />
<br />
Section "InputDevice"<br />
Identifier "Evdev Mouse"<br />
Driver "evdev"<br />
Option "Name" "Logitech USB Gaming Mouse"<br />
Option "evBits" "+1-2"<br />
Option "keyBits" "~272-287"<br />
Option "relBits" "~0-2 ~6 ~8"<br />
Option "Pass" "3"<br />
Option "CorePointer"<br />
EndSection<br />
<br />
Replace the "Name" option with the name you copied from above. You may also omit the "CorePointer" option if you use multiple mice or experience errors when attempting to load Xorg. The other options are all basic mouse configurations for evdev and should work with most mice.<br />
<br />
Next, we need to tell X to use the mouse, so look in xorg.conf for <tt>ServerLayout</tt>.<br />
<br />
Modify the <tt>InputDevice</tt> section to use "Evdev Mouse" as the device. When you are done, it should look something like this:<br />
<br />
Section "ServerLayout"<br />
Identifier "Default Layout"<br />
Screen 0 "Monitor0" 0 0<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
InputDevice "Evdev Mouse" "CorePointer"<br />
EndSection<br />
<br />
The only thing you should change in the layout is the InputDevice line that refers to your mouse.<br />
<br />
That should be all that's required.<br />
<br />
* Edit by: xxsashixx <br />
This is for Logitech G5 Mouse users. I have not tested this for other mouses but if you don't add this your mouse <b>MAY</b> not work.<br />
If you don't need to add this, then don't.<br />
<br />
Put <br />
Option "Device" "/dev/input/event[#]"<br />
in the InputDevice section or else the mouse won't be picked up.<br />
<br />
[#] = The number you got from:<br />
egrep "Name|Handlers" /proc/bus/input/devices<br />
<br />
* Edit by: bapman<br />
With the above method, your mouse might not to work after reboot (event number changes). To fix this, you can use symlinks in /dev/input/by-id. For example :<br />
Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse"<br />
To find the appropriate id, do :<br />
ls /dev/input/by-id/<br />
<br />
* Edit by: Diamir<br />
With a Desktop type keyboard-mouse, this doesnt work because there is only one usb attachement <br />
and /dev/input/by-id contains only the keyboard.<br />
In this case, we can build an udev rule to get a consistant link.<br />
The following rules create the link /dev/input/usbmouse which point on the correct event entry:<br />
KERNEL=="event[0-9]*", BUS=="usb", SYSFS{modalias}=="usb:v045Ep008Ad7373dc00dsc00dp00ic03isc00ip00", SYMLINK+="input/usbmouse"<br />
<br />
You can call it z10_usb_mouse.rules and put it in /etc/udev/rules.d<br />
<br />
The cryptic value to use for SYSFS(modalias) can be get the following way:<br />
<br />
enter the command cat /proc/bus/input/devices<br />
<br />
You will find the keyvoard and the mouse and see event4 is the mouse in this case: <br />
<br />
I: Bus=0003 Vendor=045e Product=008a Version=0111<br />
N: Name="Microsoft Microsoft Wireless Optical Desktop� 1.00"<br />
P: Phys=usb-0000:00:10.0-2/input0<br />
S: Sysfs=/devices/pci0000:00/0000:00:10.0/usb1/1-2/1-2:1.0/input/input3<br />
U: Uniq=<br />
H: Handlers=kbd event0 <br />
B: EV=120013<br />
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe<br />
B: MSC=10<br />
B: LED=107<br />
<br />
I: Bus=0003 Vendor=045e Product=008a Version=0111<br />
N: Name="Microsoft Microsoft Wireless Optical Desktop� 1.00"<br />
P: Phys=usb-0000:00:10.0-2/input1<br />
S: Sysfs=/devices/pci0000:00/0000:00:10.0/usb1/1-2/1-2:1.1/input/input4<br />
U: Uniq=<br />
H: Handlers=kbd mouse0 event1 <br />
B: EV=17<br />
B: KEY=3000000000000 0 1f0000 f8400244000 601878d800d448 1e000000000000 0<br />
B: REL=7c3<br />
B: MSC=10<br />
<br />
So I enter the following command (adapt event # to your particular case):<br />
udevinfo -a -p `udevinfo -q path -n /dev/input/event4` | grep modalias<br />
ATTRS{modalias}=="input:b0003v045Ep008Ae0111-e0,1,2,4,k71,72,73,74,83,86,8A,8C,8E,8F,9B,9C,9E,9F,A3,A4,A5,A6,AB,AC,B5,B6,CE,D2,D5,E2,E7,E8,E9,EA,EB,110,111,112,113,114,1B0,1B1,r0,1,6,7,8,9,A,am4,lsfw"<br />
ATTRS{modalias}=="usb:v045Ep008Ad7373dc00dsc00dp00ic03isc00ip00"<br />
ATTRS{modalias}=="pci:v00001106d00003038sv00001043sd000080EDbc0Csc03i00"<br />
<br />
grab the ATTRS which becomes with usb: to complete "SYSFS{modalias}== " entry<br />
<br />
And finaly, use "usbmouse" as the Device Option in xorg.conf:<br />
Option "Device" "/dev/input/usbmouse"<br />
<br />
=== Post Configuration ===<br />
==== Opera ====<br />
It just works™.<br />
<br />
==== Firefox ====<br />
<br />
===== Horizontal Scroll =====<br />
By default, left right scroll on a FX/MX mouse translates into back/forward, respectively. If you don't like this, open <tt>about:config</tt> and change a few values:<br />
<br />
mousewheel.horizscroll.withnokey.action 0<br />
mousewheel.horizscroll.withnokey.numlines -3<br />
<br />
OR (tested on Logitech G5)<br />
<br />
mousewheel.horizscroll.withnokey.action 2<br />
mousewheel.horizscroll.withnokey.numlines 2<br />
<br />
NOTE: If you use a positive value for numlines, your left/right will switch, ie: pressing left scrolls the window to the right.<br />
<br />
==== Firefox3 ====<br />
<br />
OR (tested on Microsoft Wireless Intellimouse explorer 2.0)<br />
<br />
mousewheel.horizscroll.withnokey.action 2<br />
mousewheel.horizscroll.withnokey.numlines -1<br />
mousewheel.horizscroll.withnokey.sysnumlines false<br />
<br />
NOTE: If you use the true value for numlines, your left/right will be inverted<br />
<br />
<br />
===== Thumb Buttons - Forward and Back =====<br />
<br />
To do this we need to map keystrokes to the desired mouse buttons and install xvkbd and xbindkeys.<br />
<br />
pacman -Sy xvkbd xbindkeys<br />
<br />
In firefox pressing Alt+Left_Arrow on the keyboard goes back and pressing Alt+Right_Arrow goes forward. On most MX mice the thumb buttons resolve to 8 & 9. If your mouse is different, check button numbers using xev and replace the numbers used in the example (b:8 & b:9).<br />
<br />
So if you have an MX mouse you would create the file ~/.xbindkeysrc, containing:<br />
<br />
# Mouse Buttons<br />
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""<br />
m:0x0 + b:8 <br />
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""<br />
m:0x0 + b:9<br />
<br />
Now to test.. run the following command and if it works as expected remember to add xbindkeys to .xinitrc or somewhere where it will be executed each time X starts.<br />
<br />
xbindkeys<br />
<br />
The above info and more help may be found in the [[MX1000_Buttons]] wiki<br />
<br />
==== Epiphany ====<br />
To get the back and forwards buttons working in this browser open <tt>about:config</tt> and change these values:<br />
<br />
mousewheel.horizscrool.withnokey.action 2<br />
mousewheel.horizscrool.withnokey.sysnumlines false<br />
<br />
==== Konqueror ====<br />
For the back and forward button to work, imwheel is needed.<br />
<br />
pacman -Sy imwheel<br />
<br />
<br />
Create the file .imwheelrc in your home dir:<br />
<br />
".*"<br />
None, Up, Alt_L|Left<br />
None, Down, Alt_L|Right<br />
<br />
Make sure imwheel is started during kde start.<br />
Create a file ~/.kde/Autostart/imwheel<br />
With the following contents:<br />
<br />
#!/bin/sh<br />
xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11"<br />
killall /usr/bin/imwheel<br />
imwheel -k -b "67"<br />
<br />
You can find you buttons by execute <tt>imwheel -D</tt> in a console and see which buttons belong to the back and forward button.<br />
<br />
==== xmodmap tweaking ====<br />
'''NOTE: None of the below is necessary with evdev, but it's here for non-evdev users. Unless something doesn't work on your mouse, ignore this whole section!'''<br />
<br />
If you use .xinitrc to load X, then add this to .xinitrc (change for the number of buttons you have):<br />
<br />
xmodmap -e "pointer = 1 2 3 6 7 8 9 10 11 12 4 5" &<br />
<br />
Note that buttons 4 and 5 <strong>must go on the end</strong> or else your scroll wheel won't work.<br />
<br />
If you use GDM/XDM/KDM instead of .xinitrc, then create the file ~/.Xmodmap and add this to it (change for the number of buttons you have):<br />
<br />
pointer = 1 2 3 6 7 8 9 10 11 12 4 5<br />
<br />
*GDM/XDM/KDM read the ~/.Xmodmap file if it's present, whereas <tt>startx</tt> does not. Another solution would be to add this to your ~/.xinitrc: <tt>xmodmap -e $(cat ~/.Xmodmap)</tt>. This would allow you to use *DM and <tt>startx</tt> while only having to edit ~/.Xmodmap when you need to make changes.<br />
<br />
You may have to play with these numbers a bit to get your desired behavior. Some mice use buttons 6 and 7 for the scroll wheel, in which case those buttons would have to be the last numbers. Keep playing with it until it works!<br />
<br />
You can also check to see which buttons are being read with a program called 'xev', which is part of XOrg. When xev is run, it will show a box on your desktop that you can put the cursor into and click buttons to find out what buttons have been mapped.<br />
<br />
=== Alternate Methods ===<br />
The following methods use standard X.org mouse input driver (xf86-input-mouse) instead of using the evdev driver. It works on mice up to 7 buttons. Edit /etc/X11/xorg.conf InputDevice section for your mouse to reflect the changes shown below. Then restart X and you're done.<br />
<br />
==== Method 1 - IMPS/2 ====<br />
This has been tested on an IntelliMouse Explorer 3.0. Your mileage may vary, as this does not seem to work for all said mice.<br />
<br />
Driver "mouse"<br />
Option "Protocol" "IMPS/2"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
<br />
==== Method 2 - ExplorerPS/2 ====<br />
This has been tested on a Logitech MX400 and MX518 and should work on any mx series mouse with up to 7 buttons. <br />
<br />
Driver "mouse"<br />
Option "Protocol" "ExplorerPS/2"<br />
Option "Device" "/dev/input/mice"<br />
Option "Buttons" "7"<br />
Option "ZAxisMapping" "4 5"<br />
Option "ButtonMapping" "1 2 3 6 7"<br />
<br />
==== Method 3 - Auto ====<br />
This has been tested on a Logitech MX400 and should work on most mice with up to 7 buttons.<br />
<br />
Driver "mouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "Buttons" "7"<br />
Option "ZAxisMapping" "4 5"<br />
Option "ButtonMapping" "1 2 3 6 7"<br />
<br />
==== Method 4 - btnx ====<br />
[http://www.ollisalonen.com/btnx/ btnx: Button Extension- a GNU/GPL mouse tool for GNU/Linux]<br />
<br />
This allows the use of all buttons on the Logitech MX Revolution and reportedly other multi-button mice as well. Provides greater control & configuration than the evdev driver.<br />
<br />
Install via AUR:<br />
[http://aur.archlinux.org/packages.php?do_Details=1&ID=13476&O=0&L=0&C=0&K=btnx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd btnx-config] then [http://aur.archlinux.org/packages.php?do_Details=1&ID=13477&O=0&L=0&C=0&K=btnx&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd btnx]<br />
Be sure the xorg.conf "Device" is at the default "/dev/input/mice" rather than "evdev".<br />
{{Box Note | '''Since Firefox 3, buttons 6 + 7 are no longer mapped to back and forward as in Firefox 2.''' Therefore, if using the above methods in Xorg, refer further to corrective methods below if necessary}}<br />
====Firefox 3 button 6 + 7 correction:====<br />
<br />
For MX518, try changing the above ButtonMapping Option to:<br />
Option "ButtonMapping" "1 2 3 8 9" <br />
And restart X. (Successfully tested on MX518)<br />
<br />
Another method:<br />
<br />
Leave back/forward mapped to 6+7 in xorg. In Firefox 3 about:config change the following keys:<br />
<br />
mousewheel.horizscroll.withnokey.action = 2<br />
mousewheel.horizscroll.withnokey.numlines = -1<br />
mousewheel.horizscroll.withnokey.sysnumlines = false<br />
<br />
=== Binding keyboard to mouse buttons ===<br />
<br />
==== xvkbd and xbindkeys ====<br />
Let's say we want to bind some mouse buttons to keyboard ones. The problem we will encounter is that we don't know how to emulate a key press. Here comes in handy xvkbd. It isn't available via pacman, but we can find it on AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=616&K=xvkbd]. We can use it along with xvbindkeys. <br />
<br />
pacman -S xbindkeys<br />
xbindkeys --defaults >> ~/.xbindkeysrc<br />
xbindkeys<br />
<br />
to restart xbindkeys type:<br />
<br />
pkill -f xbindkeys<br />
xbindkeys <br />
<br />
Here's example ~/.xbindkeysrc config:<br />
<br />
"xvkbd -text "\[F8]""<br />
m:0x0 + b:8<br />
"xvkbd -text "\[Shift]\[Left]""<br />
m:0x0 + b:9<br />
"xvkbd -text "\[Shift]\[Right]""<br />
m:0x0 + b:10<br />
"xvkbd -text 2"<br />
m:0x0 + b:11<br />
"xvkbd -text 3"<br />
m:0x0 + b:12<br />
<br />
if you want to check your mouse buttons number use xev. Don't forget to type capital letters in xvkbd -text usage and to escape opening bracket with \, or you get simply [Shift] written.<br />
<br />
==== Why standard methods are not enough? ====<br />
This will work great for X servers, but it seems not to work in some specific situations, like in Enemy Territory game. So I will describe a bit more advanced configuration, which work with my logitech G5 buttons - I can use all my 5 additional buttons along with 3 standard and a scroll, which gives overall 10 events to use in Enemy Territory. So here we go:<br />
<br />
<br />
<br />
==== kbde ====<br />
To emulate keystroke which will be later detected in Enemy Territory we need something more advanced than xvkbd. Here comes in handy kbde, but it doesn't exist in AUR yet - we've got to compile it by ourselves. We need two programs: kbde and kbde-driver. Kbde website is located on sourceforge [http://kbde.sourceforge.net/], check it for download, you need only kbde-driver. Apparently, it doesn't work for me without some hacking. Use your editor and add <br />
<br />
#include <linux/version.h><br />
<br />
somewhere near other includes in the driver/kbde.c file. (OK, I'm not sure whether it is a proper way to compile it, but it works).<br />
Assuming that you've already done that try:<br />
<br />
tar -zxvf kbde-driver-1*<br />
cd kbde-driver-1*<br />
make<br />
# if you don't have sudo just use su and type this as root<br />
sudo make install mknod<br />
modprobe kbde<br />
<br />
and now you should have kbde working. If you want to use it as a non-root (yes, you want) change permissions, the quickest and dirtiest way is (note that I added my startup scripts at the end of this text):<br />
<br />
chgrp users /dev/kbde<br />
chmod 220 /dev/kbde<br />
<br />
If not try reading installation instructions on the site. Now we can use it to emulate keystrokes visible even in login shells:<br />
<br />
kbde --press 5 --release 5 -b<br />
<br />
this will press 5 for about three times. If you want to type a string using this, rather than this use --asci=STRING, as press sometimes generates 3 strokes before it is released.<br />
<br />
==== evrouter ====<br />
Now we need something which will work when Enemy Territory is loaded. Apparently, xbindkeys doesn't work here, so we need another program: evrouter [http://www.bedroomlan.org/~alexios/coding_evrouter.html], which can be found in the AUR: [http://aur.archlinux.org/packages.php?ID=15258]<br />
<br />
OK, so now we must have evdev and we canNOT use it in X, so here's how my example /etc/X11/xorg.conf mouse section looks like:<br />
<br />
Section "InputDevice"<br />
<br />
Identifier "Logitech G5"<br />
<br />
Driver "mouse"<br />
Option "Protocol" "Auto"<br />
Option "Device" "/dev/input/mouse1" # probably you'll need here mouse0<br />
Option "Name" "Logitech USB Gaming Mouse"<br />
Option "Buttons" "8" # set this to your number of buttons<br />
Option "ZAxisMapping" "4 5"<br />
<br />
EndSection<br />
<br />
and now we've got to restart X server. <br />
You will run this as user, and event devices are owned by root, so you got to change the permissions at this point. Let's say we do it just like that, but I advice you to do this more carefully (note that I added my startup scripts at the end of this text):<br />
<br />
chgrp users /dev/input/event*<br />
chmod 660 /dev/input/event*<br />
<br />
Now we can use --dump option to check what we will have to bind and to which device:<br />
<br />
evrouter --dump /dev/input/event*<br />
# here click buttons you would like to bind<br />
<br />
It will give you output similar to config. Here's my example config ~/.evrouterrc with kbde usage:<br />
<br />
"Logitech USB Gaming Mouse" "/dev/input/event.*" any key/278 "SHELL/kbde --press 2 --release 2 -b"<br />
"Logitech USB Gaming Mouse" "/dev/input/event.*" any key/279 "SHELL/kbde --press 3 --release 3 -b"<br />
"Logitech USB Gaming Mouse" "/dev/input/event.*" any key/274 "SHELL/kbde --press 4 --release 4 -b"<br />
"Logitech USB Gaming Mouse" "/dev/input/event.*" any key/277 "SHELL/kbde --press 5 --release 5 -b"<br />
"Logitech USB Gaming Mouse" "/dev/input/event.*" any key/276 "SHELL/kbde --press 6 --release 6 -b"<br />
<br />
this works great, even in enemy territory. "none" modifier means that I have to only press the button, other options are ctrl+alt and so on. Here I use "any" because "none" means that after pressing shift, ctrl or alt our buttons would not work. Also note that it accepts regex for mouse name and event path. Then, after setting up a config, run service with:<br />
<br />
evrouter /dev/input/event* >> /dev/null<br />
<br />
or change the event* to a device corresponding to your mouse - but be aware that the numbers are changing sometimes. It will work in background, while outputting some annoying messages, so we stream it to devnull. If something went wrong, run it without streaming and check what it outputs. If you want to end it, you have to delete /tmp/evrouter.* manually, here's a script to kill evrouter:<br />
<br />
#!/bin/bash<br />
evrouter -q<br />
rm -f /tmp/.evrouter*<br />
<br />
and here's one to start it:<br />
<br />
#!/bin/bash<br />
mydevicename="Logitech USB Gaming Mouse"<br />
<br />
device=`evrouter -D /dev/input/event* | grep "$mydevicename"` | cut -d ":" -f 2<br />
evrouter $device > /dev/null<br />
<br />
You have to edit the mydevicename var to proper value (the one which is shown by evrouter -D), or just change it to listen on all events by changing device var to /dev/input/event*. OK, I've saved them in /usr/bin/ . Now, everything should be ready for use!<br />
<br />
==== binding + and - in logitech G5 mouse ====<br />
If you want to bind buttons + and - in G5/7 mouse, which normally changes dpi, you have to use g5hack [http://piie.net/temp/g5_hiddev.c] released by a lomoco author.<br />
<br />
wget http://piie.net/temp/g5_hiddev.c<br />
gcc -o g5hack g5_hiddev.c<br />
./g5hack /dev/usb/hiddev0 3<br />
<br />
This will change your dpi to 2000, light the 1st led and disables dpi on-the-fly changing, so you can use it with evrouter. If you would use it frequently I suggest you to copy it to the /usr/bin dir:<br />
<br />
sudo cp g5hack /usr/bin/<br />
<br />
If you want to bind your + and - buttons you must copy the line at the bottom (one with the comment '"-" button does not function anymore' above) to the mode you'll be using, like, for example, under the "case 3:" you can put it on the line with the comment 'turn on third led' above (deleting the old one before of course).<br />
<br />
For the newest G5 mouse which is reported as "product 0xc049" original hack don't work. You have to simply change the #define MOUSE_G5 0xc041 to #define MOUSE_G5 0xc049 and recompile.<br />
<br />
==== startup scripts ====<br />
Currently, I am using startup script with a bit dirty methods, so if somebody can propose better, please edit. I have created input group and make my user a member of it.<br />
/etc/rc.local:<br />
<br />
#!/bin/bash<br />
# creating /dev/kbde nod and changing permissions<br />
# also don't forget to add kbde in modules line in /etc/rc.conf<br />
# to be honest, I'm not sure why we have to create /dev/kbde after each startup, but it seems that only this way it works<br />
# maybe first check if it's needed for you, too<br />
mknod --mode=220 /dev/kbde c 11 0 <br />
chgrp input /dev/kbde<br />
# changing permissions for event* -- evrouter needs that<br />
chmod 660 /dev/input/event*<br />
chgrp input /dev/input/event*<br />
# g5hack ran for a few times to make sure that it'll work...<br />
# note that I've add it to /usr/bin, you should probably put your full path here<br />
# you probably should skip this lines, especially if you don't have logitech g5/g3/g7<br />
g5hack /dev/usb/hiddev0 3<br />
g5hack /dev/usb/hiddev0 3<br />
g5hack /dev/usb/hiddev0 3<br />
<br />
~/.kde/Autostart/init:<br />
<br />
#!/bin/bash<br />
# there I use my script to start evrouter, which I have presented above<br />
evrouter-start<br />
# here I map my buttons so I can use G5 thumb button as push to talk in TS<br />
# note that I have to use it as middle button also on kde <br />
# you probably don't need it<br />
xmodmap -e "pointer = 1 9 3 4 5 6 7 2 8 10 11 12"<br />
<br />
And voila, we've got it working immediately after kde login.<br />
<br />
=== User Tools ===<br />
'''NOTE: This section is out of date, and the lomoco package may also be out of date. There is a hack for a newer logitech mice: [http://piie.net/temp/g5_hiddev.c]'''<br />
<br />
If you use a MX* Logitech mouse, there is a tool called <tt>lomoco</tt> which will help you set the proper resolution, enable or disable smart scroll (with boot time support too!), etc. lomoco is available from the Community repository and can be installed with the following command:<br />
<br />
pacman -S lomoco<br />
<br />
*Be sure to look at <tt>/etc/udev/lomoco_mouse.conf</tt> and set up the the options you want to be automatically applied when the mouse gets loaded by udev. <br />
<br />
=== Credits ===<br />
linuX-gamers.net How-Tos: Getting all mouse buttons working in X<br />
<br />
http://gentoo-wiki.com/HOWTO_Advanced_Mouse</div>Statixhttps://wiki.archlinux.org/index.php?title=Open_Sound_System&diff=47873Open Sound System2008-08-19T19:56:07Z<p>Statix: Neutrality issue :)</p>
<hr />
<div>[[Category:Sound (English)]]<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|OSS}}<br />
{{i18n_entry|简体中文|OSS (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
The Open Sound System (OSS) from [http://www.opensound.com www.opensound.com] is a commercially-supported sound driver that works on several unix-like systems, including Linux, FreeBSD, and Solaris.<br />
<br />
The OSS was previously proprietary and being open-sourced recently, it has nothing to do with the sub-quality OSS/free in early linux kernels.<br />
<br />
Pros:<br />
* Transparent software mixing in kernel space ('''virtual mixer'''), up to 18 virtual sound devices (unlike ALSA's dmix, which works in user-space via ALSA lib).<br />
* Per-application mixer volume.<br />
* Much better sound quality for several onboard audio chips.<br />
<br />
Cons:<br />
* Software-emulated 3D enhancement, reverb effect, and equalizer have not yet been added to the new mixing engine in oss v4.<br />
<br />
= Installation =<br />
* Install package<br />
** Get the PKGBUILD:<br />
*** http://aur.archlinux.org/packages.php?do_Details=1&ID=14421<br />
** Extract the files from the tarball:<br />
*** <tt>tar -zxvf oss-filename.tar.gz</tt><br />
**Enter the directory created by expanding the tarball and install the package:<br />
*** <tt>makepkg -i</tt><br />
NOTE: Perform this command as a normal user. Do not run it as root or with sudo.<br />
<br />
* Start oss-linux:<br />
** Add ''!soundcore'' to <tt>MODULES</tt> in ''/etc/rc.conf'' to blacklist it.<br />
** Reboot to clean up alsa drivers, or manually unload the module ''soundcore'' and all other modules depending on it.<br />
** Run <tt>/etc/rc.d/oss-linux-free start</tt> (or oss-linux in case of the older, proprietary package), or add it to <tt>DAEMONS</tt> in ''/etc/rc.conf''<br />
<br />
= Configuration =<br />
''Your sound card should not need any configuration to work properly''<br />
<br />
Config files used to load oss drivers are under ''/usr/lib/oss/conf''. Do not edit these files directly, instead you should use ''/etc/modprobe.conf''. Every file under /usr/lib/oss/conf is named MODULE_NAME.conf and all the options are passed to modprobe when you're starting oss-linux. So the following two methods are actually doing the same thing:<br />
<br />
(/usr/lib/oss/conf/osscore.conf)<br />
max_intrate=1000<br />
src_quality=4<br />
(/etc/modprobe.conf)<br />
options osscore max_intrate=1000 src_quality=4<br />
<small>NOTE: This is merely an example, it is ''not'' recommended to use these parameters unless you know what you're doing.</small><br />
<br />
To get the list of the drivers you use, run <tt>ossdetect -v</tt> and check the file <tt>/usr/lib/oss/etc/installed_drivers</tt>.<br />
<br />
Other parameters: see the comments in<br />
/usr/lib/oss/conf/osscore.conf<br />
/usr/lib/oss/conf/ossusb.conf<br />
/usr/lib/oss/conf/YOUR_AUDIO_DRIVER.conf<br />
<br />
= Programs =<br />
* '''/etc/rc.d/oss-linux''': oss-linux service.<br />
* '''/etc/rc.d/oss-linux-free''': same as above, but for the free version.<br />
* '''ossinfo''': show list of sound devices and their status; passing argument "-v9" to get details including which programs use them.<br />
* '''ossmix''': command-line mixer, where you can configure volume, recording source and special sound effects (surround, reverb, etc).<br />
* '''ossxmix''': same as ossmix except for that it provides a GUI using gtk2.<br />
* '''savemixer''': save your current mixer settings (need superuser) or restore them, called automatically when the oss-linux service is stopped.<br />
* '''ossrecord''': simple command-line recording program.<br />
* '''ossplay''': simple command-line playing program. Supports WAV, AU, VOC and a few other containers.<br />
<br />
= Troubleshooting =<br />
* Like ALSA, you have to lower the main volume and PCM volume to certain degree to avoid noises (depending on your audio chip. I use vol=65,pcm=65 for my via8237)<br />
<br />
* See [http://4front-tech.com/forum/viewtopic.php?t=2358 here] how to set the default soundcard, in case the default choice isn't optimal.<br />
<br />
* If you have a problem getting sound from an application, the 4front wiki may have the [http://www.4front-tech.com/wiki/index.php/Configuring_Applications_for_OSSv4 answer].<br />
<br />
* If you have other issues, try and search or post on the forums at: http://www.4front-tech.com/forum/<br />
<br />
== Skype ==<br />
There's a special Skype version for OSS (QT static build), you can get the PKGBUILD here [http://aur.archlinux.org/packages.php?do_Details=1&ID=13003&O=0&L=0&C=0&K=skype&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd].<br />
A binary is available from skype's download page [http://skype.com/go/getskype-linux-oss].<br />
<br />
= Tips and Tricks =<br />
<br />
== ALSA compatibility ==<br />
OSS provides 2 layers for ALSA compatibility: kernel and alsa lib. The kernel module ("cuckoo") was 100% compatible with all the apps but it no longer works with latest OSS version; The alsa emulation lib in oss distribution is outdated and I don't know where to get the latest version.<br />
<br />
What you can have now is to use ALSA's oss plugin:<br />
# Install alsa-plugins<br />
# Edit ''/etc/asound.conf'':<br />
pcm.oss {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
pcm.!default {<br />
type oss<br />
device /dev/dsp<br />
}<br />
<br />
ctl.oss {<br />
type oss<br />
device /dev/mixer<br />
}<br />
<br />
ctl.!default {<br />
type oss<br />
device /dev/mixer<br />
}<br />
This method doesn't work with programs that detect hardware sound devices (skype 1.3, gizmo, ..)<br />
<br />
== Using your multimedia keys with OSS ==<br />
<br />
Wanting to raise-lower-mute-unmute the sound with your multimedia keys using OSS v4? <br />
<br />
Just make three "scripts" like these (I am assuming you have the bc package installed):<br />
<br />
lowervolume.sh:<br />
VOL=$(ossmix | grep misc.pcm1 | awk '{print $4}' | awk -F : '{print $1}')<br />
VOL=$(echo $VOL-2 | bc)<br />
ossmix misc.pcm1 $VOL:$VOL<br />
<br />
raisevolume.sh:<br />
VOL=$(ossmix | grep misc.pcm1 | awk '{print $4}' | awk -F : '{print $1}')<br />
VOL=$(echo $VOL+2 | bc)<br />
ossmix misc.pcm1 $VOL:$VOL<br />
<br />
mute.sh:<br />
#!/bin/bash<br />
VOLUME=$(cat $HOME/.volume)<br />
if [ -z "$VOLUME" ]; then<br />
VOLUME=$(ossmix | grep misc.pcm1 | awk '{print $4}' | awk -F : '{print $1}')<br />
ossmix misc.pcm1 0:0<br />
echo $VOLUME > $HOME/.volume<br />
else<br />
ossmix misc.pcm1 $VOLUME:$VOLUME<br />
> $HOME/.volume<br />
fi<br />
This will restore the previous volume levels when unmuting. Issue a:<br />
touch $HOME/.volume<br />
before using the first time.<br />
<br />
Then you just have to chmod +x these and set the keyboard shortcuts on your VM.<br />
<br />
== System-wide (software) equalizer effects ==<br />
<br />
NOTES: This requires the use of the old softoss module (the predecessor of vmix) which may not be as good as vmix, wine and gstreamer do not play nice with softoss, and the module will not work with sample rates higher than 48khz.<br />
<br />
We must do a few things to gain access to these effects.<br />
<br />
* If you're running the oss-linux-free daemon right now, stop it by running (as root):<br />
/etc/rc.d/oss-linux-free stop<br />
** On builds 1015 and older, in /usr/lib/oss/etc/installed_drivers remove<br />
vmix<br />
** On 1016 and newer, you should instead pass "vmix_disabled=1" parameter to osscore (via /usr/lib/oss/conf/osscore.conf) to disable vmix.<br />
*in /usr/lib/oss/etc/installed_drivers add<br />
softoss<br />
* in /etc/rc.d/oss-linux-free comment out lines 15 through 20 so that it looks kinda like this<br />
#!/bin/bash<br />
. /etc/rc.conf<br />
. /etc/rc.d/functions<br />
case "$1" in<br />
start)<br />
stat_busy "Starting OSS/Open source driver"<br />
# start<br />
/usr/sbin/soundon<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
grep '^softoss' /proc/modules >/dev/null 2>/dev/null<br />
# if [ $? -eq 0 ]; then<br />
# stat_busy "Replacing old \"softoss\" module with \"vmix\""<br />
# rmmod softoss<br />
# modprobe vmix<br />
# sed -i 's/^softoss.*$/vmix/' /usr/lib/oss/etc/installed_drivers<br />
# fi<br />
add_daemon oss4<br />
stat_done<br />
fi<br />
;;<br />
stop)<br />
stat_busy "Saving OSS mixer"<br />
/usr/sbin/savemixer<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
stat_done<br />
fi<br />
grep '^"cuckoo"' /proc/modules >/dev/null 2>/dev/null<br />
if [ $? -eq 0 ]; then<br />
stat_busy "Removing \"cuckoo\" module"<br />
rmmod \"cuckoo\"<br />
fi<br />
stat_busy "Stopping OSS/Open source driver"<br />
/usr/sbin/soundoff<br />
if [ $? -gt 0 ]; then<br />
stat_fail<br />
else<br />
rm_daemon oss4<br />
stat_done<br />
fi<br />
;;<br />
restart)<br />
$0 stop<br />
sleep 1<br />
$0 start<br />
;;<br />
*)<br />
echo "usage: $0 {start|stop|restart}"<br />
esac<br />
This keeps the oss-linux-free daemon from replacing softoss with vmix. (Very useful if you wish to switch between softoss and vmix.)<br />
<br />
* start the daemon again (as root of course)<br />
/etc/rc.d/oss-linux-free start<br />
* If no errors are reported, then you may now see/use the effects with either ossmix or ossxmix with<br />
ossmix -d1<br />
or<br />
ossxmix<br />
* you must turn off bipass to actually use the effects<br />
ossmix -d1 effects.eq.bypass OFF<br />
or just uncheck bypass in ossxmix<br />
<br />
* enjoy</div>Statixhttps://wiki.archlinux.org/index.php?title=AUR_helpers&diff=44428AUR helpers2008-07-08T07:43:54Z<p>Statix: /* AUR Helpers */</p>
<hr />
<div>[[Category:Utilities (English)]]<br />
== Overview ==<br />
This is an index of AUR helper scripts that help search and/or build packages from the AUR. None of these scripts are officially supported.<br />
<br />
== AUR Helpers ==<br />
* [[Yaourt]] - Yet AnOther User Repository Tool<br />
* [http://aurbuild.berlios.de aurbuild] is a tool written in Python to download and build packages from the AUR.<br />
* [http://aur.archlinux.org/packages.php?ID=16021 Arson] -- arson is the "HOT AUR search helper", providing simple access to AUR packages. You have to run makepkg, unlike (for example) yaourt or aurbuild<br />
* [http://husio.homelinux.com/static/aurshell/ aurshell] is a shell written in Python. With plugins included, it's possible to use AUR, ABS and even wrap pacman.</div>Statixhttps://wiki.archlinux.org/index.php?title=Pacman&diff=44427Pacman2008-07-08T07:39:58Z<p>Statix: /* External Links */</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:Utilities (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|:Pacman (Česky)}}<br />
{{i18n_entry|Dansk|:Pacman_(Dansk)}}<br />
{{i18n_entry|Deutsch|:Pacman (Deutsch)}}<br />
{{i18n_entry|English|:Pacman}}<br />
{{i18n_entry|Español|:Pacman (Español)}}<br />
{{i18n_entry|Français|:Pacman (Français)}}<br />
{{i18n_entry|Italiano|:Pacman (Italiano)}}<br />
{{i18n_entry|Nederlands|:Pacman (Nederlands)}}<br />
{{i18n_entry|Polski|:Pacman (Polski)}}<br />
{{i18n_entry|Português de Portugal|:Pacman (Portugues)}}<br />
{{i18n_entry|Romanian|:Pacman (română)}}<br />
{{i18n_entry|Русский|:Pacman (Русский)}}<br />
{{i18n_entry|简体中文|:Pacman (简体中文)}}<br />
{{i18n_entry|한국어|:Pacman (한국어)}}<br />
{{i18n_links_end}}<br />
<br />
==Overview==<br />
The '''[http://archlinux.org/pacman/ Pacman]''' package manager is one of the great highlights of Arch Linux. It combines a simple binary package format with an easy-to-use build system (see [[makepkg]] and [[ABS]]). '''Pacman''' makes it possible to easily manage packages, whether they be from the official Arch repositories or the user's own builds.<br />
<br />
'''Pacman''' keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows you to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
'''Pacman''' is written in the C programming language, so it is fast, light and very agile. It uses the .tar.gz package format, which further enhances its speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
==Usage==<br />
<br />
To really learn what pacman can do, read [http://archlinux.org/pacman/pacman.8.html man pacman]. The below is just a small sample of operations that can be performed.<br />
<br />
===Installing and Removing Packages===<br />
Before installing and upgrading packages, it is a good idea to synchronize the local package database with the remote repositories.<br />
<br />
pacman -Sy<br />
or<br />
pacman --sync --refresh<br />
<br />
To install or upgrade a single package or list of packages (including dependencies), issue the following command:<br />
<br />
pacman -S package_name1 package_name2<br />
<br />
Sometimes there are more versions of a package in different repositories (e.g. extra and testing). You can specify which one to install:<br />
<br />
pacman -S extra/package_name<br />
pacman -S testing/package_name<br />
<br />
You can also refresh the package database before installing a package in one command:<br />
<br />
pacman -Sy package_name<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
<br />
pacman -R package_name<br />
<br />
To remove all of the packages dependencies which aren't used by any other installed package:<br />
<br />
pacman -Rs package_name<br />
<br />
===Upgrading the System===<br />
<br />
'''Pacman''' can update all packages on the system with just one command. This could take quite a while depending on how up-to-date your system is.<br />
<br />
pacman -Su<br />
<br />
However, the best option is to synchronize the repository databases AND update your system in one go with the following:<br />
<br />
pacman -Syu<br />
<br />
===Querying the Package Database===<br />
<br />
'''Pacman''' can search and query the local package database with the -Q flag. See<br />
<br />
pacman -Q --help<br />
<br />
or the [http://archlinux.org/pacman/pacman.8.html pacman(8)] manpage for more details. Sync databases can be searched and queried with the -S flag. See either the manpage just mentioned or<br />
<br />
pacman -S --help<br />
<br />
for details.<br />
<br />
===Other Usage===<br />
<br />
'''Pacman''' is quite an extensive package management tool, here is just a brief collection of other features.<br />
<br />
* Download a package without installing it:<br />
pacman -Sw package_name<br />
<br />
* Install a local package (not from a repository):<br />
pacman -U /path/to/package/package_name-version.pkg.tar.gz<br />
You may also enter a URL:<br />
pacman -U http://www.examplepackage/repo/examplepkg.tar.gz<br />
* Fully clean the package cache (/var/cache/pacman/pkg):<br />
pacman -Scc<br />
* For removing orphans (recursively):<br />
pacman -Rs $(pacman -Qtdq)<br />
* For reinstalling all packages (at least the ones available in a repository):<br />
pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")<br />
<br />
For a more detailed list of switches please refer to <code>pacman --help</code> or <code>man pacman</code>.<br />
<br />
==Configuration==<br />
Pacman configuration is located in <code>/etc/pacman.conf</code>. In depth information about the configuration file can be found in <code>man pacman.conf</code>.<br />
<br />
===General options===<br />
General options are in [options] section. Read the man page or look in the default pacman.conf for information on what can be done here.<br />
<br />
===Repositories===<br />
In this section you define which repositories to use, as referred to in /etc/pacman.conf. They can be defined directly there or you can include them from another file.<br />
All official repositories use the same /etc/pacman.d/mirrorlist file which contains a variable '$repo'. So you only need to maintain one list.<br />
The following is an example for the official repositories which have a lot of [[mirrors]]. Avoid using ftp.archlinux.org as it is [http://www.archlinux.org/news/302/ throttled].<br />
<br />
<pre><br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
</pre><br />
<br />
'''n.b.''' Care should be taken when using '''testing''' repository<br />
<br />
===Errors===<br />
<br />
If you receive the following error<br />
'''not found in sync db'''<br />
this likely due to the package not being located because the repository has not been set correctly.<br />
<br />
==Related links==<br />
<br />
'''man-pages''':<br />
*[http://www.archlinux.org/pacman/pacman.8.html man pacman]<br />
*[http://www.archlinux.org/pacman/PKGBUILD.5.html man PKGBUILD]<br />
*[http://www.archlinux.org/pacman/libalpm.3.html man libalpm]<br />
*[http://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf]<br />
*[http://www.archlinux.org/pacman/makepkg.8.html man makepkg]<br />
*[http://www.archlinux.org/pacman/makepkg.conf.5.html man makepkg.conf]<br />
*[http://www.archlinux.org/pacman/repo-add.8.html man repo-add]<br />
<br />
'''other wiki-entries''':<br />
<br />
[[Improve Pacman Performance]]<br><br />
[[Colored Pacman output]]<br><br />
[[Downgrade packages]]<br><br />
[http://www.archlinux.org/pacman/pacman.conf.5.html Editing pacman.conf]<br><br />
[[Redownloading all installed packages]]<br><br />
[[Server_configuration|Server configuration in pacman.conf]]<br><br />
[[ArchLinux User-community Repository (AUR)]]<br><br />
[[Local repository HOW-TO]]<br><br />
[[Custom local repository with ABS and gensync]]<br><br />
[[Howto Upgrade via Home Network]] (Network Shared Pacman Cache)<br><br />
[[rucksack]]<br><br />
[[Pacman GUI Frontends]]<br><br />
[[Pacman_Aliases|Pacman Aliases (for bash)]]<br><br />
[[Mirrors]]<br />
<br />
== External Links ==<br />
[http://archux.com/page/using-pacman Using Pacman]<br />
<br />
[http://bbs.archlinux.org/viewtopic.php?id=14849 GUI Frontends]</div>Statixhttps://wiki.archlinux.org/index.php?title=Pacman&diff=44426Pacman2008-07-08T07:39:49Z<p>Statix: /* External Links */</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:Utilities (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|:Pacman (Česky)}}<br />
{{i18n_entry|Dansk|:Pacman_(Dansk)}}<br />
{{i18n_entry|Deutsch|:Pacman (Deutsch)}}<br />
{{i18n_entry|English|:Pacman}}<br />
{{i18n_entry|Español|:Pacman (Español)}}<br />
{{i18n_entry|Français|:Pacman (Français)}}<br />
{{i18n_entry|Italiano|:Pacman (Italiano)}}<br />
{{i18n_entry|Nederlands|:Pacman (Nederlands)}}<br />
{{i18n_entry|Polski|:Pacman (Polski)}}<br />
{{i18n_entry|Português de Portugal|:Pacman (Portugues)}}<br />
{{i18n_entry|Romanian|:Pacman (română)}}<br />
{{i18n_entry|Русский|:Pacman (Русский)}}<br />
{{i18n_entry|简体中文|:Pacman (简体中文)}}<br />
{{i18n_entry|한국어|:Pacman (한국어)}}<br />
{{i18n_links_end}}<br />
<br />
==Overview==<br />
The '''[http://archlinux.org/pacman/ Pacman]''' package manager is one of the great highlights of Arch Linux. It combines a simple binary package format with an easy-to-use build system (see [[makepkg]] and [[ABS]]). '''Pacman''' makes it possible to easily manage packages, whether they be from the official Arch repositories or the user's own builds.<br />
<br />
'''Pacman''' keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows you to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
'''Pacman''' is written in the C programming language, so it is fast, light and very agile. It uses the .tar.gz package format, which further enhances its speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently. <br />
<br />
==Usage==<br />
<br />
To really learn what pacman can do, read [http://archlinux.org/pacman/pacman.8.html man pacman]. The below is just a small sample of operations that can be performed.<br />
<br />
===Installing and Removing Packages===<br />
Before installing and upgrading packages, it is a good idea to synchronize the local package database with the remote repositories.<br />
<br />
pacman -Sy<br />
or<br />
pacman --sync --refresh<br />
<br />
To install or upgrade a single package or list of packages (including dependencies), issue the following command:<br />
<br />
pacman -S package_name1 package_name2<br />
<br />
Sometimes there are more versions of a package in different repositories (e.g. extra and testing). You can specify which one to install:<br />
<br />
pacman -S extra/package_name<br />
pacman -S testing/package_name<br />
<br />
You can also refresh the package database before installing a package in one command:<br />
<br />
pacman -Sy package_name<br />
<br />
To remove a single package, leaving all of its dependencies installed:<br />
<br />
pacman -R package_name<br />
<br />
To remove all of the packages dependencies which aren't used by any other installed package:<br />
<br />
pacman -Rs package_name<br />
<br />
===Upgrading the System===<br />
<br />
'''Pacman''' can update all packages on the system with just one command. This could take quite a while depending on how up-to-date your system is.<br />
<br />
pacman -Su<br />
<br />
However, the best option is to synchronize the repository databases AND update your system in one go with the following:<br />
<br />
pacman -Syu<br />
<br />
===Querying the Package Database===<br />
<br />
'''Pacman''' can search and query the local package database with the -Q flag. See<br />
<br />
pacman -Q --help<br />
<br />
or the [http://archlinux.org/pacman/pacman.8.html pacman(8)] manpage for more details. Sync databases can be searched and queried with the -S flag. See either the manpage just mentioned or<br />
<br />
pacman -S --help<br />
<br />
for details.<br />
<br />
===Other Usage===<br />
<br />
'''Pacman''' is quite an extensive package management tool, here is just a brief collection of other features.<br />
<br />
* Download a package without installing it:<br />
pacman -Sw package_name<br />
<br />
* Install a local package (not from a repository):<br />
pacman -U /path/to/package/package_name-version.pkg.tar.gz<br />
You may also enter a URL:<br />
pacman -U http://www.examplepackage/repo/examplepkg.tar.gz<br />
* Fully clean the package cache (/var/cache/pacman/pkg):<br />
pacman -Scc<br />
* For removing orphans (recursively):<br />
pacman -Rs $(pacman -Qtdq)<br />
* For reinstalling all packages (at least the ones available in a repository):<br />
pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")<br />
<br />
For a more detailed list of switches please refer to <code>pacman --help</code> or <code>man pacman</code>.<br />
<br />
==Configuration==<br />
Pacman configuration is located in <code>/etc/pacman.conf</code>. In depth information about the configuration file can be found in <code>man pacman.conf</code>.<br />
<br />
===General options===<br />
General options are in [options] section. Read the man page or look in the default pacman.conf for information on what can be done here.<br />
<br />
===Repositories===<br />
In this section you define which repositories to use, as referred to in /etc/pacman.conf. They can be defined directly there or you can include them from another file.<br />
All official repositories use the same /etc/pacman.d/mirrorlist file which contains a variable '$repo'. So you only need to maintain one list.<br />
The following is an example for the official repositories which have a lot of [[mirrors]]. Avoid using ftp.archlinux.org as it is [http://www.archlinux.org/news/302/ throttled].<br />
<br />
<pre><br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
</pre><br />
<br />
'''n.b.''' Care should be taken when using '''testing''' repository<br />
<br />
===Errors===<br />
<br />
If you receive the following error<br />
'''not found in sync db'''<br />
this likely due to the package not being located because the repository has not been set correctly.<br />
<br />
==Related links==<br />
<br />
'''man-pages''':<br />
*[http://www.archlinux.org/pacman/pacman.8.html man pacman]<br />
*[http://www.archlinux.org/pacman/PKGBUILD.5.html man PKGBUILD]<br />
*[http://www.archlinux.org/pacman/libalpm.3.html man libalpm]<br />
*[http://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf]<br />
*[http://www.archlinux.org/pacman/makepkg.8.html man makepkg]<br />
*[http://www.archlinux.org/pacman/makepkg.conf.5.html man makepkg.conf]<br />
*[http://www.archlinux.org/pacman/repo-add.8.html man repo-add]<br />
<br />
'''other wiki-entries''':<br />
<br />
[[Improve Pacman Performance]]<br><br />
[[Colored Pacman output]]<br><br />
[[Downgrade packages]]<br><br />
[http://www.archlinux.org/pacman/pacman.conf.5.html Editing pacman.conf]<br><br />
[[Redownloading all installed packages]]<br><br />
[[Server_configuration|Server configuration in pacman.conf]]<br><br />
[[ArchLinux User-community Repository (AUR)]]<br><br />
[[Local repository HOW-TO]]<br><br />
[[Custom local repository with ABS and gensync]]<br><br />
[[Howto Upgrade via Home Network]] (Network Shared Pacman Cache)<br><br />
[[rucksack]]<br><br />
[[Pacman GUI Frontends]]<br><br />
[[Pacman_Aliases|Pacman Aliases (for bash)]]<br><br />
[[Mirrors]]<br />
<br />
== External Links ==<br />
[http://archux.com/page/using-pacman Using Pacman]<br />
[http://bbs.archlinux.org/viewtopic.php?id=14849 GUI Frontends]</div>Statixhttps://wiki.archlinux.org/index.php?title=Openbox&diff=43446Openbox2008-06-22T07:38:35Z<p>Statix: /* Panels, Trays, and Pagers */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Openbox}}<br />
{{i18n_entry|Русский|Openbox (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
<br />
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://icculus.org/openbox/ official website]. This article will pertain to running Openbox under Arch Linux.<br />
<br />
<br />
= Installation =<br />
Openbox is available from the standard repositories:<br />
# pacman -S openbox<br />
<br />
Once installed, pacman will direct you to copy the default <tt>menu.xml</tt> & <tt>rc.xml</tt> configuration files to <tt>~/.config/openbox/</tt>, for example:<br />
<br />
$ mkdir -p ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml<br />
'''''Note:''' do this as a regular user, not as root.''<br />
<br />
<tt>rc.xml</tt> is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.<br />
<br />
<tt>menu.xml</tt> controls the Openbox application menu that appears when you click on your desktop. The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].<br />
<br />
= Getting Started =<br />
<br />
== Using Openbox ==<br />
To run Openbox on its own, simply add the following to the bottom of ~/.xinitrc:<br />
exec openbox-session<br />
<br />
== Using Openbox with GNOME ==<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use startx, add '''exec openbox-gnome-session''' to ~/.xinitrc<br />
# From the shell:<br />
xinit /usr/bin/openbox-gnome-session<br />
<br />
== Using Openbox with KDE ==<br />
# If you use KDM, select the "KDE/Openbox" login option<br />
# If you use startx, add '''exec openbox-kde-session''' to ~/.xinitrc<br />
# From the shell:<br />
xinit /usr/bin/openbox-kde-session<br />
<br />
== Using Openbox with Xfce4 ==<br />
Log into a normal Xfce4 session. From your terminal of choice, do:<br />
<br />
killall xfwm4 ; openbox & exit<br />
<br />
This will kill xfwm4, run Openbox, and close the terminal. <br />
<br />
Log out, making sure to check the "Save session for future logins" checkbox.<br />
<br />
On next login, Xfce4 will use Openbox as its WM.<br />
<br />
To be able to exit the session using xfce4-session, open your file ~/.config/openbox/menu.xml (if it isn't there, copy it from /etc/xdg/openbox/menu.xml). <br />
<br />
Look for the entry:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
and change it to:<br />
<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.<br />
<br />
If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your ~/.config/openbox/rc.xml file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).<br />
<br />
If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:<br />
<br />
xfdesktop --quit<br />
<br />
However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.<br />
<br />
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)<br />
<br />
= Configuration =<br />
<br />
== Preferences ==<br />
Currently, there are two options for configuring the core Openbox preferences; manually edit the '''rc.xml''', or use the ObConf tool.<br />
<br />
=== Setting Preferences Manually ===<br />
<br />
To configure Openbox manually, simply edit '''~/.config/openbox/rc.xml''' with your favourite text editor. The config file provides plenty of comments throughout, and [http://icculus.org/openbox/index.php/Help:Contents full documentation] is available at the official website.<br />
<br />
=== Setting Preferences with ObConf ===<br />
<br />
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.<br />
<br />
To install ObConf, run:<br />
# pacman -S obconf<br />
<br />
'''''Note:''''' ObConf cannot be used to configure keyboard shortcuts and some other advanced features. For these modifications, you must edit '''rc.xml''' manually (see above.)<br />
<br />
== Menu Management ==<br />
<br />
The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:<br />
<br />
=== Manually ===<br />
Similar to the '''rc.xml''' file, you can edit '''~/.config/openbox/menu.xml''' with your favourite text editor. Although many of the settings are self-explanatory, [http://icculus.org/openbox/index.php/Help:Menus full documentation] is available.<br />
<br />
=== MenuMaker ===<br />
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.<br />
<br />
MenuMaker is available from the [http://aur.archlinux.org/packages.php?ID=10894 AUR]. <br />
<br />
Once installed, you can generate a complete menu by running:<br />
$ mmaker -v OpenBox3<br />
<br />
By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
To see a full list of options, run '''mmaker --help'''<br />
<br />
This will give you a pretty thorough menu. Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.<br />
<br />
=== Obmenu ===<br />
Obmenu is a GUI-based menu editor for Openbox. For those who don't enjoy mucking about in XML source code, this is probably the best option for you.<br />
<br />
It is available in the community repository:<br />
# pacman -S obmenu<br />
<br />
Once installed, simply run '''obmenu''' and add or remove the desired applications.<br />
<br />
==== obm-xdg ====<br />
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg, add the following line to '''~/.config/openbox/menu.xml''':<br />
<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then run '''openbox --reconfigure''' to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
'''''NOTE:''' If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.''<br />
<br />
== Startup Programs ==<br />
Openbox 3.4+ features support for running programs at startup. This is provided by the "openbox-session" command.<br />
<br />
There are two ways to enable autostart:<br />
# If you use startx to log into your X session, change the line that executes ''openbox'' to execute '''openbox-session''' instead.<br />
# If you log in with GDM/KDM, then select the ''Openbox'' session and it will automatically use autostart.<br />
<br />
Startup programs are managed in '''~/.config/openbox/autostart.sh'''. Full instructions and best practices for how to do this are available at the [http://icculus.org/openbox/index.php/Help:Autostart Openbox website].<br />
<br />
== Per-application settings ==<br />
Openbox 3.3+ features per-application settings, allowing you to define rules for your programs. For example, you can:<br />
* load your web browser on a certain desktop<br />
* load your terminal without a window border<br />
* load your torrent client at a certain position on your screen<br />
<br />
These are defined in '''~/.config/openbox/rc.xml'''. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://icculus.org/openbox/index.php/Help:Applications<br />
<br />
== Theming and Appearance ==<br />
Aside from the Openbox Themes, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME or KDE.<br />
<br />
=== Openbox Themes ===<br />
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. <br />
<br />
Additional themes are available from the standard repositories:<br />
<br />
# pacman -S openbox-themes<br />
<br />
This package is by no means definitive. [http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is another great resource for Openbox themes.<br />
<br />
Downloaded themes should be extracted to '''~/.themes''' and can be installed or selected with the [[Openbox#Preferences|ObConf]] tool.<br />
<br />
Creating new themes is fairly easy and again [http://icculus.org/openbox/index.php/Help:Themes well-documented].<br />
<br />
=== Desktop Wallpaper ===<br />
<br />
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]]. Other options include ImageMagick, hsetroot and xsetbg.<br />
<br />
===KDE Themes===<br />
KDE apps can be themed and colored to closely match your GTK2 apps by invoking kcontrol, part of the '''kdeadmin''' package.<br />
<br />
=== GTK Themes ===<br />
===== GTK2/GTK+ =====<br />
GTK+ themes can be managed easily with the ''gtk-chtheme'' or ''switch2'' utilities. To install, run:<br />
# pacman -S gtk-chtheme<br />
and/or<br />
# pacman -S gtk-theme-switch2<br />
Then run '''gtk-chtheme''' or '''switch2''' and set the desired theme.<br />
<br />
===== GTK1 =====<br />
For legacy GTK1 themes, install the '''gtk-theme-switch''' package:<br />
# pacman -S gtk-theme-switch<br />
Then run '''''switch''''' to select a desired theme.<br />
<br />
=== GTK Fonts ===<br />
If you want to change the type and size of your fonts, add the following to '''~/.gtkrc.mine''':<br />
style "user-font"<br />
{<br />
font_name = "[font-name] [size]"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "[font-name] [size]"<br />
<br />
where [font-name] [size] is the desired font and point size. For example:<br />
style "user-font"<br />
{<br />
font_name = "DejaVu Sans 8"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "DejaVu Sans 8"<br />
<br />
Both <tt>font_name</tt> and <tt>gtk-font-name</tt> fields are required for backwards compatibility.<br />
<br />
=== GTK Icons ===<br />
Extract the desired icon theme to '''/usr/share/icons''' (system-wide access) or '''~/.icons''' (local user access).<br />
<br />
Add the following to ~/.gtkrc.mine: <br />
gtk-icon-theme-name = "[name-of-icon-theme]"<br />
<br />
where [name-of-icon-theme] is the name of the icon theme directory. For example:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
Ensure ~/.gtkrc-2.0 is configured to parse ~/.gtkrc.mine:<br />
<br />
# ~/.gtkrc-2.0<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
include "/usr/share/themes/Rezlooks-Gilouche/gtk-2.0/gtkrc"<br />
include "/home/username/.gtkrc.mine"<br />
# -- THEME AUTO-WRITTEN DO NOT EDIT<br />
<br />
=== Mouse cursor themes ===<br />
Extract the desired Xcursor theme to either '''/usr/share/icons''' (system-wide access) or '''~/.icons''' (local user access).<br />
<br />
Add this to ~/.Xdefaults:<br />
Xcursor.theme: [name-of-cursor-theme]<br />
where [name-of-cursor-theme] is the name of the cursor theme directory. For example:<br />
Xcursor.theme: Vanilla-DMZ-AA<br />
<br />
=== Desktop Icons ===<br />
Openbox does not provide a means to display icons on the desktop. PcmanFM, [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function. <br />
<br />
ROX and PCmanFM have the additional advantage of being lightweight file managers.<br />
<br />
= Tips & Tricks =<br />
<br />
== Recommended Programs == <br />
<br />
=== Login Managers ===<br />
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations. Refer to Arch's [[SLiM]] wiki for detailed instructions.<br />
<br />
=== Composite Desktop ===<br />
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.<br />
<br />
=== Application Launchers ===<br />
==== dmenu ====<br />
Set-up dmenu as described in the [[dmenu]] wiki article.<br />
<br />
Then, add the following entry to the <keyboard> section '''~/.config/openbox/rc.xml''' to enable a shortcut to launch dmenu:<br />
<keybind key="W-p"><br />
<action name="Execute"><br />
<command>~/path/to/your/dmenu-script</command><br />
</action><br />
</keybind><br />
<br />
==== Gmrun ====<br />
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:<br />
pacman -S gmrun<br />
Add the following entry to the <keyboard> section '''~/.config/openbox/rc.xml''' to enable Alt+F2 functionality:<br />
<keybind key="A-F2"><br />
<action name="execute"><execute>gmrun</execute></action><br />
</keybind><br />
<br />
=== File managers ===<br />
<br />
There are many possibilities, but the most popular lightweight file managers are:<br />
* [http://thunar.xfce.org Thunar]. Thunar supports auto-mount features and other plugins. <br />
pacman -S thunar<br />
Thunar may be started in daemon mode for tighter desktop integration. For instance, inserting a USB pendrive will invoke a Thunar window to popup, with the drive contents listed in the window. <br />
<br />
To start Thunar in daemon mode, edit ~/.config/openbox/autostart.sh and add:<br />
thunar --daemon &<br />
<br />
* [http://rox.sourceforge.net ROX] (ROX provides desktop icons)<br />
pacman -S rox<br />
* [http://pcmanfm.sourceforge.net PCMan] (pcmanfm also provides desktop icons)<br />
pacman -S pcmanfm<br />
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm.sourceforge.net/ emelFM], both of which use the familiar 'Midnight Commander' two pane layout (these two require gtk 1.2.x).<br />
<br />
Of course, you can also use GNOME's Nautilus. Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections).<br />
<br />
=== Panels, Trays, and Pagers ===<br />
<br />
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:<br />
<br />
'''Panels'''<br />
* [http://wiki.archlinux.org/index.php/PyPanel PyPanel]<br />
* [http://nsf.110mb.com/bmpanel/ bmpanel]<br />
* [http://code.google.com/p/ttm/ Tint]<br />
* [http://sourceforge.net/projects/lxpanel LXPanel]<br />
* [http://fbpanel.sourceforge.net fbpanel]<br />
* [http://perlpanel.org/ PerlPanel]<br />
* [http://www.chatjunkies.org/fspanel/ fspanel]<br />
* [http://www.xfce.org/projects/xfce4-panel/ xfce4-panel]<br />
* [http://developer.gnome.org/arch/gnome/corecomponents/panel/ gnome-panel]<br />
* [http://code.google.com/p/avant-window-navigator/ avant-window-navigator]<br />
* [http://developer.berlios.de/projects/cairo-dock/ cairo-dock]<br />
<br />
'''Trays'''<br />
* [http://stalonetray.sourceforge.net/ Stalonetray]<br />
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]<br />
<br />
'''Pagers'''<br />
* [http://projects.l3ib.org/trac/visibility Visibility]<br />
* [http://bbtools.sourceforge.net/ bbpager]<br />
* [http://aur.archlinux.org/packages.php?ID=970 netwmpager]<br />
* [http://useperl.ru/ipager/index.en.html IPager]<br />
<br />
Make your choice and add it to your startup file.<br />
<br />
== Get xprop values for per-app settings quickly ==<br />
If you use per-application settings frequently, you might find this bash alias handy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use, run '''xp''' and click on the running program that you'd like to define with per-app settings. The result will display only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:<br />
<br />
[thayer@dublin:~] $ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
== Linking the menu to a command ==<br />
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script , xdotool, can simulate a keypress by running a command. Xdotool is available on AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here]. To use it, simply add the following code to the <keyboard> section of your rc.xml:<br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:<br />
# xdotool key ctrl+alt+q<br />
Of course, you can change the shortcut to your liking.<br />
<br />
= Additional Resources =<br />
* [http://icculus.org/openbox/ Openbox Website] - The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [http://archux.com/page/application-recommendations Application recommendations]</div>Statixhttps://wiki.archlinux.org/index.php?title=Openbox&diff=41642Openbox2008-05-20T22:48:19Z<p>Statix: /* Panels, Trays, and Pagers */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Openbox}}<br />
{{i18n_entry|Русский|Openbox (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
<br />
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://icculus.org/openbox/ official website]. This article will pertain to running Openbox under Arch Linux.<br />
<br />
<br />
= Installation =<br />
Openbox is available from the standard repositories:<br />
# pacman -S openbox<br />
<br />
Once installed, pacman will direct you to copy the default <tt>menu.xml</tt> & <tt>rc.xml</tt> configuration files to <tt>~/.config/openbox/</tt>, for example:<br />
<br />
$ mkdir -p ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml<br />
$ cp /etc/xdg/openbox/autostart.sh ~/.config/openbox/autostart.sh<br />
'''''Note:''' do this as a regular user, not as root.''<br />
<br />
The rc.xml file is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.<br />
<br />
The menu.xml file controls the Openbox application menu that appears when you right-click on your desktop. The default items are pretty sparse (if not entirely useless), but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].<br />
<br />
The [http://wiki.archlinux.org/index.php/Openbox#Startup_Programs autostart.sh file] controls what programs start up when you start the openbox-session.<br />
<br />
= Getting Started =<br />
<br />
== Using Openbox ==<br />
To run Openbox on its own, simply add the following to the bottom of ~/.xinitrc:<br />
exec openbox-session<br />
<br />
== Using Openbox with GNOME ==<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use startx, add '''exec openbox-gnome-session''' to ~/.xinitrc<br />
# From the shell:<br />
xinit /usr/bin/openbox-gnome-session<br />
<br />
== Using Openbox with KDE ==<br />
# If you use KDM, select the "KDE/Openbox" login option<br />
# If you use startx, add '''exec openbox-kde-session''' to ~/.xinitrc<br />
# From the shell:<br />
xinit /usr/bin/openbox-kde-session<br />
<br />
== Using Openbox with Xfce4 ==<br />
Log into a normal Xfce4 session. From your terminal of choice, do:<br />
<br />
killall xfwm4 ; openbox & exit<br />
<br />
This will kill xfwm4, run Openbox, and close the terminal. <br />
<br />
Log out, making sure to check the "Save session for future logins" checkbox.<br />
<br />
On next login, Xfce4 will use Openbox as its WM.<br />
<br />
To be able to exit the session using xfce4-session, open your file ~/.config/openbox/menu.xml (if it isn't there, copy it from /etc/xdg/openbox/menu.xml). <br />
<br />
Look for the entry:<br />
<br />
<item label="Exit"><br />
<action name="Exit"/><br />
</item><br />
<br />
and change it to:<br />
<br />
<item label="Exit"><br />
<action name="Execute"><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.<br />
<br />
If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your ~/.config/openbox/rc.xml file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).<br />
<br />
If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:<br />
<br />
xfdesktop --quit<br />
<br />
However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.<br />
<br />
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.) <br />
= Configuration =<br />
<br />
== Preferences ==<br />
Currently, there are two options for configuring the core Openbox preferences; manually edit the '''rc.xml''', or use the ObConf tool.<br />
<br />
=== Setting Preferences Manually ===<br />
<br />
To configure Openbox manually, simply edit '''~/.config/openbox/rc.xml''' with your favourite text editor.<br />
<br />
=== Setting Preferences with ObConf ===<br />
<br />
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.<br />
<br />
To install ObConf, run:<br />
# pacman -S obconf<br />
<br />
Currently, ObConf cannot be used to manage keyboard shortcuts and a few other advanced features. For these modifications, the user must resort to editing the '''rc.xml''' manually.<br />
<br />
== Menu Management ==<br />
<br />
The default Openbox menu is pretty basic and if you don't have any of the listed programs installed, it is downright useless. There are a number of ways to customize your menu.<br />
<br />
=== MenuMaker ===<br />
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.<br />
<br />
MenuMaker is available from the [http://aur.archlinux.org/packages.php?ID=10894 AUR]. <br />
<br />
Once installed, you can generate a complete menu by running:<br />
$ mmaker -v OpenBox3<br />
<br />
By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
To see a full list of options, run '''mmaker --help'''<br />
<br />
This will give you a pretty thorough menu. Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.<br />
<br />
=== Obmenu ===<br />
Obmenu is a GUI-based menu editor for Openbox. For those who don't enjoy mucking about in XML source code, this is probably the best option for you.<br />
<br />
It's available in the standard repositories:<br />
# pacman -S obmenu<br />
<br />
Once installed, simply run '''obmenu''' and add or remove the desired applications.<br />
<br />
==== obm-xdg ====<br />
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg, add the following line to '''~/.config/openbox/menu.xml''':<br />
<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then run '''openbox --reconfigure''' to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
'''''NOTE:''' If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.''<br />
<br />
== Startup Programs ==<br />
Openbox 3.4+ features support for running programs at startup. This is provided by the "openbox-session" command.<br />
<br />
There are two ways to enable autostart:<br />
# If you use startx to log into your X session, change the line that executes ''openbox'' to execute '''openbox-session''' instead.<br />
# If you log in with GDM/KDM, then select the ''Openbox'' session and it will automatically use autostart.<br />
<br />
Startup programs are managed in '''~/.config/openbox/autostart.sh'''. Full instructions and best practices for how to do this are available at the [http://icculus.org/openbox/index.php/Help:Autostart Openbox website].<br />
<br />
== Theming and Appearance ==<br />
Aside from the Openbox Themes, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME or KDE.<br />
<br />
=== Openbox Themes ===<br />
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. <br />
<br />
Additional themes are available from the standard repositories:<br />
<br />
# pacman -S openbox-themes<br />
<br />
This package is by no means definitive. [http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is another great resource for Openbox themes.<br />
<br />
Downloaded themes should be extracted to '''~/.themes''' and can be installed or selected with the [[Openbox#Preferences|ObConf]] tool.<br />
<br />
Creating new themes is fairly easy and again [http://icculus.org/openbox/index.php/Help:Themes well-documented].<br />
<br />
=== Desktop Wallpaper ===<br />
<br />
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]]. Other options include ImageMagick, hsetroot and xsetbg.<br />
<br />
=== GTK Themes ===<br />
GTK2 themes can be managed easily with gtk-chtheme:<br />
# pacman -S gtk-chtheme<br />
<br />
Simply run '''gtk-chtheme''' and set the desired theme.<br />
<br />
For legacy GTK1 themes, install the '''gtk-theme-switch''' package and run '''''switch'''''.<br />
<br />
=== GTK Fonts ===<br />
If you want to change the type and size of your fonts, add the following to '''~/.gtkrc.mine''':<br />
style "user-font"<br />
{<br />
font_name = "[font-name] [size]"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "[font-name] [size]"<br />
<br />
where [font-name] [size] is the desired font and point size. For example:<br />
style "user-font"<br />
{<br />
font_name = "DejaVu Sans 8"<br />
}<br />
widget_class "*" style "user-font"<br />
gtk-font-name = "DejaVu Sans 8"<br />
<br />
Both <tt>font_name</tt> and <tt>gtk-font-name</tt> fields are required for backwards compatibility.<br />
<br />
=== GTK Icons ===<br />
Extract the desired icon theme to '''/usr/share/icons''' (system-wide access) or '''~/.icons''' (local user access).<br />
<br />
Add the following to ~/.gtkrc.mine: <br />
gtk-icon-theme-name = "[name-of-icon-theme]"<br />
<br />
where [name-of-icon-theme] is the name of the icon theme directory. For example:<br />
gtk-icon-theme-name = "Tango"<br />
<br />
=== Mouse cursor themes ===<br />
Extract the desired Xcursor theme to either '''/usr/share/icons''' (system-wide access) or '''~/.icons''' (local user access).<br />
<br />
Add this to ~/.Xdefaults:<br />
Xcursor.theme: [name-of-cursor-theme]<br />
where [name-of-cursor-theme] is the name of the cursor theme directory. For example:<br />
Xcursor.theme: Vanilla-DMZ-AA<br />
<br />
=== Desktop Icons ===<br />
Openbox does not provide a means to display icons on the desktop. [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function. <br />
<br />
ROX has the additional advantage of being a lightweight file manager.<br />
<br />
= Tips & Tricks =<br />
<br />
== Recommended Programs == <br />
<br />
=== Login Managers ===<br />
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations. Refer to Arch's [[SLiM]] wiki for detailed instructions.<br />
<br />
=== Composite Desktop ===<br />
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.<br />
<br />
=== Application Launchers ===<br />
==== dmenu ====<br />
Set-up dmenu as described in the [[dmenu]] wiki article.<br />
<br />
Then, add the following entry to the <keyboard> section '''~/.config/openbox/rc.xml''' to enable a shortcut to launch dmenu:<br />
<keybind key="W-p"><br />
<action name="Execute"><br />
<command>~/path/to/your/dmenu-script</command><br />
</action><br />
</keybind><br />
<br />
==== Gmrun ====<br />
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:<br />
pacman -S gmrun<br />
Add the following entry to the <keyboard> section '''~/.config/openbox/rc.xml''' to enable Alt+F2 functionality:<br />
<keybind key="A-F2"><br />
<action name="execute"><execute>gmrun</execute></action><br />
</keybind><br />
<br />
=== File managers ===<br />
<br />
There are many possibilities, but the most popular lightweight file managers are:<br />
* [http://thunar.xfce.org Thunar] (Supports auto-mount features and other plugins)<br />
* [http://rox.sourceforge.net ROX] (ROX can also provide desktop icons)<br />
* [http://pcmanfm.sourceforge.net PCMan] (pcmanfm)<br />
<br />
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm.sourceforge.net/ emelFM], both of which use the familiar 'Midnight Commander' two pane layout (these two require gtk 1.2.x).<br />
<br />
Of course, you can also use GNOME's Nautilus. Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections).<br />
<br />
=== Panels, Trays, and Pagers ===<br />
<br />
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:<br />
<br />
'''Panels'''<br />
* [http://wiki.archlinux.org/index.php/PyPanel PyPanel]<br />
* [http://nsf.110mb.com/bmpanel/ bmpanel]<br />
* [http://code.google.com/p/ttm/ Tint]<br />
* [http://sourceforge.net/projects/lxpanel LXPanel]<br />
* [http://fbpanel.sourceforge.net fbpanel]<br />
* [http://perlpanel.org/ PerlPanel]<br />
* [http://www.chatjunkies.org/fspanel/ fspanel]<br />
* [http://www.xfce.org/projects/xfce4-panel/ xfce4-panel]<br />
* [http://developer.gnome.org/arch/gnome/corecomponents/panel/ gnome-panel]<br />
* [http://code.google.com/p/avant-window-navigator/ avant-window-navigator]<br />
<br />
'''Trays'''<br />
* [http://stalonetray.sourceforge.net/ Stalonetray]<br />
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]<br />
<br />
'''Pagers'''<br />
* [http://projects.l3ib.org/trac/visibility Visibility]<br />
* [http://bbtools.sourceforge.net/ bbpager]<br />
* [http://aur.archlinux.org/packages.php?ID=970 netwmpager]<br />
* [http://useperl.ru/ipager/index.en.html IPager]<br />
<br />
Make your choice and add it to your startup file.<br />
<br />
== Per-application settings ==<br />
Openbox has per-application settings since openbox 3.3<br />
These settings can be set in ~/.config/openbox/rc.xml by creating new XML element inside <openbox_config> called <applications>, which will contain the settings. Inside <applications> you will need <application name=""> which will determine which application this setting is going to affect. The ways to determine the application are name, class and role, eg.<br />
<application class="Firefox-bin"><br />
The class and name can be found by running<br />
xprop | grep WM_CLASS<br />
When you click the application you want to configure, it will return something like<br />
WM_CLASS(STRING) = "Gecko", "Thunderbird-bin"<br />
The first one is what you put inside name="" and the latter one is for class="", you can use either one, but I prefer the one which doesn't get mixed with anything.<br />
After this you need to set the settings you want, available settings are <br />
decor - whether window has borders, titlebar and so on, values yes or no, on or off <br />
shade - whether the window is shaded to the titlebar or not (doesn't work with decorations off), values yes, no, on, off and so on<br />
position - position of the window when started needs subsection<br />
<x>pos</x> - position on pixels reading from top left corner<br />
<y>pos</y> - center as value and such work too, you can also leave x or y out if you only want to adjust one value.<br />
focus - whether the window gets focused when starting it (not sure about this), values yes no and so on<br />
desktop - desktop (workspace) the application starts, value desktop number reading from 0 (if its opened to another desktop, it doesn't get focused)<br />
monitor - xinerama head the application starts (useful when you have 2 monitors and want the application to open in another, eg nvidia twinview uses xinerama), values 0 1 screennumber and such<br />
layer - layer the application starts on, values Bottom, Normal and Top<br />
iconic - whether the application is to be launched iconic, values yes, no, on, off and so on<br />
skip_pager - application skips pager, values yes, no, on, off and so on<br />
skip_taskbar - same as above, just taskbar, values yes, no, on, off and so on<br />
fullscreen - whether app should be started fullscreen, values yes, no, on, off and so on<br />
maximized - type of maximization, values Horizontal, Vertical, yes, no, on, off and so on.<br />
Example config showing firefox opening 30 pixels from top centered with horizontal maximization<br />
<applications><br />
<application class="Firefox-bin"><br />
<position><br />
<x>center</x><br />
<y>30</y><br />
</position><br />
<maximized>Horizontal</maximized><br />
</application><br />
</applications><br />
== Linking the menu to a command ==<br />
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script , xdotool, can simulate a keypress by running a command. Xdotool is available on AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here]. To use it, simply add the following code to the <keyboard> section of your rc.xml:<br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:<br />
# xdotool key ctrl+alt+q<br />
Of course, you can change the shortcut to your liking.<br />
<br />
= Additional Resources =<br />
* [http://icculus.org/openbox/ Openbox Website] - The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [http://archux.com/page/application-recommendations Application recommendations]</div>Statix