Difference between revisions of "Development on Linux"
Line 15: | Line 15: | ||
==Download GIMX sources== <!--T:9--> | ==Download GIMX sources== <!--T:9--> | ||
− | + | <code><!--T:10--> | |
− | git clone -b master --single-branch --depth 1 <nowiki>https://github.com/matlo/GIMX.git</nowiki> | + | git clone -b master --single-branch --depth 1 <nowiki>https://github.com/matlo/GIMX.git</nowiki></code> |
==Compile== <!--T:11--> | ==Compile== <!--T:11--> | ||
− | + | <code><!--T:12--> | |
cd GIMX | cd GIMX | ||
− | + | make -j 2</code> | |
<!--T:13--> | <!--T:13--> | ||
Line 29: | Line 29: | ||
==Install== <!--T:14--> | ==Install== <!--T:14--> | ||
− | + | <code><!--T:15--> | |
− | sudo make install | + | sudo make install</code> |
==Set the setuid== <!--T:19--> | ==Set the setuid== <!--T:19--> | ||
Line 37: | Line 37: | ||
A few gimx binaries need root priviledges. | A few gimx binaries need root priviledges. | ||
− | + | <code><!--T:21--> | |
− | sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision | + | sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision</code> |
==Set Input Device Permissions== <!--T:16--> | ==Set Input Device Permissions== <!--T:16--> | ||
Line 45: | Line 45: | ||
One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group. | One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group. | ||
− | + | <code><!--T:18--> | |
sudo su | sudo su | ||
− | + | groupadd -f input | |
− | + | ||
− | + | echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules | |
− | + | echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules | |
− | + | chgrp -f input /dev/input/event* /dev/input/js* | |
− | + | chmod g+rw /dev/input/event* /dev/input/js* | |
− | + | ||
− | + | chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher | |
− | + | chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher | |
− | + | ||
− | + | exit</code> | |
</translate> | </translate> |
Revision as of 09:30, 22 April 2015
This wiki explains how to compile GIMX from a Linux terminal.
Contents
Install development packages
On Ubuntu:
sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev libxml2-dev libusb-1.0-0-dev libncursesw5-dev gettext xterm xdg-utils libmhash-dev libcurl4-gnutls-dev libxi-dev libx11-dev libhidapi-dev libhidapi-hidraw0
On Fedora:
yum -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel (to be completed)
Download GIMX sources
git clone -b master --single-branch --depth 1 https://github.com/matlo/GIMX.git
Compile
cd GIMX
make -j 2
Replace "2" with your number of CPU cores.
Install
sudo make install
Set the setuid
A few gimx binaries need root priviledges.
sudo chmod u+s /usr/bin/gimx /usr/bin/sixaddr /usr/bin/bdaddr /usr/bin/hcirevision
Set Input Device Permissions
One way to give read permissions to GIMX is to create a special group, change /dev/input/event* group ownership to that group, and then make the gimx binaries setgid to that group.
sudo su
groupadd -f input
echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules
echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules
chgrp -f input /dev/input/event* /dev/input/js*
chmod g+rw /dev/input/event* /dev/input/js*
chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher
chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher
exit