https://wiki.archlinux.org/api.php?action=feedcontributions&user=Tomsik68&feedformat=atomArchWiki - User contributions [en]2024-03-28T09:46:13ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=LDAP_authentication&diff=588606LDAP authentication2019-11-11T12:57:14Z<p>Tomsik68: /* LDAP Server Setup */ Add section about required schemas in slapd.conf</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Authentication]]<br />
[[ja:LDAP 認証]]<br />
{{Related articles start}}<br />
{{Related|OpenLDAP}}<br />
{{Related|LDAP Hosts}}<br />
{{Related articles end}}<br />
<br />
== Introduction and Concepts ==<br />
<br />
This is a guide on how to configure an Arch Linux installation to authenticate against an LDAP directory. This LDAP directory can be either local (installed on the same computer) or network (e.g. in a lab environment where central authentication is desired).<br />
<br />
The guide is divided into two parts. The first part deals with how to setup an [[OpenLDAP]] server that hosts the authentication directory. The second part deals with how to setup the NSS and PAM modules that are required for the authentication scheme to work on the client computers. If you just want to configure Arch to authenticate against an already existing LDAP server, you can skip to the [[#Client_Setup|second part]].<br />
<br />
=== NSS and PAM ===<br />
NSS (which stands for Name Service Switch) is a system mechanism to configure different sources for common configuration databases. For example, {{ic|/etc/passwd}} is a {{ic|file}} type source for the {{ic|passwd}} database.<br />
<br />
[[PAM]] (which stands for Pluggable Authentication Modules) is a mechanism used by Linux (and most *nixes) to extend its authentication schemes based on different plugins.<br />
<br />
So to summarize, we need to configure NSS to use the OpenLDAP server as a source for the {{ic|passwd}}, {{ic|shadow}} and other configuration databases and then configure PAM to use these sources to authenticate its users.<br />
<br />
== LDAP Server Setup ==<br />
<br />
=== Installation ===<br />
<br />
You can read about installation and basic configuration in the [[OpenLDAP]] article. After you have completed that, return here.<br />
<br />
=== Include required schemas ===<br />
<br />
To be able to use the {{ic|posixAccount}} object class used for storing users in LDAP, make sure to include the following schemas in {{ic|/etc/openldap/slapd.conf}}.<br />
{{hc|slapd.conf|2=<br />
include /etc/openldap/schema/cosine.schema<br />
include /etc/openldap/schema/inetorgperson.schema<br />
include /etc/openldap/schema/nis.schema<br />
}}<br />
<br />
=== Set up access controls ===<br />
<br />
To make sure that no-one can read the (encrypted) passwords from the LDAP server, but still allowing users to edit some of their own select attributes (such as own password and photo), add the following to {{ic|/etc/openldap/slapd.conf}} and restart {{ic|slapd.service}} afterwards:<br />
{{note|Alter the domain components "example" and "org" to your needs}}<br />
<br />
{{hc|slapd.conf|2=<br />
access to attrs=userPassword,givenName,sn,photo<br />
by self write<br />
by anonymous auth<br />
by dn.base="cn=Manager,dc=example,dc=org" write<br />
by * none<br />
<br />
access to *<br />
by self read <br />
by dn.base="cn=Manager,dc=example,dc=org" write<br />
by * read<br />
<br />
}}<br />
<br />
=== Populate LDAP Tree with Base Data ===<br />
<br />
Create a temporary file called {{ic|base.ldif}} with the following text.<br />
<br />
{{hc|base.ldif|<nowiki><br />
# example.org<br />
dn: dc=example,dc=org<br />
dc: example<br />
o: Example Organization<br />
objectClass: dcObject<br />
objectClass: organization<br />
<br />
# Manager, example.org<br />
dn: cn=Manager,dc=example,dc=org<br />
cn: Manager<br />
description: LDAP administrator<br />
objectClass: organizationalRole<br />
objectClass: top<br />
roleOccupant: dc=example,dc=org<br />
<br />
# People, example.org<br />
dn: ou=People,dc=example,dc=org<br />
ou: People<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
<br />
# Groups, example.org<br />
dn: ou=Group,dc=example,dc=org<br />
ou: Group<br />
objectClass: top<br />
objectClass: organizationalUnit<br />
</nowiki>}}<br />
<br />
Add it to your OpenLDAP tree:<br />
<br />
$ ldapadd -D "cn=Manager,dc=example,dc=org" -W -f base.ldif<br />
<br />
Test to make sure the data was imported:<br />
<br />
$ ldapsearch -x -b 'dc=example,dc=org' '(objectclass=*)'<br />
<br />
=== Adding users ===<br />
To manually add a user, create an {{ic|.ldif}} file like this:<br />
{{hc|user_joe.ldif|<nowiki><br />
dn: uid=johndoe,ou=People,dc=example,dc=org<br />
objectClass: top<br />
objectClass: person<br />
objectClass: organizationalPerson<br />
objectClass: inetOrgPerson<br />
objectClass: posixAccount<br />
objectClass: shadowAccount<br />
uid: johndoe<br />
cn: John Doe<br />
sn: Doe<br />
givenName: John<br />
title: Guinea Pig<br />
telephoneNumber: +0 000 000 0000<br />
mobile: +0 000 000 0000<br />
postalAddress: AddressLine1$AddressLine2$AddressLine3<br />
userPassword: {CRYPT}xxxxxxxxxx<br />
labeledURI: https://archlinux.org/<br />
loginShell: /bin/bash<br />
uidNumber: 9999<br />
gidNumber: 9999<br />
homeDirectory: /home/johndoe/<br />
description: This is an example user<br />
</nowiki>}}<br />
<br />
The {{ic|xxxxxxxxxx}} in the {{ic|userPassword}} entry should be replaced with the value in {{ic|/etc/shadow}} or use the {{ic|slappasswd}} command. Now add the user:<br />
<br />
$ ldapadd -D "cn=Manager,dc=example,dc=org" -W -f user_joe.ldif<br />
<br />
{{Note|You can automatically migrate all of your local accounts (and groups, etc.) to the LDAP directory using PADL Software's [http://www.padl.com/OSS/MigrationTools.html Migration Tools].}}<br />
<br />
== Client Setup ==<br />
<br />
Install the OpenLDAP client as described in [[OpenLDAP]]. Make sure you can query the server with {{ic|ldapsearch}}.<br />
<br />
Next, [[install]] the {{pkg|nss-pam-ldapd}} package.<br />
<br />
=== NSS Configuration ===<br />
NSS is a system facility which manages different sources as configuration databases. For example, {{ic|/etc/passwd}} is a {{ic|file}} type source for the {{ic|passwd}} database, which stores the user accounts.<br />
<br />
Edit {{ic|/etc/nsswitch.conf}} which is the central configuration file for NSS. It tells NSS which sources to use for which system databases. We need to add the {{ic|ldap}} directive to the {{ic|passwd}}, {{ic|group}} and {{ic|shadow}} databases, so be sure your file looks like this:<br />
<br />
passwd: files ldap<br />
group: files ldap<br />
shadow: files ldap<br />
<br />
Edit {{ic|/etc/nslcd.conf}} and change the {{ic|base}} and {{ic|uri}} lines to fit your ldap server setup.<br />
<br />
Start {{ic|nslcd.service}} using systemd.<br />
<br />
You now should see your LDAP users when running {{ic|getent passwd}} on the client.<br />
<br />
=== PAM Configuration ===<br />
The basic rule of thumb for PAM configuration is to include {{ic|pam_ldap.so}} wherever {{ic|pam_unix.so}} is included. Arch moving to {{pkg|pambase}} has helped decrease the amount of edits required. For more details about configuring pam, the [https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Smart_Cards/PAM_Configuration_Files.html RedHat Documentation] is quite good. You might also want the upstream documentation for [http://arthurdejong.org/nss-pam-ldapd nss-pam-ldapd].<br />
<br />
{{Tip|If you want to prevent UID clashes with local users on your system, you might want to include {{ic|minimum_uid&#61;10000}} or similar on the end of the {{ic|pam_ldap.so}} lines. You will have to make sure the LDAP server returns uidNumber fields that match the restriction.}}<br />
<br />
{{Note|Each facility (auth, session, password, account) forms a separate chain and the order matters. Sufficient lines will sometimes "short circuit" and skip the rest of the section, so the rule of thumb for ''auth'', ''password'', and ''account'' is ''sufficient'' lines before ''required'', but after required lines for the ''session'' section; ''optional'' can almost always go at the end. When adding your {{ic|pam_ldap.so}} lines, do not change the relative order of the other lines without good reason! Simply insert LDAP within the chain.}}<br />
<br />
First edit {{ic|/etc/pam.d/system-auth}}. This file is included in most of the other files in {{ic|pam.d}}, so changes here propagate nicely. Updates to {{pkg|pambase}} may change this file.<br />
<br />
Make {{ic|pam_ldap.so}} sufficient at the top of each section, except in the ''session'' section, where we make it optional.<br />
{{hc|/etc/pam.d/system-auth|<br />
'''auth sufficient pam_ldap.so'''<br />
auth required pam_unix.so try_first_pass nullok<br />
auth optional pam_permit.so<br />
auth required pam_env.so<br />
<br />
'''account sufficient pam_ldap.so'''<br />
account required pam_unix.so<br />
account optional pam_permit.so<br />
account required pam_time.so<br />
<br />
'''password sufficient pam_ldap.so'''<br />
password required pam_unix.so try_first_pass nullok sha512 shadow<br />
password optional pam_permit.so<br />
<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
'''session optional pam_ldap.so'''<br />
session optional pam_permit.so<br />
}}<br />
<br />
Then edit both {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}} identically. The {{ic|su-l}} file is used when the user runs {{ic|su --login}}.<br />
<br />
Make {{ic|pam_ldap.so}} sufficient at the top of each section but below {{ic|pam_rootok}}, and add {{ic|use_first_pass}} to {{ic|pam_unix}} in the ''auth'' section.<br />
{{hc|/etc/pam.d/su|<br />
#%PAM-1.0<br />
auth sufficient pam_rootok.so<br />
'''auth sufficient pam_ldap.so'''<br />
# Uncomment the following line to implicitly trust users in the "wheel" group.<br />
#auth sufficient pam_wheel.so trust use_uid<br />
# Uncomment the following line to require a user to be in the "wheel" group.<br />
#auth required pam_wheel.so use_uid<br />
auth required pam_unix.so '''use_first_pass'''<br />
'''account sufficient pam_ldap.so'''<br />
account required pam_unix.so<br />
'''session sufficient pam_ldap.so'''<br />
session required pam_unix.so<br />
}}<br />
<br />
To enable users to edit their password, edit {{ic|/etc/pam.d/passwd}}:<br />
<br />
{{hc|/etc/pam.d/passwd|2=<br />
#%PAM-1.0<br />
'''password sufficient pam_ldap.so'''<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
}}<br />
<br />
==== Create home folders at login ====<br />
<br />
If you want home folders to be created at login (eg: if you are not using NFS to store home folders), edit {{ic|/etc/pam.d/system-login}} and add {{ic|pam_mkhomedir.so}} to the ''session'' section above any "sufficient" items. This will cause home folder creation when logging in at a tty, from ssh, xdm, kdm, gdm, etc. You might choose to edit additional files in the same way, such as {{ic|/etc/pam.d/su}} and {{ic|/etc/pam.d/su-l}} to enable it for {{ic|su}} and {{ic|su --login}}. If you do not want to do this for ssh logins, edit {{ic|system-local-login}} instead of {{ic|system-login}}, etc.<br />
<br />
{{hc|/etc/pam.d/system-login|<br />
...top of file not shown...<br />
session optional pam_loginuid.so<br />
session include system-auth<br />
session optional pam_motd.so motd&#61;/etc/motd<br />
session optional pam_mail.so dir&#61;/var/spool/mail standard quiet<br />
-session optional pam_systemd.so<br />
session required pam_env.so<br />
'''session required pam_mkhomedir.so skel&#61;/etc/skel umask&#61;0022'''<br />
}}<br />
<br />
{{hc|/etc/pam.d/su-l|<br />
...top of file not shown...<br />
'''session required pam_mkhomedir.so skel&#61;/etc/skel umask&#61;0022'''<br />
session sufficient pam_ldap.so<br />
session required pam_unix.so<br />
}}<br />
<br />
==== Enable sudo ====<br />
<br />
To enable sudo from an LDAP user, edit {{ic|/etc/pam.d/sudo}}. You will also need to modify sudoers accordingly.<br />
{{hc|/etc/pam.d/sudo|<br />
#%PAM-1.0<br />
'''auth sufficient pam_ldap.so'''<br />
auth required pam_unix.so '''try_first_pass'''<br />
auth required pam_nologin.so<br />
}}<br />
<br />
You will also need to add in {{ic|/etc/openldap/ldap.conf}} the following.<br />
{{hc|/etc/openldap/ldap.conf|2=<br />
sudoers_base ou=sudoers,dc=AFOLA<br />
}}<br />
<br />
== Online and Offline Authentication with SSSD ==<br />
<br />
SSSD is a system daemon. Its primary function is to provide access to identity and authentication remote resource through a common framework that can provide caching and offline support to the system. It provides PAM and NSS modules, and in the future will D-BUS based interfaces for extended user information. It provides also a better database to store local users as well as extended user data.<br />
<br />
=== General Package Details ===<br />
<br />
[[Install]] the {{pkg|sssd}} package.<br />
<br />
=== How to enable SSSD for basic Authentication ===<br />
<br />
==== 1. SSSD Configuration ====<br />
<br />
If it does not exist create {{ic|/etc/sssd/sssd.conf}}.<br />
{{hc|/etc/sssd/sssd.conf|2=<br />
[sssd]<br />
config_file_version = 2<br />
services = nss, pam<br />
domains = LDAP<br />
<br />
[domain/LDAP]<br />
cache_credentials = true<br />
enumerate = true<br />
<br />
id_provider = ldap<br />
auth_provider = ldap<br />
<br />
ldap_uri = ldap://server1.example.org, ldap://server2.example.org<br />
ldap_search_base = dc=example,dc=org<br />
ldap_id_use_start_tls = true<br />
ldap_tls_reqcert = demand<br />
ldap_tls_cacert = /etc/openldap/certs/cacerts.pem<br />
chpass_provider = ldap<br />
ldap_chpass_uri = ldap://server1.example.org<br />
entry_cache_timeout = 600<br />
ldap_network_timeout = 2<br />
ldap_group_member = uniquemember<br />
}}<br />
<br />
The above is an example only. See {{man|5|sssd.conf}} for the full details.<br />
<br />
Finally set the file permissions {{ic|chmod 600 /etc/sssd/sssd.conf}} otherwise sssd will fail to start.<br />
<br />
==== 2. NSCD Configuration ====<br />
<br />
Disable caching for passwd, group and netgroup entries in {{ic|/etc/nscd.conf}} as it will interfere with sssd caching.<br />
<br />
Keep caching enabled for hosts entries otherwise some services may fail to start.<br />
{{hc|/etc/nscd.conf|<br />
# Begin /etc/nscd.conf<br />
''[...]''<br />
enable-cache passwd '''no'''<br />
''[...]''<br />
enable-cache group '''no'''<br />
''[...]''<br />
enable-cache hosts yes<br />
''[...]''<br />
enable-cache netgroup '''no'''<br />
''[...]''<br />
# End /etc/nscd.conf<br />
}}<br />
<br />
==== 3. NSS Configuration ====<br />
<br />
Edit {{ic|/etc/nsswitch.conf}} as follows.<br />
{{hc|/etc/nsswitch.conf|<br />
# Begin /etc/nsswitch.conf<br />
<br />
passwd: files '''sss'''<br />
group: files '''sss'''<br />
shadow: files '''sss'''<br />
'''sudoers: files sss'''<br />
<br />
publickey: files<br />
<br />
hosts: files dns myhostname<br />
networks: files<br />
<br />
protocols: files<br />
services: files<br />
ethers: files<br />
rpc: files<br />
<br />
netgroup: files<br />
<br />
# End /etc/nsswitch.conf<br />
}}<br />
<br />
==== 4. PAM Configuration ====<br />
<br />
The first step is to edit {{ic|/etc/pam.d/system-auth}} as follows.<br />
{{hc|/etc/pam.d/system-auth|2=<br />
#%PAM-1.0<br />
<br />
'''auth sufficient pam_sss.so forward_pass'''<br />
auth required pam_unix.so try_first_pass nullok<br />
auth optional pam_permit.so<br />
auth required pam_env.so<br />
<br />
'''account [default=bad success=ok user_unknown=ignore authinfo_unavail=ignore] pam_sss.so'''<br />
account required pam_unix.so<br />
account optional pam_permit.so<br />
account required pam_time.so<br />
<br />
'''password sufficient pam_sss.so use_authtok'''<br />
password required pam_unix.so try_first_pass nullok sha512 shadow<br />
password optional pam_permit.so<br />
<br />
'''session required pam_mkhomedir.so skel=/etc/skel/ umask=0077'''<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
'''session optional pam_sss.so'''<br />
session optional pam_permit.so<br />
}}<br />
<br />
These PAM changes will apply to fresh login. To also allow the {{ic|su}} command to authenticate through SSSD, edit {{ic|/etc/pam.d/su}}:<br />
<br />
{{hc|/etc/pam.d/su|2=<br />
#%PAM-1.0<br />
auth sufficient pam_rootok.so<br />
<br />
'''auth sufficient pam_sss.so forward_pass'''<br />
auth required pam_unix.so<br />
<br />
'''account [default=bad success=ok user_unknown=ignore authinfo_unavail=ignore] pam_sss.so'''<br />
account required pam_unix.so<br />
<br />
session required pam_unix.so<br />
'''session optional pam_sss.so'''<br />
}}<br />
<br />
===== 1. SUDO Configuration =====<br />
<br />
Edit {{ic|/etc/pam.d/sudo}} as follows.<br />
{{hc|/etc/pam.d/sudo|<br />
#%PAM-1.0<br />
'''auth sufficient pam_sss.so'''<br />
auth required pam_unix.so try_first_pass<br />
auth required pam_nologin.so<br />
}}<br />
<br />
===== 2. Password Management =====<br />
<br />
In order to enable users to change their passwords using {{ic|passwd}} edit {{ic|/etc/pam.d/passwd}} as follows.<br />
{{hc|/etc/pam.d/passwd|2=<br />
#%PAM-1.0<br />
'''password sufficient pam_sss.so'''<br />
#password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3<br />
#password required pam_unix.so sha512 shadow use_authtok<br />
password required pam_unix.so sha512 shadow nullok<br />
}}<br />
<br />
[[Start/enable]] the {{ic|sssd.service}} systemd unit.<br />
<br />
You should now be able to see details of your ldap users with {{ic|getent passwd <username>}} or {{ic|id <username>}}.<br />
<br />
Once you have logged in with a user the credentials will be cached and you will be able to login using the cached credentials when the ldap server is offline or unavailable.<br />
<br />
== Resources ==<br />
* [http://arthurdejong.org/nss-pam-ldapd/setup The official page of the nss-pam-ldapd packet]<br />
* [[debian:LDAP/NSS|Debian Wiki - LDAP/NSS]]<br />
* [[debian:LDAP/PAM|Debian Wiki - LDAP/PAM]]<br />
* [https://www.fatofthelan.com/technical/using-ldap-for-single-authentication/ Using LDAP for single authentication]<br />
* [http://www.cs.dixie.edu/ldap/ Heterogeneous Network Authentication Introduction]<br />
* [http://readlist.com/lists/suse.com/suse-linux-e/36/182642.html Discussion on suse's mailing lists about nss-pam-ldapd]<br />
* [https://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/chap-SSSD_User_Guide-Introduction.html Fedora's SSSD User Guide]</div>Tomsik68https://wiki.archlinux.org/index.php?title=Laptop/Dell&diff=469095Laptop/Dell2017-02-25T09:31:39Z<p>Tomsik68: Add Inspiron 15 7000 Series (Model 7566)</p>
<hr />
<div>[[Category:Dell]]<br />
{{Laptops navigation}}<br />
<br><br />
== Inspiron ==<br />
{{HCL/Laptops table header}}<br />
| Inspiron 1300 || Don't Panic (Core Dump version) || 3D with {{Pkg|xf86-video-intel}} || Intel || ''b44'' module works out-of-the-box || BCM4318-based card, works with [[ndiswrapper]] || N/A || Untested || Untested || -- || Everything works out-of-the-box except wireless and sometimes screen resolution<br />
|- <br />
| Inspiron 1420 || 2012.09 || 3D with {{Pkg|xf86-video-nouveau}} || Intel HD Audio with ALSA || Yes || Yes, {{AUR|broadcom-wl}} needed from the AUR || Untested || Untested || Untested || Untested || Everything that I have tested works great without any problems<br />
|-<br />
| Inspiron 1501 || Duke || 3D with proprietary ATI fglrx || Intel HD audio with ALSA || Yes || Yes, BCM4311 PCI-E with bcm43xx || N/A || Untested || Untested || Smart card reader works out-of-the-box || Everything else works without a hitch<br />
|-<br />
| Inspiron 1520 || Core Dump || 3D with NVIDIA || SigmaTel audio with ALSA || ''b44'' module, out of the box || ''b43'', need firmware || Yes || Both hibernate and suspend-to-RAM and works with [[pm-utils]] || Untested || Hot keys work out-of-the-box || Everything else works without a hitch<br />
|-<br />
| [[Dell Inspiron 1525|Inspiron 1525]] || Arch Linux 2008.06 - "Overlord" FTP Install || 3D with {{Pkg|xf86-video-intel}} 2.4.3, native resolution with {{Pkg|xorg-server}} 1.5.3 (1280x800) || Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || PRO/Wireless 3945ABG with ''iwlwifi-3945-ucode'' 15.28.2.8 || Untested (does not have) || Untested || Untested || SD card reader works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS. Everything else work out-of-the-box.<br />
|- <br />
| Inspiron 1525 || Core Dump (2008.03 ISO) || 3D with {{Pkg|xf86-video-intel}} 2.2, native resolution with {{Pkg|xorg-server}} 1.4 (1280x800)|| Intel HD Audio (SigmaTel STAC9228 codec) with ALSA || Marvell Yukon Gb Ethernet: Yes (''sky2'' module) || Broadcom BCM4310: Yes, [[ndiswrapper]] ([[AUR]] {{AUR|broadcom-wl}} works, but must blacklist {{ic|ssb}} module) || Untested (does not have) || Untested || Untested || SD card reader (Ricoh) works out-of-the-box || {{ic|Fn+Up/Down}} (LCD brightness control) works independently of the OS; media keys configured with KeyTouch. DVD-RW drive and everything else work out-of-the-box.<br />
|- <br />
| [[Dell Inspiron 1564|Inspiron 1564]] || Core Dump || 3D with either [[Catalyst]] or [[ATI|xf86-video-ati]]; both work flawlessly. || Intel HD Audio with ALSA || Realtek RTL8101E Ethernet Controller || Intel WiFi Link 5100 with ''iwlagn'' driver || Untested || Both suspend and hibernate work flawlessly with [[pm-utils]] || Untested || Realtek card reader works out-of-the-box. LCD brightness works out-of-the-box; volume keys need configuring through key bindings. || Overall, this laptop is Linux friendly.<br />
|- <br />
| Inspiron 1764 || 2011.08.19 || 3D with {{Pkg|xf86-video-intel}} || Works well with ALSA || Realtek RTL8101E 10/100 Ethernet Controller || [[Broadcom wireless|Broadcom BCM43224]] 802.11a/b/g/n works well with [[Broadcom_wireless#brcmsmac.2Fbrcmfmac|brcmsmac]]{{Broken section link}} || Untested || Untested || Does not have a modem || SD card reader and LCD brightness {{ic|Fn}} keys work out-of-the-box || Fan control/monitoring is completely broken with {{AUR|i8kutils}}<br />
|-<br />
| [[Dell Inspiron 14 3420|Inspiron 14 3000 Series (Model 3420)]] || 2016.09.03 || Intel® HD Graphics 4000. Works out of the box with {{Pkg|xf86-video-intel}}. || Works well with {{Pkg|alsa-utils}}. || Yes, works out of the box || Yes, with {{AUR|broadcom-wl}} || Untested || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No || Synaptics touchpad work flawlessly. Wifi on/off and brightness ''Fn keys'' work flawlessly. Webcam and integrated microphone work. || Volume up / down and player control buttons need configuring through key bindings to work.<br />
|-<br />
| [[Dell Inspiron 15 3541|Inspiron 15 3000 Series (Model 3541)]] || 2016.01.01<br />
|-<br />
| [[Dell Inspiron 5547|Inspiron 15 5000 Series (Model 5547)]] || 2016.01.25 || Hybrid graphics/AMD Radeon R7 M260/M265, Please read [[Hybrid graphics#Dynamic Switching Model]]. This has not be tested yet.|| Works with Intel HD Audio and [[PulseAudio]], but need to configure [[PulseAudio/Troubleshooting#Microphone_not_detected_by_PulseAudio|microphone]] || Yes || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM untested. Hibernate untested. Disk spindown untested. || No modem || HDMI work, need configuration to swith between monitor. The touchpad work properly, but just test the basics || Webcam works, SD card reader untested<br />
|-<br />
| Inspiron 15 7000 Series (Model 7537) || 2016.06.01 || Intel® HD Graphics 4400. Works out of the box with {{Pkg|xf86-video-intel}}. || Intel HD Audio. Works out of the box. || Yes RJ45 Ethernet || Intel 7260N or 7260AC, Works out of the box with iwlwifi. || Yes, works out of the box. || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown untested. || No modem || HDMI perfect. The touchpad works with minimal configuration. || Volume up / down button needs some modifying to work all other buttons work with drivers that come with the kernel. ACPI battery is not detected on bootup and requires you to plug in and out the AC adapter.<br />
|-<br />
| Inspiron 15 7000 Series (Model 7548) || 2015.05 || AMD Radeon® R7 M270 || Untested || N/A || Yes, works out of the box || Yes, works out of the box || Suspend-to-RAM perfect. Hibernate untested. Disk spindown untested. || No modem || HDMI is currently untested. The touchpad (clickpad) needs some tweaking to work properly. If the kernel [https://bbs.archlinux.org/viewtopic.php?id=200763 panics] during bootup replace the 'keyboard'-hook with the specifc module.|| Webcam works, SD card reader untested<br />
|-<br />
| Inspiron 15 7000 Series (Model 7566) || 2016.12 || Hybrid graphics NVIDIA GM107M(GeForce GTX960M)({{Pkg|nvidia}}) + Intel HD Graphics 530 ({{Pkg|xf86-video-intel}}) via [[Bumblebee]] || Intel HD Audio. Works out of the box. || Yes. || Yes, works out of the box || Yes || Suspend-to-RAM works. Otherwise untested. || No modem || HDMI has issues connecting monitor after turning laptop on. If monitor is connected before, there's no problem.(might be caused by bad config) || Webcam works, SD card reader works, ACPI battery detection works<br />
|-<br />
| Inspiron M5030 || Any || [[ATI]] works fine, [[catalyst]] untested || Yes, works out of the box || Yes || Yes, works out of the box || N/A || Untested || N/A || Everything works alright, and out of the box. || {{AUR|i8kutils}} required for fan control<br />
|-<br />
| Inspiron Duo 1090 (hybrid touchscreen netbook/tablet) || 2014.10.01 || Intel Atom Integrated VGA graphics controller. Software 3D, works out-of-the-box (1366x768). || Intel HD Audio with ALSA || No. || Yes, Qualcomm Atheros (ath9k) || Untested || Suspend-to-RAM works flawlessly. Hibernate untested. || No. || eGalax touchscreen and Synaptics touchpad work flawlessly. All function keys (Power manager, Wifi on/off, touchpad on/off, brightness and audio up/down work flawlessly. Webcam and integrated microphone work. || Audio out works, no standard audio-in or video out ports. USB audio-in and USB video-out untested. <br />
|-<br />
| Inspiron E1405 || Any || 3D with {{Pkg|xf86-video-intel}} 2.0, native resolution with {{Pkg|xorg-server}} 1.3 (1440x900) || Intel HD Audio with [[ALSA]] || Yes || Yes, ipw3945 || Yes || Suspend-to-RAM is shaky; hibernate is flawless || Untested || SD card reader works out-of-the-box || Everything else works without a hitch<br />
|-<br />
! rowspan="2" | Model version<br />
! rowspan="2" | Arch Linux Install CD version<br />
! Video <br />
! Sound<br />
! Ethernet<br />
! Wireless<br />
! Bluetooth<br />
! Power management<br />
! Modem<br />
! Other<br />
! rowspan="2" | Remarks<br />
|-<br />
! colspan="8" | Hardware support<br />
|}<br />
<br />
== Latitude ==<br />
{{HCL/Laptops table header}}<br />
| Latitude D420 || Duke || {{Pkg|xf86-video-intel}}, native resolution with {{Pkg|xorg-server}} 1.2 (1280x800) || Intel HD Audio with ALSA || Yes (with tg3) || Yes (with ipw3945) || N/A || || Untested || Have not tested SD card reader || External D-Bay DVD/CD-RW works, docking station mostly works (can un-dock, but locks up on re-docking)<br />
|-<br />
| Latitude D620 || Duke || 3D with NVIDIA, native resolution with {{Pkg|xorg-server}} 1.2 (1440x900)<br> 3D with Intel 945GM, native resolution 1440x900 || Intel HD Audio with ALSA || Yes || Yes, bcm4311 PCI-E with bcm43xx. Yes for some models with iwl3945. || N/A || Suspend-to-RAM perfect, hibernate works fine. || Untested || not tested smart card reader || Everything else works without a hitch<br />
|-<br />
| Latitude D820 || Duke || 3D with NVIDIA drivers || Intel HD Audio with ALSA || Yes || Yes, IPW3945 || Yes || Suspending with [[KDE]] works || Untested || Everything works, even fingerprint reader with ''bioapi'' and ''pam_bioapi'' || Everything else works without a hitch<br />
|-<br />
| Latitude D830 || Don't Panic (2007.08-2) || NVIDIA Quadro NVS 140M with proprietary NVIDIA drivers || ALSA with the {{ic|snd_hda_intel}} module || Yes, with {{ic|tg3}} module || Yes, with {{ic|iwl3965}} module || Yes || Yes, with [[pm-utils]] || Untested || ||<br />
|-<br />
| [[Latitude E5540]] || 2016.02.01 || Haswell-ULT Integrated + GeForce GT 720M using {{Pkg|nvidia}} || Haswell-ULT HD Audio || Yes, e1000e || Yes, Atheros AR9485 || Untested || Untested || No modem || Dock works find (DisplayPort expander, ethernet, USB || Everything seems to work without problems<br />
|-<br />
| Latitude E6420 || 2011.08.19 || Intel HD3000 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes, e1000e || Yes, bcma-pci-bridge || Untested || Suspend-to-RAM good, hibernate not working || No modem || SD card reader works out-of-the-box, smart card reader works with ccid, opensc, pcsc-tools. Touchpad (alps a10) pointer aspens by default, install {{AUR|psmouse-elantech}}{{Broken package link|{{aur-mirror|psmouse-elantech}}}} from the [[AUR]] to fix it ({{AUR|psmouse-alps}}{{Broken package link|{{aur-mirror|psmouse-alps}}}} does not work anymore) || Ethernet was not working in fresh installation, had to clone repositories to HDD and update<br />
|-<br />
| Latitude E6530 || 2014.10.01 || NVIDIA NVS5200 3D works flawlessly with either {{Pkg|nvidia}} or {{Pkg|xf86-video-nouveau}} (1600x900). || Intel HD Audio with ALSA || Yes || Intel Centrino A-N (with iwlwifi) || Flawless. File transfer and Audio streaming works || Suspend-to-RAM perfect. Hibernate perfect. Disk spindown perfect. || Untested || SD card reader, ALPS touchpad with gestures, and Webcam work flawlessly. Integrated and external microphone ports work flawlessly. Backlit keyboard, monitor backlight, audio up/down/mute controls all work flawlessly. || HDMI video works but must disable Optimus in bios. HDMI audio out works. If Optimus enabled, Intel HD4000 will be used and optirun works. Prevents use of HDMI (VGA only) but otherwise works.<br />
|-<br />
| [http://www.dell.com/us/business/p/latitude-e7450-ultrabook/pd?oc=cal147w7pf2 Latitude E7450] || [https://www.archlinux.org/releng/releases/2016.03.01/ 2016.03.01] || Intel HD5500 {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || Yes || Intel Wireless 7265 || BT 4.0 LE, untested || Suspend-to-RAM perfect, Hibernate does not work. SSD drive (no spindown) || No. || SD card reader. Synaptics touchpad + stick. Webcam works without problems. Backlit keyboard. Integrated mic works. FN-keys works once you set them up (lock, volume, monitor, search, sleep, backlight). RFID reader. Fingerprint reader. Get about 9h batterylife. Intel i7 CPU, 16GB RAM. || Monitor backlight does not work out of the box. Need to be set up with some scripts. A distinct static clicking can be heard when using headphones about every second (turning up the volume drowns out the noise)<br />
|-<br />
| Latitude E7470 || 2017.01.01 || || || yes || yes || || [[pm-utils]] suspend-to-RAM works, hibernate works || || [[EFISTUB]] bootmanager does not work because it seems impossible to pass kernel parameters. Not via [[efibootmgr]], nor [[UEFI]] shell bcfg, nor the built-in gui. All ports of the docking station (PR03X) work. ||<br />
|-<br />
| [[Dell Latitude E7270 | Latitude E7270]] || 2017.01.01 || {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA and Pulseaudio || yes || yes (IWL 8260) || untested || suspend-to-RAM after UEFI Update, hibernate works || Yes, working without runtime pm || || High suspend usage with power share port active<br />
|- }<br />
<br />
== Precision ==<br />
{{HCL/Laptops table header}}<br />
| Precision M4800 || 2014.04.01 || System not usable if booted without kernel parameter {{ic|nomodeset}}. Nvidia Quadro K2100M works with {{Pkg|nvidia}}, but [[Nouveau]] does not work because it requires KMS. || Untested || Yes || Yes || Untested || Untested || No modem || N/A || {{ic|nomodeset}} is ''required'' to boot to a usable system, both with the Arch installation media and post-installation.<br />
|}<br />
<br />
== Studio ==<br />
{{HCL/Laptops table header}}<br />
| Studio 1749 || 2013.01.04 || Radeon HD 5650M, {{ic|xf86-video-ati}} is almost flawless (just slower 3D), {{ic|catalyst}} is faster but has various issues. || HDA Intel MID, works with ALSA after adding {{ic|1=options snd-hda-intel index=0 model=dell-m6-dmic}} to {{ic|/etc/modprobe.d/alsa-base.conf}}. HDMI audio has some issues. || Yes || BCM43224, brcmsmac and {{AUR|broadcom-wl}} both work || N/A || Suspend works; hibernate untested. || N/A || SD card reader works, media keys work, web cam, and microphone both work. || Flawless except for poor 3D performance and battery life.<br />
|-<br />
| Studio XPS M1640 || (2009.08) || ATI HD4670 Mobile works with {{Pkg|xf86-video-ati}} (see the forums for 3D support); Catalyst drivers untested || Works with Intel HD Audio and ALSA. || Yes || Works with iwlagn || Bluetooth works || Works but when using {{Pkg|xf86-video-ati}}, there is video corruption upon boot || N/A || Web cam works, media keys work with the {{ic|dell_laptop}} kernel module, IR works, card reader works || Everything basically worked out-of-the-box<br />
|}<br />
<br />
<br />
== XPS ==<br />
{{HCL/Laptops table header}}<br />
| XPS L322 || 2013_03 || Intel HD 4000, with {{Pkg|xf86-video-intel}} || Intel HD Audio with ALSA || No Ethernet port || Yes || Untested || Yes || No modem || No SD card slot || ALPS Touchpad recognized only as PS/2 mouse, two-finger scroll, finger tap-to-click, etc... does not work. Some new mouse drivers suggest a fix but have not worked.<br />
|-<br />
| XPS M1210 || Duke || 3D with NVIDIA open source drivers || SigmaTel audio with ALSA || ''b44'' module, out-of-the-box || IPW 3945, command-line {{Pkg|wireless_tools}} || Untested || Untested || Untested || rico card reader worked out-of-the-box, hot keys using keytouch, web cam works but is unstable. In [[MPlayer]], use {{ic|1=driver=v4l2:device=/dev/video0}} || Everything else works without a hitch<br />
|-<br />
| [[Dell XPS M1330|XPS M1330]] || Don't Panic (2007.08-2) || For dedicated graphics (NVIDIA 8400m) works with NVIDIA package || Works with Intel HD Audio and ALSA, but need to configure microphone || Yes || Works with iwl4965 || Can set Bluetooth but have not tested with any devices || Suspend works fine with [[pm-utils]] (''acpi_cpufreq'' problem: [https://bbs.archlinux.org/viewtopic.php?id=44500 see forums]) || Untested || 2.0 MP web cam works with ''uvcvideo'', media keys work with keytouch or esekeyd, IR remote works, SD card works || Everything basically worked out-of-the-box except the microphone<br />
|-<br />
| [[Dell XPS 13 (9333)|XPS 13 (9333)]] || --- || --- || --- || --- || --- || --- || --- || --- || --- || --- ||<br />
|-<br />
| [[Dell XPS 13 (9343)|XPS 13 (9343)]] || --- || --- || --- || --- || --- || --- || --- || --- || --- || --- ||<br />
|-<br />
| [[Dell XPS 13 (9350)|XPS 13 (9350)]] || --- || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || --- || --- || --- || Everything basically works out-of-the-box with a reasonably up-to-date kernel. ||<br />
|-<br />
| [[Dell XPS 13 (9360)|XPS 13 (9360)]] || --- || Yes || Yes || Yes || Yes, after firmware update || Yes (Suspend and Hibernate) || --- || --- || --- || Everything basically works out-of-the-box with a reasonably up-to-date kernel. ||<br />
|-<br />
| [[Dell XPS 15]] || --- || Intel HD 530 works with [https://www.archlinux.org/packages/?name=xf86-video-intel i915] and GTX 960M works with [https://www.archlinux.org/packages/?name=nvidia nvidia] || Yes || No Ethernet Port || Yes || Untested || Yes || No Modem || --- || Everything basically works out-of-the-box with a reasonably up-to-date kernel. ||</div>Tomsik68https://wiki.archlinux.org/index.php?title=Lemonbar&diff=469093Lemonbar2017-02-25T08:45:12Z<p>Tomsik68: add xft fonts and font-awesome section</p>
<hr />
<div>[[Category:Eye candy]]<br />
[[ja:Lemonbar]]<br />
[https://github.com/LemonBoy/bar lemonbar] is a lightweight bar based on XCB. It provides foreground/background color switching along with text alignment and colored under/overlining of text, full utf8 support and reduced memory footprint. Nothing less and nothing more.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{AUR|lemonbar}} package, or {{AUR|lemonbar-git}} for the development version.<br />
<br />
== Configuration ==<br />
<br />
Configuration of lemonbar is now completely done via {{ic|screenrc}}-like format strings and command line options as opposed to older versions, where configuration took place at compile-time.<br />
<br />
See the man page for a short overview of those configuration options.<br />
<br />
== Usage ==<br />
<br />
{{ic|lemonbar}} prints no information on its own. To get any text into {{ic|lemonbar}} you need to pipe text into it. The following example would write the text "Hello World" into your bar.<br />
<br />
{{bc|<br />
#!/bin/bash<br />
<br />
# Echo the text<br />
echo "Hello World"<br />
}}<br />
<br />
If you want the text in {{ic|lemonbar}} to update through a script, you need to add the {{ic|-p}} option. This prevents {{ic|lemonbar}} from exiting after stdin is closed.<br />
<br />
==== Colors ====<br />
<br />
{{ic|lemonbar}} uses the following commands to color the text, background or the under/overline. Colors can be specified via the formats {{ic|#RRGGBB}}, {{ic|#AARRGGBB}} (with an alpha channel; this requires a compositor to be running), or even {{ic|#RGB}}.<br />
<br />
The special color {{ic|-}} indicates the default color (which is set by command-line flags, or is otherwise the default white text on a black background).<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{F''color''} }} || Use ''color'' as the foreground/font color<br />
|-<br />
| {{ic|%{B''color''} }} || Use ''color'' as the background<br />
|-<br />
| {{ic|%{U''color''} }} || Use ''color'' for under/overlining the text<br />
|}<br />
<br />
==== Text alignment ====<br />
<br />
{{ic|lemonbar}} also supports alignment of text. It uses the following commands to align the text<br />
<br />
{| border="1"<br />
! Command !! Meaning<br />
|-<br />
| {{ic|%{l} }} || Aligns the text to the left<br />
|-<br />
| {{ic|%{c} }} || Aligns the text to the center<br />
|-<br />
| {{ic|%{r} }} || Aligns the text to the right<br />
|}<br />
<br />
==== Examples ====<br />
<br />
The following example prints the date and time in the middle of the bar, the font's color being {{ic|yellow}} and the background {{ic|blue}} and changes the font/background color back to the default color afterwards. Run it with {{ic|/path/to/script/example.sh &#124; lemonbar -p}}<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
# Define the clock<br />
Clock() {<br />
DATETIME&#61;$(date "+%a %b %d, %T")<br />
<br />
echo -n "$DATETIME"<br />
}<br />
<br />
# Print the clock<br />
<br />
while true; do<br />
echo "%{c}%{F#FFFF00}%{B#0000FF} $(Clock) %{F-}%{B-}"<br />
sleep 1<br />
done<br />
}}<br />
<br />
Another example showing the battery percentage. To use this script you need to install {{Pkg|acpi}}.<br />
<br />
{{hc|example.sh|<br />
#!/usr/bin/bash<br />
<br />
#Define the battery<br />
Battery() {<br />
BATPERC&#61;$(acpi --battery &#124; cut -d, -f2)<br />
echo "$BATPERC"<br />
}<br />
<br />
# Print the percentage<br />
while true; do<br />
echo "%{r}$(Battery)"<br />
sleep 1;<br />
done<br />
}}<br />
<br />
==== XFT fonts ====<br />
<br />
The default lemonbar version does not support XFT fonts. To get support for XFT fonts, you need to install {{AUR|lemonbar-xft-git}}, which replaces {{AUR|lemonbar}}.<br />
<br />
To use different font with lemonbar, you need to pass {{ic|-f}} option when starting lemonbar e.g. {{ic|lemonbar -f "Roboto Medium"}}.<br />
<br />
===== Font Awesome icons =====<br />
<br />
With XFT support, you can also add [http://fontawesome.io/ font-awesome icons] to your bar. You need to install {{AUR|ttf-font-awesome}} before using the icons and pass {{ic|-f "Font Awesome"}} to lemonbar. Please note, that you also need to specify one more font (e.g. {{ic|-f "Roboto Medium"}}) to be used for other symbols than font awesome icons if you want something else visible in your lemonbar as font awesome does not contain other symbols.<br />
<br />
Before adding an icon to lemonbar, you need to look up its unicode id on the [http://fontawesome.io/icons/ icon list] and pass it to lemonbar string. Here is a script that displays icon with unicode id {{ic|f242}} in lemonbar: <br />
<br />
{{hc|fontawesome.sh|<br />
#!/usr/bin/bash<br />
echo -e "\uf242 Battery: 0"<br />
}}<br />
<br />
Pay extra attention to {{ic|echo -e}} flag, as it is necessary to properly use echo with escape sequences.<br />
<br />
And corresponding lemonbar command: {{ic|lemonbar -f "Roboto Medium" -f "Font Awesome"}}</div>Tomsik68https://wiki.archlinux.org/index.php?title=Bspwm&diff=462030Bspwm2017-01-09T07:17:28Z<p>Tomsik68: Panels: Add missing quote</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Tiling WMs]]<br />
[[ja:Bspwm]]<br />
[[ru:Bspwm]]<br />
[[es:Bspwm]]<br />
{{Related articles start}}<br />
{{Related|bspwm/Example configurations}}<br />
{{Related|Window manager}}<br />
{{Related|Comparison of tiling window managers}}<br />
{{Related articles end}}<br />
<br />
''bspwm'' is a tiling window manager that represents windows as the leaves of a full binary tree. It has support for [http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html EWMH] and multiple monitors, and is configured and controlled through messages.<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|bspwm}} and {{Pkg|sxhkd}}, or the development versions: {{AUR|bspwm-git}} and {{AUR|sxhkd-git}}.<br />
Sxhkd is a simple X hotkey daemon used to communicate with bspwm through {{ic|bspc}} as well as launch your applications of choice.<br />
<br />
To start bspwm on login, add the following to {{ic|~/.xinitrc}} or {{ic|~/.xprofile}} (depending on how you launch X/your display manager):<br />
<br />
{{bc|<br />
sxhkd &<br />
exec bspwm<br />
}}<br />
<br />
The first line should be omitted if you have a command for running sxhkd in your bspwmrc config file (it is this way in the example config).<br />
<br />
== Configuration ==<br />
<br />
Example configuration is found at {{ic|/usr/share/doc/bspwm/examples/}} and on [https://github.com/baskerville/bspwm/blob/master/examples/ GitHub].<br />
<br />
'''Important:''' Make sure your environment variable $XDG_CONFIG_HOME is set or your bspwmrc will not be found. This can be done by adding XDG_CONFIG_HOME="$HOME/.config" and export XDG_CONFIG_HOME to your ~/.profile.<br />
<br />
Create {{ic|~/.config/bspwm/}} and {{ic|~/.config/sxhkd/}}, then copy {{ic|/usr/share/doc/bspwm/examples/bspwmrc}} to {{ic|~/.config/bspwm/}} and {{ic|/usr/share/doc/bspwm/examples/sxhkdrc}} to {{ic|~/.config/sxhkd/}}. Make bspwmrc executable with {{ic|chmod +x ~/.config/bspwm/bspwmrc}}.<br />
<br />
These two files are where you will be setting wm settings and keybindings, respectively. See [[bspwm/Example configurations]] for annotated examples.<br />
<br />
Documentation for bspwm is found by running {{ic|man bspwm}}.<br />
<br />
There is also documentation for sxhkd found by running {{ic|man sxhkd}}.<br />
<br />
==== Note for multi-monitor setups ====<br />
<br />
The example bspwmrc configures ten desktops on one monitor like this:<br />
bspc monitor -d I II III IV V VI VII VIII IX X<br />
<br />
You will need to change this line and add one for each monitor, similar to this:<br />
bspc monitor DVI-I-1 -d I II III IV<br />
bspc monitor DVI-I-2 -d V VI VII<br />
bspc monitor DP-1 -d VIII IX X<br />
<br />
You can use `xrandr -q` or `bspc query -M` to find the monitor names.<br />
<br />
The total number of desktops were maintained at ten in the above example. This is so that each desktop can still be addressed with 'super + {1-9,0}' in the sxhkdrc.<br />
<br />
=== Rules ===<br />
<br />
There are two ways to set window rules (as of [https://github.com/baskerville/bspwm/commit/cd97a3290aa8d36346deb706fa307f5f8faa2f34 cd97a32]).<br />
<br />
The first is by using the built in rule command, as shown in the example bspwmrc:<br />
{{bc|<nowiki><br />
bspc rule -a Gimp desktop=^8 follow=on state=floating<br />
bspc rule -a Chromium desktop=^2<br />
bspc rule -a mplayer2 state=floating<br />
bspc rule -a Kupfer.py focus=on<br />
bspc rule -a Screenkey manage=off<br />
</nowiki>}}<br />
<br />
The second option is to use an external rule command. This is more complex, but can allow you to craft more complex window rules. See [https://github.com/baskerville/bspwm/tree/master/examples/external_rules these examples] for a sample rule command.<br />
<br />
If a particular window does not seem to be behaving according to your rules, check the class name of the program. This can be accomplished by running {{ ic | xprop <nowiki>|</nowiki> grep WM_CLASS}} to make sure you're using the proper string.<br />
<br />
=== Panels ===<br />
An example panel for {{AUR|lemonbar}} is provided in the examples folder on the GitHub page. You might also get some insights from the [[lemonbar]] wiki page. The panel will be executed by placing {{ic | panel &}} in your bspwmrc. Check the opt-depends in the bspwm package for dependencies that may be required.<br />
<br />
To display system information on your status bar you can use various system calls. This example will show you how to edit your {{ic | panel }} to get the volume status on your BAR:<br />
<br />
{{bc|<nowiki><br />
panel_volume()<br />
{<br />
volStatus=$(amixer get Master | tail -n 1 | cut -d '[' -f 4 | sed 's/].*//g')<br />
volLevel=$(amixer get Master | tail -n 1 | cut -d '[' -f 2 | sed 's/%.*//g')<br />
# is alsa muted or not muted?<br />
if [ "$volStatus" == "on" ]<br />
then<br />
echo "%{Fyellowgreen} $volLevel %{F-}"<br />
else<br />
# If it is muted, make the font red<br />
echo "%{Findianred} $volLevel %{F-}"<br />
fi<br />
}</nowiki>}}<br />
<br />
Next, we will have to make sure it is called and piped to {{ic | $PANEL_FIFO}}:<br />
<br />
{{bc|<nowiki><br />
while true; do<br />
echo "S" "$(panel_volume) $(panel_clock)" > "$PANEL_FIFO"<br />
sleep 1s<br />
done &<br />
</nowiki>}}<br />
<br />
=== Scratchpad ===<br />
<br />
You can emulate a dropdown terminal (like i3's scratchpad feature if you put a terminal in it) using bspwm's window flags. Append the following to the end of the bspwm config file (adapt to your own terminal emulator):<br />
<br />
{{bc|<nowiki><br />
bspc rule -a scratchpad sticky=on state=floating hidden=on<br />
st -c scratchpad -e ~/bin/scratch &<br />
</nowiki>}}<br />
<br />
The sticky flag ensures that the window is always present on the current desktop.<br />
And {{ic|~/bin/scratch}} is:<br />
<br />
{{bc|<nowiki><br />
#!/usr/bin/sh<br />
bspc query -N -n .floating > /tmp/scratchid<br />
$SHELL<br />
</nowiki>}}<br />
<br />
The hotkey for toggling the scratchpad should be bound to:<br />
<br />
{{bc|<nowiki><br />
id=$(cat /tmp/scratchid);\<br />
bspc node $id --flag hidden;bspc node -f $id<br />
</nowiki>}}<br />
<br />
For a scratch-pad which can use any window type without pre-defined rules, see: [https://www.reddit.com/r/bspwm/comments/3xnwdf/i3_like_scratch_for_any_window_possible/cy6i585]<br />
<br />
For a more sophisticated scratchpad script that supports many terminals out of the box and has flags for doing things like optionally starting a tmuxinator/tmux session, turning any window into a scratchpad on the fly, and automatically resizing a scratchpad to fit the current monitor see {{AUR|tdrop-git}}.<br />
<br />
=== Different monitor configurations for different machines ===<br />
<br />
Since the {{ic|bspwmrc}} is a shell script, it allows you to do things like these:<br />
<br />
#! /bin/sh<br />
<nowiki><br />
if [[ $(hostname) == 'myhost' ]]; then<br />
bspc monitor eDP1 -d I II III IV V VI VII VIII IX X<br />
elif [[ $(hostname) == 'otherhost' ]]; then<br />
bspc monitor VGA-0 -d I II III IV V<br />
bspc monitor VGA-1 -d VI VII VIII IX X<br />
elif [[ $(hostname) == 'yetanotherhost' ]]; then<br />
bspc monitor DVI-I-3 -d VI VII VIII IX X<br />
bspc monitor DVI-I-2 -d I II III IV V<br />
fi<br />
</nowiki><br />
<br />
=== Set up a desktop where all windows are floating ===<br />
<br />
Here is how to setup the desktop 3 to have only floating windows. It can be useful for Gimp or other apps with multiple windows.<br />
<br />
Put this script somewhere in your $PATH and call it from .xinitrc or similar (with a & at the end):<br />
<br />
#!/bin/bash<br />
<nowiki><br />
# change the desktop number here<br />
FLOATING_DESKTOP_ID=$(bspc query -D -d '^3')<br />
<br />
bspc subscribe node_manage | while read -a msg ; do<br />
desk_id=${msg[2]}<br />
wid=${msg[3]}<br />
[ "$FLOATING_DESKTOP_ID" = "$desk_id" ] && bspc node "$wid" -t floating<br />
done<br />
</nowiki><br />
<br />
([https://github.com/baskerville/bspwm/issues/428#issuecomment-199985423 source])<br />
<br />
<br />
== Troubleshooting ==<br />
<br />
=== Help! I get a blank screen and my keybindings don't work! ===<br />
<br />
There are a few ways to debug this. First, a blank screen is good. That means bspwm is running.<br />
<br />
I would confirm that your xinitrc looks something like<br />
<br />
{{bc|<nowiki><br />
sxhkd &<br />
exec bspwm<br />
</nowiki>}}<br />
<br />
The ampersand is important. Next, try spawning a terminal in your xinitrc to see if its getting positioned properly. It should appear somewhat "centered" on the screen. To do this, use this .xinitrc:<br />
<br />
{{bc|<nowiki><br />
sxhkd &<br />
urxvt &<br />
exec bspwm<br />
</nowiki>}}<br />
<br />
If nothing shows up, that means you probably forgot to install urxvt. If it shows up but isn't centered or taking up most of your screen, that means BSPWM isn't getting started properly. Make sure that you've {{ic | chmod +x ~/.config/bspwm/bspwmrc }}.<br />
<br />
Next, type {{ic | pidof sxhkd}} in that terminal you spawned. It should return a number. If it doesn't, that means sxhd isn't running. Try to be explicit and run {{ ic | sxhkd -c ~/.config/sxhkd/sxhkdrc }}. You could also try changing the Super key to something like Alt in your sxhkdrc and see if that helps. Another common problem is copying the text from the example files instead of physically copying the file over. Copying / pasting code usually leads to indentation issues which sxhkd can be sensitive to.<br />
<br />
=== Window box larger than the actual application! ===<br />
<br />
This can happen if you are using GTK3 apps and usually for dialog windows. The fix is to create or add the below to a gtk3 theme file (~/.config/gtk-3.0/gtk.css). <br />
<br />
{{bc|<nowiki><br />
.window-frame, .window-frame:backdrop {<br />
box-shadow: 0 0 0 black;<br />
border-style: none;<br />
margin: 0;<br />
border-radius: 0;<br />
}<br />
<br />
.titlebar {<br />
border-radius: 0;<br />
}<br />
</nowiki>}}<br />
<br />
(source: [https://bbs.archlinux.org/viewtopic.php?pid=1404973#p1404973 Bspwm forum thread])<br />
<br />
=== Problems with Java applications === <br />
If you have problems, like Java application Windows not resizing, or menus immediately closing after you click, see [[Java#Applications not resizing with WM, menus immediately closing]].<br />
<br />
=== Problems with keybindings using fish ===<br />
If you use [[fish]], you will find that you are unable to switch desktops. This is because bspc's use of the ^ character is incompatible with fish. You can fix this by explicitly telling sxhkd to use bash to execute commands:<br />
$ set -U SXHKD_SHELL /usr/bin/bash<br />
<br />
Alternatively, the ^ character may be escaped with a backslash in your sxhkdrc file.<br />
<br />
=== Error messages "Could not grab key 43 with modfield 68" on start ===<br />
Either you try to use the same key twice, or you start sxhkd twice. Check bspwmrc and {{ic | ~/.profile}} or {{ic | ~/.bash_profile}} for excessive commands starting sxhkd.<br />
<br />
== See also ==<br />
<br />
* Mailing List: bspwm ''at'' librelist.com.<br />
* {{ic|#bspwm}} - IRC channel at irc.freenode.net<br />
* https://bbs.archlinux.org/viewtopic.php?id=149444 - Arch BBS thread<br />
* https://github.com/baskerville/bspwm - GitHub project<br />
* https://github.com/windelicato/dotfiles/wiki/bspwm-for-dummies - earsplit's "bspwm for dummies"<br />
* https://github.com/smlb/dotfiles/wiki/Bspwm - smlb's wiki</div>Tomsik68