https://wiki.archlinux.org/api.php?action=feedcontributions&user=SoleSoul&feedformat=atomArchWiki - User contributions [en]2024-03-28T11:26:38ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=VirtualBox&diff=258386VirtualBox2013-05-23T11:10:39Z<p>SoleSoul: /* Shared Folders as Arch Linux Guest */</p>
<hr />
<div>[[Category:Emulators]]<br />
[[Category:Virtualization]]<br />
[[cs:VirtualBox]]<br />
[[de:VirtualBox]]<br />
[[es:VirtualBox]]<br />
[[fr:VirtualBox]]<br />
[[hu:VirtualBox]]<br />
[[it:VirtualBox]]<br />
[[ja:VirtualBox]]<br />
[[pt:VirtualBox]]<br />
[[ru:VirtualBox]]<br />
[[zh-CN:VirtualBox]]<br />
{{Article summary start}}<br />
{{Article summary text|This article is about basic usage of VirtualBox, including running the VirtualBox software within an Arch ''host'', and running an Arch ''guest'' inside a VirtualBox virtual machine.}}<br />
{{Article summary heading|Required software}}<br />
{{Article summary link|VirtualBox|https://www.virtualbox.org}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|VirtualBox Extras}}<br />
{{Article summary wiki|PhpVirtualBox}}<br />
{{Article summary wiki|VirtualBox Arch Linux Guest On Physical Drive}}<br />
{{Article summary wiki|Installing Arch Linux from VirtualBox}}<br />
{{Article summary wiki|Moving an existing install into (or out of) a virtual machine}}<br />
{{Article summary end}}<br />
<br />
'''VirtualBox''' is a virtual PC emulator like [[VMware]]. It is in constant development and new features are implemented all the time. e.g. version 2.2 introduced OpenGL 3D acceleration support for Linux and Solaris guests. It has a [[Qt]] GUI interface, as well as headless and [[Wikipedia:SDL|SDL]] command line tools for managing and running virtual machines. It includes ''guest additions'' for some guest operating systems, which integrate functions of the guest and host systems, including sharing files, the clipboard, video acceleration and a “seamless” window integration mode.<br />
<br />
{{Wikipedia|VirtualBox}}<br />
<br />
== Installation on host ==<br />
<br />
The basic GPL-licensed VirtualBox suite can be [[pacman|installed]] with the {{Pkg|virtualbox}} package, found in the [[official repositories]].<br />
<br />
The {{pkg|virtualbox-host-modules}} package, which contains the precompiled modules for the stock archlinux kernel, should be installed with it. If you are using the {{pkg|linux-lts}} kernel you should also install the {{pkg|virtualbox-host-modules-lts}} package. For custom kernels, read [[#Hosts running a custom kernel|the section below]].<br />
<br />
In order to use the graphical interface, based on [[Qt]] ({{ic|VirtualBox}} command), you will also need to install the {{Pkg|qt4}} package. This is not required for the simpler SDL-only GUI ({{ic|VBoxSDL}} command) nor for the {{ic|VBoxHeadless}} command.<br />
<br />
=== Hosts running a custom kernel ===<br />
<br />
VirtualBox works just fine with custom kernels such as [[Linux-ck]] ''without'' the need to keep any of the official ARCH kernel packages on the system. The trick to keeping pacman from bringing down the ARCH kernel packages is to install virtualbox with the {{Pkg|virtualbox-host-dkms}} package, which contains the source for the virtualbox kernel modules. See {{Bug|26721}} for further explanations.<br />
<br />
Once {{Pkg|virtualbox-host-dkms}} is installed, simply generate the kernel modules for your custom kernel by running:<br />
# dkms install vboxhost/<virtualbox-host-source version> -k <your custom kernel's version>/<your architecture><br />
<br />
Which for the lazy is the command:<br />
# dkms install vboxhost/$(pacman -Q virtualbox|awk {'print $2'}|sed 's/\-.\+//') -k $(uname -rm|sed 's/\ /\//')<br />
<br />
and load it:<br />
# modprobe vboxdrv<br />
<br />
To load/compile virtualbox modules automatically at startup you can enable {{ic|dkms.service}}:<br />
# systemctl enable dkms.service<br />
<br />
==== Automatic re-compilation of the virtualbox host modules with every update of any kernel====<br />
<br />
This is possible thanks to {{AUR|vboxhost-hook}} from the [[AUR]]. In '''vboxhost-hook''', the 'automatic re-compilation' functionality is done by a '''vboxhost hook''' on [[mkinitcpio]] after forcing to update the {{Pkg|linux-headers}} package. You will need to add 'vboxhost' to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}, as well as 'linux-headers' and your custom kernel(s) headers to the SyncFirst array in {{ic|/etc/pacman.conf}} for this to work.<br />
<br />
{{Warning|The SyncFirst option is no longer available as of pacman 4.1. Use<br />
<br />
$ pacman -Sy linux-headers && pacman -Su<br />
<br />
instead to manually cause linux-headers to be updated first. See [https://mailman.archlinux.org/pipermail/arch-general/2013-April/033297.html This explanation].}}<br />
<br />
The hook will call the '''dkms''' command to update the virtualbox host modules for the version of your new kernel.<br />
<br />
{{Note|If you are using this functionality it's '''important''' to look at the installation process of the linux (or any other kernel) package. vboxhost hook will tell you if anything goes wrong.}}<br />
<br />
== Setup ==<br />
<br />
Add the desired username to the '''vboxusers''' [[group]]. Everything may work fine without this step but shared folders and possibly some other optional stuff require it to work. The new group does not automatically apply to existing sessions; the user has to log in again or start a new environment with a command like {{Ic|newgrp}} or {{Ic|sudo -u ''username'' -s}}.<br />
<br />
# gpasswd -a ''username'' vboxusers<br />
<br />
=== Loading Kernel Modules ===<br />
VirtualBox running on Linux uses its own [[kernel modules]], including a mandatory module named '''vboxdrv''', which must be loaded before virtual machines can run. It can be automatically loaded when Arch Linux starts up, or it can be loaded manually when necessary.<br />
<br />
To load the module manually:<br />
<br />
# modprobe vboxdrv<br />
<br />
To load the VirtualBox driver at startup, create a {{ic|*.conf}} file (e.g. {{ic|virtualbox.conf}}) in {{ic|/etc/[[Kernel_modules#Loading|modules-load.d]]}} that contains all modules that should be loaded:<br />
<br />
{{hc|/etc/modules-load.d/virtualbox.conf|<br />
vboxdrv}}<br />
<br />
{{Note|You may need to update the kernel modules db in order to avoid 'no such file or directory' error when loading vboxdrv. Run: {{ic|depmod -a}}.}}<br />
<br />
To start the VirtualBox graphical manager:<br />
<br />
$ VirtualBox<br />
<br />
To ensure full functionality of bridged networking, ensure that the {{ic|vboxnetadp}}, {{ic|vboxnetflt}} and {{ic|vboxpci}} [[Kernel modules|kernel modules]] are loaded as well as the {{pkg|net-tools}} package.<br />
<br />
=== Guest additions disc ===<br />
<br />
The {{Pkg|virtualbox}} package also suggests installing {{Pkg|virtualbox-guest-iso}} on the host (Arch Linux) running VirtualBox. It is a disc image that can be used to install the guest additions onto guest systems. Make it available to the (running) guest by going to Devices and clicking "Install Guest Additions... Host+D". Then run the guest additions installation from inside the guest.<br />
<br />
=== Booting a live disc ===<br />
<br />
Click the 'New' button to create a new virtual environment. Name it appropriately and select Operating System type and version. Select base memory size (note: most operating systems will need at least 512&nbsp;MB to function properly). Create a new hard disk image (a hard disk image is a file that will contain the operating system's filesystem and files).<br />
<br />
When the new image has been created, click 'Settings', then CD/DVD-ROM, check 'Mount CD/DVD Drive' then select an ISO image.<br />
<br />
=== Starting virtual machines with a service ===<br />
<br />
See [[Systemd/Services#VirtualBox virtual machines]] for details on how to setup a systemd service for each virtual machine.<br />
<br />
=== Advanced setup ===<br />
<br />
See [[VirtualBox Extras]] for advanced configuration.<br />
<br />
== Arch Linux guests ==<br />
<br />
Installing Arch under VirtualBox is straightforward, and additions should be installed through pacman (not through "Install Guest Additions" in VirtualBox, or from a mounted ISO image).<br />
<br />
=== Install the Guest Additions ===<br />
<br />
Install the {{Pkg|virtualbox-guest-utils}} package. Manually load the modules with:<br />
<br />
# modprobe -a vboxguest vboxsf vboxvideo<br />
<br />
Create a {{ic|*.conf}} file (e.g. {{ic|virtualbox.conf}}) in {{ic|/etc/modules-load.d/}} with these lines:<br />
<br />
{{hc|/etc/modules-load.d/virtualbox.conf|<br />
vboxguest<br />
vboxsf<br />
vboxvideo}}<br />
<br />
Add the following line to the top of {{ic|~/.xinitrc}} (create one if {{ic|~/.xinitrc}} does not exist):<br />
<br />
{{hc|~/.xinitrc|<br />
/usr/bin/VBoxClient-all}}<br />
<br />
{{Note|This must be added at the top of {{ic|~/.xinitrc}} or before you specify any {{ic|exec}} options.}}<br />
<br />
=== Automatic re-compilation of the VirtualBox guest modules with every update of any kernel ===<br />
<br />
This is possible thanks to {{AUR|vboxguest-hook}} from the [[AUR]]. In '''vboxguest-hook''', the 'automatic re-compilation' functionality is done by a '''vboxguest hook''' on [[mkinitcpio]] after forcing to update the {{pkg|linux-headers}} package. You will need to add {{ic|vboxguest}} to the HOOKS array in {{ic|/etc/mkinitcpio.conf}}. You may need to manually recreate the initramfs after an upgrade of the {{pkg|linux-headers}} package.<br />
<br />
The hook will call the {{ic|dkms}} command to update the VirtualBox guest modules for the version of your new kernel.<br />
<br />
{{Note|If you are using this functionality, it is '''important''' to look at the installation process of the {{pkg|linux}} (or any other kernel) package. vboxguest hook will tell you if anything goes wrong.}}<br />
<br />
=== Start the sharing services ===<br />
After installing {{Pkg|virtualbox-guest-utils}} above, you should start {{ic|VBoxClient-all}} to start services for sharing the clipboard, resizing the screen, etc.<br />
* If you are running something that launches {{Ic|/etc/xdg/autostart/vboxclient.desktop}}, such as GNOME or KDE, then nothing needs to be done. <br />
* If you use {{Ic|.xinitrc}} to launch things instead, you must add the following to your {{Ic|.xinitrc}} before launching your WM.<br />
<br />
# VBoxClient-all &<br />
<br />
=== Using USB webcam / microphone ===<br />
<br />
{{Note|You will need to have VirtualBox extension pack installed before following the steps below. See [[VirtualBox_Extras#Extension_pack]] for details.}}<br />
<br />
# Make sure the virtual machine is not running and your webcam / microphone is not being used.<br />
# Bring up the main VirtualBox window and go to settings for Arch machine. Go to USB section.<br />
# Make sure "Enable USB Controller" is selected. Also make sure that "Enable USB 2.0 (EHCI) Controller" is selected too.<br />
# Click the "Add filter from device" button (the cable with the '+' icon).<br />
# Select your USB webcam/microphone device from the list.<br />
# Now click OK and start your VM.<br />
<br />
=== Using Arch under Virtualbox EFI mode ===<br />
<br />
My experience with this configuration was pretty terrible, but it does work.<br />
<br />
''UPD. Using efibootmgr has the same effect as using VirtualBox boot menu (see the note below): settings [https://www.virtualbox.org/ticket/11177 disappear] after VM shutdown.'' First, {{ic|efibootmgr}} does *not* work. It will appear to work, but all changes it makes appear to be overwritten on reboot. After performing a standard UEFI/GPT installation, reboot and you should get dumped to the EFI shell. Type exit and you will get a menu. Select the Boot Management Manager, Boot Options, Add Boot Option. Use the file browser to find the grub efi file and select it. Add a label if you want. Afterwards, select Change Boot Order from the menu, use arrow keys to select your Arch option, and {{keypress|+}} to move it up to the top. GRUB should boot by default now.<br />
<br />
Other options are: 1) move your loader to {{ic|\EFI\boot\bootx64.efi}}, 2) create {{ic|\startup.nsh}} script, which executes desirable loader, like this:<br />
<br />
{{hc|\startup.nsh|<br />
HD16a0a1:\EFI\refind\refindx64.efi}}<br />
<br />
Here I'm using consistent mapping name (HD16a0a1). It is probably a good idea, because they do survive configuration changes.<br />
<br />
{{Note|Another useful way to get back to the EFI menu after autobooting is working is to press the {{Keypress|C}} key inside GRUB and type {{ic|exit}}. Obviously, this will only work with {{ic|grub-efi}}, not {{ic|grub-bios}}.<br><br />
Regenerating the {{ic|grub.cfg}} file may also be required to fix broken UUIDs. Check with the {{ic|lsblk -f}} command that they match.<br><br />
Yet another useful way to get to VirtualBox boot menu is pressing {{keypress|F12}} right after starting virtual machine. It comes in handy when using rEFInd + EFISTUB, for example.}}<br />
<br />
== Shared Folders as Arch Linux Guest ==<br />
<br />
Shared folders are managed via the VirtualBox program on the host. They may be added, auto-mounted and made read-only from there. Creating a shared folder from the VirtualBox program in the host locates that folder in {{Ic|/media/sf_''SHAREDFOLDERNAME''}}. At this time an additional step is needed to have that folder created in the Arch Guest because Arch use a package for Guest Additions. To create and access this shared folder from the Arch Guest, this must also be done at the command line after installing the Guest Additions package(s) from pacman:<br />
<br />
# groupadd vboxsf<br />
# gpasswd -a $USER vboxsf<br />
<br />
{{Note|For automounting to work, you have to enable the vboxservice service. See next section for instructions.}}<br />
<br />
If you wish, a symbolic link may be made to another folder in your home directory for easy access. As an example, if a shared folder named "Dropbox" was created in the VirtualBox program on the host machine, then /media/sf_Dropbox is automatically created in the guest so this could be done:<br />
<br />
$ ln -s /media/sf_Dropbox/* ~/dropbox<br />
<br />
The .run script provided in the Guest Additions iso does this for you, however, Arch does not recommend using that script so this step must be done manually. The instructions for it were found here: (pastebin: [http://pastebin.com/6cUE3kjF]) .<br />
<br />
If shared folders are not auto-mounted, try [https://bbs.archlinux.org/viewtopic.php?id=70780 manually mount] or read the next section.<br />
<br />
To prevent startup problems when you're using [[systemd]], you should add {{ic|1=comment=systemd.automount}} to your {{ic|/etc/fstab}}. This way, they are mounted only when you access those mountpoints and not during startup. Otherwise your system might become unusable after a kernel upgrade (if you install your guest additions manually).<br />
<br />
desktop /media/desktop vboxsf uid=user,gid=group,rw,dmode=700,fmode=600,comment=systemd.automount 0 0<br />
<br />
Don't waste your time to test the {{ic|nofail}} option. {{ic|mount.vboxsf}} is not able to handle this (2012-08-20).<br />
<br />
desktop /media/desktop vboxsf uid=user,gid=group,rw,dmode=700,fmode=600,nofail 0 0<br />
<br />
=== Synchronise guest date with host ===<br />
<br />
To keep sync date and time, make sure you have {{Pkg|virtualbox-guest-utils}} installed in your host (see [[#Install the Guest Additions|previous section]]). Then run<br />
# systemctl enable vboxservice.service<br />
<br />
To enable the service for next boot. To start immediately, run<br />
# systemctl start vboxservice.service<br />
<br />
You also need run this daemon in order to use auto-mounting feature of shared folders that are mentioned above.<br />
<br />
== Troubleshooting ==<br />
=== VBOX_E_INVALID_OBJECT_STATE (0x80BB0007) ===<br />
This can occur if a VM is exited ungracefully. The solution to unlock the VM is trivial:<br />
VBoxManage controlvm nArch poweroff<br />
<br />
=== USB subsystem is not working on the host or guest ===<br />
<br />
Sometimes the USB subsystem is not auto-detected resulting in an error or in a not visible USB drive on the host, even when the user is in the '''vboxusers''' group. See this topic [https://bbs.archlinux.org/viewtopic.php?id=125785] for details.<br />
<br />
USB subsystem will work if you add<br />
<br />
VBOX_USB=usbfs<br />
<br />
to {{Ic|~/.bashrc}} and reboot your system or open a new bash instance.<br />
<br />
Also make sure that your user is a member of the '''storage''' group.<br />
<br />
=== Failed to create the host-only network interface ===<br />
<br />
To be able to create a Host-Only Network Adapter or a Bridged Network Adapter the kernel modules {{ic|vboxnetadp}} and {{ic|vboxnetflt}} need to be loaded, you also need to make sure the {{pkg|net-tools}} package is installed. It's possible to load these kernel modules manually with<br />
<br />
# modprobe -a vboxnetadp vboxnetflt<br />
<br />
To load them automatically at boot, add a new line for each module to {{ic|/etc/modules-load.d/virtualbox.conf}}:<br />
<br />
vboxdrv<br />
vboxnetadp<br />
vboxnetflt<br />
<br />
{{Note|These used to be added to the {{ic|MODULES}} array in {{ic|/etc/rc.conf}}. This is now deprecated.}}<br />
<br />
More information in [https://bbs.archlinux.org/viewtopic.php?id=130581 this] topic.<br />
<br />
=== WinXP: Bit-depth cannot be greater than 16 ===<br />
<br />
If you are running at 16-bit color depth, then the icons may appear fuzzy/choppy. However, upon attempting to change the color depth to a higher level, the system may restrict you to a lower resolution or simply not enable you to change the depth at all. To fix this, run {{ic|regedit}} add the following key to the Virtual Windows XP registry:<br />
<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]<br />
"ColorDepth"=dword:00000004<br />
<br />
Then update the color depth in the desktop properties window. If nothing happens, force the screen to redraw through some method (i.e. {{Keypress|Host+F}} to redraw/enter full screen).<br />
<br />
=== Mounting .vdi Images ===<br />
<br />
This just work with '''static''' size vdi images! '''Dynamic size won't''' be easy mountable! First we need one information from your .vdi image:<br />
<br />
$ VBoxManage internalcommands dumphdinfo Arch_64min.vdi |grep offData<br />
Header: offBlocks=4096 offData=69632<br />
<br />
Now, '''add to your''' {{ic|offData}} 32256. e.g. 32256 + 69632 = 101888<br />
<br />
Now you can mount your vdi image:<br />
<br />
# mount -t ext4 -o rw,noatime,noexec,loop,offset=101888 Arch_64min.vdi /mnt/<br />
<br />
=== Startup problems because of mount failures ===<br />
<br />
If you experience problems in a [[systemd]] setup after a kernel upgrade, you should start the system with {{ic|1=init=/bin/bash}} (if the emergency shell does not work for you).<br />
<br />
root=/dev/mapper/vg_main-lv_root ro vga=792 resume=/dev/mapper/vg_main-lv_swap init=/bin/bash<br />
<br />
Then mount the ''root''-filesystem with write access:<br />
<br />
# mount / -o remount,rw<br />
<br />
Change {{ic|/etc/fstab}} according to [[#Shared Folders as Arch Linux Guest]]. Then exec systemd within the Bash shell:<br />
<br />
# exec /bin/systemd<br />
<br />
=== Copy&Paste not working on Arch Linux Guest ===<br />
<br />
Since updating {{ic|virtualbox-guest-additions}} to version {{ic|4.2.0-2}} copy&paste from Host OS to Arch Linux Guest stopped working. It seems to be due to {{ic|VBoxClient-all}} requiring ''root'' access. In previous versions adding ''VBoxClient-all &'' to ''~/.xinitrc'' was sufficient to make copy&paste work. Update ''~/.xinitrc'' to match {{ic|sudo VBoxClient-all &}} and add the line {{ic|, NOPASSWD: /usr/bin/VBoxClient-all}} to your username in the sudoers file and restart X. It should all work again. The line in the sudoers file should look similar to this:<br />
<br />
# Allow sudo for user 'you' and let him run VBoxClient-all without requiring a password<br />
you ALL = PASSWD: ALL, NOPASSWD: /usr/bin/VBoxClient-all<br />
<br />
{{Note|Use {{ic|visudo}} to edit the sudoers file. This will check for syntax errors when saving.}}<br />
<br />
=== Use Serial port in guest OS ===<br />
Check you permission in Serial port<br />
$ /bin/ls -l /dev/ttyS*<br />
crw-rw---- 1 root uucp 4, 64 Feb 3 09:12 /dev/ttyS0<br />
crw-rw---- 1 root uucp 4, 65 Feb 3 09:12 /dev/ttyS1<br />
crw-rw---- 1 root uucp 4, 66 Feb 3 09:12 /dev/ttyS2<br />
crw-rw---- 1 root uucp 4, 67 Feb 3 09:12 /dev/ttyS3<br />
<br />
Add you user in '''uucp''' group.<br />
# gpasswd -a YOURUSER uucp <br />
and relogon.<br />
<br />
=== Abort on resume ===<br />
There is a known bug that causes abort on resume: https://www.virtualbox.org/ticket/11289. The workaround is simple: always use Host+q or the menu to close the VM.<br />
<br />
=== System Images in Btrfs ===<br />
In 2010 there were reports that OS disk images would not start if they were attached via a virtual SATA device. It was reportedly fixed, and seemed to be. But as of around March 2013, that particular bug report has been [https://www.virtualbox.org/ticket/6905 repoened]. This can be fixed by enabling the use of the host I/O cache, which is disabled by default with virtual SATA interfaces.<br />
<br />
== External links ==<br />
<br />
* [http://www.virtualbox.org/manual/UserManual.html VirtualBox User Manual]</div>SoleSoulhttps://wiki.archlinux.org/index.php?title=Openbox&diff=219784Openbox2012-08-26T13:27:49Z<p>SoleSoul: /* openbox-menu */</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Article summary start}}<br />
{{Article summary text|A comprehensive guide on the installation and use of the Openbox window manager.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary end}}<br />
<br />
Openbox is a lightweight and highly configurable [[Window Manager|window manager]] with extensive standards support. Its features are documented at the [http://openbox.org/ official website]. This article pertains to installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Install {{Pkg|openbox}}, available in the [[Official Repositories]]. After installation, you should copy the default configuration files {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}} to {{ic|~/.config/openbox}}:<br />
<br />
{{Note | Do this as a regular user, not as root.}}<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp /etc/xdg/openbox/{rc.xml,menu.xml,autostart,environment} ~/.config/openbox<br />
<br />
These four files form the basis of your openbox configuration. Each file addresses a unique aspect of your configuration and the role of each file is as follows:<br />
<br />
; {{ic|rc.xml}}: This is the main configuration file. It defines keyboard shortcuts, themes, virtual desktops, and more.<br />
<br />
;{{ic|menu.xml}}: This file defines the content of the right-click menu. It defines launchers for applications and other shortcuts. See the [[#Menus]] section.<br />
<br />
;{{ic|autostart}}: This file is read by openbox-session at startup. It contains the programs that are run at startup. It is typically used to set environment variables, launch panels/docks, set background image or execute other startup scripts. See the [http://openbox.org/wiki/Help:Autostart Openbox Wiki].<br />
<br />
;{{ic|environment}}: This file is sourced by openbox-session at startup. It contains environment variables to be set in Openbox's context. Any variables you set here will be visible to Openbox itself and anything you start from its menus.<br />
<br />
== Upgrading to Openbox 3.5 ==<br />
<br />
If you are upgrading to Openbox 3.5 or later from an earlier release, be aware of these changes:<br />
<br />
* There is a new config file called {{ic|environment}} that you should copy from {{ic|/etc/xdg/openbox}} to {{ic|~/.config/openbox}}.<br />
* The config file previously called {{ic|autostart.sh}} is now just called {{ic|autostart}}. You should rename yours to remove the {{ic|.sh}} from the end of the name.<br />
* Some of the configuration grammar in {{ic|rc.xml}} has changed. While Openbox appears to understand the old options, it would be wise to compare your configuration to the one in {{ic|/etc/xdg/openbox}} and look for changes that affect you.<br />
<br />
== Openbox as a stand-alone WM ==<br />
<br />
Openbox can be used as a stand-alone window manager (WM). This is usually simpler to install and configure than using Openbox with desktop environments. Running openbox alone may reduce your system's CPU and memory load.<br />
<br />
To run Openbox as a stand-alone window manager, append the following to {{ic|~/.xinitrc}}:<br />
exec openbox-session<br />
<br />
Using ConsoleKit, use this instead:<br />
exec ck-launch-session openbox-session<br />
<br />
If you also use PolicyKit and [[D-Bus]] (e.g. for automatically mounting drives in Nautilus/GNOME) use:<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
You may also start Openbox from the command shell (aka: text prompt) using {{ic|xinit}}:<br />
$ xinit /usr/bin/openbox-session<br />
<br />
If you used another window manager previously (such as Xfwm) and now Openbox will not start after logging out of X, try moving the autostart folder:<br />
mv ~/.config/autostart ~/.config/autostart.bak<br />
<br />
{{Note | {{pkg|python2-xdg}} is required for Openbox's xdg-autostart}}<br />
{{Note | {{ic|dbus-launch}} must be placed after {{ic|ck-launch-session}} or you will experience mounting problems.}}<br />
<br />
== Openbox as a WM for desktop environments ==<br />
<br />
Openbox can be used as a replacement window manager for full-fledged desktop environments. The method for deploying Openbox depends on the desktop environment.<br />
<br />
=== GNOME 2.24 and 2.26 ===<br />
Create {{ic|/usr/share/applications/openbox.desktop}} with the following lines:<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=OpenBox<br />
Exec=openbox<br />
NoDisplay=true<br />
# name of loadable control center module<br />
X-GNOME-WMSettingsModule=openbox<br />
# name we put on the WM spec check window<br />
X-GNOME-WMName=OpenBox<br />
In gconf, set {{ic|/desktop/gnome/session/required_components/windowmanager}} to {{ic|openbox}}:<br />
$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox<br />
Finally, choose the {{ic|GNOME}} session from the GDM sessions menu.<br />
<br />
=== GNOME 2.26 redux ===<br />
'''''If the previous guide for GNOME 2.24 fails:'''''<br />
<br />
If, when attempting to log into a "Gnome/Openbox" session -- and it consistently fails to start, try the following. This is one way of achieving your goal of using Openbox as the WM anytime you open a Gnome session:<br />
<br />
#Log into your Gnome-only session (it should still be using Metacity as its window manager).<br />
#Install Openbox if you have not done so already<br />
#Navigate your menus to ''System &rarr; Preferences &rarr; Startup Applications'' (possibly named 'Session' in older Gnome versions)<br />
#Open Startup Application, select '+ Add' and enter the text shown below. Omit the text after #.<br />
#Click the 'Add' button for the data entry window. Make sure the checkbox beside your new entry is selected.<br />
#Log out from your Gnome session and log back in<br />
#You should now be running openbox as your window manager.<br />
<br />
Name: Openbox Windox Manager # Can be changed<br />
Command: openbox --replace # Text should not be removed from this line, but possibly added to it<br />
Comment: Replaces metacity with openbox # Can be changed<br />
<br />
This creates a startup list entry which is executed by Gnome each time the user's session is started.<br />
<br />
=== GNOME 2.22 and prior ===<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use {{ic|startx}}, add {{ic|exec openbox-gnome-session}} to {{ic|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-gnome-session<br />
<br />
=== KDE ===<br />
# If you use KDM, select the "KDE/Openbox" login option.<br />
# Open System Settings > Default Applications (in the Workspace Appearance and Behaviour section), and change the default window manager to Openbox (this will also avoid having to log out and log back in again).<br />
# If you use startx, add {{ic|exec openbox-kde-session}} to {{ic|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-kde-session<br />
<br />
=== Xfce4 ===<br />
Log into a normal Xfce4 session. From your terminal, type:<br />
$ killall xfwm4 ; openbox & exit<br />
<br />
This kills xfwm4, runs Openbox, and closes the terminal. Log out, being sure to check the ''"Save session for future logins"'' box. On your next login, Xfce4 should use '''Openbox''' as its window manager.<br />
<br />
Alternatively, you can chooose ''Settings'' -> ''Session and Startup'' from menu, go to the ''Application Autostart'' tab and add {{ic|openbox --replace}} to the list of automatically started applications.<br />
<br />
To enable exiting from a session using ''xfce4-session'', edit {{ic|~/.config/openbox/menu.xml}}. If the file is not there, copy it from {{ic|/etc/xdg/openbox/}}. Look for the following entry:<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
Change it to:<br />
<item label="Exit Openbox"><br />
<action name="Execute"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, choosing "Exit" from the root-menu causes Openbox to terminate its execution, leaving you with no window manager.<br />
<br />
If you have a problem changing virtual desktops with the mouse wheel skipping over desktops, edit {{ic|~/.config/openbox/rc.xml}}. Move the ''mouse binds with...'' actions "DesktopPrevious" and "DesktopNext" from context ''Desktop'' to the context ''Root''. Note that you may need to create a definition for the ''Root'' context as well.<br />
<br />
When using the Openbox root-menu instead of Xfce's menu, you may exit the Xfdesktop with this terminal command:<br />
$ xfdesktop --quit<br />
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 />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead}} can be found in the {{AUR}} and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Configuration ==<br />
<br />
There are several options for configuring Openbox settings:<br />
<br />
=== Manual configuration ===<br />
To configure Openbox manually, edit the {{ic|~/.config/openbox/rc.xml}} file with a text editor. The file has explanatory comments throughout, for more details about editing it see the [http://openbox.org/wiki/Help:Configuration Openbox wiki].<br />
<br />
=== ObConf ===<br />
[http://openbox.org/wiki/ObConf:About ObConf] is an Openbox configuration tool. It is used to set most common preferences such as themes, virtual desktops, window properties, and desktop margins. It can be installed with the {{Pkg|obconf}} package, available in the [[official repositories]].<br />
<br />
ObConf cannot configure keyboard shortcuts and certain other features. For these features edit {{ic|rc.xml}} manually. Alternatively, you can try {{AUR|obkey}} from the [[AUR]].<br />
<br />
=== Application customization ===<br />
<br />
Openbox allows per-application customizations. This lets you define rules for a given program. For example:<br />
* Start your web browser on a specific virtual desktop.<br />
* Open your terminal program with no window decorations (window chrome).<br />
* Make your bit-torrent client open at a given screen position.<br />
<br />
Per-application settings are defined in {{ic|~/.config/openbox/rc.xml}}. Instructions are in the file's comments. More details are found in the [http://openbox.org/wiki/Help:Applications Openbox wiki].<br />
<br />
== Menus ==<br />
<br />
The default Openbox menu includes a variety of menu items to get you started. Many of these items launch applications you do not want, have not installed yet, or never intend to install. You will surely want to customize '''{{ic|menu.xml}}''' at some point. There are a number of ways to do so.<br />
<br />
=== Manual configuration of menus ===<br />
<br />
You can edit {{ic|~/.config/openbox/menu.xml}} with a text editor. Many of the settings are self-explanatory. The article [http://openbox.org/wiki/Help:Menus Help:Menus] in the Openbox wiki has extensive details.<br />
<br />
=== Icons in the menu ===<br />
<br />
Since version 3.5.0 you can have icons next to your menu entries. To do that :<br />
# add <showIcons>yes</showIcons> in the <menu> section of the {{ic|rc.xml}} file<br />
# edit the menu entries in {{ic|menu.xml}} and add icons="<path>" like this :<br />
<menu id="apps-menu" label="SomeApp" icon="/home/user/.icons/application.png"><br />
<br />
then {{ic|openbox --reconfigure}} or {{ic|openbox --restart}} if the menus do not update properly.<br />
<br />
=== MenuMaker ===<br />
<br />
[http://menumaker.sourceforge.net/ MenuMaker] creates XML menus for several window managers including Openbox. MenuMaker searchs your computer for executable programs and creates a menu file from the result. It can be configured to exclude certain application types (GNOME, KDE, etc) if you desire. It can be installed with the {{Pkg|menumaker}} package available in the official repositories.<br />
<br />
Once installed, generate a menu file (named {{ic|menu.xml}}) by running the program.<br />
$ mmaker -v OpenBox3 # Will not overwrite an existing menu file.<br />
$ mmaker -vf OpenBox3 # Force option permits overwriting the menu file.<br />
$ mmaker --help # See the full set of options for MenuMaker.<br />
<br />
MenuMaker creates a comprehensive {{ic|menu.xml}}. You may edit this file by hand or regenerate it after installing software.<br />
<br />
=== Obmenu ===<br />
<br />
Obmenu is a menu editor for Openbox. This GUI application is the best choice for those who dislike editing XML code. Obmenu can be installed with the package {{Pkg|obmenu}}, available in the official repositories.<br />
<br />
Once installed, run {{ic|obmenu}} then add and remove applications as desired.<br />
<br />
==== Obm-xdg ====<br />
<br />
{{ic|obm-xdg}} is a command-line tool that comes with Obmenu. It generates a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg with other menus, add the following line to {{ic|~/.config/openbox/menu.xml}}:<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then add the following line under your ''root-menu'' entry where you want to have the menu appear:<br />
<menu id="xdg-menu"/><br />
<br />
Then run {{ic|openbox --reconfigure}} to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
To use obm-xdg by itself, create {{ic|~/.config/openbox/menu.xml}} and add these lines:<br />
<openbox_menu><br />
<menu execute="obm-xdg" id="root-menu" label="apps"/><br />
</openbox_menu><br />
<br />
{{Note|If you do not have GNOME installed, you need to install the package {{pkg|gnome-menus}} for obm-xdg.}}<br />
<br />
=== openbox-menu ===<br />
<br />
[http://mimasgpc.free.fr/openbox-menu_en.html Openbox-menu] uses [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] from the LXDE Project to create dynamic menus for Openbox.<br />
<br />
If you get an error while trying to open this menu try [https://wiki.archlinux.org/index.php/Openbox#Icons_in_the_menu adding icons] to the Openbox menu.<br />
<br />
It can be installed with the package {{AUR|openbox-menu}}, available in the [[AUR]].<br />
<br />
=== Python-based xdg menu script ===<br />
<br />
This script is found in Fedora's Openbox package. You have only to put the script somewhere and create a menu entry. The latest version of the script can be found [http://pkgs.fedoraproject.org/cgit/openbox.git/tree/xdg-menu here].<br />
<br />
Download the script from the above repository and Place int into any directory you want.<br />
<br />
Open {{ic|menu.xml}} with your text editor and add the following entry. Of course, you can modify the label as you see fit.<br />
<menu id="apps-menu" label="xdg-menu" execute="python2 /path/to/xdg-menu"/><br />
<br />
Save the file and run {{ic|openbox --reconfigure}}.<br />
<br />
{{Note|If you do not have GNOME installed, you need to install the package {{pkg|gnome-menus}} for xdg-menu.}}<br />
<br />
=== Openbox menu generator ===<br />
<br />
The Openbox menu generator can be installed with the package {{AUR|obmenugen-bin}}, available in the AUR. creates the menu file from {{ic|.desktop}} files. Obmenugen provides a text file which filters (hides) menu items using basic regular expressions.<br />
$ obmenugen # Create a menu file<br />
$ openbox --reconfigure # To see the menu you generated<br />
<br />
=== Pipe menus ===<br />
<br />
Like other window managers, Openbox allows for scripts to dynamically build menus (menus on-the-fly). Examples are system monitors, media player controls, or weather monitors. Pipe menu script examples are found in the [http://openbox.org/wiki/Openbox:Pipemenus Openbox:Pipemenus] page at Openbox's site.<br />
<br />
Some interesting pipe menus provided by Openbox users:<br />
* {{App|obfilebrowser|A pipe menu file browser.|http://xyne.archlinux.ca/projects/obfilebrowser/|{{AUR|obfilebrowser}}}}<br />
* {{App|wifi-pipe|A pipe menu for scanning and connecting to wireless hot spots using netcfg.|https://github.com/pbrisbin/wifi-pipe|{{AUR?|wifi-pipe}}}}<br />
* {{App|obdevicemenu|A pipe menu for managing removable devices using Udisks.|https://bbs.archlinux.org/viewtopic.php?id&#61;114702|{{AUR|obdevicemenu}}}}<br />
<br />
== Startup programs ==<br />
<br />
Openbox supports running programs at startup. This is provided by command '''openbox-session'''.<br />
<br />
=== Enabling autostart ===<br />
<br />
There are two ways to enable autostart:<br />
# When using startx or xinit to begin a session, edit {{ic|~/.xinitrc}}. Change the line that executes '''''openbox''''' to '''openbox-session'''.<br />
# When using GDM or KDM, selecting an ''Openbox'' session automatically runs the autostart script.<br />
<br />
=== Autostart script ===<br />
<br />
Openbox provides a system-wide startup script which applies to all users and is located at {{ic|/etc/xdg/openbox/autostart}}. A user may also create his own startup script to be executed after the system-wide script by creating the file {{ic|~/.config/openbox/autostart}}. This file is not provided by default and must be created by the user.<br />
<br />
Further instructions are available in the [http://openbox.org/wiki/Help:Autostart Help:Autostart] article at the official Openbox site.<br />
<br />
{{Note|The autostart files used to be named autostart.sh prior to OpenBox 3.5.0. While these scripts will presently still work, users who are upgrading are advised to drop the .sh extension.}}<br />
{{Note|All the programs in the autostart file should be run as daemons or run in the background,otherwise the items in {{ic|/etc/xdg/autostart/}} won't be started!}}<br />
<br />
=== Autostart directory ===<br />
<br />
Openbox also starts any *.desktop files in {{ic|/etc/xdg/autostart}} - this happens regardless of whether a user startup script is present. {{ic|nm-applet}}, for example, installs a file at this location, and may cause it to run twice for users with the usual {{ic|(sleep 3 && /usr/bin/nm-applet --sm-disable) &}} in their startup script. There is a discussion on managing the effects of this at [https://bbs.archlinux.org/viewtopic.php?pid=993738].<br />
<br />
== Themes and appearance ==<br />
<br />
{{Box||See the main article: [[Openbox Themes and Apps#Themes and appearance]]|#E5E5FF|#FCFCFC}}<br />
<br />
=== Openbox themes ===<br />
<br />
Themes control the appearance of windows, titlebars, and buttons. They also control menu appearance and on-screen display (OSD). Some Openbox themes can be installed with the package {{Pkg|openbox-themes}}, available in the [[official repositories]].<br />
<br />
=== Cursors, icons, wallpapers ===<br />
<br />
Xcursor themes can be installed with the package {{Pkg|xcursor-themes}}, available in the official repositories, or with other packages from such as {{Pkg|xcursor-bluecurve}}, {{Pkg|xcursor-vanilla-dmz}} or {{Pkg|xcursor-pinux}}. Many other themes can be found in the official repositories or the [[AUR]].<br />
<br />
Icon themes are also available in the repositories, for example {{Pkg|lxde-icon-theme}}, {{Pkg|tangerine-icon-theme}} or {{Pkg|gnome-icon-theme}} can be found in the official repositories with many more in the [[AUR]].<br />
<br />
Wallpapers are easily set with utilities such as [[Feh]] or {{ic|hsetroot}}.<br />
<br />
Please see [[Openbox Themes and Apps]] for information on these GUI customizations.<br />
<br />
== Recommended programs ==<br />
<br />
{{Box||See the main article: [[Openbox Themes and Apps#Recommended programs]]|#E5E5FF|#FCFCFC}}<br />
<br />
== Tips and tricks ==<br />
<br />
===Aero snap behaviour===<br />
Windows 7 supports a unique window behaviour to snap windows when they are moved to the edge of the screen. This effect can also be achieved through an Openbox keybinding. More information [http://ubuntuforums.org/showthread.php?t=1796793 here].<br />
<br />
=== File associations ===<br />
Because Openbox and the applications you use with it are not well-integrated you might run into the issues with your browser. Your browser may not know which program it is supposed to use for certain types of files.<br />
<br />
A package in the AUR called {{AUR|gnome-defaults-list}} contains a list of file-types and programs specific to the Gnome desktop. The list is installed to {{ic|/etc/gnome/defaults.list}}.<br />
<br />
Open this file with your text editor. Here you can replace a given application with the name of the program of your choosing. For example, replace '''totem''' with '''vlc''' or '''eog''' with '''mirage'''. Save the file to {{ic|~/.local/share/applications/defaults.list}}.<br />
<br />
Another way of setting file associations is to install package {{Pkg|perl-file-mimeinfo}} from the official repositories and invoke '''mimeopen''' like this:<br />
mimeopen -d /path/to/file<br />
You are asked which application to use when opening {{ic|/path/to/file}}:<br />
Please choose a default application for files of type text/plain<br />
1) notepad (wine-extension-txt)<br />
2) Leafpad (leafpad)<br />
3) OpenOffice.org Writer (writer)<br />
4) gVim (gvim)<br />
5) Other...<br />
Your answer becomes the default handler for that type of file. Mimeopen is installed as {{ic|/usr/bin/perlbin/vendor/mimetype}}.<br />
<br />
=== Copy and paste ===<br />
<br />
From a terminal {{Keypress|Ctrl+Ins}} for copy and {{keypress|Shift+Ins}} for paste.<br />
<br />
Also {{keypress|Ctrl+Shift+c}} for copy and '''mouse middle-click''' for paste (in terminals).<br />
<br />
Other applications most likely use the conventional keyboard shortcuts for copy and paste.<br />
<br />
=== Window transparency ===<br />
<br />
The program {{Pkg|transset-df}} is available in the official repositories. With ''transset-df'' you can enable window transparency on-the-fly.<br />
<br />
For instance by placing the following in the ''<mouse>'' section you can have your mouse adjust window transparency by scrolling while hovering over the title bar:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<context name="Titlebar"><br />
. . .<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
. . .<br />
</context><br />
</nowiki>}}<br />
{{Warning|It appears to work only when no additional actions are defined within the action group.}}<br />
<br />
=== Xprop values for applications ===<br />
Xprop can be installed with the package {{Pkg|xorg-xprop}}, available in the official repositories. <br />
<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 {{ic|xp}} and click on the running program that you would like to define with per-app settings. The result displays only the info that Openbox requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
$ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Xprop for Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values {{ic|xprop}} may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Linking the menu to a button ===<br />
<br />
Some people want to link the Openbox menu (or any menu) to an object. This is useful for creating a panel button to pop up a menu. Although Openbox does not provide this, a program called {{Pkg|xdotool}} simulates a keypress. Openbox can be configured to bind that keypress to the ''ShowMenu'' action.<br />
<br />
After installing ''xdotool'', add the following to the ''<keyboard>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
Then execute {{ic|openbox --reconfigure}} or {{ic|openbox --restart}} to use the new configuration. The following command summons a menu at your cursor position. The command may given as-is, linked to an object, or placed in a script.<br />
$ xdotool key ctrl+alt+q<br />
<br />
Of course, change the key shortcut to your liking. Here is a snippet from a [[Tint2]] configuration file which pops up a menu when the clock area is clicked. Each key combination is set to open a menu within Openbox's {{ic|rc.xml}} configuration file. The right‑click menu is different from the left‑click menu:<br />
clock_rclick_command = xdotool key --clearmodifiers "ctrl+XF86PowerOff"<br />
clock_lclick_command = xdotool key --clearmodifiers "alt+XF86PowerOff"<br />
<br />
=== Urxvt in the background ===<br />
<br />
With Openbox, running a terminal as desktop background is easy. You will not need [[Wikipedia:Devil's Pie (software)|devilspie]] here.<br />
<br />
First you must enable transparency, open your {{ic|~/.Xdefaults}} file (if it does not exist yet, create it).<br />
URxvt*transparent:true<br />
URxvt*scrollBar:false<br />
URxvt*geometry:124x24 #I do not use the whole screen, if you want a full screen term do not bother with this and see below.<br />
URxvt*borderLess:true<br />
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.<br />
<br />
Then add the following to the ''<applications>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<application name="urxvt"><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<position><br />
<x>center</x><br />
<y>20</y><br />
</position><br />
<layer>below</layer><br />
<desktop>all</desktop><br />
<maximized>true</maximized> #Only if you want a full size terminal.<br />
</application><br />
</nowiki>}}<br />
The ''magic'' comes from the '''<layer>below</layer>''' line, which place the application under all others. Here [[Rxvt-unicode|urxvt]] is displayed on all desktops, change it to your convenience.<br />
<br />
{{Tip|Instead of using ''<application name&#61;"urxvt">'', you can use another name ("urxvt-bg" for example), and use the {{ic|-name}} option when starting uxrvt. That way, only the urxvt terminals which you choose to name {{ic|urxvt-bg}} would be captured and modified by the application rule in {{ic|rc.xml}}. For example:<br />
$ urxvt -name urxvt-bg<br />
}}<br />
====ToggleShowDesktop exception====<br />
<br />
If you use '''ToggleShowDesktop''' to minimize all your application and show the desktop it will also minimize the urxvt window. Several methods are available to bypass this, but none works properly:<br />
* one method is explained in this [https://bbs.archlinux.org/viewtopic.php?pid=865844#p865844 forum post]. This involves editing Urxvt's source code.<br />
{{Warning|This method seems to have been broken in a recent update, now leading to a memory leak when the patched Urxvt is run.}}<br />
* the best method is outlined [https://bbs.archlinux.org/viewtopic.php?pid=929792#p929792 here]. It still has a big disadvantage: it makes ''ToggleShowDesktop'' a one-way action, not restoring the other desktop applications when ''ToggleShowDesktop'' is run for a second time. It does create the opportunity to use a different terminal emulator than Urxvt, however.<br />
<br />
=== Keyboard volume control ===<br />
====ALSA====<br />
If you use [[ALSA]] for sound, you can use the {{ic|amixer}} program (part of the {{Pkg|alsa-utils}} package) to adjust the sound volume. You can use Openbox's keybindings to map different shortcuts to actions. If you want to use the multimedia keys, but do not know their names, you could look at the [[Multimedia Keys]] page to find out.<br />
<br />
For example, add the following in the ''<keyboard>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Up"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
This binds {{Keypress|Super+&uarr;}} to increase your master ALSA volume by 5%. Corresponding binding for volume down:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Down"><br />
<action name="Execute"><br />
<command>amixer set Master 5%-</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
As another example you can also use the {{ic|XF86Audio*}} keybindings:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
The above example should work for the majority of multimedia keyboards. It should enable to raise, lower and mute the Master control of your audio device by using the respective multimedia keyboard keys. Notice also that in this example:<br />
<br />
* The "Mute" key should unmute the Master control if it is already in mute mode.<br />
* The "Raise" and "Lower" keys should unmute the Master control if it is in mute mode.<br />
<br />
====Pulseaudio====<br />
If you are using [[PulseAudio]] with ALSA as a backend the above keybinding are slightly different as {{ic|amixer}} must be told to use PulseAudio. As always, add the following to the ''<keyboard>'' section to get the proper behaviour:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
This keybindings should work for most of the systems. Other examples can be found [http://ubuntuforums.org/showthread.php?t=987149 here].<br />
<br />
== Troubleshooting Openbox 3.5 ==<br />
=== X server crashes ===<br />
Problems have been detected after upgrade to version 3.5, that the X server might crash in attempt to start Openbox, ending with this error message:<br />
(metacity:25137): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process \<br />
was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit \<br />
status can't be returned. This is a bug in the program calling g_spawn_sync(); either do not request \<br />
the exit status, or do not set the SIGCHLD action.<br />
xinit: connection to X server lost<br />
waiting for X server to shut down<br />
In this particular case, some problem with '''metacity''' package has been identified as the cause of the X server crash issue. To solve the problem reinstall the {{Pkg|metacity}} and {{Pkg|compiz-decorator-gtk}} packages. If that does not solve the problem, try removing them.<br />
<br />
Also, plenty of similar cases have been found on the Internet, that not only metacity package might be causing the X server to crash.<br />
Thus, whatever else instead of metacity you get in the error output message, try to reinstall it (or remove if necessary) in an attempt to get rid of this X server crash.<br />
<br />
=== Autostarting unwanted applications in 3.5 ===<br />
If unwanted applications start with your Openbox session even though they are not listed in your {{ic|~/.config/openbox/autostart}}, check the {{ic|~/.config/autostart/}} directory, it might contain the residues from your previously used desktop environment (GNOME, KDE, etc.), and remove unwanted files.<br />
<br />
=== SSH agent no longer starting ===<br />
Whereas Openbox 3.4.x allowed launching an SSH agent from {{ic|~/.config/openbox/autostart}}, with 3.5 that no longer seems to work. You need to put the following code in {{ic|~/.config/openbox/environment}}:<br />
<br />
{{bc|<nowiki><br />
SSHAGENT="/usr/bin/ssh-agent"<br />
SSHAGENTARGS="-s"<br />
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then<br />
eval `$SSHAGENT $SSHAGENTARGS`<br />
trap "kill $SSH_AGENT_PID" 0<br />
fi<br />
</nowiki>}}<br />
<br />
=== Openbox not registering with D-Bus ===<br />
Just like with SSH agent, lots of people used to have D-Bus code in {{ic|~/.config/openbox/autostart}} - which no longer works (e.g. Thunar does not see any removable devices anymore).<br />
<br />
The fix is to move the code to {{ic|~/.config/openbox/environment}}:<br />
{{bc|<br />
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then<br />
eval `dbus-launch --sh-syntax --exit-with-session`<br />
fi<br />
}}<br />
<br />
Alternatively you can call {{ic|openbox-session}} with {{ic|dbus-launch}} in {{ic|~/.xinitrc}}.<br />
<br />
==See also==<br />
* [http://openbox.org/ Openbox Website] &ndash; The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://snott.net/linux/using-gnome3-with-openbox/ Using GNOME 3 with Openbox Tutorial]</div>SoleSoulhttps://wiki.archlinux.org/index.php?title=Openbox&diff=219783Openbox2012-08-26T13:27:08Z<p>SoleSoul: /* openbox-menu */</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Article summary start}}<br />
{{Article summary text|A comprehensive guide on the installation and use of the Openbox window manager.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary end}}<br />
<br />
Openbox is a lightweight and highly configurable [[Window Manager|window manager]] with extensive standards support. Its features are documented at the [http://openbox.org/ official website]. This article pertains to installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
Install {{Pkg|openbox}}, available in the [[Official Repositories]]. After installation, you should copy the default configuration files {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}} to {{ic|~/.config/openbox}}:<br />
<br />
{{Note | Do this as a regular user, not as root.}}<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp /etc/xdg/openbox/{rc.xml,menu.xml,autostart,environment} ~/.config/openbox<br />
<br />
These four files form the basis of your openbox configuration. Each file addresses a unique aspect of your configuration and the role of each file is as follows:<br />
<br />
; {{ic|rc.xml}}: This is the main configuration file. It defines keyboard shortcuts, themes, virtual desktops, and more.<br />
<br />
;{{ic|menu.xml}}: This file defines the content of the right-click menu. It defines launchers for applications and other shortcuts. See the [[#Menus]] section.<br />
<br />
;{{ic|autostart}}: This file is read by openbox-session at startup. It contains the programs that are run at startup. It is typically used to set environment variables, launch panels/docks, set background image or execute other startup scripts. See the [http://openbox.org/wiki/Help:Autostart Openbox Wiki].<br />
<br />
;{{ic|environment}}: This file is sourced by openbox-session at startup. It contains environment variables to be set in Openbox's context. Any variables you set here will be visible to Openbox itself and anything you start from its menus.<br />
<br />
== Upgrading to Openbox 3.5 ==<br />
<br />
If you are upgrading to Openbox 3.5 or later from an earlier release, be aware of these changes:<br />
<br />
* There is a new config file called {{ic|environment}} that you should copy from {{ic|/etc/xdg/openbox}} to {{ic|~/.config/openbox}}.<br />
* The config file previously called {{ic|autostart.sh}} is now just called {{ic|autostart}}. You should rename yours to remove the {{ic|.sh}} from the end of the name.<br />
* Some of the configuration grammar in {{ic|rc.xml}} has changed. While Openbox appears to understand the old options, it would be wise to compare your configuration to the one in {{ic|/etc/xdg/openbox}} and look for changes that affect you.<br />
<br />
== Openbox as a stand-alone WM ==<br />
<br />
Openbox can be used as a stand-alone window manager (WM). This is usually simpler to install and configure than using Openbox with desktop environments. Running openbox alone may reduce your system's CPU and memory load.<br />
<br />
To run Openbox as a stand-alone window manager, append the following to {{ic|~/.xinitrc}}:<br />
exec openbox-session<br />
<br />
Using ConsoleKit, use this instead:<br />
exec ck-launch-session openbox-session<br />
<br />
If you also use PolicyKit and [[D-Bus]] (e.g. for automatically mounting drives in Nautilus/GNOME) use:<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
You may also start Openbox from the command shell (aka: text prompt) using {{ic|xinit}}:<br />
$ xinit /usr/bin/openbox-session<br />
<br />
If you used another window manager previously (such as Xfwm) and now Openbox will not start after logging out of X, try moving the autostart folder:<br />
mv ~/.config/autostart ~/.config/autostart.bak<br />
<br />
{{Note | {{pkg|python2-xdg}} is required for Openbox's xdg-autostart}}<br />
{{Note | {{ic|dbus-launch}} must be placed after {{ic|ck-launch-session}} or you will experience mounting problems.}}<br />
<br />
== Openbox as a WM for desktop environments ==<br />
<br />
Openbox can be used as a replacement window manager for full-fledged desktop environments. The method for deploying Openbox depends on the desktop environment.<br />
<br />
=== GNOME 2.24 and 2.26 ===<br />
Create {{ic|/usr/share/applications/openbox.desktop}} with the following lines:<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=OpenBox<br />
Exec=openbox<br />
NoDisplay=true<br />
# name of loadable control center module<br />
X-GNOME-WMSettingsModule=openbox<br />
# name we put on the WM spec check window<br />
X-GNOME-WMName=OpenBox<br />
In gconf, set {{ic|/desktop/gnome/session/required_components/windowmanager}} to {{ic|openbox}}:<br />
$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox<br />
Finally, choose the {{ic|GNOME}} session from the GDM sessions menu.<br />
<br />
=== GNOME 2.26 redux ===<br />
'''''If the previous guide for GNOME 2.24 fails:'''''<br />
<br />
If, when attempting to log into a "Gnome/Openbox" session -- and it consistently fails to start, try the following. This is one way of achieving your goal of using Openbox as the WM anytime you open a Gnome session:<br />
<br />
#Log into your Gnome-only session (it should still be using Metacity as its window manager).<br />
#Install Openbox if you have not done so already<br />
#Navigate your menus to ''System &rarr; Preferences &rarr; Startup Applications'' (possibly named 'Session' in older Gnome versions)<br />
#Open Startup Application, select '+ Add' and enter the text shown below. Omit the text after #.<br />
#Click the 'Add' button for the data entry window. Make sure the checkbox beside your new entry is selected.<br />
#Log out from your Gnome session and log back in<br />
#You should now be running openbox as your window manager.<br />
<br />
Name: Openbox Windox Manager # Can be changed<br />
Command: openbox --replace # Text should not be removed from this line, but possibly added to it<br />
Comment: Replaces metacity with openbox # Can be changed<br />
<br />
This creates a startup list entry which is executed by Gnome each time the user's session is started.<br />
<br />
=== GNOME 2.22 and prior ===<br />
# If you use GDM, select the "GNOME/Openbox" login option<br />
# If you use {{ic|startx}}, add {{ic|exec openbox-gnome-session}} to {{ic|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-gnome-session<br />
<br />
=== KDE ===<br />
# If you use KDM, select the "KDE/Openbox" login option.<br />
# Open System Settings > Default Applications (in the Workspace Appearance and Behaviour section), and change the default window manager to Openbox (this will also avoid having to log out and log back in again).<br />
# If you use startx, add {{ic|exec openbox-kde-session}} to {{ic|~/.xinitrc}}<br />
# From the shell:<br />
$ xinit /usr/bin/openbox-kde-session<br />
<br />
=== Xfce4 ===<br />
Log into a normal Xfce4 session. From your terminal, type:<br />
$ killall xfwm4 ; openbox & exit<br />
<br />
This kills xfwm4, runs Openbox, and closes the terminal. Log out, being sure to check the ''"Save session for future logins"'' box. On your next login, Xfce4 should use '''Openbox''' as its window manager.<br />
<br />
Alternatively, you can chooose ''Settings'' -> ''Session and Startup'' from menu, go to the ''Application Autostart'' tab and add {{ic|openbox --replace}} to the list of automatically started applications.<br />
<br />
To enable exiting from a session using ''xfce4-session'', edit {{ic|~/.config/openbox/menu.xml}}. If the file is not there, copy it from {{ic|/etc/xdg/openbox/}}. Look for the following entry:<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
Change it to:<br />
<item label="Exit Openbox"><br />
<action name="Execute"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Otherwise, choosing "Exit" from the root-menu causes Openbox to terminate its execution, leaving you with no window manager.<br />
<br />
If you have a problem changing virtual desktops with the mouse wheel skipping over desktops, edit {{ic|~/.config/openbox/rc.xml}}. Move the ''mouse binds with...'' actions "DesktopPrevious" and "DesktopNext" from context ''Desktop'' to the context ''Root''. Note that you may need to create a definition for the ''Root'' context as well.<br />
<br />
When using the Openbox root-menu instead of Xfce's menu, you may exit the Xfdesktop with this terminal command:<br />
$ xfdesktop --quit<br />
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 />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead}} can be found in the {{AUR}} and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Configuration ==<br />
<br />
There are several options for configuring Openbox settings:<br />
<br />
=== Manual configuration ===<br />
To configure Openbox manually, edit the {{ic|~/.config/openbox/rc.xml}} file with a text editor. The file has explanatory comments throughout, for more details about editing it see the [http://openbox.org/wiki/Help:Configuration Openbox wiki].<br />
<br />
=== ObConf ===<br />
[http://openbox.org/wiki/ObConf:About ObConf] is an Openbox configuration tool. It is used to set most common preferences such as themes, virtual desktops, window properties, and desktop margins. It can be installed with the {{Pkg|obconf}} package, available in the [[official repositories]].<br />
<br />
ObConf cannot configure keyboard shortcuts and certain other features. For these features edit {{ic|rc.xml}} manually. Alternatively, you can try {{AUR|obkey}} from the [[AUR]].<br />
<br />
=== Application customization ===<br />
<br />
Openbox allows per-application customizations. This lets you define rules for a given program. For example:<br />
* Start your web browser on a specific virtual desktop.<br />
* Open your terminal program with no window decorations (window chrome).<br />
* Make your bit-torrent client open at a given screen position.<br />
<br />
Per-application settings are defined in {{ic|~/.config/openbox/rc.xml}}. Instructions are in the file's comments. More details are found in the [http://openbox.org/wiki/Help:Applications Openbox wiki].<br />
<br />
== Menus ==<br />
<br />
The default Openbox menu includes a variety of menu items to get you started. Many of these items launch applications you do not want, have not installed yet, or never intend to install. You will surely want to customize '''{{ic|menu.xml}}''' at some point. There are a number of ways to do so.<br />
<br />
=== Manual configuration of menus ===<br />
<br />
You can edit {{ic|~/.config/openbox/menu.xml}} with a text editor. Many of the settings are self-explanatory. The article [http://openbox.org/wiki/Help:Menus Help:Menus] in the Openbox wiki has extensive details.<br />
<br />
=== Icons in the menu ===<br />
<br />
Since version 3.5.0 you can have icons next to your menu entries. To do that :<br />
# add <showIcons>yes</showIcons> in the <menu> section of the {{ic|rc.xml}} file<br />
# edit the menu entries in {{ic|menu.xml}} and add icons="<path>" like this :<br />
<menu id="apps-menu" label="SomeApp" icon="/home/user/.icons/application.png"><br />
<br />
then {{ic|openbox --reconfigure}} or {{ic|openbox --restart}} if the menus do not update properly.<br />
<br />
=== MenuMaker ===<br />
<br />
[http://menumaker.sourceforge.net/ MenuMaker] creates XML menus for several window managers including Openbox. MenuMaker searchs your computer for executable programs and creates a menu file from the result. It can be configured to exclude certain application types (GNOME, KDE, etc) if you desire. It can be installed with the {{Pkg|menumaker}} package available in the official repositories.<br />
<br />
Once installed, generate a menu file (named {{ic|menu.xml}}) by running the program.<br />
$ mmaker -v OpenBox3 # Will not overwrite an existing menu file.<br />
$ mmaker -vf OpenBox3 # Force option permits overwriting the menu file.<br />
$ mmaker --help # See the full set of options for MenuMaker.<br />
<br />
MenuMaker creates a comprehensive {{ic|menu.xml}}. You may edit this file by hand or regenerate it after installing software.<br />
<br />
=== Obmenu ===<br />
<br />
Obmenu is a menu editor for Openbox. This GUI application is the best choice for those who dislike editing XML code. Obmenu can be installed with the package {{Pkg|obmenu}}, available in the official repositories.<br />
<br />
Once installed, run {{ic|obmenu}} then add and remove applications as desired.<br />
<br />
==== Obm-xdg ====<br />
<br />
{{ic|obm-xdg}} is a command-line tool that comes with Obmenu. It generates a categorized sub-menu of installed GTK/GNOME applications.<br />
<br />
To use obm-xdg with other menus, add the following line to {{ic|~/.config/openbox/menu.xml}}:<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Then add the following line under your ''root-menu'' entry where you want to have the menu appear:<br />
<menu id="xdg-menu"/><br />
<br />
Then run {{ic|openbox --reconfigure}} to refresh the Openbox menu. You should now see a sub-menu labeled '''xdg''' in your menu.<br />
<br />
To use obm-xdg by itself, create {{ic|~/.config/openbox/menu.xml}} and add these lines:<br />
<openbox_menu><br />
<menu execute="obm-xdg" id="root-menu" label="apps"/><br />
</openbox_menu><br />
<br />
{{Note|If you do not have GNOME installed, you need to install the package {{pkg|gnome-menus}} for obm-xdg.}}<br />
<br />
=== openbox-menu ===<br />
<br />
[http://mimasgpc.free.fr/openbox-menu_en.html Openbox-menu] uses [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] from the LXDE Project to create dynamic menus for Openbox.<br />
<br />
It can be installed with the package {{AUR|openbox-menu}}, available in the [[AUR]].<br />
If you get an error while trying to open this menu try [https://wiki.archlinux.org/index.php/Openbox#Icons_in_the_menu adding icons] to the Openbox menu.<br />
<br />
=== Python-based xdg menu script ===<br />
<br />
This script is found in Fedora's Openbox package. You have only to put the script somewhere and create a menu entry. The latest version of the script can be found [http://pkgs.fedoraproject.org/cgit/openbox.git/tree/xdg-menu here].<br />
<br />
Download the script from the above repository and Place int into any directory you want.<br />
<br />
Open {{ic|menu.xml}} with your text editor and add the following entry. Of course, you can modify the label as you see fit.<br />
<menu id="apps-menu" label="xdg-menu" execute="python2 /path/to/xdg-menu"/><br />
<br />
Save the file and run {{ic|openbox --reconfigure}}.<br />
<br />
{{Note|If you do not have GNOME installed, you need to install the package {{pkg|gnome-menus}} for xdg-menu.}}<br />
<br />
=== Openbox menu generator ===<br />
<br />
The Openbox menu generator can be installed with the package {{AUR|obmenugen-bin}}, available in the AUR. creates the menu file from {{ic|.desktop}} files. Obmenugen provides a text file which filters (hides) menu items using basic regular expressions.<br />
$ obmenugen # Create a menu file<br />
$ openbox --reconfigure # To see the menu you generated<br />
<br />
=== Pipe menus ===<br />
<br />
Like other window managers, Openbox allows for scripts to dynamically build menus (menus on-the-fly). Examples are system monitors, media player controls, or weather monitors. Pipe menu script examples are found in the [http://openbox.org/wiki/Openbox:Pipemenus Openbox:Pipemenus] page at Openbox's site.<br />
<br />
Some interesting pipe menus provided by Openbox users:<br />
* {{App|obfilebrowser|A pipe menu file browser.|http://xyne.archlinux.ca/projects/obfilebrowser/|{{AUR|obfilebrowser}}}}<br />
* {{App|wifi-pipe|A pipe menu for scanning and connecting to wireless hot spots using netcfg.|https://github.com/pbrisbin/wifi-pipe|{{AUR?|wifi-pipe}}}}<br />
* {{App|obdevicemenu|A pipe menu for managing removable devices using Udisks.|https://bbs.archlinux.org/viewtopic.php?id&#61;114702|{{AUR|obdevicemenu}}}}<br />
<br />
== Startup programs ==<br />
<br />
Openbox supports running programs at startup. This is provided by command '''openbox-session'''.<br />
<br />
=== Enabling autostart ===<br />
<br />
There are two ways to enable autostart:<br />
# When using startx or xinit to begin a session, edit {{ic|~/.xinitrc}}. Change the line that executes '''''openbox''''' to '''openbox-session'''.<br />
# When using GDM or KDM, selecting an ''Openbox'' session automatically runs the autostart script.<br />
<br />
=== Autostart script ===<br />
<br />
Openbox provides a system-wide startup script which applies to all users and is located at {{ic|/etc/xdg/openbox/autostart}}. A user may also create his own startup script to be executed after the system-wide script by creating the file {{ic|~/.config/openbox/autostart}}. This file is not provided by default and must be created by the user.<br />
<br />
Further instructions are available in the [http://openbox.org/wiki/Help:Autostart Help:Autostart] article at the official Openbox site.<br />
<br />
{{Note|The autostart files used to be named autostart.sh prior to OpenBox 3.5.0. While these scripts will presently still work, users who are upgrading are advised to drop the .sh extension.}}<br />
{{Note|All the programs in the autostart file should be run as daemons or run in the background,otherwise the items in {{ic|/etc/xdg/autostart/}} won't be started!}}<br />
<br />
=== Autostart directory ===<br />
<br />
Openbox also starts any *.desktop files in {{ic|/etc/xdg/autostart}} - this happens regardless of whether a user startup script is present. {{ic|nm-applet}}, for example, installs a file at this location, and may cause it to run twice for users with the usual {{ic|(sleep 3 && /usr/bin/nm-applet --sm-disable) &}} in their startup script. There is a discussion on managing the effects of this at [https://bbs.archlinux.org/viewtopic.php?pid=993738].<br />
<br />
== Themes and appearance ==<br />
<br />
{{Box||See the main article: [[Openbox Themes and Apps#Themes and appearance]]|#E5E5FF|#FCFCFC}}<br />
<br />
=== Openbox themes ===<br />
<br />
Themes control the appearance of windows, titlebars, and buttons. They also control menu appearance and on-screen display (OSD). Some Openbox themes can be installed with the package {{Pkg|openbox-themes}}, available in the [[official repositories]].<br />
<br />
=== Cursors, icons, wallpapers ===<br />
<br />
Xcursor themes can be installed with the package {{Pkg|xcursor-themes}}, available in the official repositories, or with other packages from such as {{Pkg|xcursor-bluecurve}}, {{Pkg|xcursor-vanilla-dmz}} or {{Pkg|xcursor-pinux}}. Many other themes can be found in the official repositories or the [[AUR]].<br />
<br />
Icon themes are also available in the repositories, for example {{Pkg|lxde-icon-theme}}, {{Pkg|tangerine-icon-theme}} or {{Pkg|gnome-icon-theme}} can be found in the official repositories with many more in the [[AUR]].<br />
<br />
Wallpapers are easily set with utilities such as [[Feh]] or {{ic|hsetroot}}.<br />
<br />
Please see [[Openbox Themes and Apps]] for information on these GUI customizations.<br />
<br />
== Recommended programs ==<br />
<br />
{{Box||See the main article: [[Openbox Themes and Apps#Recommended programs]]|#E5E5FF|#FCFCFC}}<br />
<br />
== Tips and tricks ==<br />
<br />
===Aero snap behaviour===<br />
Windows 7 supports a unique window behaviour to snap windows when they are moved to the edge of the screen. This effect can also be achieved through an Openbox keybinding. More information [http://ubuntuforums.org/showthread.php?t=1796793 here].<br />
<br />
=== File associations ===<br />
Because Openbox and the applications you use with it are not well-integrated you might run into the issues with your browser. Your browser may not know which program it is supposed to use for certain types of files.<br />
<br />
A package in the AUR called {{AUR|gnome-defaults-list}} contains a list of file-types and programs specific to the Gnome desktop. The list is installed to {{ic|/etc/gnome/defaults.list}}.<br />
<br />
Open this file with your text editor. Here you can replace a given application with the name of the program of your choosing. For example, replace '''totem''' with '''vlc''' or '''eog''' with '''mirage'''. Save the file to {{ic|~/.local/share/applications/defaults.list}}.<br />
<br />
Another way of setting file associations is to install package {{Pkg|perl-file-mimeinfo}} from the official repositories and invoke '''mimeopen''' like this:<br />
mimeopen -d /path/to/file<br />
You are asked which application to use when opening {{ic|/path/to/file}}:<br />
Please choose a default application for files of type text/plain<br />
1) notepad (wine-extension-txt)<br />
2) Leafpad (leafpad)<br />
3) OpenOffice.org Writer (writer)<br />
4) gVim (gvim)<br />
5) Other...<br />
Your answer becomes the default handler for that type of file. Mimeopen is installed as {{ic|/usr/bin/perlbin/vendor/mimetype}}.<br />
<br />
=== Copy and paste ===<br />
<br />
From a terminal {{Keypress|Ctrl+Ins}} for copy and {{keypress|Shift+Ins}} for paste.<br />
<br />
Also {{keypress|Ctrl+Shift+c}} for copy and '''mouse middle-click''' for paste (in terminals).<br />
<br />
Other applications most likely use the conventional keyboard shortcuts for copy and paste.<br />
<br />
=== Window transparency ===<br />
<br />
The program {{Pkg|transset-df}} is available in the official repositories. With ''transset-df'' you can enable window transparency on-the-fly.<br />
<br />
For instance by placing the following in the ''<mouse>'' section you can have your mouse adjust window transparency by scrolling while hovering over the title bar:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<context name="Titlebar"><br />
. . .<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
. . .<br />
</context><br />
</nowiki>}}<br />
{{Warning|It appears to work only when no additional actions are defined within the action group.}}<br />
<br />
=== Xprop values for applications ===<br />
Xprop can be installed with the package {{Pkg|xorg-xprop}}, available in the official repositories. <br />
<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 {{ic|xp}} and click on the running program that you would like to define with per-app settings. The result displays only the info that Openbox requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
$ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Xprop for Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values {{ic|xprop}} may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Linking the menu to a button ===<br />
<br />
Some people want to link the Openbox menu (or any menu) to an object. This is useful for creating a panel button to pop up a menu. Although Openbox does not provide this, a program called {{Pkg|xdotool}} simulates a keypress. Openbox can be configured to bind that keypress to the ''ShowMenu'' action.<br />
<br />
After installing ''xdotool'', add the following to the ''<keyboard>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
Then execute {{ic|openbox --reconfigure}} or {{ic|openbox --restart}} to use the new configuration. The following command summons a menu at your cursor position. The command may given as-is, linked to an object, or placed in a script.<br />
$ xdotool key ctrl+alt+q<br />
<br />
Of course, change the key shortcut to your liking. Here is a snippet from a [[Tint2]] configuration file which pops up a menu when the clock area is clicked. Each key combination is set to open a menu within Openbox's {{ic|rc.xml}} configuration file. The right‑click menu is different from the left‑click menu:<br />
clock_rclick_command = xdotool key --clearmodifiers "ctrl+XF86PowerOff"<br />
clock_lclick_command = xdotool key --clearmodifiers "alt+XF86PowerOff"<br />
<br />
=== Urxvt in the background ===<br />
<br />
With Openbox, running a terminal as desktop background is easy. You will not need [[Wikipedia:Devil's Pie (software)|devilspie]] here.<br />
<br />
First you must enable transparency, open your {{ic|~/.Xdefaults}} file (if it does not exist yet, create it).<br />
URxvt*transparent:true<br />
URxvt*scrollBar:false<br />
URxvt*geometry:124x24 #I do not use the whole screen, if you want a full screen term do not bother with this and see below.<br />
URxvt*borderLess:true<br />
URxvt*foreground:Black #Font color. My wallpaper is White, you may wish to change this to White.<br />
<br />
Then add the following to the ''<applications>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<application name="urxvt"><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<position><br />
<x>center</x><br />
<y>20</y><br />
</position><br />
<layer>below</layer><br />
<desktop>all</desktop><br />
<maximized>true</maximized> #Only if you want a full size terminal.<br />
</application><br />
</nowiki>}}<br />
The ''magic'' comes from the '''<layer>below</layer>''' line, which place the application under all others. Here [[Rxvt-unicode|urxvt]] is displayed on all desktops, change it to your convenience.<br />
<br />
{{Tip|Instead of using ''<application name&#61;"urxvt">'', you can use another name ("urxvt-bg" for example), and use the {{ic|-name}} option when starting uxrvt. That way, only the urxvt terminals which you choose to name {{ic|urxvt-bg}} would be captured and modified by the application rule in {{ic|rc.xml}}. For example:<br />
$ urxvt -name urxvt-bg<br />
}}<br />
====ToggleShowDesktop exception====<br />
<br />
If you use '''ToggleShowDesktop''' to minimize all your application and show the desktop it will also minimize the urxvt window. Several methods are available to bypass this, but none works properly:<br />
* one method is explained in this [https://bbs.archlinux.org/viewtopic.php?pid=865844#p865844 forum post]. This involves editing Urxvt's source code.<br />
{{Warning|This method seems to have been broken in a recent update, now leading to a memory leak when the patched Urxvt is run.}}<br />
* the best method is outlined [https://bbs.archlinux.org/viewtopic.php?pid=929792#p929792 here]. It still has a big disadvantage: it makes ''ToggleShowDesktop'' a one-way action, not restoring the other desktop applications when ''ToggleShowDesktop'' is run for a second time. It does create the opportunity to use a different terminal emulator than Urxvt, however.<br />
<br />
=== Keyboard volume control ===<br />
====ALSA====<br />
If you use [[ALSA]] for sound, you can use the {{ic|amixer}} program (part of the {{Pkg|alsa-utils}} package) to adjust the sound volume. You can use Openbox's keybindings to map different shortcuts to actions. If you want to use the multimedia keys, but do not know their names, you could look at the [[Multimedia Keys]] page to find out.<br />
<br />
For example, add the following in the ''<keyboard>'' section:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Up"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
This binds {{Keypress|Super+&uarr;}} to increase your master ALSA volume by 5%. Corresponding binding for volume down:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Down"><br />
<action name="Execute"><br />
<command>amixer set Master 5%-</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
As another example you can also use the {{ic|XF86Audio*}} keybindings:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
The above example should work for the majority of multimedia keyboards. It should enable to raise, lower and mute the Master control of your audio device by using the respective multimedia keyboard keys. Notice also that in this example:<br />
<br />
* The "Mute" key should unmute the Master control if it is already in mute mode.<br />
* The "Raise" and "Lower" keys should unmute the Master control if it is in mute mode.<br />
<br />
====Pulseaudio====<br />
If you are using [[PulseAudio]] with ALSA as a backend the above keybinding are slightly different as {{ic|amixer}} must be told to use PulseAudio. As always, add the following to the ''<keyboard>'' section to get the proper behaviour:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
This keybindings should work for most of the systems. Other examples can be found [http://ubuntuforums.org/showthread.php?t=987149 here].<br />
<br />
== Troubleshooting Openbox 3.5 ==<br />
=== X server crashes ===<br />
Problems have been detected after upgrade to version 3.5, that the X server might crash in attempt to start Openbox, ending with this error message:<br />
(metacity:25137): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process \<br />
was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit \<br />
status can't be returned. This is a bug in the program calling g_spawn_sync(); either do not request \<br />
the exit status, or do not set the SIGCHLD action.<br />
xinit: connection to X server lost<br />
waiting for X server to shut down<br />
In this particular case, some problem with '''metacity''' package has been identified as the cause of the X server crash issue. To solve the problem reinstall the {{Pkg|metacity}} and {{Pkg|compiz-decorator-gtk}} packages. If that does not solve the problem, try removing them.<br />
<br />
Also, plenty of similar cases have been found on the Internet, that not only metacity package might be causing the X server to crash.<br />
Thus, whatever else instead of metacity you get in the error output message, try to reinstall it (or remove if necessary) in an attempt to get rid of this X server crash.<br />
<br />
=== Autostarting unwanted applications in 3.5 ===<br />
If unwanted applications start with your Openbox session even though they are not listed in your {{ic|~/.config/openbox/autostart}}, check the {{ic|~/.config/autostart/}} directory, it might contain the residues from your previously used desktop environment (GNOME, KDE, etc.), and remove unwanted files.<br />
<br />
=== SSH agent no longer starting ===<br />
Whereas Openbox 3.4.x allowed launching an SSH agent from {{ic|~/.config/openbox/autostart}}, with 3.5 that no longer seems to work. You need to put the following code in {{ic|~/.config/openbox/environment}}:<br />
<br />
{{bc|<nowiki><br />
SSHAGENT="/usr/bin/ssh-agent"<br />
SSHAGENTARGS="-s"<br />
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then<br />
eval `$SSHAGENT $SSHAGENTARGS`<br />
trap "kill $SSH_AGENT_PID" 0<br />
fi<br />
</nowiki>}}<br />
<br />
=== Openbox not registering with D-Bus ===<br />
Just like with SSH agent, lots of people used to have D-Bus code in {{ic|~/.config/openbox/autostart}} - which no longer works (e.g. Thunar does not see any removable devices anymore).<br />
<br />
The fix is to move the code to {{ic|~/.config/openbox/environment}}:<br />
{{bc|<br />
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then<br />
eval `dbus-launch --sh-syntax --exit-with-session`<br />
fi<br />
}}<br />
<br />
Alternatively you can call {{ic|openbox-session}} with {{ic|dbus-launch}} in {{ic|~/.xinitrc}}.<br />
<br />
==See also==<br />
* [http://openbox.org/ Openbox Website] &ndash; The official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://snott.net/linux/using-gnome3-with-openbox/ Using GNOME 3 with Openbox Tutorial]</div>SoleSoulhttps://wiki.archlinux.org/index.php?title=Netbeans&diff=126197Netbeans2010-12-28T11:55:26Z<p>SoleSoul: /* Font antialiasing in Netbeans */</p>
<hr />
<div>Netbeans IDE is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
The NetBeans IDE is written in Java and runs everywhere where a JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.<br />
<br />
(based on wikipedia)<br />
<br />
== Font antialiasing in Netbeans ==<br />
<br />
Based on: http://ibnaziz.wordpress.com/2009/06/10/netbeans-anti-aliasing/<br />
<br />
Problem :<br />
<br />
For some time now, the newer version of netbeans, no longer displays the “Advanced Options” that allows for anti-aliased fonts. And frankly speaking, the fonts look terrible.<br />
<br />
Solution :<br />
<br />
Edit the file ''/usr/share/netbeans/etc/netbeans.conf'' and add the switchs ‘-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on’ to ‘netbeans_default_options’.</div>SoleSoulhttps://wiki.archlinux.org/index.php?title=Netbeans&diff=126196Netbeans2010-12-28T11:54:48Z<p>SoleSoul: Created page with "Netbeans IDE is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages. The Net..."</p>
<hr />
<div>Netbeans IDE is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
The NetBeans IDE is written in Java and runs everywhere where a JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.<br />
<br />
(based on wikipedia)<br />
<br />
== Font antialiasing in Netbeans ==<br />
<br />
Based on: http://ibnaziz.wordpress.com/2009/06/10/netbeans-anti-aliasing/<br />
<br />
Problem :<br />
<br />
For some time now, the newer version of netbeans, no longer displays the “Advanced Options” that allows for anti-aliased fonts. And frankly speaking, the fonts look terrible.<br />
<br />
Solution :<br />
<br />
Edit the file /usr/share/netbeans/etc/netbeans.conf and add the switchs ‘-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on’ to ‘netbeans_default_options’.</div>SoleSoulhttps://wiki.archlinux.org/index.php?title=GRUB2_Rescue_Console&diff=86307GRUB2 Rescue Console2009-12-04T13:28:18Z<p>SoleSoul: Created page with '== Background == Since the MBR is too small for all of GRUB2 modules, just the menu and a few basic capabilities truly reside there. Most of GRUB2 stays on the partition it was …'</p>
<hr />
<div>== Background ==<br />
<br />
Since the MBR is too small for all of GRUB2 modules, just the menu and a few basic capabilities truly reside there. Most of GRUB2 stays on the partition it was installed from. The "MBR part" keeps a variable - "prefix" - which points to the partition and folder containing the rest of the program.<br />
<br />
== Possible problem ==<br />
<br />
Sometimes, when you change the partition layout of your HD, the number of the partition which contains GRUB2 changes. Let's assume we installed GRUB2 from (hd0,7) or /dev/sda7, which is a logical partition inside an extended partition. Then we deleted /dev/sda5 and /dev/sda6, our /dev/sda7 became /dev/sda5. Now when the "MBR part" is looking for the rest of the program, it can't find it in (hd0,7) since such partition doesn't exist anymore. In this case, instead of showing the usual GRUB2 menu, you are being dropped to some sort of command line which is called GRUB rescue.<br />
<br />
== How to deal with it ==<br />
<br />
The easies way to fix this situation is to use another boot disk of some sort and reinstall GRUB2 again from the right partition. Such a boot disk is not always available so here is how to do it from GRUB rescue.<br />
<br />
The number of available commands in GRUB rescue is really minimal. The only useful ones are "set" and "insmod". "set" sets variables, and "insmod" inserts new modules to expand GRUB rescue's capabilities.<br />
<br />
Before we can start, we have to know the right number of the partition which contains GRUB2 in order to inform the "MBR part".<br />
<br />
Assuming GRUB2 is installed in it's default location "/boot/grub", type<br />
<br />
set prefix=(hdx,y)/boot/grub<br />
<br />
where x is the physical HD number and y is the partition number.<br />
<br />
{{Note|If (hdx,y) is a boot partition, you have to omit the /boot part from the path, ie type {{Codeline|set prefix=(hdx,y)/grub}}}}<br />
<br />
<br />
Now we want to expand the console capabilities so we insert a useful module. Type<br />
<br />
insmod (hdx,y)/boot/grub/linux.mod<br />
<br />
where, again, (hdx,y) is the right partition where GRUB2 was installed from and "/boot/grub" is the path to the installation directory.<br />
<br />
This will hopefully bring you back to the standad (?) GRUB2 console. <br />
<br />
<br />
Now in order to boot your OS, we have to type the regular GRUB2 command.<br />
<br />
Here is an example of how to boot Arch Linux:<br />
<br />
set root=(hd0,5)<br />
linux /boot/vmlinuz26 root=/dev/sda5<br />
initrd /boot/kernel26.img<br />
boot<br />
<br />
where (hd0,5) is the partition of your Arch Linux installation (not necessarily the same partition as above and it is probably different in your case).<br />
<br />
If you have a boot partition, change the lines accordigly to something like that:<br />
<br />
set root=(hd0,5)<br />
linux /vmlinuz26 root=/dev/sda6<br />
initrd /kernel26.img<br />
boot<br />
<br />
and again, change the numbers to fit your layout.<br />
<br />
<br />
After successfully booting your Arch Linux installation, you must fix grub.cfg to the new partition numbers and then run<br />
<br />
grub-install /dev/sda<br />
<br />
or /dev/sdb or whatever fits your layout to reinstall GRUB2 and fix the problem completely.</div>SoleSoul