Difference between revisions of "Prey"

From ArchWiki
Jump to: navigation, search
m (GUI config: Added code formatting)
(Configuration)
(13 intermediate revisions by 4 users not shown)
Line 10: Line 10:
  
 
== Configuration ==
 
== Configuration ==
 +
Add your device using the control panel on Prey's website.
  
Edit "/usr/share/prey-tracker/config" and add your device key and API key in the appropriate place.
+
{{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}}
  
Run "sudo /usr/share/prey-tracker/prey.sh" and check the results.
+
Edit {{ic|/usr/share/prey/config}} and add your device key and API key, both of which are listed in Prey's control panel.
 +
 
 +
Run {{ic|/usr/share/prey/prey.sh}} as root to ensure that the configuration is correct.
 +
 
 +
{{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/}}.}}
 +
 
 +
Enable [[systemd]] service '''prey-tracker''' to automatically start Prey at boot {{ic|# systemctl enable prey-tracker}}
  
 
=== Modules ===
 
=== Modules ===
Line 22: Line 29:
 
You can use a GUI to configure prey using the {{ic|prey-config}} script:
 
You can use a GUI to configure prey using the {{ic|prey-config}} script:
  
{{bc|# sudo /usr/share/prey-tracker/platform/linux/prey-config.py}}
+
# /usr/share/prey/platform/linux/prey-config.py
  
Note that if this doesn't work you are missing a dependency, not sure if python alone suffices.
+
Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.
  
 
=== Standalone Mode ===
 
=== Standalone Mode ===
  
You can use the GUI to configure standalone mode.
+
The GUI can be used to configure standalone mode.
  
Alternatively you can edit /usr/share/prey-tracker/config
+
Alternatively,{{ic|/usr/share/prey/config}} can be edited to change {{ic|post_method}} to {{ic|email}} and edit the SMTP settings.
  
to change the post_method to "email" and edit the SMTP settings.
+
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:
 
+
{{bc|# chmod -x /usr/share/prey/modules/alarm/core/run}}
Note that in Standalone Mode, all modules in /usr/share/prey-tracker/modules run by default. To turn these off, you need to go into each "core" subdirectory of each module, und switch off the execute bit on "run". So for example, if you want to turn off the "alarm" module, you do this:
+
 
+
sudo chmod -x /usr/share/prey-tracker/modules/alarm/core/run
+
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===
 +
To troubleshoot, run
  
To troubleshoot, try:
+
{{bc|# /usr/share/prey/prey.sh --check}}
  
sudo /usr/share/prey-tracker/prey.sh --check
+
Ensure you have enabled [[systemd]] service '''prey-tracker.service''' and '''prey-trackter.timer''' to start Prey at boot.
  
==== Beeping ====
+
If you're not receiving webcam images in you reports, install {{Pkg|xawtv}} from the official repositories.
  
If you have scrot installed, prey will use it to take a screenshot if the "session" module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To avoid beeping, you have to add
+
==== Beeping ====
xset -b
+
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}}
to the file /usr/share/prey-tracker/modules/session/core/run at the top
+
to the beginning of {{ic|/usr/share/prey/modules/session/core/run}}.
  
 
=== Bugs ===
 
=== Bugs ===
 
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.
 
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.

Revision as of 23:11, 5 June 2013

Prey is a set of bash scripts that helps you track your computer when it is stolen.

This guide shows you how to install Prey.

Installation

Install prey-trackerAUR from the AUR.

Configuration

Add your device using the control panel on Prey's website.

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

Edit /usr/share/prey/config and add your device key and API key, both of which are listed in Prey's control panel.

Run /usr/share/prey/prey.sh as root to ensure that the configuration is correct.

Note: The old version of prey-trackerAUR ( < 0.5.9-3) was in /usr/share/prey-tracker/ folder, now (>0.5.10-2) it is in /usr/share/prey/.

Enable systemd service prey-tracker to automatically start Prey at boot # systemctl enable prey-tracker

Modules

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.

GUI config

You can use a GUI to configure prey using the prey-config script:

# /usr/share/prey/platform/linux/prey-config.py

Note that if this doesn't work you are missing a dependency, not sure if Python alone suffices.

Standalone Mode

The GUI can be used to configure standalone mode.

Alternatively,/usr/share/prey/config can be edited to change post_method to email and edit the SMTP settings.

Note that in Standalone Mode, all modules in /usr/share/prey/modules run by default. To disable them, remove executable permissions on the module's run file (located within the module's core subdirectory). For example, the following command disables the alarm module:

# chmod -x /usr/share/prey/modules/alarm/core/run

Troubleshooting

To troubleshoot, run

# /usr/share/prey/prey.sh --check

Ensure you have enabled systemd service prey-tracker.service and prey-trackter.timer to start Prey at boot.

If you're not receiving webcam images in you reports, install xawtv from the official repositories.

Beeping

If scrot is installed, prey will use it to take a screenshot if the session module is enabled. Unfortunately, scrot emits an annoying beep everytime it is run. To disable beeping, append xset -b to the beginning of /usr/share/prey/modules/session/core/run.

Bugs

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.