https://wiki.archlinux.org/api.php?action=feedcontributions&user=Winston-Wolfe&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:48:06ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Prey&diff=646397Prey2020-12-23T05:17:08Z<p>Winston-Wolfe: redundant, checking enabled systemd service is already mentioned twice</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=646396Prey2020-12-23T05:15:04Z<p>Winston-Wolfe: Removed the smtp bug entry. That feature no longer exists. Also version 0.5.3 was in 2011.</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}<br />
<br />
Ensure you have enabled the [[systemd]] service '''prey-agent.service''' to start Prey at boot.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=646395Prey2020-12-23T05:12:43Z<p>Winston-Wolfe: Removed entry about silencing 'scrot'. It doesn't beep anymore and '/usr/share/prey/modules/session/core/run' is a path that doesn't exist</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}<br />
<br />
Ensure you have enabled the [[systemd]] service '''prey-agent.service''' to start Prey at boot.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=646394Prey2020-12-23T05:10:48Z<p>Winston-Wolfe: Removed entry about checking if 'xawtv' is installed. It's a dependency in pkgbuild.</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}<br />
<br />
Ensure you have enabled the [[systemd]] service '''prey-agent.service''' to start Prey at boot.<br />
<br />
==== Beeping ====<br />
If [[Taking a screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep every time it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=646393Prey2020-12-23T05:06:02Z<p>Winston-Wolfe: Removed 'Standalone Mode' entry. Plugins 'url-trigger' and 'report-to-inbox' aren't options anymore.</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}<br />
<br />
Ensure you have enabled the [[systemd]] service '''prey-agent.service''' to start Prey at boot.<br />
<br />
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.<br />
<br />
==== Beeping ====<br />
If [[Taking a screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep every time it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=646392Prey2020-12-23T04:58:10Z<p>Winston-Wolfe: Readability and grammar fixes. Redundancies removed.</p>
<hr />
<div>[[Category:Surveillance]]<br />
[[Category:Internet applications]]<br />
[[ja:Prey]]<br />
[https://www.preyproject.com/ Prey] is a multi-os anti-theft, data security, and management platform that helps you track your computer when it is stolen. <br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-node-client}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
<br />
{{Note|Create an account on [https://panel.preyproject.com/signup/ Prey's website] if you haven't done so already.}}<br />
<br />
{{Tip|You can configure Prey using either the [[#CLI config|CLI config]] or the [[#GUI config|GUI config]].}}<br />
<br />
=== CLI config ===<br />
<br />
Configure your device with your Prey account:<br />
<br />
# prey_project config account setup<br />
<br />
Follow on-screen instructions.<br />
<br />
To activate your configuration, run {{ic|prey_project config activate}} as user ''prey''. One way to accomplish this is with {{ic|sudo -u prey prey_project config activate}}.<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
==== Plugins ====<br />
<br />
To enable/disable plugins, you must run {{ic|# prey_project config plugins}}. Read on-screen instructions to list the available plugins and enable/disable them.<br />
<br />
=== GUI config ===<br />
<br />
You can use the GUI config to configure prey. Launch the GUI with:<br />
<br />
# prey_project config gui<br />
<br />
{{Tip|The installer automatically starts and enables the [[systemd]] service '''prey-agent.service''' to activate Prey at boot. You can check if it's loaded and running with {{ic|# systemctl status prey-agent.service}}}}<br />
<br />
=== Standalone Mode ===<br />
<br />
By enabling the '''url-trigger''' and '''report-to-inbox''' plugins you can set a standalone prey client, triggering emailed reports whenever a URL returns a specific status code.<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|$ prey_project config check}}<br />
<br />
Ensure you have enabled the [[systemd]] service '''prey-agent.service''' to start Prey at boot.<br />
<br />
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.<br />
<br />
==== Beeping ====<br />
If [[Taking a screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep every time it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407935ZoneMinder2015-11-02T02:01:28Z<p>Winston-Wolfe: /* MySQL */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that [https://wiki.archlinux.org/index.php/Apache_HTTP_Server LAMP] stack is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
$ mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=/etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407856ZoneMinder2015-11-01T03:14:07Z<p>Winston-Wolfe: /* Installation */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that [https://wiki.archlinux.org/index.php/Apache_HTTP_Server LAMP] stack is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407855ZoneMinder2015-11-01T02:59:34Z<p>Winston-Wolfe: /* PHP */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407854ZoneMinder2015-11-01T02:55:44Z<p>Winston-Wolfe: /* Configure MySQL */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407853ZoneMinder2015-11-01T02:53:18Z<p>Winston-Wolfe: /* Configure MySQL */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Configure MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407852ZoneMinder2015-11-01T02:52:32Z<p>Winston-Wolfe: /* Configure MySQL */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Configure MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=chosen_password}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407851ZoneMinder2015-11-01T02:51:27Z<p>Winston-Wolfe: /* Configure MySQL */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Configure MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
Update the Zoneminder config with your new parameters:<br />
<br />
{{hc|1=$ /etc/zm.conf|<br />
2=ZM_DB_HOST=localhost<br />
ZM_DB_NAME=zm<br />
ZM_DB_USER=zmuser<br />
ZM_DB_PASS=zoneminder}}<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407849ZoneMinder2015-11-01T02:40:07Z<p>Winston-Wolfe: /* Installation */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
<br />
It is very important that LAMP stack ([[Apache HTTP Server]]) is installed and properly configured in order for ZoneMinder to work.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm].<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Configure MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407844ZoneMinder2015-11-01T02:31:09Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
Other AUR packages (usually less supported) include {{AUR|zoneminder-xinetd}}{{Broken package link|{{aur-mirror|zoneminder-xinetd}}}} and {{AUR|zoneminder64}}{{Broken package link|{{aur-mirror|zoneminder64}}}}.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm]. It is very important that httpd and php are configured in order for ZoneMinder to work (especially with local cameras!).<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Configure MySQL ===<br />
<br />
Create the zm database and user with appropriate permissions and password : <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE DATABASE zm;<br />
<br />
MariaDB> CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'chose_password';<br />
<br />
MariaDB> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;<br />
<br />
MariaDB> exit}}<br />
<br />
Import the preconfigured tables into your newly created zm database:<br />
<br />
mysql -u root -p zm < /usr/share/zoneminder/db/zm_create.sql<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/*<br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407839ZoneMinder2015-11-01T02:02:37Z<p>Winston-Wolfe: /* PHP */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
Other AUR packages (usually less supported) include {{AUR|zoneminder-xinetd}}{{Broken package link|{{aur-mirror|zoneminder-xinetd}}}} and {{AUR|zoneminder64}}{{Broken package link|{{aur-mirror|zoneminder64}}}}.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm]. It is very important that httpd and php are configured in order for ZoneMinder to work (especially with local cameras!).<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/* <br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407838ZoneMinder2015-11-01T02:01:16Z<p>Winston-Wolfe: /* PHP */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
Other AUR packages (usually less supported) include {{AUR|zoneminder-xinetd}}{{Broken package link|{{aur-mirror|zoneminder-xinetd}}}} and {{AUR|zoneminder64}}{{Broken package link|{{aur-mirror|zoneminder64}}}}.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm]. It is very important that httpd and php are configured in order for ZoneMinder to work (especially with local cameras!).<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Ensure open_basedir has the following directories added/included =====<br />
<br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/<br />
<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/* <br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=ZoneMinder&diff=407835ZoneMinder2015-11-01T01:57:07Z<p>Winston-Wolfe: /* Installation */</p>
<hr />
<div>[[Category:Security]]<br />
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.<br />
<br />
== Installation ==<br />
<br />
Install the {{AUR|zoneminder}} package from AUR. The development branch is also available with {{AUR|zoneminder-git}}.<br />
Other AUR packages (usually less supported) include {{AUR|zoneminder-xinetd}}{{Broken package link|{{aur-mirror|zoneminder-xinetd}}}} and {{AUR|zoneminder64}}{{Broken package link|{{aur-mirror|zoneminder64}}}}.<br />
<br />
Once configuration below is completed and the system service started, the web interface will be accessible via [http://localhost/zm http://localhost/zm]. It is very important that httpd and php are configured in order for ZoneMinder to work (especially with local cameras!).<br />
<br />
== Configuration ==<br />
<br />
=== Apache Configuration ===<br />
<br />
==== Edit '''/etc/httpd/conf/httpd.conf''' ====<br />
<br />
===== Enable PHP =====<br />
<br />
1. Comment out LoadModule mpm_event_module modules/mod_mpm_event.so:<br />
#LoadModule mpm_event_module modules/mod_mpm_event.so<br />
<br />
2. Uncomment LoadModule mpm_prefork_module modules/mod_mpm_prefork.so:<br />
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so<br />
<br />
3. Load mod_php at or near line 183:<br />
LoadModule php5_module modules/libphp5.so<br />
<br />
4. Place this at or near the end of the file:<br />
Include conf/extra/php5_module.conf<br />
<br />
===== Enable mod_cgi =====<br />
<br />
Uncomment the following line at or near line 170:<br />
<br />
LoadModule cgi_module modules/mod_cgi.so<br />
<br />
===== Load the httpd-zoneminder configuration file =====<br />
<br />
Add this line at or near the end of httpd.conf:<br />
<br />
Include conf/extra/httpd-zoneminder.conf<br />
<br />
=== PHP ===<br />
<br />
==== Edit '''/etc/php/php.ini''' ====<br />
<br />
===== Ensure the following extensions are enabled by uncommenting these lines =====<br />
<br />
extension=ftp.so<br />
extension=gd.so<br />
extension=gettext.so<br />
extension=mcrypt.so<br />
extension=openssl.so<br />
extension=pdo_mysql.so<br />
extension=sockets.so<br />
extension=zip.so<br />
<br />
===== Set your timezone =====<br />
<br />
For example:<br />
<br />
date.timezone = "Australia/Sydney"<br />
<br />
See http://php.net/manual/en/timezones.php for a list of timezones.<br />
<br />
=== Optional Packages ===<br />
<br />
Install {{Pkg|netpbm}} from the [[official repositories]] for thumbnail generation (used rarely).<br />
<br />
=== Enable System Services ===<br />
<br />
For 'always on' and on boot:<br />
<br />
ZoneMinder:<br />
<br />
$ systemctl enable zoneminder<br />
<br />
Also ensure Apache HTTPd is enabled:<br />
<br />
$ systemctl enable httpd<br />
<br />
==== Service Management ====<br />
<br />
Starting the ZoneMinder service:<br />
<br />
$ systemctl start zoneminder<br />
<br />
Restarting the ZoneMinder service:<br />
<br />
$ systemctl restart zoneminder<br />
<br />
Stopping the ZoneMinder service:<br />
<br />
$ systemctl stop zoneminder<br />
<br />
Its also possible to do this via the web interface.<br />
<br />
=== Flushing Application Data ===<br />
<br />
This is useful for developers or users that need to wipe all ZoneMinder and start fresh.<br />
<br />
==== Dropping the database ====<br />
<br />
Drop the ZoneMinder MySQL database.<br />
<br />
MySQL root user with a password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zoneminder<br />
<br />
Or, root without password:<br />
<br />
$ echo 'delete from user where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ echo 'delete from db where User="zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm<br />
<br />
==== Reset the database and permissions ====<br />
<br />
MySQL root user with a password:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql<br />
<br />
Or, root without passsword:<br />
<br />
$ mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload<br />
$ cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf<br />
$ echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf mysql<br />
<br />
==== Flush the cache folders ====<br />
<br />
Note: this removes all images and events!<br />
<br />
$ rm -Rf /var/cache/zoneminder/events/* /var/cache/zoneminder/images/* /var/cache/zoneminder/temp/* <br />
<br />
== Troubleshooting ==<br />
<br />
Logs by default are kept in '''/var/log/zoneminder'''. You can also inspect the log within the web interface.<br />
<br />
See the upstream wiki page, [http://www.zoneminder.com/wiki/index.php/Troubleshooting Troubleshooting].<br />
<br />
=== Local video devices ===<br />
<br />
It is important that the user running httpd (usually '''http''') can access your cameras, for example:<br />
<br />
$ groups http<br />
video http<br />
<br />
$ ls -l /dev/video0<br />
crw-rw----+ 1 root video 81, 0 Oct 28 21:54 /dev/video0<br />
<br />
That is, add the '''http''' user to the '''video''' group.<br />
<br />
=== Multiple local USB cameras ===<br />
<br />
If you observe an error like, '''libv4l2: error turning on stream: No space left on device''' when using multiple USB video devices (such as multiple webcams), you may need to increase the bandwidth on the bus.<br />
<br />
Test first by stopping the '''zoneminder''' service, then:<br />
<br />
$ rmmod uvcvideo<br />
$ modprobe uvcvideo quirks=128<br />
<br />
Start the '''zoneminder''' service and if the issue is resolved, perist the change by adding the module option to '''/etc/modprobe.d/uvcvideo.conf'''. for example:<br />
<br />
options uvcvideo nodrop=1 quirks=128<br />
<br />
([http://renoirsrants.blogspot.com.au/2011/07/multiple-webcams-on-zoneminder.html reference])<br />
<br />
== See also ==<br />
<br />
* http://www.zoneminder.com/wiki/index.php/Arch_Linux — Upstream project page.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Dwm&diff=263147Dwm2013-06-17T19:51:42Z<p>Winston-Wolfe: /* Conky statusbar */</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
[[de:Dwm]]<br />
[[es:Dwm]]<br />
[[fr:DWM]]<br />
[[ru:Dwm]]<br />
[[zh-CN:Dwm]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Information on installing and configuring dwm}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|dmenu}}<br />
{{Article summary wiki|wmii}}<br />
{{Article summary end}}<br />
{{DISPLAYTITLE:dwm}}<br />
[http://dwm.suckless.org/ dwm] is a dynamic window manager for [[X]]. It manages windows in tiled, stacked, and full-screen layouts, as well as many others with the help of [[#Extended usage|optional patches]]. Layouts can be applied dynamically, optimizing the environment for the application in use and the task performed. dwm is extremely lightweight and fast, written in C and with a stated design goal of remaining under 2000 source lines of code. It provides multi-head support for [[xrandr]] and Xinerama.<br />
<br />
==Installing==<br />
===Method 1: makepkg + ABS (recommended)===<br />
These instructions will install dwm using [[makepkg]] along with the Arch Build System, or [[ABS]] for short. This will allow reconfiguring dwm at a later time without complications.<br />
<br />
Basic programming tools present in {{Pkg|base-devel}} are needed in order to compile dwm and build a package for it, and the {{Pkg|abs}} package is also a requisite for fetching the necessary build scripts. Installing [[dmenu]], a fast and lightweight dynamic menu for X is a good idea.<br />
# pacman -S base-devel abs dmenu<br />
<br />
Once the required packages are installed, use ABS to update and then copy the dwm build scripts from the ABS tree to a temporary directory. For example:<br />
# abs community/dwm<br />
$ cp -r /var/abs/community/dwm ~/dwm<br />
<br />
Use {{Ic|cd}} to switch to the directory containing the build scripts (the example above used {{ic|~/dwm}}). Then run:<br />
$ makepkg -i<br />
<br />
This will compile dwm, build an Arch Linux package containing the resulting files, and install the package file all in one step. If problems are encountered, review the output for specific information. <br />
<br />
{{Tip|If this directory ({{ic|~/dwm}}) is saved, it can subsequently be used for making changes to the default configuration.}}<br />
<br />
===Method 2: official repos (easier, but not configurable)===<br />
If only interested in installing dwm for a test drive, simply install the binary package from the repositories instead. You will probably also want to consider installing [[dmenu]], a fast and lightweight dynamic menu for X:<br />
# pacman -S dwm dmenu<br />
{{note|By omitting compiling dwm from source a great deal of customizability is lost, since dwm's entire configuration is performed by editing its source code. Taking this in mind, the rest of the article assumes that dwm has been compiled from source as explained in the entirety of this section.}}<br />
<br />
==Starting dwm==<br />
To start dwm with {{Ic|startx}} or the [[SLIM]] login manager, simply append the following to {{ic|~/.xinitrc}}: <br />
exec dwm<br />
<br />
For [[GDM]], add it to {{ic|~/.Xclients}} instead, and select "Run XClient Script" from the Sessions menu.<br />
<br />
===Starting a customized dwm from a display manager===<br />
<br />
The default /usr/share/xsessions/dwm.desktop does not allow for a customized start like can be done in .xinitrc.<br />
A solution to this problem is to make a start script, for example /usr/bin/dwm-personalized and make an alternative xsession .desktop file (/usr/share/xsessions/dwm-personalized.desktop).<br />
<br />
Example of /usr/share/xsessions/dwm-personalized.desktop<br />
<pre>[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=Dwm-personalized<br />
Comment=Dynamic window manager<br />
Exec=dwm-personalized<br />
Icon=dwm<br />
Type=XSession<br />
</pre><br />
<br />
Example of /usr/bin/dwm-personalized<br />
<br />
<pre>#!/bin/zsh<br />
<br />
#Set swedish keyboard map<br />
setxkbmap se<br />
<br />
#Set chrome as default browser<br />
if [ -n "$DISPLAY" ]; then<br />
BROWSER=google-chrome<br />
fi<br />
<br />
#Set status bar & start DWM<br />
conky | while read -r; do xsetroot -name "$REPLY"; done &<br />
exec dwm<br />
</pre><br />
<br />
==Basic usage==<br />
===Using dmenu===<br />
Dmenu is a useful addon to dwm. Rather than a standard list-style menu, it acts as a sort of autocomplete to typing in the names of binaries. It is more advanced than many program launchers and integrates well within dwm.<br />
<br />
To start it, press {{Keypress|Mod1}} + {{Keypress|P}} ({{Keypress|Mod1}} should be the {{Keypress|Alt}} key by default). This can, of course, be changed if you so desire. Then, simply type in the first few characters of the binary you wish to run until you see it along the top bar. Then, simply use your left and right arrow keys to navigate to it and press enter.<br />
<br />
For more information, see [[dmenu]].<br />
<br />
===Controlling windows===<br />
====Giving another tag to a window====<br />
Changing a window's tag is very simple. To do so, simply bring the window into focus by hovering over it with your cursor, then press {{Keypress|Shift}} + {{Keypress|Mod1}} + {{Keypress|x}}, where 'x' is the number of the tag to which you want to move the window. [Mod1] is, by default, the {{Keypress|Alt}} key.<br />
====Closing a window====<br />
To cleanly close a window using dwm, simply press {{Keypress|Shift}} + {{Keypress|Mod1}} + {{Keypress|c}}.<br />
<br />
====Window layouts====<br />
By default, dwm will operate in tiled mode. This can be observed by new windows on the same tag growing smaller and smaller as new windows are opened. The windows will, together, take up the entire screen (except for the menu bar) at all times. There are, however, two other modes: floating and monocle. Floating mode should be familiar to users of non-tiling window managers; it allows users to rearrange windows as they please. Monocle mode will keep a single window visible at all times.<br />
<br />
To switch to floating mode, simply press {{Keypress|Mod1}} + {{Keypress|F}}. {{Keypress|Mod1}} is, by default, the {{Keypress|Alt}} key. To check if you are in floating mode, you should see something like this next to the numbered tags in the top right corner of the screen: ><>.<br />
<br />
To switch to monocole mode, press {{Keypress|Mod1}} + {{Keypress|M}}. To check if you are in monocle mode, you can see an M in square brackets (if no windows are open on that tag) or a number in square brackets (which corresponds with the number of windows open on that tag). Thus, a tag with no windows open would display this: [M], and a tag with 'n' windows open would display this: [n].<br />
<br />
To return to tiled mode, press {{Keypress|Mod1}} + {{Keypress|T}}. You will see a symbol which looks like this: []= .<br />
<br />
===Exiting dwm===<br />
To cleanly exit dwm, press {{Keypress|Shift}} + {{Keypress|Mod1}} + {{Keypress|q}}.<br />
<br />
Source: [http://dwm.suckless.org/tutorial dwm tutorial].<br />
<br />
==Configuring==<br />
dwm, as mentioned before, is exclusively configured at compile-time via some of its source files, namely {{ic|config.h}} and {{ic|config.mk}}. While the initial configuration provides a good set of defaults, it is reasonable to expect eventual customization.<br />
<br />
===Method 1: ABS rebuild (recommended)===<br />
Modifying dwm is quite simple using this route.<br />
<br />
====Customizing config.h====<br />
Browse to the dwm source code directory saved during the [[#Installing|installation process]]; {{ic|~/dwm}} in the example. The {{ic|config.h}} found within this directory is where the general dwm preferences are stored. Most settings within the file should be self-explanatory. For detailed information on these settings, see the [http://dwm.suckless.org/ dwm website].<br />
<br />
{{note|Be sure to make a backup copy of config.h before modifying it, just in case something goes wrong.}}<br />
<br />
Once changes have been made, pipe the new md5sums into the [[PKGBUILD]]:<br />
$ makepkg -g >> PKGBUILD<br />
This will eliminate a checksum mismatch between the official config.h and the new revised copy.<br />
<br />
Now, compile and reinstall:<br />
$ makepkg -efi<br />
<br />
Assuming the configuration changes were valid, this command will compile dwm, build and reinstall the resulting package. If problems were encountered, review the output for specific information.<br />
<br />
Finally, restart dwm in order to apply the changes.<br />
<br />
====Notes====<br />
From now on, instead of updating the md5sums for every {{ic|config.h}} revision, which are known to become frequent, one may erase the md5sums array and build dwm with the {{Ic|--skipinteg}} option:<br />
$ makepkg -efi --skipinteg<br />
<br />
And after adding a few lines to dwm's start-up script, it is possible to [[#Restart dwm without logging out or closing programs|restart dwm without logging out or closing programs]].<br />
<br />
{{Tip|To recompile easily, make an alias by putting ({{ic|alias redwm<nowiki>=</nowiki>'cd ~/dwm; makepkg -g >> PKGBUILD; makepkg -efi --noconfirm; killall dwm'}}) in your .bashrc.}}<br />
<br />
===Method 2: Git (advanced)===<br />
dwm is maintained upstream within a [http://git-scm.com git] version control system at [http://git.suckless.org/dwm suckless.org]. Those already familiar with git may find it more convenient to maintain configurations and patches within this system. Learning how to do local branching and merging will make maintaining, applying and removing patches easy.<br />
<br />
Before building dwm from the git sources, be sure to alter config.mk accordingly, because failure to do so may result in X crashes. Here are the values that need changing:<br />
<br />
Modify {{Ic|PREFIX}}:<br />
PREFIX = /usr<br />
The X11 include folder:<br />
X11INC = /usr/include/X11<br />
And the the X11 lib directory:<br />
X11LIB = /usr/lib/X11<br />
<br />
==Statusbar configuration==<br />
dwm uses the root window's name to display information in its statusbar, which can be changed with {{Ic|xsetroot -name}}.<br />
<br />
===Basic statusbar===<br />
This example prints the date in [[wikipedia:ISO_8601|ISO 8601]] format. Add it to files {{ic|~/.xinitrc}} or {{ic|~/.Xclients}} or see this page's discussion for more details about the GDM-3 case :<br />
<pre><br />
while true; do<br />
xsetroot -name "$( date +"%F %R" )"<br />
sleep 1m # Update time every minute<br />
done &<br />
exec dwm<br />
</pre><br />
<br />
Here is an example intended for laptops that depends on the {{Pkg|acpi}} package for showing battery information:<br />
<pre><br />
while true ; do<br />
xsetroot -name "$(acpi -b | awk 'sub(/,/,"") {print $3, $4}')"<br />
sleep 1m<br />
done &<br />
exec dwm<br />
</pre><br />
<br />
The script displays the amount of battery remaining besides its charging status by using the awk command to trim away the unneeded text from acpi, and tr to remove the commas.<br />
<br />
An alternative to the above is to selectively show the battery status depending on the current charging state:<br />
<pre><br />
while true; do<br />
batt=$(LC_ALL=C acpi -b)<br />
<br />
case $batt in<br />
*Discharging*)<br />
batt="${batt#* * * }"<br />
batt="${batt%%, *} "<br />
;;<br />
*)<br />
batt=""<br />
;;<br />
esac<br />
<br />
xsetroot -name "$batt$(date +%R)"<br />
<br />
sleep 60<br />
done &<br />
<br />
exec dwm<br />
</pre><br />
<br />
Finally, make sure there is only one instance of dwm in {{ic|~/.xinitrc}} or {{ic|~/.Xclients}}, so combining everything together should resemble this:<br />
~/.setbg<br />
autocutsel &<br />
termirssi &<br />
urxvt &<br />
<br />
while true; do<br />
xsetroot -name "$(date +"%F %R")"<br />
sleep 1m # Update time every minute<br />
done &<br />
'''exec dwm'''<br />
<br />
Here is another example that displays also the alsa volume and the battery state. The latter only when the system is off-line.<br />
<br />
#set statusbar<br />
while true<br />
do<br />
if acpi -a | grep off-line > /dev/null; then<br />
xsetroot -name "Bat. $(awk 'sub(/,/,"") {print $3, $4}' <(acpi -b)) \<br />
| Vol. $(awk '/dB/ { gsub(/[\[\]]/,""); print $5}' <(amixer get Master)) \<br />
| $(date +"%a, %b %d %R")"<br />
else<br />
xsetroot -name "Vol. $(awk '/dB/ { gsub(/[\[\]]/,""); print $5}' <(amixer get Master)) \<br />
| $(date +"%a, %b %d %R")"<br />
fi<br />
sleep 1s <br />
done &<br />
<br />
===Conky statusbar===<br />
[[Conky]] can be printed to the statusbar with {{Ic|xsetroot -name}}:<br />
conky | while read -r; do xsetroot -name "$REPLY"; done &<br />
exec dwm<br />
<br />
To do this, conky needs to be told to output text to the console only. The following is a sample conkyrc for a dual core CPU, displaying several stats:<br />
<pre><br />
out_to_console yes<br />
out_to_x no<br />
background no<br />
update_interval 2<br />
total_run_times 0<br />
use_spacer none<br />
<br />
TEXT<br />
$mpd_smart :: ${cpu cpu1}% / ${cpu cpu2}% ${loadavg 1} ${loadavg 2 3} :: ${acpitemp}c :: $memperc% ($mem) :: ${downspeed eth0}K/s ${upspeed eth0}K/s :: ${time %a %b %d %I:%M%P}<br />
</pre><br />
<br />
For icons and color options, see [[dzen]].<br />
<br />
==Extended usage==<br />
<br />
===Patches & additional tiling modes===<br />
The official website has a number of [http://dwm.suckless.org/patches/ patches] that can add extra functionality to dwm. Users can easily customize dwm by applying the modifications they like. The [http://dwm.suckless.org/patches/bottom_stack Bottom Stack] patch provides an additional tiling mode that splits the screen horizontally, as opposed to the default vertically oriented tiling mode. Similarly, bstack horizontal splits the tiles horizontally. <br />
<br />
The [http://dwm.suckless.org/patches/gapless_grid gaplessgrid patch] allows windows to be tiled like a grid.<br />
<br />
====Enable one layout per tag====<br />
The default behaviour of dwm is to apply the currently selected layout for all tags.To have different layouts for different tags use the [http://dwm.suckless.org/patches/pertag pertag] patch.<br />
<br />
===Fixing gaps around terminal windows===<br />
If there are empty gaps of desktop space outside terminal windows, it is likely due to the terminal's font size. Either adjust the size until finding the ideal scale that closes the gap, or toggle {{Ic|resizehints}} to ''False'' in {{ic|config.h}}:<br />
static Bool resizehints = False; /* True means respect size hints in tiled resizals */<br />
<br />
This will cause dwm to ignore resize requests from all client windows, not just terminals. The downside to this workaround is that some terminals may suffer redraw anomalies, such as ghost lines and premature line wraps, among others.<br />
<br />
===Space around font in dwm's bar===<br />
By default, dwm's bar adds 2px around the size of the font. To change it, modify the following line in {{ic|dwm.c}}:<br />
<pre>bh = dc.h = dc.font.height + 2;</pre><br />
<br />
===Restart dwm without logging out or closing programs===<br />
For restarting dwm without logging out or closing applications, change or add a startup script so that it loads dwm in a ''while'' loop, like this:<br />
<pre><br />
while true; do<br />
# Log stderror to a file <br />
dwm 2> ~/.dwm.log<br />
# No error logging<br />
#dwm >/dev/null 2>&1<br />
done<br />
</pre><br />
<br />
dwm can now be restarted without destroying other X windows by pressing the usual Mod-Shift-Q combination.<br />
<br />
It is a good idea to place the above startup script into a separate file, {{ic|~/bin/startdwm}} for instance, and execute it through {{ic|~/.xinitrc}}. From this point on, when desiring to actually end the X session simply execute {{Ic|killall startdwm}}, or bind it to a convenient key.<br />
<br />
===Make the right Alt key work as if it were Mod4 (Windows Key)===<br />
When using Mod4 (aka Super/Windows Key) as the {{Ic|MODKEY}}, it may be equally convenient to have the right Alt key (Alt_R) act as Mod4. This will allow performing otherwise awkward keystrokes one-handed, such as zooming with Alt_R+Enter. <br />
<br />
First, find out which keycode is assigned to Alt_R:<br />
xmodmap -pke | grep Alt_R<br />
<br />
Then simply add the following to the startup script (e.g. {{ic|~/.xinitrc}}), changing the keycode ''113'' if necessary to the result gathered by the previous {{Ic|xmodmap}} command:<br />
xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L<br />
xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group<br />
<br />
Now, any functions that are triggered by a Super_L (Windows) key press will also be triggered by an Alt_R key press.<br />
===Disable focus follows mouse behaviour===<br />
To disable focus follows mouse behaviour comment out the following line in definiton of struct handler in dwm.c <br />
<pre>[EnterNotify] = enternotify, </pre><br />
Note that this change can cause some difficulties. After it the first click on inactive window will only bring the focus on it. To interact with window contents (buttons, fields etc) you need to click again. Also if you have several monitors you can notice that keyboard focus doesn't switch to another monitor activated by clicking.<br />
<br />
===Adding custom keybinds/shortcuts===<br />
Two entries are needed in {{ic|config.h}} to create custom keybinds. One under the "/* commands */" section, and another under the "static Key keys[] = {" section.<br />
<br />
static const char *<keybindname>[] = { "<command>", "<flags>", "<arguments>", NULL };<br />
<br />
<keybindname> can be anything... <command> <-flags> and <arguments> can be anything but they have to be individually enclosed in "",<br />
<br />
{ MODKEY, XK_<key>, spawn, {.v = <keybindname> } },<br />
<br />
...would bind Mod+<key> to the command defined previously.<br />
<br />
{ MODKEY|ShiftMask, XK_<key>, spawn, {.v = <keybindname> } },<br />
<br />
...would bind Mod+Shift+<key> Use ControlMask for Ctrl key.<br />
<br />
Single keys such as Fn or multimedia keys have to be bound with the hex codes obtainable from the program "xev"<br />
<br />
{ 0, 0xff00, spawn, {.v = <keybindname> } },<br />
<br />
...would bind foo key 0xff00 to <keybindname><br />
<br />
* [[Extra_Keyboard_Keys#Step_1:_Check_for_keycodes|How to check for keycodes]]<br />
<br />
===Fixing misbehaving Java applications===<br />
<br />
As of JRE 6u20, Java applications misbehave in dwm because it is not a known window manager to Java. This causes menus to close when the mouse is released, and other little issues. First, install wmname from the [community] repository:<br />
# pacman -S wmname<br />
<br />
Now all you have to do is use wmname to set a WM name that Java recognizes:<br />
{{Note|This may cause some programs to behave oddly when tiled (specifically Chromium).}}<br />
$ wmname LG3D<br />
<br />
<br />
This is not permanent, so you may want to add this command to your .xinitrc.<br />
<br />
It is also possible to change enable {{ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}<br />
<br />
==See also==<br />
* [http://dwm.suckless.org/ dwm's official website]<br />
* [http://www.youtube.com/watch?v=GQ5s6T25jCc Introduction to dwm video]<br />
* [[dmenu]] - Simple application launcher from the developers of dwm<br />
* The [https://bbs.archlinux.org/viewtopic.php?id=57549/ dwm thread] on the forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=92895/ Hacking dwm thread]<br />
* Check out the forums' [https://bbs.archlinux.org/viewtopic.php?id=57768/ wallpaper thread] for a selection of dwm wallpapers<br />
*[https://bbs.archlinux.org/viewtopic.php?id=74599 Show off your dwm configuration forum thread]<br />
* [http://0x80.org/blog/?p=72 Moved to dwm]<br />
* [http://wongdev.com/blog/2013/01/24/dwm-tags-are-not-workspaces/ dwm: Tags are not workspaces]</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Conky&diff=263142Conky2013-06-17T19:45:09Z<p>Winston-Wolfe: /* Display number of new emails (Gmail)*/ Removed Google App mail script that no longer works, added solution.</p>
<hr />
<div>[[Category:Status monitoring and notification]]<br />
[[es:Conky]]<br />
[[fr:Conky]]<br />
[[it:Conky]]<br />
[[ru:Conky]]<br />
[[tr:Conky]]<br />
[[zh-CN:Conky]]<br />
<br />
Conky is a system monitor software for the X Window System. It is available for GNU/Linux and FreeBSD. It is free software released under the terms of the GPL license. Conky is able to monitor many system variables including CPU, memory, swap, disk space, temperature, top, upload, download, system messages, and much more. It is extremely configurable, however, the configuration can be a little hard to understand. Conky is a fork of torsmo.<br />
<br />
== Installation and configuration ==<br />
<br />
* [[pacman|Install]] the {{Pkg|conky}} package which is available in the [[official repositories]].<br />
* Edit the {{ic|~/.conkyrc}} config file using an example configuration file from [http://conky.sourceforge.net/screenshots.html homeproject-screenshot]<br />
When editing your config file, you will see immediately the effect of any change as soon as you save it. There is no need to log out/log in your X session. So best is to test all kind of options, one by one, save the configuration file and see the change on your conky window, and correct if your change is unappropriated.<br />
* Alternatively, you can use the default config at {{ic|/etc/conky/conky.conf}}:<br />
$ cp /etc/conky/conky.conf ~/.conkyrc<br />
Best is to use a local {{ic|~/.conkyrc}} config.<br />
As many apps, conky will first try to look for a local {{ic|.conkyrc}} file. If this one doesn't exist, then it will read the default one in {{ic|/etc/conky}}.<br />
<br />
In case you store your configuration locally, e.g. in your home directory, you will not be able to read any log files unless you do some changes. One of the nice features of conky is to pipe to your desktop some {{ic|/var/log/}} files to read all kinds of log messages. Most of these files can only be read by {{ic|root}}, and you will thus need to {{ic|sudo}} conky. Starting conky as {{ic|root}} is not recommended, so you will need to make this following changes:<br />
$ usermod -aG log username<br />
You add {{ic|username}} to the {{ic|log group}}. Now {{ic|username}} can read log files, and you will be able to redirect log messages with conky on your desktop.<br />
<br />
* If conky does not accept changes -- e.g. minimum_size -- you made to {{ic|~/.conkyrc}} make sure you cleared {{ic|/etc/conky/conky.conf}} or commented out the relevant section.Best is to remove files in {{ic|/etc/conky/}}, as conky will keep reading them and this can give you some Xorg error messages.<br />
<br />
== AUR packages ==<br />
<br />
In addition to the basic '''conky''' package, there are various [[AUR]] packages available with extra compile options enabled:<br />
<br />
* {{App|conky-cli|Conky without X11 dependencies||{{AUR|conky-cli}}}}<br />
* {{App|conky-lua|Conky with Lua support||{{AUR|conky-lua}}}}<br />
* {{App|conky-lua-nv|Conky with both Lua and Nvidia support||{{AUR|conky-lua-nv}}}}<br />
* {{App|conky-nvidia|Conky with Nvidia support||{{AUR|conky-nvidia}}}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Enable real transparency in KDE4 and Xfce4 ===<br />
<br />
Since version 1.8.0, Conky suppports real transparency. To enable it add this line to {{ic|~/.conkyrc}}:<br />
own_window_transparent yes<br />
<br />
The above option is not desired with the {{ic|OWN_WINDOW_ARGB_VISUAL yes}} option.<br />
This replaces the {{Pkg|feh}} method described below.<br />
<br />
=== Autostart with Xfce4 ===<br />
<br />
In {{ic|.conkyrc}} file:<br />
background yes<br />
<br />
This variable will fork Conky to your background.<br />
If you want to make your window always visible on your desktop, sticky across all workspaces and not showing in your taskbar, add these arguments:<br />
own_window yes<br />
own_window_type override<br />
The override option makes your window out of control of your window manager.<br />
<br />
Add a {{ic|~/.config/autostart/conky.desktop}}:<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Version=0.9.4<br />
Type=Application<br />
Name=conky<br />
Comment=<br />
Exec=conky -d<br />
StartupNotify=false<br />
Terminal=false<br />
Hidden=false<br />
<br />
=== Prevent flickering ===<br />
<br />
Conky needs Double Buffer Extension (DBE) support from the X server to prevent flickering because it cannot update the window fast enough without it. It can be enabled in {{ic|/etc/X11/xorg.conf}} with {{ic|Load "dbe"}} line in {{ic|Section "Module"}}. The xorg.conf file has been replaced (1.8.x patch upwards) by {{ic|/etc/X11/xorg.conf.d}} which contains the particular configuration files. ''DBE'' is loaded automatically.<br />
<br />
To verify: <br />
$ grep dbe /var/log/Xorg.0.log<br />
<br />
Output (should be similar):<br />
[ 3286.101] (II) LoadModule: "dbe"<br />
[ 3286.101] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so<br />
[ 3286.111] (II) Module dbe: vendor="X.Org Foundation"<br />
<br />
To enable double-buffer check to have in {{ic|~/.conkyrc}}:<br />
# Place below the other options, not below TEXT or XY<br />
double_buffer yes<br />
<br />
=== Custom colors ===<br />
<br />
Aside the classic preset colors (white, black, yellow...), you can set your own custom color using the color name code. To determine the code of a color, use a color selector app. The basic {{Pkg|gcolor2}} package in the [[Official Repositories|official repositories]] will give you the color name. It is made of a series of letters and numbers.<br />
Add this line in your configuration file for a custom color:<br />
color1 Colorname1<br />
color2 Colorname2<br />
Then, when editing the TEXT section, use custom color number previously defined.<br />
<br />
=== Dual Screen ===<br />
<br />
When using a dual screen configuration, you will need to play with two options to place your conky window.<br />
Let's say you are running a 1680X1050 pixels resolution, and you want the window on middle top of your left monitor, you will use this:<br />
alignment top_left<br />
gap_X 840<br />
The alignment option is trivial, and gap_X option is the distance, in pixels, from the left border of your screen.<br />
<br />
=== Do not minimize on Show Desktop ===<br />
<br />
'''Using Compiz:''' If the 'Show Desktop' button or key-binding minimizes Conky along with all other windows, start the Compiz configuration settings manager, go to "General Options" and uncheck the "Hide Skip Taskbar Windows" option.<br />
<br />
If you do not use Compiz, try editing {{ic|~/.conkyrc}} and adding/changing the following line:<br />
<br />
own_window_type override<br />
<br />
=== Integrate with Gnome 3 ===<br />
<br />
Some have experienced problems with Conky showing up under Gnome 3.<br />
*Add these lines to {{ic|~/.conkyrc}}:<br />
own_window yes<br />
own_window_type conky<br />
own_window_transparent yes<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
If you still experience problems with transparency. You could add these lines.<br />
own_window_argb_visual yes<br />
own_window_argb_value 255<br />
<br />
=== Integrate with KDE ===<br />
<br />
Conky with screenshot configuration generate problems with icons visualization. So there are some steps to follow.<br />
* Add these lines to {{ic|~/.conkyrc}}:<br />
own_window yes<br />
own_window_type normal<br />
own_window_transparent yes<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
* If this setting is on, comment it out or delete the line:<br />
minimum_size<br />
* To automatically start Conky, create this symlink:<br />
** KDE4:<br />
$ ln -s /usr/bin/conky ~/.kde4/Autostart/conkylink<br />
** KDE3:<br />
$ ln -s /usr/bin/conky ~/.kde/share/autostart/conkylink<br />
* Install the {{Pkg|feh}} package which is available in the official repositories.<br />
* Make a script to allow transparency with the desktop<br />
In KDE4 edit {{ic|~/.kde4/Autostart/fehconky}}:<br />
<br />
#!/bin/bash<br />
feh --bg-scale "$(sed -n 's/wallpaper=//p' ~/.kde4/share/config/plasma-desktop-appletsrc)"<br />
<br />
In KDE3 edit {{ic|~/.kde/share/autostart/fehconky}}:<br />
<br />
#!/bin/bash<br />
feh --bg-scale $(dcop kdesktop KBackgroundIface currentWallpaper 1)<br />
<br />
use {{ic|--bg-center}} if you use a centered wallpaper.<br />
<br />
* Make it executable:<br />
** KDE4:<br />
$ chmod +x ~/.kde4/Autostart/fehconky<br />
** KDE3:<br />
$ chmod +x ~/.kde/share/autostart/fehconky<br />
* Instead of using a script, you can add the corresponding line to the bottom of {{ic|~/.conkyrc}}<br />
** For KDE4<br />
${exec feh --bg-scale "$(sed -n 's/wallpaper=//p' ~/.kde4/share/config/plasma-desktop-appletsrc)"}<br />
** For KDE3<br />
${exec feh --bg-scale $(dcop kdesktop KBackgroundIface currentWallpaper 1)}<br />
<br />
=== Integrate with Razor-qt ===<br />
<br />
With Conky's default configuration, its window might disappear from the desktop when you click on the latter.<br />
Add these lines to: <br />
{{hc|~/.conkyrc|own_window yes<br />
own_window_class Conky<br />
own_window_type normal<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
own_window_transparent yes<br />
}}<br />
<br />
=== Display package update information ===<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=68104 Paconky] - Displays package update information in a user-defined format. The output of this program can be included in Conky with the {{ic|<nowiki>${execpi}</nowiki>}} command.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=53761 Scrolling Notifications] - Prints scrolling update notifications. From the author of Paconky.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=57291 Perl Script] - Simpler and earlier script from the author of Paconky. Prints only the number of packages needing an update.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=37284 Python Script] - Fairly configurable update notification program in [[Python]].<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=483742#p483742 Bash Script] - [[Bash]] script for users that have enabled ShowSize.<br />
<br />
=== Display weather forecast ===<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?id=37381 this thread].<br />
<br />
=== Display RSS feeds ===<br />
<br />
Conky has the ability to display RSS feeds natively without the need for an outside script to run and output into Conky. For example, to display the titles of the ten most recent Planet Arch updates and refresh the feed every minute, you would put this into your {{ic|~/.conkyrc}} in the TEXT section:<br />
<br />
${rss https://planet.archlinux.org/rss20.xml 1 item_titles 10 }<br />
If you want to display Arch Forum rss feed, add this line:<br />
${rss https://bbs.archlinux.org/extern.php?action=feed&type=rss 1 item_titles 4}<br />
where 1 is in minutes the refresh interval (15 mn is default),4 the number of items you wish to show.<br />
<br />
=== Display Distrowatch Arch Linux ranking ===<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?id=88779 this thread].<br />
<br />
=== Display rTorrent stats ===<br />
<br />
See [https://bbs.archlinux.org/viewtopic.php?id=67304 this thread].<br />
<br />
=== Display your WordPress blog stats ===<br />
<br />
This can be achieved by using the in python written extension named [http://evilshit.wordpress.com/2013/04/20/conkypress-a-wordpress-stats-visualization-tool-for-your-desktop/ ConkyPress].<br />
<br />
=== Display number of new emails (Gmail) ===<br />
<br />
Create a file named {{ic|gmail.py}} in a convenient location (this example uses {{ic|~/.scripts/}}) with the following [[Python]] code:<br />
#!/usr/bin/env python<br />
<br />
from urllib.request import FancyURLopener<br />
<br />
username = 'your username'<br />
password = 'your password'<br />
<br />
url = 'https://%s:%s@mail.google.com/mail/feed/atom' % (username, password)<br />
<br />
opener = FancyURLopener()<br />
page = opener.open(url)<br />
<br />
contents = page.read().decode('utf-8')<br />
<br />
<br />
ifrom = contents.index('<fullcount>') + 11<br />
ito = contents.index('</fullcount>')<br />
<br />
unread = contents[ifrom:ito]<br />
<br />
print(unread)<br />
<br />
With a Google App mail account, the above username variable must contain your domain:<br />
username = 'user@yourdomain.com'<br />
{{Note|Regular Gmail users input only your username without @gmail.com}}<br />
<br />
You can also use Python's urllib as follows.<br />
import urllib.request<br />
from xml.etree import ElementTree as etree<br />
<br />
# Enter your username and password below within quotes below, in place of ****.<br />
# Set up authentication for gmail<br />
auth_handler = urllib.request.HTTPBasicAuthHandler()<br />
auth_handler.add_password(realm='New mail feed',<br />
uri='https://mail.google.com/',<br />
user= '****',<br />
passwd= '****')<br />
opener = urllib.request.build_opener(auth_handler)<br />
# ...and install it globally so it can be used with urlopen.<br />
urllib.request.install_opener(opener)<br />
<br />
gmail = 'https://mail.google.com/gmail/feed/atom'<br />
NS = '{http://purl.org/atom/ns#}'<br />
with urllib.request.urlopen(gmail) as source:<br />
tree = etree.parse(source)<br />
fullcount = tree.find(NS + 'fullcount').text<br />
print(fullcount + ' new')<br />
<br />
Add the following string to your {{ic|~/.conkyrc}} in order the check your Gmail account for new email every five minutes (300 seconds) and display:<br />
${execpi 300 python ~/.scripts/gmail.py}<br />
<br />
==== Other Methods ====<br />
<br />
The same way, but with using {{ic|grep}} and {{ic|sed}} for filtering output of {{ic|wget}}:<br />
<br />
$ wget -q -O - https://mail.google.com/a/'''domain'''/feed/atom \<br />
> --http-user='''login'''@'''domain''' \<br />
> --http-password='''password''' \ <br />
> --no-check-certificate | \<br />
> grep fullcount | sed 's/<[^0-9]*>//g'<br />
<br />
instead of words '''login, domain, password''' you must type yours data.<br />
<br />
Alternatively, you can use [http://www.stunnel.org/ stunnel] which is provided by the {{Pkg|stunnel}} package.<br />
<br />
The following configuration is taken from [http://conky.sourceforge.net/faq.html Conky's FAQ]<br />
<br />
Modify {{ic|/etc/stunnel/stunnel.conf}} as follows, and then start the {{ic|stunnel}} [[Daemon|daemon]]:<br />
# Service-level configuration for TLS server<br />
[imap]<br />
client = yes<br />
accept = 143<br />
connect = imap.gmail.com:143<br />
protocol = imap<br />
sslVersion = TLSv1<br />
# Service-level configuration for SSL server<br />
[imaps]<br />
client = yes<br />
accept = 993<br />
connect = imap.gmail.com:993<br />
<br />
The only thing left is our {{ic|~/.conkyrc}}:<br />
imap localhost username * -i 120 -p 993<br />
TEXT<br />
Inbox: ${imap_unseen}/${imap_messages}<br />
<br />
Here I used * as the password for Conky to ask for it at start, but you do not ''have'' to do it.<br />
<br />
=== Display new emails (IMAP + SSL) ===<br />
<br />
Conky has built in support for IMAP accounts but does not support SSL. This can be provided using this script from [http://www.unix.com/shell-programming-scripting/115322-perl-conky-gmail-imap-unread-message-count.html this forum post]. This requires the Perl/CPAN Modules Mail::IMAPClient and IO::Socket::SSL which are in the {{AUR|perl-mail-imapclient}} and {{Pkg|perl-io-socket-ssl}} packages<br />
<br />
Create a file named {{ic|imap.pl}} in a location to be read by Conky. In this file, add (with the appropriate changes):<br />
#!/usr/bin/perl<br />
<br />
# gimap.pl by gxmsgx<br />
# description: get the count of unread messages on imap<br />
<br />
use strict;<br />
use Mail::IMAPClient;<br />
use IO::Socket::SSL;<br />
<br />
my $username = 'example.username'; <br />
my $password = 'password123'; <br />
<br />
my $socket = IO::Socket::SSL->new(<br />
PeerAddr => 'imap.server',<br />
PeerPort => 993<br />
)<br />
or die "socket(): $@";<br />
<br />
my $client = Mail::IMAPClient->new(<br />
Socket => $socket,<br />
User => $username,<br />
Password => $password,<br />
)<br />
or die "new(): $@";<br />
<br />
if ($client->IsAuthenticated()) {<br />
my $msgct;<br />
<br />
$client->select("INBOX");<br />
$msgct = $client->unseen_count||'0';<br />
print "$msgct\n";<br />
}<br />
<br />
$client->logout();<br />
<br />
Add to {{ic|~/.conkyrc}}:<br />
${execpi 300 ~/.conky/imap.pl} <br />
or wherever you saved the file.<br />
<br />
Alternatively, you can use stunnel as shown above: [[Conky#How to display the number of new emails (Gmail) in Conky]]<br />
<br />
=== Fix scrolling with UTF-8 multibyte characters ===<br />
<br />
The current version of conky (1.9.0) suffers from a bug (http://sourceforge.net/p/conky/bugs/341/) where scrolling text increments by byte, not by character, resulting in text containing multibyte characters to disappear and reappear while scrolling. A package with a patch fixing this bug can be found in the AUR: {{AUR|conky-utfscroll}}<br />
<br />
== User-contributed configuration examples ==<br />
<br />
=== Graysky ===<br />
<br />
[[http://img9.imageshack.us/img9/3153/imageffj.jpg Screenshot]].<br />
<br />
[[https://github.com/graysky2/configs/raw/master/dotfiles/.conkyrc Here]] it is - modify to fit your system. Optimized for a quad core chip w/ several hdds (although one of them is not connected for this screenshot) and an nvidia graphics card. You can easily modify this to a dual or single core system with one or whatever number of hdds.<br />
<br />
=== A sample rings script with nvidia support===<br />
<br />
{{bc|1=<br />
# -- Conky settings -- #<br />
background no<br />
update_interval 1<br />
<br />
cpu_avg_samples 2<br />
net_avg_samples 2<br />
<br />
override_utf8_locale yes<br />
<br />
double_buffer yes<br />
no_buffers yes<br />
<br />
text_buffer_size 2048<br />
imlib_cache_size 0<br />
<br />
# -- Window specifications -- #<br />
<br />
own_window yes<br />
own_window_type normal<br />
own_window_transparent yes<br />
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below<br />
<br />
border_inner_margin 0<br />
border_outer_margin 0<br />
<br />
minimum_size 320 800<br />
maximum_width 320<br />
<br />
alignment bottom_right<br />
gap_x 0<br />
gap_y 0<br />
<br />
# -- Graphics settings -- #<br />
draw_shades no<br />
draw_outline no<br />
draw_borders no<br />
draw_graph_borders yes<br />
<br />
# -- Text settings -- #<br />
use_xft yes<br />
xftfont MaiandraGD:size=24<br />
xftalpha 0.4<br />
<br />
uppercase no<br />
<br />
default_color 888888<br />
<br />
# -- Lua Load -- #<br />
lua_load ~/conky/lua/lua.lua<br />
lua_draw_hook_pre ring_stats<br />
<br />
TEXT<br />
${alignr}${voffset 53}${goto 90}${font MaiandraGD:size=11}${time %A, %d %B %Y}<br />
<br />
<br />
${voffset 5}${goto 164}${font MaiandraGD:size=16}${time %H:%M}<br />
<br />
<br />
<br />
${voffset -40}${goto 100}${font MaiandraGD:size=9}Kernel:${offset 70}Uptime:<br />
${goto 90}${font MaiandraGD:size=9}$kernel${offset 40}$uptime<br />
${voffset 57}${goto 117}${font snap:size=8}${cpu cpu0}%<br />
${goto 117}${cpu cpu1}%<br />
${goto 117}CPU<br />
${voffset 19}${goto 145}${memperc}%<br />
${goto 145}$swapperc%<br />
${goto 145}MEM<br />
${voffset 25}${goto 170}${nvidia gpufreq}<br />
${goto 170}${nvidia memfreq}<br />
${goto 170}GPU<br />
${voffset 27}${goto 198}${totaldown ppp0}<br />
${goto 198}${totalup ppp0}<br />
${goto 205}NET<br />
${voffset 21}<br />
${goto 222}${fs_used /home}<br />
${goto 230}DISK<br />
}}<br />
<br />
And the required lua.lua script:<br />
<br />
{{bc|1=<br />
--[[<br />
Ring Meters by londonali1010 (2009)<br />
<br />
This script draws percentage meters as rings. It is fully customisable; all options are described in the script.<br />
<br />
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this does not happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.<br />
<br />
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):<br />
lua_load ~/scripts/rings-v1.2.1.lua<br />
lua_draw_hook_pre ring_stats<br />
<br />
Changelog:<br />
+ v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)<br />
+ v1.2 -- Added option for the ending angle of the rings (07.10.2009)<br />
+ v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)<br />
+ v1.0 -- Original release (28.09.2009)<br />
]]<br />
<br />
settings_table = {<br />
{<br />
-- Edit this table to customise your rings.<br />
-- You can create more rings simply by adding more elements to settings_table.<br />
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.<br />
name='time',<br />
-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.<br />
arg='%I.%M',<br />
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.<br />
max=12,<br />
-- "bg_colour" is the colour of the base ring.<br />
bg_colour=0x888888,<br />
-- "bg_alpha" is the alpha value of the base ring.<br />
bg_alpha=0.3,<br />
-- "fg_colour" is the colour of the indicator part of the ring.<br />
fg_colour=0x888888,<br />
-- "fg_alpha" is the alpha value of the indicator part of the ring.<br />
fg_alpha=0.5,<br />
-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.<br />
x=191, y=145,<br />
-- "radius" is the radius of the ring.<br />
radius=32,<br />
-- "thickness" is the thickness of the ring, centred around the radius.<br />
thickness=4,<br />
-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.<br />
start_angle=0,<br />
-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle.<br />
end_angle=360<br />
},<br />
{<br />
name='time',<br />
arg='%M.%S',<br />
max=60,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=191, y=145,<br />
radius=37,<br />
thickness=4,<br />
start_angle=0,<br />
end_angle=360<br />
},<br />
{<br />
name='time',<br />
arg='%S',<br />
max=60,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=191, y=145,<br />
radius=42,<br />
thickness=4,<br />
start_angle=0,<br />
end_angle=360<br />
},<br />
{<br />
name='cpu',<br />
arg='cpu0',<br />
max=100,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=140, y=300,<br />
radius=26,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='cpu',<br />
arg='cpu1',<br />
max=100,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=140, y=300,<br />
radius=20,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='memperc',<br />
arg='',<br />
max=100,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=170, y=350,<br />
radius=26,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='swapperc',<br />
arg='',<br />
max=100,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=170, y=350,<br />
radius=20,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='time',<br />
arg='%d',<br />
max=31,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=191, y=145,<br />
radius=50,<br />
thickness=5,<br />
start_angle=-140,<br />
end_angle=-30<br />
},<br />
{<br />
name='time',<br />
arg='%m',<br />
max=12,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=191, y=145,<br />
radius=50,<br />
thickness=5,<br />
start_angle=30,<br />
end_angle=140<br />
},<br />
-- {<br />
-- name='fs_used_perc',<br />
-- arg='/',<br />
-- max=100,<br />
-- bg_colour=0x888888,<br />
-- bg_alpha=0.3,<br />
-- fg_colour=0x888888,<br />
-- fg_alpha=0.5,<br />
-- x=260, y=503,<br />
-- radius=26,<br />
-- thickness=5,<br />
-- start_angle=-90,<br />
-- end_angle=180<br />
-- },<br />
{<br />
name='fs_used_perc',<br />
arg='/home',<br />
max=100,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=260, y=503,<br />
radius=20,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='totalup',<br />
arg='ppp0',<br />
max=2,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=230, y=452,<br />
radius=20,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='totaldown',<br />
arg='ppp0',<br />
max=2,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=230, y=452,<br />
radius=26,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='nvidia',<br />
arg='gpufreq',<br />
max=475,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=200, y=401,<br />
radius=26,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
{<br />
name='nvidia',<br />
arg='memfreq',<br />
max=700,<br />
bg_colour=0x888888,<br />
bg_alpha=0.3,<br />
fg_colour=0x888888,<br />
fg_alpha=0.5,<br />
x=200, y=401,<br />
radius=20,<br />
thickness=5,<br />
start_angle=-90,<br />
end_angle=180<br />
},<br />
}<br />
<br />
require 'cairo'<br />
<br />
function rgb_to_r_g_b(colour,alpha)<br />
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha<br />
end<br />
<br />
function draw_ring(cr,t,pt)<br />
local w,h=conky_window.width,conky_window.height<br />
<br />
local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']<br />
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']<br />
<br />
local angle_0=sa*(2*math.pi/360)-math.pi/2<br />
local angle_f=ea*(2*math.pi/360)-math.pi/2<br />
local t_arc=t*(angle_f-angle_0)<br />
<br />
-- Draw background ring<br />
<br />
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)<br />
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))<br />
cairo_set_line_width(cr,ring_w)<br />
cairo_stroke(cr)<br />
<br />
-- Draw indicator ring<br />
<br />
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)<br />
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))<br />
cairo_stroke(cr)<br />
end<br />
<br />
function conky_ring_stats()<br />
local function setup_rings(cr,pt)<br />
local str=''<br />
local value=0<br />
<br />
str=string.format('${%s %s}',pt['name'],pt['arg'])<br />
str=conky_parse(str)<br />
<br />
value=tonumber(str)<br />
if value == nil then value = 0 end<br />
pct=value/pt['max']<br />
<br />
draw_ring(cr,pct,p<nowiki><nowiki>Insert non-formatted text here</nowiki>'''Bold text'''</nowiki>t)<br />
end<br />
<br />
if conky_window==nil then return end<br />
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_w indow.height)<br />
<br />
local cr=cairo_create(cs)<br />
<br />
local updates=conky_parse('${updates}')<br />
update_num=tonumber(updates)<br />
<br />
if update_num>5 then<br />
for i in pairs(settings_table) do<br />
setup_rings(cr,settings_table[i])<br />
end<br />
end<br />
end <br />
}}<br />
<br />
== A note about symbolic fonts ==<br />
<br />
Many of the more decorated .conkyrc's use the fonts PizzaDude Bullets and Pie Charts for Maps. They are available from the AUR as 'ttf-pizzadude-bullets' and 'ttf-piechartsformaps' respectively, or they can be found and downloaded with a quick search and manually installed using the instructions in [[Fonts]].<br />
<br />
== Fonts appear smaller than they should ==<br />
<br />
If you notice that your conky fonts appear smaller than they should, or they don't align properly, it could be caused by a default setting in the infinality freetype2 patch. This setting can cause some programs to display fonts at 72 DPI instead of 96 even if the rest of your system is set to 96. If you notice a problem open {{ic|/etc/fonts/infinality/infinality.conf}} search for the section on DPI and change 72 to 96.<br />
<br />
== Universal method to enable true transparency ==<br />
<br />
Transparency is a strange beast in Conky, but there is a way to universally apply true transparency with any environment or window manager by using xcompmgr and transset-df. Install xcompmgr from [extra] and transset-df from [community] with {{ic|pacman -S xcompmgr transset-df}}. These packages both have the same 3 dependencies, so this is the lightest method for composition available, for those of you using standalone window managers in order to achieve the leanest setup you can manage (or whatever reason you have :D)<br />
<br />
NOTE: This may conflict with any other compositing manager you are already using.<br />
<br />
Check xcompmgr documentation to help you decide which compositing options you would like to enable. The following is a common standard command.<br />
<br />
$ xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &<br />
<br />
Make sure conky is running with {{ic|conky &}}. Use transset-df to enable transparency on the Conky window. Set '.5' to any value in the range 0 - 1.<br />
<br />
$ transset-df .5 -n Conky<br />
<br />
This should give your conky window true transparency. If you get an error like, <br />
{{hc|$ transset-df .5 -n Conky|No Window matching Conky exists!}}<br />
Verify that conky is running, and use xprop and click on the conky window to find the name you should pass to {{ic|transset-df}}. <br />
{{hc|$ xprop &#124; grep WM_NAME|2=WM_NAME(STRING) = "Conky (ArchitectLinux)"}}<br />
<br />
In this case, "Conky" is right, but for you it may be different, so be sure to use your output instead. If {{ic|~/.conkyrc}} has {{ic|own_window_type panel}} then this xprop invocation may show now output. Try using any of the following options instead. {{ic|<nowiki>own_window_type {dock,normal,override,desktop}</nowiki>}}<br />
<br />
Use this in {{ic|~/.xinitrc}} to have transparent conky run when you {{ic|startx}}.<br />
<br />
xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &<br />
conky -d; sleep 1 && transset-df .5 -n Conky<br />
<br />
== See also ==<br />
<br />
* [http://conky.sourceforge.net/config_settings.html Official Conky Configuration Settings]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=39906 Conky Configs on arch forums]<br />
* [http://conky.sourceforge.net/ Official website]<br />
* [http://freshmeat.net/projects/conky/ Conky] on [[wikipedia:Freshmeat|Freshmeat]]<br />
* [http://sourceforge.net/projects/conky/ Conky] on [[wikipedia:sourceforge.net|SourceForge]]<br />
* [irc://chat.freenode.org/conky #conky] IRC chat channel on [[wikipedia:Freenode|freenode]]<br />
* [http://novel.evilcoder.org/wiki/index.php?title=ConkyFAQ&oldid=12463 FAQ]</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261382Prey2013-06-05T23:11:13Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add your device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button in the control panel links to Prey's download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
Enable [[systemd]] service '''prey-tracker''' to automatically start Prey at boot {{ic|# systemctl enable prey-tracker}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.<br />
<br />
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261379Prey2013-06-05T22:26:27Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add your device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button in the control panel links to a download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
Enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to automatically start Prey at boot.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.<br />
<br />
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261291Prey2013-06-05T15:59:48Z<p>Winston-Wolfe: /* Troubleshooting */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button on Prey's website links to its Download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
Enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to automatically start Prey at boot.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.<br />
<br />
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=SLiM&diff=261277SLiM2013-06-05T15:22:41Z<p>Winston-Wolfe: /* Other options */</p>
<hr />
<div>[[Category:Display managers]]<br />
[[cs:SLiM]]<br />
[[es:SLiM]]<br />
[[fr:SLiM]]<br />
[[hu:SLiM]]<br />
[[it:SLiM]]<br />
[[ja:SLiM]]<br />
[[ko:SLiM]]<br />
[[pt:SLiM]]<br />
[[ru:SLiM]]<br />
[[sk:SLiM]]<br />
[[tr:SLiM]]<br />
[[zh-CN:SLiM]]<br />
[[zh-TW:SLiM]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary end}}<br />
<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{pkg|slim}} from the [[official repositories]].<br />
<br />
== Configuration ==<br />
<br />
=== Enabling SLiM ===<br />
<br />
{{Note|{{pkg|slim}} no longer has ConsoleKit support, but relies on systemd-logind, and the system being booted with systemd.}}<br />
<br />
Enable the '''slim''' [[Daemons|daemon]]. With systemd, it is no longer possible to start slim using {{ic|inittab}}.<br />
This can be done via the following<br />
{{ic| systemctl enable slim.service}}<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{ic|~/.xinitrc}} to load your desktop environment:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec <session-command><br />
}}<br />
<br />
Replace {{ic|<session-command>}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
{{bc|<br />
exec awesome<br />
exec dwm<br />
exec startfluxbox<br />
exec fvwm2<br />
exec gnome-session<br />
exec openbox-session<br />
exec startkde<br />
exec startlxde<br />
exec startxfce4<br />
exec enlightenment_start<br />
}}<br />
<br />
For detailed instructions on how to start the various environments, refer to the appropriate wiki pages.<br />
<br />
SLiM reads the local {{ic|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have a {{ic|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc ~<br />
<br />
Remember to make {{ic|~/.xinitrc}} executable:<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
=== Autologin ===<br />
<br />
To make SLiM automatically login as a specified user (without having to type a password) the following lines in {{ic|/etc/slim.conf}} should be changed.<br />
# default_user simone<br />
<br />
Uncomment this line, and change "simone" to the user to be logged into automatically.<br />
<br />
# auto_login no<br />
<br />
Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.<br />
<br />
=== Zsh ===<br />
{{Note|If you don't know what zsh is and you did not install it - ignore this paragraph.}}<br />
<br />
The default login command will not initialize your environment correctly [http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/ [source]]. Change the login_cmd line in {{ic|/etc/slim.conf}} to:<br />
<br />
#login_cmd exec /bin/sh - ~/.xinitrc %session<br />
login_cmd exec /bin/zsh -l ~/.xinitrc %session<br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can cycle through sessions at login time by pressing F1. Note that this feature is experimental.<br />
<br />
{{bc|1=<br />
# Adapted from: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
icewm&#124;*)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
esac<br />
}}<br />
<br />
{{Note|<nowiki>In the latest version (1.3.5), slim does not preset any default session, so using a DEFAULT_SESSION variable will not work the way it used to. Instead put your default session as the last case and |*) to the statement (see above)</nowiki>}}<br />
<br />
=== Themes ===<br />
<br />
Install the {{Pkg|slim-themes}} package:<br />
<br />
# pacman -S slim-themes archlinux-themes-slim<br />
<br />
The {{Pkg|archlinux-themes-slim}} packages contains several different themes ([http://imageshack.us/photo/my-images/27/slimthemes.png/ slimthemes.png]). Look in the directory of {{ic|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the {{ic|current_theme}} line in {{ic|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run while an instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
Additional theme packages can be found in the [[AUR]].<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in {{ic|/usr/share/slim/themes/<your-theme>/slim.theme}} to turn these percents values. The box itself is 450 pixels by 250 pixels:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of a 1440x900 screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
# These settings set the "archlinux-retro" panel in the center of a 1680x1050 screen<br />
input_panel_x 615<br />
input_panel_y 400<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{ic|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{ic|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{ic|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{ic|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{ic|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{ic|/etc/slim.conf}} as root to uncomment the {{ic|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{ic|/usr/sbin/suspend}} to {{ic|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== SLiM init error with rc.d daemon ===<br />
<br />
If you initialize SLiM with {{ic|/etc/rc.conf}} inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in {{ic|/var/lock}} on each initialization, however, in most cases the lock folder in {{ic|/var}} does not exist preventing SLiM from initializing. Check to make sure {{ic|/var/lock}} exists, if it does not you can create it by typing the following:<br />
<br />
# mkdir /var/lock/<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{ic|/etc/slim.conf}} and {{ic|/etc/splash.conf}}; set the {{ic|1=DEFAULT_TTY=7}} same as {{ic|xserver_arguments vt07}}.<br />
<br />
=== Power-off tray icon fails ===<br />
<br />
If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit {{ic|/etc/slim.conf}} as follows:<br />
sessionstart_cmd /path/to/tray/icon/program &<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{ic|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Custom SLiM Login Commands ===<br />
<br />
You can also use the sessionstart_cmd/sessionstop_cmd in {{ic|/etc/slim.conf}} to log specific infomation, such as the session, user, or theme used by slim:<br />
<br />
sessionstop_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstop_cmd: u:%user s:%session t:%theme)"<br />
sessionstart_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstart_cmd: u:%user s:%session t:%theme)"<br />
<br />
Or if you want to play a song when slim loads (and you have the beep program installed)<br />
<br />
sessionstart_cmd /usr/bin/beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110<br />
<br />
=== SLiM and Gnome Keyring ===<br />
If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to {{ic|/etc/pam.d/slim}} (as discussed [https://bugs.archlinux.org/task/18637 here]).<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
You also have to add to {{ic|/etc/pam.d/passwd}}:<br />
password optional pam_gnome_keyring.so<br />
<br />
If you use a screensaver you also have to add <br />
auth optional pam_gnome_keyring.so<br />
to {{ic|/etc/pam.d/gnome-screensaver}} for example (replace {{ic|gnome-screensaver}} with {{ic|slimlock}}, {{ic|slock}}, whatever you use). If you don't do that, your keyring is locked when screen is locked by your screensaver and not unlocked again after logging back in.<br />
<br />
However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [https://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:<br />
login_cmd exec dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
<br />
As of GNOME 3.4, you need to edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}} as mentioned above, so that {{ic|<nowiki>/etc/pam.d/slim</nowiki>}} looks like:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
and {{ic|<nowiki>/etc/pam.d/passwd</nowiki>}}<br />
#%PAM-1.0<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
As of 2012-10-13, {{ic|<nowiki>/etc/pam.d/gnome-screensaver</nowiki>}} already contains the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instruction.<br />
<br />
The correct positioning of the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instructions were taken from [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
After editing the above files, you need to edit {{ic|<nowiki>/etc/inittab</nowiki>}}.<br />
<br />
The solutions mentioned here and also further information are found [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
If you have problems keeping the keyring unlocked for longer sessions, there is another thing that Gnome does: <br />
Look at {{ic|<nowiki>/etc/xdg/autostart/{gnome-keyring-gpg.desktop, gnome-keyring-pkcs11.desktop, gnome-keyring-secrets.desktop, gnome-keyring-ssh.desktop}</nowiki>}}. <br />
<br />
Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):<br />
/usr/bin/gnome-keyring-daemon --start --components=gpg<br />
/usr/bin/gnome-keyring-daemon --start --components=pkcs11<br />
/usr/bin/gnome-keyring-daemon --start --components=secrets<br />
/usr/bin/gnome-keyring-daemon --start --components=ssh<br />
/usr/bin/awesome<br />
<br />
After login check if there is only one gnome-keyring-daemon instance running ({{ic|ps -A | grep gnome}}). If those lines are executed too early then you have 4 instances running which is not good.<br />
<br />
You also should notice that seahorse for example does not show any pkcs11 errors anymore and that your keyring is unlocked all the time and does not lock itself anymore. Finally {{pkg|gnome-keyring}} is fully functional like in Gnome. See also [https://bbs.archlinux.org/viewtopic.php?pid=1019845#p1019845 here].<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{ic|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{ic|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the {{ic|current_theme}} variable as a comma separated list to specify a set from which to choose. Selection is random.<br />
<br />
===Move the whole session to another VT===<br />
Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)<br />
So, to move the X-Server you need to change one number in the {{ic|/etc/slim.conf}} file. Just a few lines down you should see:<br />
xserver_arguments -nolisten tcp vt07<br />
<br />
Simply change the vt07 to lets say vt03 as there is no agetty started there.<br />
<br />
=== Automatically mount your encrypted /home on login ===<br />
<br />
You can use [[Pam_mount#Slim|pam_mount]].<br />
<br />
=== Change Keyboard Layout ===<br />
<br />
Edit {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}, find the following section, add the two bolded lines, and replace ''dvorak'' with your preferred keymap:<br />
<br />
Section "InputClass"<br />
Identifier "evdev keyboard catchall"<br />
MatchIsKeyboard "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
<br />
'''# Keyboard layouts'''<br />
'''Option "XkbLayout" "''dvorak''"'''<br />
EndSection<br />
<br />
== All Slim Options ==<br />
Here is a list of all the slim configuration options and their default values.<br />
<br />
{{Note|welcome_msg allows 2 variables '''%host''' and '''%domain'''<br>sessionstart_cmd allows '''%user''' ''(execd right before login_cmd)'' and it is also allowed in sessionstop_cmd<br>login_cmd allows '''%session''' and '''%theme'''}}<br />
<br />
{| class="wikitable collapsible collapsable collapsed"<br />
|-<br />
! Option Name || Default Value<br />
|-<br />
| default_path ||{{ic|/bin:/usr/bin:/usr/local/bin}}<br />
|-<br />
| default_xserver ||{{ic|/usr/bin/X}}<br />
|-<br />
| xserver_arguments ||{{ic|vt07 -auth /var/run/slim.auth}}<br />
|-<br />
| numlock ||<br />
|-<br />
| daemon || {{ic|yes}}<br />
|-<br />
| xauth_path ||{{ic|/usr/bin/xauth}}<br />
|-<br />
| login_cmd ||{{ic|exec /bin/bash -login ~/.xinitrc %session}}<br />
|-<br />
| halt_cmd ||{{ic|/sbin/shutdown -h now}}<br />
|-<br />
| reboot_cmd ||{{ic|/sbin/shutdown -r now}}<br />
|-<br />
| suspend_cmd ||<br />
|-<br />
| sessionstart_cmd ||<br />
|-<br />
| sessionstop_cmd ||<br />
|-<br />
| console_cmd ||{{ic|/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T }}<br />
|-<br />
| screenshot_cmd ||{{ic|import -window root /slim.png}}<br />
|-<br />
| welcome_msg ||{{ic|Welcome to %host}}<br />
|-<br />
| session_msg ||{{ic|Session:}}<br />
|-<br />
| default_user ||<br />
|-<br />
| focus_password ||{{ic|no}}<br />
|-<br />
| auto_login ||{{ic|no}}<br />
|-<br />
| current_theme ||{{ic|default}}<br />
|-<br />
| lockfile ||{{ic|/var/run/slim.lock}}<br />
|-<br />
| logfile ||{{ic|/var/log/slim.log}}<br />
|-<br />
| authfile ||{{ic|/var/run/slim.auth}}<br />
|-<br />
| shutdown_msg ||{{ic|The system is halting...}}<br />
|-<br />
| reboot_msg ||{{ic|The system is rebooting...}}<br />
|-<br />
| sessions ||{{ic|wmaker,blackbox,icewm}}<br />
|-<br />
| sessiondir ||<br />
|-<br />
| hidecursor ||{{ic|false}}<br />
|-<br />
| input_panel_x ||{{ic|50%}}<br />
|-<br />
| input_panel_y ||{{ic|40%}}<br />
|-<br />
| input_name_x ||{{ic|200}}<br />
|-<br />
| input_name_y ||{{ic|154}}<br />
|-<br />
| input_pass_x ||{{ic|-1}}<br />
|-<br />
| input_pass_y ||{{ic|-1}}<br />
|-<br />
| input_font ||{{ic|1=Verdana:size=11}}<br />
|-<br />
| input_color ||{{ic|#000000}}<br />
|-<br />
| input_cursor_height ||{{ic|20}}<br />
|-<br />
| input_maxlength_name ||{{ic|20}}<br />
|-<br />
| input_maxlength_passwd ||{{ic|20}}<br />
|-<br />
| input_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| welcome_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_x ||{{ic|-1}}<br />
|-<br />
| welcome_y ||{{ic|-1}}<br />
|-<br />
| welcome_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_msg ||<br />
|-<br />
| intro_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| intro_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_x ||{{ic|-1}}<br />
|-<br />
| intro_y ||{{ic|-1}}<br />
|-<br />
| background_style ||{{ic|stretch}}<br />
|-<br />
| background_color ||{{ic|#CCCCCC}}<br />
|-<br />
| username_font ||{{ic|1=Verdana:size=12}}<br />
|-<br />
| username_color ||{{ic|#FFFFFF}}<br />
|-<br />
| username_x ||{{ic|-1}}<br />
|-<br />
| username_y ||{{ic|-1}}<br />
|-<br />
| username_msg ||{{ic|Please enter your username}}<br />
|-<br />
| username_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| password_x ||{{ic|-1}}<br />
|-<br />
| password_y ||{{ic|-1}}<br />
|-<br />
| password_msg ||{{ic|Please enter your password}}<br />
|-<br />
| msg_color ||{{ic|#FFFFFF}}<br />
|-<br />
| msg_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| msg_x ||{{ic|40}}<br />
|-<br />
| msg_y ||{{ic|40}}<br />
|-<br />
| msg_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| session_x ||{{ic|50%}}<br />
|-<br />
| session_y ||{{ic|90%}}<br />
|-<br />
| session_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_color ||{{ic|#FFFFFF}}<br />
|}<br />
== Uninstallation ==<br />
To completely remove SLiM:<br />
{{bc| # pacman -Rns slim<br />
# rm /etc/systemd/system/display-manager.service<br />
}}<br />
== See also ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=User_talk:Flu&diff=261271User talk:Flu2013-06-05T15:07:27Z<p>Winston-Wolfe: /* Bumblebeed automatic startup - key information removed */</p>
<hr />
<div>==Broken templates==<br />
Hi Flu, thank you for all the help you're giving on the wiki! However I have to ask you to always preview and check your edits, in fact [https://wiki.archlinux.org/index.php?title=Installing_Arch_Linux_in_VMware&diff=259537&oldid=258224], [https://wiki.archlinux.org/index.php?title=MacBook&diff=259886&oldid=256737], [https://wiki.archlinux.org/index.php?title=Compiz&diff=260564&oldid=258926] and [https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_901&diff=next&oldid=259010] have broken some templates (found thanks to [[Special:WhatLinksHere/Template:Error]]). Can you please fix them? :) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:28, 2 June 2013 (UTC)<br />
:So sorry, I was rush-editing, but I'm calming down. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 14:52, 2 June 2013 (UTC)<br />
<br />
==Bold vs monospace==<br />
Eheh it's me again, I'd also like to ask you to suspend temporarily the substitution of [[Template:ic]] with '''bold''' until we've come to a conclusion in [[Help talk:Style#Reducing formatting bloat]]. I promise to give that discussion a high priority, since I admit it was practically left abandoned. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:00, 2 June 2013 (UTC)<br />
:Ok, you are the boss. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 14:52, 2 June 2013 (UTC)<br />
<br />
== Bumblebeed automatic startup - key information removed ==<br />
<br />
Line 61 being removed made it an unnecessary hassle to troubleshoot the issue after reinstalling Bumblebee today. I finally figured out this was what I was missing after looking at Google's cached version.<br />
<br />
"To start bumblebee automatically at startup, enable bumblebeed service:<br />
<br />
''systemctl enable bumblebeed"''<br />
:I really do not get your point, the current edit (my one) says:<br />
:{{Tip|You may want to enable [[systemd]] service '''bumblebeed'''.}}<br />
:which means the same thing.<br />
:The reason I removed it is [[Help:Style#Daemon_operations|daemon operations deprecation]]. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 06:14, 5 June 2013 (UTC)<br />
::Reworked a bit: does this look better?<br />
::{{Tip|If you wish '''bumblebee''' to start at boot, you have to enable [[systemd]] service '''bumblebeed'''.}}<br />
:: -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 06:19, 5 June 2013 (UTC)<br />
:::Thanks for the link, the rule makes sense. But yes, the wording should make a big difference. Thanks.<br />
:::[[User:Winston-Wolfe|Winston-Wolfe]] ([[User talk:Winston-Wolfe|talk]]) 15:07, 5 June 2013 (UTC)</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261269Prey2013-06-05T14:57:17Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button on Prey's website links to its Download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
Enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to automatically start Prey at boot.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.<br />
<br />
If you're not receiving webcam image in you reports, install the optional webcam dependency '''xawtv'''.<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261268Prey2013-06-05T14:56:08Z<p>Winston-Wolfe: /* Troubleshooting */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button on Prey's website links to it's download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
Enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to automatically start Prey at boot.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.<br />
<br />
If you're not receiving webcam image in you reports, install the optional webcam dependency '''xawtv'''.<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261267Prey2013-06-05T14:51:48Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button on Prey's website links to it's download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
Enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to automatically start Prey at boot.<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261264Prey2013-06-05T14:35:46Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|The 'Add new device' button on Prey's website links to it's download page for whatever reason. You can add a new device here: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
{{Tip|To automatically start Prey at boot, you must enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer.}}<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=Prey&diff=261257Prey2013-06-05T13:47:59Z<p>Winston-Wolfe: /* Configuration */</p>
<hr />
<div>[[Category:Networking]]<br />
[[Category:Security]]<br />
[http://www.preyproject.com/ Prey] is a set of bash scripts that helps you track your computer when it is stolen.<br />
<br />
This guide shows you how to install Prey.<br />
<br />
== Installation ==<br />
<br />
Install {{AUR|prey-tracker}} from the [[AUR]]. <br />
<br />
== Configuration ==<br />
Add a new device using the control panel on Prey's website. <br />
<br />
{{Note|Clicking the "Add new device" button redirects you to a download page, therefore you must go to page manually: https://panel.preyproject.com/devices/new}}<br />
<br />
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel. <br />
<br />
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.<br />
<br />
{{Tip|To automatically start Prey at boot, you must enable [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer.}}<br />
<br />
{{Note|The old version of {{AUR|prey-tracker}} ( < 0.5.9-3) was in {{ic|/usr/share/prey-tracker/}} folder, now (>0.5.10-2) it is in {{ic|/usr/share/prey/}}.}}<br />
<br />
=== Modules ===<br />
To enable/disable modules, you must change the executable permissions for the the "run" files in prey's respective modules/core subdirectories. Adding executable permissions to a module will enable it, while removing permissions will disable the module.<br />
<br />
=== GUI config ===<br />
<br />
You can use a GUI to configure prey using the {{ic|prey-config}} script:<br />
<br />
# /usr/share/prey/platform/linux/prey-config.py<br />
<br />
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.<br />
<br />
=== Standalone Mode ===<br />
<br />
The GUI can be used to configure standalone mode.<br />
<br />
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.<br />
<br />
Note that in Standalone Mode, all modules in {{ic|/usr/share/prey/modules}} run by default. To disable them, remove executable permissions on the module's {{ic|run}} file (located within the module's {{ic|core}} subdirectory). For example, the following command disables the {{ic|alarm}} module:<br />
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}<br />
<br />
=== Troubleshooting ===<br />
To troubleshoot, run<br />
<br />
{{bc|# /usr/share/prey/prey.sh --check}}<br />
<br />
==== Beeping ====<br />
If [[Taking_a_Screenshot#scrot|scrot]] is installed, prey will use it to take a screenshot if the {{ic|session}} module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append {{ic|xset -b}}<br />
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.<br />
<br />
=== Bugs ===<br />
There seems to be a bug in version 0.5.3 which gives an error if the SMTP password is set when using "email" post_method, which returns an error, but works fine when executed normally without the --check option.</div>Winston-Wolfehttps://wiki.archlinux.org/index.php?title=User_talk:Flu&diff=261209User talk:Flu2013-06-04T22:31:19Z<p>Winston-Wolfe: /* Bumblebeed automatic startup - key information removed */ new section</p>
<hr />
<div>==Broken templates==<br />
Hi Flu, thank you for all the help you're giving on the wiki! However I have to ask you to always preview and check your edits, in fact [https://wiki.archlinux.org/index.php?title=Installing_Arch_Linux_in_VMware&diff=259537&oldid=258224], [https://wiki.archlinux.org/index.php?title=MacBook&diff=259886&oldid=256737], [https://wiki.archlinux.org/index.php?title=Compiz&diff=260564&oldid=258926] and [https://wiki.archlinux.org/index.php?title=ASUS_Eee_PC_901&diff=next&oldid=259010] have broken some templates (found thanks to [[Special:WhatLinksHere/Template:Error]]). Can you please fix them? :) -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:28, 2 June 2013 (UTC)<br />
:So sorry, I was rush-editing, but I'm calming down. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 14:52, 2 June 2013 (UTC)<br />
<br />
==Bold vs monospace==<br />
Eheh it's me again, I'd also like to ask you to suspend temporarily the substitution of [[Template:ic]] with '''bold''' until we've come to a conclusion in [[Help talk:Style#Reducing formatting bloat]]. I promise to give that discussion a high priority, since I admit it was practically left abandoned. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:00, 2 June 2013 (UTC)<br />
:Ok, you are the boss. -- [[User:Flu|Flu]] ([[User talk:Flu|talk]]) 14:52, 2 June 2013 (UTC)<br />
<br />
== Bumblebeed automatic startup - key information removed ==<br />
<br />
Line 61 being removed made it an unnecessary hassle to troubleshoot the issue after reinstalling Bumblebee today. I finally figured out this was what I was missing after looking at Google's cached version.<br />
<br />
"To start bumblebee automatically at startup, enable bumblebeed service:<br />
<br />
''systemctl enable bumblebeed"''</div>Winston-Wolfe