]> git.sur5r.net Git - i3/i3status/commitdiff
install i3status with cap_net_admin capability, document it
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 1 Apr 2010 18:34:03 +0000 (20:34 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 1 Apr 2010 18:34:03 +0000 (20:34 +0200)
Makefile
man/i3status.man

index e84d0cdaa29712d25261488b2f91ca60017fbc28..883bcdd15918bd826faf525332b16b654ae8bc28 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,8 @@ install:
        install -m 755 -d $(DESTDIR)/etc
        install -m 755 -d $(DESTDIR)/usr/share/man/man1
        install -m 755 i3status $(DESTDIR)/usr/bin/i3status
+       # Allow network configuration for getting the link speed
+       which setcap && setcap cap_net_admin=ep $(DESTDIR)/usr/bin/i3status
        install -m 644 i3status.conf $(DESTDIR)/etc/i3status.conf
        install -m 644 man/i3status.1 $(DESTDIR)/usr/share/man/man1
 
index a747c73998e25d4b30d0e105cb2efdb69bb0c7df..74493b949093bf18c1b63582cc664b5d5b7b63ed 100644 (file)
@@ -62,7 +62,7 @@ wireless wlan0 {
 }
 
 ethernet eth0 {
-        # if you use %speed, i3status requires root privileges
+        # if you use %speed, i3status requires the cap_net_admin capability
         format = "E: %ip (%speed)"
 }
 
@@ -150,7 +150,8 @@ connected.
 === Ethernet
 
 Gets the IP address and (if possible) the link speed of the given ethernet
-interface. Getting the link speed requires root privileges.
+interface. Getting the link speed requires the cap_net_admin capability. Set
+it using +setcap cap_net_admin=ep $(which i3status)+.
 
 *Example order*: +ethernet eth0+