https://wiki.archlinux.org/api.php?action=feedcontributions&user=Petaspeed&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:50:44ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Bankid&diff=306777Bankid2014-03-23T19:56:20Z<p>Petaspeed: </p>
<hr />
<div>This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run other versions of Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
You also need to install a 32-bit version of {{ic|libgcrypt.so.11}}. This is not available from the standard repositories, but you might be able to install it from the AUR.<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternatives ==<br />
The open source program [[Fribid]] ([https://fribid.se/index.en.html fribid.se]) is available in the AUR: [https://aur.archlinux.org/packages.php?ID=54325 fribid-stable]. For information on how to install packages in the AUR read more at [[AUR User Guidelines]].<br />
<br />
== Running Bankid in a virtual machine running Windows ==<br />
If no other solution works, you can always install for example [[Virtualbox]] and run Bankid on a Windows virtual machine. It should work fairly out of the box with Windows XP on the guest. If you want to use a card-reader you have to add the user that runs Virtualbox (usually you) to the group {{ic|vboxusers}} to be able to access the usb-connected card-reader. You can then add a usb-filter in the Virtualbox settings for the machine, so that the machine captures the card-reader automatically.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306776Bankid2014-03-23T19:55:01Z<p>Petaspeed: added some more info on running in vm. removed "under construction" note</p>
<hr />
<div>This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
You also need to install a 32-bit version of {{ic|libgcrypt.so.11}}. This is not available from the standard repositories, but you might be able to install it from the AUR.<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternatives ==<br />
The open source program [[Fribid]] ([https://fribid.se/index.en.html fribid.se]) is available in the AUR: [https://aur.archlinux.org/packages.php?ID=54325 fribid-stable]. For information on how to install packages in the AUR read more at [[AUR User Guidelines]].<br />
<br />
<br />
== Running Bankid in a virtual machine running Windows ==<br />
If no other solution works, you can always install for example [[Virtualbox]] and run Bankid on a Windows virtual machine. It should work fairly out of the box with Windows XP on the guest. If you want to use a card-reader you have to add the user that runs Virtualbox (usually you) to the group {{ic|vboxusers}} to be able to access the usb-connected card-reader. You can then add a usb-filter in the Virtualbox settings for the machine, so that the machine captures the card-reader automatically.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306769Bankid2014-03-23T18:42:38Z<p>Petaspeed: /* Open source alternatives */</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternatives ==<br />
The open source program [[Fribid]] ([https://fribid.se/index.en.html fribid.se]) is available in the AUR: [https://aur.archlinux.org/packages.php?ID=54325 fribid-stable]. For information on how to install packages in the AUR read more at [[AUR User Guidelines]].</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306768Bankid2014-03-23T18:35:11Z<p>Petaspeed: /* Open source alternatives */</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternatives ==<br />
The open source program [[Fribid]] ([https://fribid.se/index.en.html fribid.se]) is available in the AUR: [https://aur.archlinux.org/packages.php?ID=54325 fribid-stable].</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306765Bankid2014-03-23T17:45:21Z<p>Petaspeed: </p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternatives ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Building_in_a_32-bit_clean_chroot&diff=306764Building in a 32-bit clean chroot2014-03-23T17:38:46Z<p>Petaspeed: /* Build 32-bit packages in a 64-bit environment */</p>
<hr />
<div>[[Category:Arch64]]<br />
==Build 32-bit packages in a 64-bit environment==<br />
{{Note|{{pkg|devtools}} is needed. Because of circular dependencies, you may need to install {{pkg|arch-install-scripts}} at the same time.}}<br />
<br />
{{Note|If you are using or plan to use either [[Install_bundled_32-bit_system_in_Arch64#arch32-light|Arch32 light]] or [[Install bundled 32-bit system in Arch64]] you will need to use a different directory other than /opt/arch32 since this tutorial will conflict with the directory chosen in the other articles.}}<br />
<br />
This example uses mkarchroot to create the chroot environment. First, create /opt/arch32 or another directory of your choice. The next steps is to copy your existing pacman.conf and makepkg.conf file to /opt/arch32 or your chosen directory. In the following tutorial, substitute /opt/arch32 with your chosen directory if you decide to use a different directory.<br />
<br />
{{Note|If you have customized either makepkg.conf or pacman.conf, then you will need to use the standard pacman.conf and makepkg.conf files. Also make sure your /etc/pacman.d/mirrorlist contains the $arch variable instead of x86_64 or i686}}<br />
<br />
'''Edit your /opt/arch32/pacman.conf'''<br />
<br />
Change {{ic|1=Architecture = auto}} to {{ic|1=Architecture = i686}}.<br />
<br />
You will also need to comment out any multi-lib repos.<br />
<br />
{{Note|''Thanks to Remy Oudompheng to pointing this out.'' devtools (version 0.9.10 in [testing]) contains a ready-to-use /usr/share/devtools/makepkg-i686.conf. If you decide to use this conf file, you can skip the next step. You will need to copy /usr/share/devtools/makepkg-i686.conf to /opt/arch32/makepkg.conf if you decide to use devtools[from testing].}}<br />
<br />
'''Edit /opt/arch32/makepkg.conf'''<br />
<br />
Change CARCH="x86_64" '''to''' ''CARCH="i686"<br />
CHOST="x86_64-unknown-linux-gnu" '''to''' CHOST="i686-unknown-linux-gnu".<br />
CFLAGS="-march=x86_64 -mtune=generic -O2 -pipe" '''to''' CFLAGS="-march=i686 -mtune=generic -O2 -pipe" .<br />
CXXFLAGS="-march=x86_64 -mtune=generic -O2 -pipe" '''to''' CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe" .<br />
<br />
After the changes have been made, you will need to create another directory, I created /aur as mine. <br />
<br />
'''Next run:'''<br />
sudo mkarchroot -C /opt/arch32/pacman.conf -M /opt/arch32/makepkg.conf <chrootdir>/root base base-devel sudo <br />
If you create the /aur directory like mine you would run <br />
''sudo mkarchroot -C /opt/arch32/pacman.conf -M /opt/arch32/makepkg.conf /aur/root base base-devel sudo''<br />
<br />
You will need to edit /aur/copy/etc/pacman.d/mirrorlist and select which mirrors to use.<br />
<br />
Now you can use makechrootpkg to build i686 packages like this:<br />
# makechrootpkg -r /aur/</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306753Bankid2014-03-23T17:11:27Z<p>Petaspeed: </p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install standard C routines needed for all 32-bit applications, the 32-bit Gtk libraries and some other dependencies:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2 lib32-libpng12 lib32-libidn<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306745Bankid2014-03-23T16:44:52Z<p>Petaspeed: </p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
<br />
You now have a list of the libraries that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
$ strace -o "| grep libpng12.so.0" personal<br />
open("/usr/lib32/tls/i686/sse2/libpng12.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />
[...]<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
Now we need to find out which package contains the needed file:<br />
<br />
$ sudo pkgfile --update # Update package database<br />
:: Updating 4 repos...<br />
core is up to date<br />
extra is up to date<br />
community is up to date<br />
multilib is up to date<br />
$ pkgfile libpng12.so.0 | grep lib32<br />
multilib/lib32-libpng12<br />
<br />
We can now install the library with pacman.<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306744Bankid2014-03-23T16:32:16Z<p>Petaspeed: </p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid :<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries for 32-bit program ===<br />
If you get an error similar to the below when running the 32-bit program, you need to provide the missing libraries to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
libidn.so.11 => not found<br />
libgcrypt.so.11 => not found<br />
<br />
You now have a list of the executables that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
strace -o "| grep libpng12.so.0" personal<br />
<br />
The output will show you that the program is actually looking for the library in a couple if locations starting with {{ic|/usr/lib32/}}. This means you need the 32-bit version of the library (since you are running the 32-bit program).<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306741Bankid2014-03-23T16:28:15Z<p>Petaspeed: expanded on strace</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid :<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries ===<br />
If you get an error similar to the below, you need to provide the missing library to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
<br />
Find out what libraries Bankid can't find by running {{ic|ldd}} on the executable:<br />
<br />
$ ldd /usr/local/lib/personal/personal.bin | grep "not found"<br />
libpng12.so.0 => not found<br />
libidn.so.11 => not found<br />
libgcrypt.so.11 => not found<br />
<br />
You now have a list of the executables that the application is missing. When you run a 32-bit application on Archlinux the library calls from the program (e g {{ic|libpng12.so.0}} are translated to point to the 32-bit versions of ditto libraries.<br />
<br />
To see the path where the application is actually looking for for example {{ic|libpng12.so.0}} run:<br />
<br />
strace -o "| grep libpng12.so.0" personal<br />
<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306738Bankid2014-03-23T16:18:50Z<p>Petaspeed: expanded on nexus personal</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''. The underlaying application of Bankid is [[Nexus Personal]] ([http://www.nexusgroup.com/en/solutions/Identity-Federation/nexus-personal-security-client/ http://www.nexusgroup.com]), so the tips here is probably helpful for anyone trying to run Nexus Personal as well.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid :<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
<br />
== Troubleshooting ==<br />
=== Missing libraries ===<br />
If you get an error similar to the below, you need to provide the missing library to Bankid.<br />
<br />
/usr/local/lib/personal/personal.bin: error while loading shared libraries:<br />
libpng12.so.0: cannot open shared object file: No such file or directory<br />
Find out what libraries Bankid can't find.<br />
<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306737Bankid2014-03-23T16:08:14Z<p>Petaspeed: expanded</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid :<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
Download the [https://install.bankid.com/Download/All Bankid application for Linux].<br />
<br />
Extract the archive you downloaded and run the installation program:<br />
$ tar -xzf BISP-4.19.1.11663.tar.gz<br />
$ ./BISP-4.19.1.11663/install.4.19.1.11663.sh i<br />
<br />
Some additional information are to be found in the text files supplied with the application.<br />
<br />
After the install you can safely remove the installation program. Note that two directories are created when you extract the archive: {{ic|/BISP-4.19.1.11663}} and {{ic|/lang}}.<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Bankid&diff=306736Bankid2014-03-23T15:55:55Z<p>Petaspeed: created page</p>
<hr />
<div>'''This page is under construction today --[[User:Petaspeed|Petaspeed]] ([[User talk:Petaspeed|talk]]) 15:55, 23 March 2014 (UTC)'''<br />
<br />
This page is about the digital id software '''Bankid''' or '''BankID'''.<br />
<br />
== Installing 32-bit Bankid application on 64-bit system ==<br />
<br />
As of 2014-03-23 Bankid is only available as a 32-bit application. The following is required to run Bankid:<br />
<br />
Install C routines for 32-bit applications and the 32-bit Gtk libraries:<br />
$ sudo pacman -S lib32-glibc lib32-gtk2<br />
<br />
<br />
== Open source alternative ==<br />
The open source project [[Fribid]] ([https://fribid.se/index.en.html https://fribid.se]) is an open implementation of Bankid.</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Raspberry_Pi&diff=252786Raspberry Pi2013-04-03T15:13:43Z<p>Petaspeed: /* What is Raspberry Pi */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
{{Note|Support for the ARM architecture is provided on http://archlinuxarm.org/ }}<br />
<br />
How mature is Raspberry Pi (RPI). A brief overview.<br />
<br />
== What is Raspberry Pi? ==<br />
<br />
It is a minimalist computer built for [http://en.wikipedia.org/wiki/ARMv6 ARMv6] architecture. [http://www.raspberrypi.org/ More information about this project] and [http://uk.farnell.com/raspberry-pi technical specification].<br />
<br />
== Installing Arch Linux ARM ==<br />
<br />
See the [http://archlinuxarm.org/platforms/armv6/raspberry-pi#qt-platform_tabs-ui-tabs2 archlinuxarm documentation].<br />
<br />
== Video ==<br />
<br />
The generic {{pkg|xf86-video-fbdev}} driver can be used.<br />
<br />
== Serial Console ==<br />
Edit the default /boot/cmdline.txt<br />
<br />
Change loglevel to 5 to see boot messages<br />
# loglevel=5<br />
<br />
Change speed from 115200 to 38400<br />
# console=ttyAMA0,38400 kgdboc=ttyAMA0,38400<br />
<br />
Start getty service<br />
# systemctl start getty@ttyAMA0<br />
<br />
Enable on boot<br />
# systemctl enable getty@ttyAMA0.service<br />
<br />
Creating the proper service link:<br />
# ln -s /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@ttyAMA0.service<br />
<br />
Then connect :)<br />
# screen /dev/ttyUSB0 38400<br />
<br />
Referenced from these [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=19186] posts [https://bbs.archlinux.org/viewtopic.php?id=144847]</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Netcfg&diff=252688Netcfg2013-04-02T13:43:03Z<p>Petaspeed: /* Just one profile */ added link to systemctl</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Networking]]<br />
[[es:Netcfg]]<br />
[[fr:Netcfg]]<br />
[[it:Netcfg]]<br />
[[ja:Netcfg]]<br />
[[ro:Netcfg]]<br />
[[ru:Netcfg]]<br />
[[tr:netcfg]]<br />
[[zh-CN:Netcfg]]<br />
{{Article summary start}}<br />
{{Article summary text|A guide to configuring the network using netcfg and network profile scripts.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Networking overview}}}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary wiki|Netcfg Tips}}<br />
{{Article summary wiki|Netcfg Troubleshooting}}<br />
{{Article summary link|Netcfg network scripts repository|https://projects.archlinux.org/netcfg.git/}}<br />
{{Article summary end}}<br />
<br />
Netcfg is used to configure and manage network connections via profiles. It has pluggable support for a range of connection types, such as wireless, Ethernet and [[Wikipedia:Point-to-point_protocol|PPP]]. It is also capable of starting/stopping many-to-one connections, that is, multiple connections within the same profile, optionally with bonding. Further it is useful for users seeking a simple and robust means of managing multiple network configurations (e.g. laptop users).<br />
<br />
== Preparation ==<br />
<br />
In the simplest cases, users must at least know the name of their network interface(s) (e.g. {{ic|eth0}}, {{ic|wlan0}}). If configuring a static IP address, the IP addresses of the default gateway and name server(s) must also be known.<br />
<br />
If connecting to a wireless network, have some basic information ready. For a wireless network this includes what type of security is used, the network name (ESSID), and any passphrase or encryption keys. Additionally, ensure the proper drivers and firmware are installed for the wireless device, as described in [[Wireless Setup]].<br />
<br />
== Installation ==<br />
<br />
The {{Pkg|netcfg}} package is available in the [[Official Repositories|official repositories]]. As of {{Pkg|netcfg}} version 2.5.x, optional dependencies include {{Pkg|wpa_actiond}}, which is required for automatic/roaming wireless connections, and {{Pkg|ifplugd}}, which is required for automatic Ethernet configuration. See [https://www.archlinux.org/news/487/ the announcement].<br />
<br />
Users wanting [[Bash]] completion support for netcfg, install the {{Pkg|bash-completion}} package from the official repositories.<br />
<br />
== Configuration ==<br />
{{Note|1={{Pkg|netcfg}} >= 2.8.9 drops deprecated {{ic|/etc/[[rc.conf]]}} compatibility. Netcfg users should configure all interfaces in {{ic|/etc/conf.d/netcfg}} instead of {{ic|/etc/rc.conf}}.}}<br />
<br />
Network profiles are stored in {{ic|/etc/network.d/}}. To minimize the potential for errors, copy an example configuration from {{ic|/etc/network.d/examples/}} to {{ic|/etc/network.d/mynetwork}}. The file name is the name of the network profile, and {{ic|mynetwork}} is used as an example throughout this article.<br />
<br />
Depending on the connection type and security, use one of the following examples from {{ic|/etc/network.d/examples/}} as a base.<br />
<br />
{{Warning|Be wary of examples found on the internet as they often contain deprecated options that may cause problems!}}<br />
<br />
{| class="wikitable" align="center"<br />
! Connection !! Type !! Example Profile !! Information<br />
|-<br />
| rowspan="3"| '''Wired'''<br />
| Dynamic IP || {{ic|ethernet-dhcp}} ||<br />
|-<br />
| Static IP || {{ic|ethernet-static}} ||<br />
|-<br />
| Routed || {{ic|ethernet-iproute}} || Can be checked with {{ic|ip route}} from the {{Pkg|iproute2}} package.<br />
|-<br />
| rowspan="3"| '''Wireless'''<br />
| WPA-Personal<br />
| {{ic|wireless-wpa}} || Uses a passphrase/pre-shared key.<br />
|-<br />
| rowspan="2"| WPA-Enterprise<br />
| {{ic|wireless-wpa-config}} || The {{Pkg|wpa_supplicant}} configuration is external.<br />
|-<br />
| {{ic|wireless-wpa-configsection}} || The {{Pkg|wpa_supplicant}} configuration is stored as a string.<br />
|}<br />
<br />
Modify the new configuration file, {{ic|/etc/network.d/mynetwork}}:<br />
<br />
* Set {{ic|INTERFACE}} to the correct wireless or Ethernet interface. This can be checked with {{ic|ip link}} and {{ic|iwconfig}}.<br />
* Ensure the {{ic|ESSID}} and {{ic|KEY}} (passphrase) are set correctly for wireless connections. Typos in these fields are common errors.<br />
** Note that WEP ''string'' keys (not ''hex'' keys) must be specified with a leading {{ic|s:}} (e.g. {{ic|1=KEY="s:''somepasskey''"}}).<br />
<br />
{{Note|If you are using netcfg inside a VPS, please see [[Virtual_Private_Server#Moving_your_VPS_from_network_configuration_in_rc.conf_to_netcfg_.28tested_with_OpenVZ.29|the appropriate page]].}}<br />
<br />
{{Note|Netcfg configurations are valid Bash scripts. Any configuration involving special characters such as {{ic|$}} or {{ic|\}} needs to be quoted correctly otherwise it will be interpreted by Bash. To avoid interpretation, use single quotes or backslash escape characters where appropriate.}}<br />
<br />
{{Note|Network information (e.g. wireless passkey) will be stored in plain text format, so users may want to change the permissions on the newly created profile (e.g. {{ic|chmod 0600 /etc/network.d/mynetwork}}) to make it readable by root only.}}<br />
<br />
{{Note|For WPA-Personal, it is also possible to [[Wpa_supplicant#Classic_method:_.2Fetc.2Fwpa_supplicant.conf|encode the WPA passkey into a hexadecimal string]]. Save the new hexadecimal string into the wireless WPA profile in {{ic|/etc/network.d/mynetwork}} as the value of the {{ic|KEY}} variable (make sure this will be the only {{ic|KEY}} variable enabled), to look similar to this: {{ic|1=KEY='7b271c9a7c8a6ac07d12403a1f0792d7d92b5957ff8dfd56481ced43ec6a6515'}}. However, this key can also be used by anyone to get on your network, and thus must be protected just as well as the cleartext key. The hexadecimal encoding is more convenient if you use special characters that are hard to express in scripts.}}<br />
<br />
{{<br />
Note|1=By default netcfg uses dhcpcd for configuring network interfaces. An alternate to dhcpcd is dhclient. To use dhclient, set DHCLIENT='yes' in appropriate profile configuration.<br />
}}<br />
<br />
== Manual Operation ==<br />
<br />
To connect a profile:<br />
<br />
# netcfg mynetwork<br />
<br />
To disconnect a profile:<br />
<br />
# netcfg down mynetwork<br />
<br />
If successful, users can configure netcfg to connect automatically or during boot. If the connection fails, see [[Netcfg Troubleshooting]] for solutions and for how to ask for help.<br />
<br />
It is also possible to use an interactive menu ({{Pkg|dialog}} package is required):<br />
netcfg-menu<br />
<br />
Additionally, see:<br />
<br />
$ netcfg help<br />
<br />
== Automatic Operation ==<br />
<br />
=== Just one profile ===<br />
<br />
In the simplest case, only one profile will be used and is always desired to start on boot:<br />
<br />
# [[Systemd#Basic_systemctl_usage|systemctl]] enable netcfg@myprofile<br />
<br />
=== Net-Profiles ===<br />
<br />
Edit the {{ic|NETWORKS}} array in {{ic|/etc/conf.d/netcfg}} to refer to the network config file {{ic|/etc/network.d/mynetwork}}.<br />
<br />
{{hc|/etc/conf.d/netcfg|2=<br />
NETWORKS=(mynetwork yournetwork)}}<br />
<br />
Start the service on startup:<br />
<br />
# systemctl enable netcfg<br />
<br />
Alternatively, the profiles that were active at last shutdown can be restored by setting the {{ic|NETWORKS}} array to {{ic|last}}.<br />
<br />
{{hc|/etc/conf.d/netcfg|2=<br />
NETWORKS=(last)}}<br />
<br />
{{Note|For {{ic|1=NETWORKS=(last)}} to work, you will have to connect to your network manually first and then stop the daemon for Netcfg to remember the network. You can stop the Netcfg daemon by running {{ic|netcfg-daemon stop}} as root.}}<br />
<br />
{{Note|The {{ic|1=NETWORKS=(menu)}} setting cannot be used anymore when switching to systemd. See {{bug|31377}} for details.}}<br />
<br />
=== Net-Auto-Wireless ===<br />
<br />
This allows users to automatically connect to wireless networks with proper roaming support. To use this feature, the {{Pkg|wpa_actiond}} package is required. Note that {{ic|wireless-wpa-config}} profiles do not work with {{ic|net-auto-wireless}}. Convert them to {{ic|wireless-wpa-configsection}} or {{ic|wireless-wpa}} instead.<br />
<br />
Specify the desired wireless interface with the {{ic|WIRELESS_INTERFACE}} variable in {{ic|/etc/conf.d/netcfg}} or define a list of wireless networks that should be automatically connected with the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}.<br />
<br />
{{Note|If AUTO_PROFILES is not set, all wireless networks will be tried.}}<br />
{{Note|1=By default, wpa_actiond sets dhcp timeout to 10 seconds (line 16 of /usr/bin/netcfg-wpa_actiond-action) which may be not enough for all users to always get an IP address successfully. To override this, for example with classic 30 seconds timeout, write DHCP_TIMEOUT=30 to /etc/conf.d/netcfg}}<br />
Enable {{ic|net-auto-wireless}} so systemd manages it.<br />
<br />
# systemctl enable net-auto-wireless<br />
<br />
=== Net-Auto-Wired ===<br />
<br />
This allows users to automatically connect to wired networks. To use this feature, the {{Pkg|ifplugd}} package is required.<br />
<br />
Specify the desired wired interface with the {{ic|WIRED_INTERFACE}} variable in {{ic|/etc/conf.d/netcfg}}.<br />
<br />
Enable {{ic|net-auto-wired}} so systemd manages it.<br />
<br />
# systemctl enable net-auto-wired<br />
<br />
The daemon starts an {{ic|ifplugd}} process which runs {{ic|/etc/ifplugd/netcfg.action}} when the status of the wired interface changes (e.g. a cable is plugged in or unplugged). On plugging in a cable, attempts are made to start any profiles with {{ic|1=CONNECTION = "ethernet"}} or {{ic|"ethernet-iproute"}} and {{ic|1=INTERFACE = WIRED_INTERFACE}} until one of them succeeds.<br />
<br />
{{Note|DHCP profiles are tried before static ones, which could lead to undesired results in some cases. However, one can tell netcfg to prefer a particular interface by adding {{ic|1=AUTO_WIRED=1}} to the desired profile.}}<br />
<br />
{{Note|The {{ic|net-auto-wired}} daemon cannot start multiple ifplugd processes for multiple interfaces (unlike ifplugd's own {{ic|/etc/rc.d/ifplugd}} which can).}}<br />
<br />
== FAQ ==<br />
<br />
{{FAQ<br />
|question=Why doesn't netcfg do ''(some feature)''?<br />
|answer=Netcfg does not need to; it connects to networks. Netcfg is modular and re-usable. See {{ic|/usr/lib/network}} for re-usable functions for custom scripts.}}<br />
<br />
{{FAQ<br />
|question=Why doesn't netcfg behave in ''this'' way?<br />
|answer=Netcfg does not enforce any rules; it connects to networks. Netcfg does not impose any heuristics, like "disconnect from wireless if Ethernet is connected". If you want such behavior, it should be simple to write a separate tool on top of netcfg. See the question above. Alternatively, you could be creative with the use of netcfg's {{ic|POST_UP}} functionality to handle some use cases.}}<br />
<br />
{{FAQ<br />
|question=Do I need anything else if I'm using netcfg?<br />
|answer=This question usually references {{ic|/etc/hostname}}, which still has to be set.}}</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Vim&diff=252389Vim2013-03-30T21:17:12Z<p>Petaspeed: /* Syntax highlighting */</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Text editors]]<br />
[[es:Vim]]<br />
[[de:Vim]]<br />
[[it:Vim]]<br />
[[lt:Vim]]<br />
[[ru:Vim]]<br />
[[zh-CN:Vim]]<br />
[[zh-TW:Vim]]<br />
''"[http://www.vim.org/about.php Vim] is an advanced text editor that seeks to provide the power of the de-facto UNIX editor ‘vi’, with a more complete feature set."'' <br />
<br />
Vim focuses on keyboard usage, and offers useful features such as syntax highlighting and scripting capabilities. Vim is not a simple text editor, like nano or pico. It does require some time to learn, and a great amount of time to master.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] the command line version with the {{Pkg|vim}} package, or you can install the GUI version (which also provides {{ic|vim}}) by installing the {{Pkg|gvim}} package.<br />
<br />
{{Note|The {{Pkg|vim}} package is meant to be as lightweight as possible; hence, it does not support Python, Lua, and Ruby interpreters, nor does it support X server options (this means that it will not support copy and paste from the X clipboard). If you require these options, install the {{Pkg|gvim}} package instead (it includes the {{ic|vim}} binary as well). The {{ic|herecura-stable}} unofficial repository also provides a couple different Vim / gVim variants:<br />
{{hc|$ pacman -Slq herecura-stable &#124; grep vim|<br />
vim-cli<br />
vim-gvim-gtk<br />
vim-gvim-motif<br />
vim-gvim-qt<br />
vim-gvim-x11<br />
vim-rt<br />
vim-tiny<br />
}}<br />
}}<br />
<br />
{{Note|There are some visualization problems in KDE using {{Pkg|gvim}} from official repositories. In that case you can install {{ic|vim-gvim-qt}} from {{ic|herecura-stable}} or {{AUR|vim-qt}}<br />
}}<br />
==Usage==<br />
<br />
This is a basic overview on how to use Vim. Alternately, running {{Ic|vimtutor}} or {{Ic|gvimtutor}} will launch vim's tutorial, which takes about 25-30 minutes.<br />
<br />
Vim has four different modes:<br />
<br />
* Command mode: keystrokes are interpreted as commands.<br />
* Insert mode: keystrokes are entered into the file.<br />
* Visual mode: keystrokes select, cut, or copy text<br />
* Ex mode: input mode for additional commands (e.g. saving a file, replacing text...)<br />
<br />
===Basic editing===<br />
<br />
If you start Vim with:<br />
<br />
$ vim somefile.txt<br />
<br />
you will see a blank document (providing that somefile.txt does not exist. If it does, you will see what is in there). You will not be able to edit right away – you are in Command Mode. In this mode you are able to issue commands to Vim with the keyboard.<br />
<br />
{{Note|Vim is an example of classic Unix-style ware. It has a steep learning curve, but once you get started, you will find that it is extremely powerful. Also, all commands are case sensitive. Sometimes the uppercase versions are “blunter” versions ({{keypress|s}} will replace a character, {{keypress|S}} will replace a line), other times they are completely different commands ({{keypress|j}} will move down, {{keypress|J}} will join two lines).}}<br />
<br />
You insert text (stick it before the cursor) with the {{keypress|i}} command. {{keypress|I}} (uppercase '''i''') inserts text at the beginning of the line. You append text (place text after the cursor, what most people expect) with {{keypress|a}}. Typing {{keypress|A}} will place the cursor at the end of the line.<br />
<br />
Return to command mode at any time by pressing {{keypress|Esc}}.<br />
<br />
===Moving around===<br />
<br />
In Vim, you can move the cursor with the arrow keys, but this isn't the '''Vim way'''. You’d have to move your right hand all the way from the standard typing position all the way to the arrow keys, and then back. Not fun.<br />
<br />
In Vim you can move down by pressing {{keypress|j}}. You can remember this because the “j” hangs down. You move the cursor back up by pressing {{keypress|k}}. Left is {{keypress|h}} (it's left of the “j”), and right is {{keypress|l}} (lowercase '''L''').<br />
<br />
{{keypress|^}} will put the cursor at the beginning of the line, and {{keypress|$}} will place it at the end.<br />
<br />
{{Note|{{keypress|^}} and {{keypress|$}} are commonly used in regular expressions to match the beginning and ending of the line. Regular expressions are very powerful and are commonly used in *nix environment, so maybe it is a little bit tricky now, but later you will notice “the idea” behind the use of most of these key mappings.}}<br />
<br />
To advance a word, press the {{keypress|w}} key. {{keypress|W}} will include more characters in what it thinks is a word (e.g. underscores and dashes as a part of a word). To go back a word, {{keypress|b}} is used. Once again, {{keypress|B}} will include more characters in what Vim considers a word. To advance to the end of a word, use {{keypress|e}}, {{keypress|E}} includes more characters.<br />
<br />
To advance to the beginning of a sentence, {{keypress|(}} will get the job done. {{keypress|)}} will do the opposite, moving to the end of a sentence. For an even bigger jump, {{keypress|{}} will move the the beginning a whole paragraph. {{keypress|<nowiki>}</nowiki>}} will advance to the end of a whole paragraph.<br />
<br />
To advance to the header (top) of the screen, {{keypress|H}} will get the job done. {{keypress|M}} will advance to the middle of the screen, and {{keypress|L}} will advance to the last (bottom). {{keypress|gg}} will go to the beginning of the file, {{keypress|G}} will go to the end of the file. {{keypress|Ctrl+D}} will let you scroll page by page.<br />
<br />
===Repeating commands===<br />
<br />
If a command is prefixed by a number, then that command will be executed that number of times over (there are exceptions, but they still make sense, like the {{keypress|s}} command). For example, pressing {{keypress|3i}} then “Help! ” then {{keypress|Esc}} will print “Help! Help! Help!“. Pressing {{keypress|<nowiki>2}</nowiki>}} will advance you two paragraphs. This comes in handy with the next few commands…<br />
<br />
===Deleting===<br />
<br />
The {{keypress|x}} command will delete the character under the cursor. {{keypress|X}} will delete the character before the cursor. This is where those number functions get fun. {{keypress|6x}} will delete 6 characters. Pressing {{keypress|.}} (dot) will repeat the previous command. So, lets say you have the word "foobar" in a few places, but after thinking about it, you’d like to see just “foo”. Move the cursor under the "b", hit {{keypress|3x}}, move to the next "foobar" and hit {{keypress|.}} (dot).<br />
<br />
The {{keypress|d}} will tell Vim that you want to delete something. After pressing {{keypress|d}}, you need to tell Vim what to delete. Here you can use the movement commands. {{keypress|dW}} will delete up to the next word. {{keypress|d^}} will delete up unto the beginning of the line. Prefacing the delete command with a number works well too: {{keypress|3dW}} will delete the next three words. {{keypress|D}} (uppercase) is a shortcut to delete until the end of the line (basically {{keypress|d$}}). Pressing {{keypress|dd}} will delete the whole line.<br />
<br />
To delete then replace the current word, place the cursor on the word and execute the command {{keypress|cw}}. This will delete the word and change to insert mode. To replace only a single letter use {{keypress|r}}.<br />
<br />
===Undo and redo===<br />
<br />
Vim has a built-in clipboard (also known as a buffer). Actions can be undone with {{keypress|u}} and redone with {{keypress|Ctrl+r}}.<br />
<br />
===Visual mode===<br />
<br />
Pressing {{keypress|v}} will put you in visual mode . Here you can move around to select text, when you’re done, you press {{keypress|y}} to yank the text into the buffer (copy), or you may use {{keypress|c}} to cut. {{keypress|p}} pastes after the cursor, {{keypress|P}} pastes before. {{keypress|V}}, Visual Line mode, is the same for entire lines. {{keypress|Ctrl+v}} is for blocks of text.<br />
<br />
{{Note|Whenever you delete something, that something is placed inside a buffer and is available for pasting.}}<br />
<br />
===Search and replace===<br />
<br />
To search for a word or character in the file, simply use {{keypress|/}} and then the characters your are searching for and press enter. To view the next match in the search press {{keypress|n}}, press {{keypress|N}} for the previous match.<br />
<br />
To search and replace use the substitute {{keypress|:s/}} command. The syntax is: {{Ic|[range]s///[arguments]}}. For example:<br />
<br />
{{bc|<br />
Command Outcome<br />
:s/xxx/yyy/ Replace xxx with yyy at the first occurence<br />
:s/xxx/yyy/g Replace xxx with yyy first occurrence, global (whole sentence)<br />
:s/xxx/yyy/gc Replace xxx with yyy global with confirm<br />
:%s/xxx/yyy/g Replace xxx with yyy global in the whole file<br />
}}<br />
<br />
You can use the global {{keypress|:g/}} command to search for patterns and then execute a command for each match. The syntax is: {{Ic|[range]:g//[cmd]}}.<br />
<br />
{{bc|<br />
Command Outcome<br />
:g/^#/d Delete all lines that begins with #<br />
:g/^$/d Delete all lines that are empty<br />
}}<br />
<br />
===Saving and quitting===<br />
<br />
To save and/or quit, you will need to use Ex mode. Ex mode commands are preceded by a {{keypress|:}}. To write a file use {{keypress|:w}} or if the file doesn’t have a name {{ic|''':w''' filename}}. Quitting is done with {{keypress|:q}}. If you choose not to save your changes, use {{keypress|:q!}}. To save and quit {{keypress|:x}}.<br />
<br />
=== Additional commands ===<br />
<br />
# Pressing {{keypress|s}} will erase the current letter under the cursor, and place you in insert mode. {{keypress|S}} will erase the whole line, and place you in insert mode.<br />
# {{keypress|o}} will create a newline below the line and put you insert mode, {{keypress|O}} will create a newline above the line and put you in insert mode.<br />
# {{keypress|yy}} will yank an entire line<br />
# {{keypress|cc}} will delete the current line and place you in insert mode.<br />
# {{keypress|*}} will highlight the current word and {{keypress|n}} will search it<br />
<br />
==Configuration==<br />
<br />
Vim's user-specific configuration file is located in the home directory: {{ic|~/.vimrc}}, and files are located inside {{ic|~/.vim/}} The global configuration file is located at {{ic|/etc/vimrc}}. Global files are located inside {{ic|/usr/share/vim/}}.<br />
<br />
The Vim global configuration in Arch Linux is very basic and differs from many other distributions' default Vim configuration file. To get some commonly expected behaviors (such as syntax highlighting, returning to the last known cursor position), consider using Vim's example configuration file:<br />
<br />
# mv /etc/vimrc /etc/vimrc.bak<br />
# cp /usr/share/vim/vim73/vimrc_example.vim /etc/vimrc<br />
<br />
===Wrap searches===<br />
<br />
With this option the ''search next'' behaviour allows to jump to the beginning of the file, when the end of file is reached. Similarly, ''search previous'' jumps to the end of the file when the start is reached. <br />
<br />
set wrapscan<br />
<br />
=== Spell checking ===<br />
<br />
set spell<br />
<br />
With this setting, Vim will highlight incorrectly spelled words. Place the cursor on a misspelled word and enter {{keypress|1=z=}} to view spelling suggestions.<br />
<br />
Only English language dictionaries are installed by default, more can be found in the [[Official Repositories|official repositories]]. To get the list of available languages type:<br />
<br />
# pacman -Ss vim-spell<br />
<br />
Language dictionaries can also be found at the [http://ftp.vim.org/vim/runtime/spell/ Vim FTP archive]. Put the downloaded dictionar(y/ies) into the {{ic|~/.vim/spell}} folder and set the dictionary by typing: {{ic|1=:setlocal spell spelllang=LL}}<br />
<br />
{{Tip|<br />
* To enable spell checking for LaTeX (or TeX) documents only, add {{ic|1=autocmd FileType tex setlocal spell spelllang=en_us}} into your {{ic|~/.vimrc}} or {{ic|/etc/vimrc}}, and then restart Vim. For spell checking of languages other than English, simply replace {{ic|en_us}} with the value appropriate for your language.<br />
* To enable spelling in two languages (for instance English and German), add {{ic|1=set spelllang=en,de}} into your {{ic|~/.vimrc}} or {{ic|/etc/vimrc}}, and then restart Vim.<br />
* You can enable spell checking for arbitrary file types (e.g. *.txt) by using the FileType plugin and a custom rule for file type detection. To enable spell checking for any file ending in {{ic|*.txt}}, create the file {{ic|/usr/share/vim/vimfiles/ftdetect/plaintext.vim}}, and insert the line {{ic|autocmd BufRead,BufNewFile *.txt setfiletype plaintext}} into that file. Next, insert the line {{ic|1=autocmd FileType plaintext setlocal spell spelllang=en_us}} into your {{ic|~/.vimrc}} or {{ic|/etc/vimrc}}, and then restart Vim.}}<br />
<br />
===Syntax highlighting===<br />
<br />
To enable syntax highlighting (Vim supports a huge list of programming languages):<br />
<br />
:filetype plugin on<br />
:syntax on<br />
<br />
===Using the mouse===<br />
<br />
Vim has the ability to make use of the mouse, but requires xterm's mouse reporting feature.<br />
<br />
# See the example .vimrc below to enable the mouse.<br />
# Use xterm. In your console: {{ic|1=export TERM=xterm-256color}} or {{ic|1=export TERM=xterm}}<br />
<br />
Notes:<br />
* This even works in PuTTY over SSH.<br />
* In PuTTY, the normal highlight/copy behaviour is changed because Vim enters visual mode when the mouse is used. To select text with the mouse normally, hold down the {{keypress|Shift}} key while selecting text.<br />
<br />
===Traverse line breaks with arrow keys===<br />
<br />
By default, pressing {{keypress|←}} at the beginning of a line, or pressing {{keypress|→}} at the end of a line, will not let the cursor traverse to the previous, or following, line.<br />
<br />
The default behavior can be changed by adding {{ic|1=set whichwrap=b,s,<,>,[,]}} to your {{ic|~/.vimrc}} file.<br />
<br />
=== Example ~/.vimrc ===<br />
<br />
An example [[Vim/.vimrc|Vim configuration]].<br />
<br />
==Merging files (vimdiff)==<br />
<br />
Vim includes a diff editor (a program that can merge differences between two files). vimdiff will open colored windows each showing the content of the file with colored highlights of the differences, line by line. You are left with two modes: the insert one, which let you edit the file, and the screen mode, which let you move around windows and lines. Begin by running {{Ic|vimdiff file1 file2}}. Some example commands are found below:<br />
<br />
;{{keypress|]c}} : next difference<br />
;{{keypress|[c}} : previous difference<br />
;{{keypress|Ctrl+w+w}} : switch windows<br />
;{{keypress|i}} : enter Insert mode<br />
;{{keypress|Esc}} : exit Insert mode<br />
;{{keypress|p}} : paste a line<br />
;{{keypress|do}} : diff obtain. when cursor is on a highlighted difference and changes from other window will move into the current one<br />
;{{keypress|dp}} : diff put. same as diff obtain but will put the changes from current windows into the other one<br />
;{{keypress|zo}} : open folded text<br />
;{{keypress|zc}} : close folded text<br />
;{{keypress|<nowiki>:</nowiki>diffupdate}} : re-scan the files for differences<br />
;{{keypress|yy}} : copy a line<br />
;{{keypress|:wq}} : save and exit the current window<br />
;{{keypress|:wqa}} : save and exit both windows<br />
;{{keypress|:q!}} : exit without saving<br />
<br />
Once your file has been correctly edited taking account changes in file.pacnew:<br />
# mv file file.bck<br />
# mv file.pacnew file<br />
Check if your new file is correct, then remove your backup:<br />
# rm file.bck<br />
<br />
==Vim tips==<br />
<br />
Specific user tricks to accomplish tasks.<br />
<br />
===Line numbers===<br />
<br />
# Show line numbers by {{Ic|:set number}}.<br />
# Jump to line number {{Ic|:<line number>}}.<br />
<br />
===Substitute on lines===<br />
<br />
To only substitute between certain lines:<br />
<br />
:''n'',''n''s/one/two/g<br />
<br />
For example, to replace instances of 'one' with 'two' between lines 3 and 4, one would execute:<br />
<br />
:3,4s/one/two/g<br />
<br />
===Make Vim restore cursor position in files===<br />
<br />
If you want the cursor to appear in its previous position after you open a file, add the following to your {{ic|~/.vimrc}}:<br />
<br />
{{bc|<nowiki><br />
if has("autocmd")<br />
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif<br />
endif<br />
</nowiki>}}<br />
<br />
See also [http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session this] tip in Vim Wiki.<br />
<br />
===Empty space at the bottom of gVim windows===<br />
When using a [[window manager]] configured to ignore window size hints, gVim will fill the non-functional area with the GTK theme background color. <br />
<br />
A solution is to make a more pleasing background color: just put the following lines in {{ic|~/.gtkrc-2.0}}:<br />
<br />
style "vimfix" {<br />
bg[NORMAL] = "#242424" # this matches my gVim theme 'Normal' bg color.<br />
}<br />
widget "vim-main-window.*GtkForm" style "vimfix"<br />
<br />
===Replace vi command with vim===<br />
<br />
Run the following commands:<br />
<br />
# ln -s $(which vim) /usr/local/bin/vi<br />
# ln -s $(which vim) /usr/local/bin/view<br />
<br />
Also see http://superuser.com/questions/27091/vim-to-replace-vi<br />
<br />
==Troubleshooting==<br />
<br />
==="^M"===<br />
There is a "^M" at the end of each line. This usually happens when you are editing a text file which was created in MS-DOS or Windows.<br />
<br />
Solution:<br />
Replace all "^M" using the command:<br />
<br />
{{bc|:%s/^M//g}}<br />
<br />
Pay attention, "^" is the control letter, press {{Keypress|Ctrl+Q}} to get the right "^".<br />
<br />
Alternatively, install the package {{pkg|dos2unix}} from the official repositories, and run {{ic|dos2unix <file name here>}}.<br />
<br />
==See also==<br />
<br />
===Official===<br />
* [http://www.vim.org/ Homepage]<br />
* [http://vimdoc.sourceforge.net/ Documentation]<br />
* [http://vim.wikia.com Tips Wiki]<br />
<br />
===Tutorials===<br />
* [http://usalug.org/vi.html vi Tutorial and Reference Guide]<br />
* [http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html Graphical vi-Vim Cheat Sheet and Tutorial]<br />
* [http://blog.interlinked.org/tutorials/vim_tutorial.html Vim Introduction and Tutorial]<br />
* [http://vim.runpaint.org/ Vim Recipes] - A free cookbook.<br />
* [http://www.openvim.com/ Open Vim] - Collection of Vim learning tools<br />
* [http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ Learn Vim Progressively]<br />
* [http://www.knowvim.com/ know vim]<br />
<br />
====Videos====<br />
* [http://vimcasts.org/ Vimcasts] - Screencasts in .ogg format.<br />
* [http://www.derekwyatt.org/vim/vim-tutorial-videos/vim-novice-tutorial-videos/ Tutorial Videos] - Covering the basics up to advanced topics.<br />
<br />
====Games====<br />
* [http://vim-adventures.com/ Vim Adventures]<br />
* [http://vimgolf.com/ VimGolf]<br />
<br />
===Example configurations===<br />
* [http://nion.modprobe.de/setup/vimrc nion's]<br />
* [http://amix.dk/vim/vimrc.html A detailed configuration from Amir Salihefendic]<br />
* [http://www.jukie.net/~bart/conf/vimrc Bart Trojanowski]<br />
* [https://github.com/spf13/spf13-vim Steve Francia's Vim Distribution]<br />
<br />
===Other===<br />
* [http://www.gentoo-wiki.info/HOWTO_VIM HOWTO Vim] - Gentoo wiki article which this article was based on (author unknown).<br />
* [http://bytefluent.com/vivify/ Vivify] - A ColorScheme Editor for Vim</div>Petaspeedhttps://wiki.archlinux.org/index.php?title=Openbox&diff=252386Openbox2013-03-30T19:33:00Z<p>Petaspeed: /* Urxvt in the background */ link to urxvt page, changed heading</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de: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 />
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) 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 />
<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 />
=== 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 />
If you want have rc.xml separated than your default openbox session rc.xml<br />
<br />
Edit the ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml or (to make the change for all XFCE users) /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml:<br />
Replace the xfwm startup command,<br />
<property name="Client0_Command" type="array"><br />
<value type="string" value="xfwm4"/><br />
</property><br />
with the following:<br />
<property name="Client0_Command" type="array"><br />
<value type="string" value="openbox"/><br />
<value type="string" value="--config-file"/><br />
<value type="string" value="~/.config/xfce4/openbox/rc.xml"/><br />
</property><br />
<br />
and also the menu, you can set the separated menu ex: xfce4-menu.xml , change it to your custom xfce4 rc.xml , but notice that the menu must be place at ~/.config/openbox/<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-git}} 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-git'' 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 />
<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 />
=== XDG-menu ===<br />
The {{Pkg|archlinux-xdg-menu}} package in [[official repositories]] can automatically generate a menu for Openbox from XDG files. For a guide on using XDG-menu, see the [[Xdg-menu#OpenBox]] article.<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 [[#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 generators ===<br />
==== obmenugen ==== <br />
Obmenugen can be installed with the package {{AUR|obmenugen}}, 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 />
==== obmenu-generator ====<br />
Obmenu-generator is a pipe/static menu generator for Openbox with icon support. You can install {{AUR|obmenu-generator}} from AUR. <br />
<br />
The following command generates a pipe menu with icons:<br />
$ obmenu-generator -p -i<br />
To see a list of options type this:<br />
$ obmenu-generator -h<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 [[Nitrogen]], [[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 />
===Window snap behaviour===<br />
Windows 7 and other VMs supports a 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].--> Openbox supports specifying percentages, and [http://openbox.org/wiki/Help:Actions actions]. To simulate Aero Snap:<br />
<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
</nowiki>}}<br />
<br />
The only issue with any methods around, is that once maximized to an edge - it stays full (vertically) until you maximize and restore. So you can add the next few lines to simulate the other windows behaviors (maximize, restore). That will speed up pulling a window from a screen edge as well.<br />
<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
</nowiki>}}<br />
<br />
Then reconfigure Openbox and try it.<br />
<br />
{{ic|openbox --reconfigure}}<br />
<br />
<br />
As an alternative/extension you can use [https://github.com/lawl/opensnap opensnap]. It provides Aero Snap like functionality and resizes windows if you drag them to an edge of the screen. It does not provide keyboard shortcuts however.<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 />
=== Running a terminal emulator as desktop 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 />
The following example shows how to run the terminal emulator [http://en.wikipedia.org/wiki/Rxvt-unicode Urxvt] as desktop background:<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 />
=== Switching between keyboard layouts ===<br />
If you don't want to use a separate program for managing keyboard layouts, you can manually configure X to switch layouts on certain key combinations. See [[Xorg#Switching_between_keyboard_layouts]] for instructions.<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 />
====OSS====<br />
With [[OSS]], you can use keybindings to raise or lower specific mixers. This is useful in cases where you wish to change the volume of a specific application (such as an audio player) without changing the system's volume. Note that the application must be first set up to use its own mixer. In this example, [[MPD]] is [[OSS#Configuring_Applications_for_OSS|configured to have its own mixer]], named {{ic|mpd}}:<br />
{{hc|~/.config/openbox/rc.xml|<nowiki><br />
<keybind key="KEY_BINDING"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
</nowiki>}}<br />
This example decreases the volume of the {{ic|mpd}} mixer by one dB. To increase the volume, replace the mixer value ({{ic|-1}}) with a positive one. The {{ic|--}} that appears after {{ic|ossmix}} are added, as listed in {{ic|ossmix}}'s man page, to prevent any negative value from being treated as an argument.<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 />
=== Windows load behind the active window ===<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|<nowiki><openbox_config></nowiki>}} and {{ic|<nowiki></openbox_config></nowiki>}} tags:<br />
<br />
{{bc|<nowiki><br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
</nowiki>}}<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>Petaspeed