Difference between revisions of "Development on Linux"
(→Set the setuid) |
m (Adding dependencies for Fedora) |
||
(30 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
==Install development packages== <!--T:2--> | ==Install development packages== <!--T:2--> | ||
− | + | <!--T:27--> | |
− | sudo apt-get install git g++ libwxgtk2.8-dev libbluetooth-dev | + | On Ubuntu 20.04:<br /> |
+ | <code> | ||
+ | sudo apt-get install build-essential pkg-config git g++ libwxgtk3.0-gtk3-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</code> | ||
+ | |||
+ | <!--T:27--> | ||
+ | On Ubuntu 18.04 / Raspbian Stretch:<br /> | ||
+ | <code> | ||
+ | sudo apt-get install build-essential pkg-config git g++ libwxgtk3.0-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</code> | ||
+ | |||
+ | <!--T:3--> | ||
+ | On Ubuntu 14.04:<br /> | ||
+ | <code> | ||
+ | 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</code> | ||
+ | |||
+ | <!--T:22--> | ||
+ | On Raspbian Jessie:<br /> | ||
+ | <code> | ||
+ | sudo apt-get install build-essential pkg-config 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</code> | ||
<!--T:4--> | <!--T:4--> | ||
− | On Fedora: | + | On Fedora:<br /> |
+ | <code> | ||
+ | dnf -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel libcurl-devel ncurses-devel mhash-devel(to be completed)</code> | ||
==Download GIMX sources== <!--T:9--> | ==Download GIMX sources== <!--T:9--> | ||
− | + | <!--T:10--> | |
− | git clone -b master --single-branch --depth 1 <nowiki>https://github.com/matlo/GIMX.git</nowiki> | + | <code> |
+ | git clone -b master --single-branch --depth 1 --recursive -j8 <nowiki>https://github.com/matlo/GIMX.git</nowiki></code> | ||
==Compile== <!--T:11--> | ==Compile== <!--T:11--> | ||
− | + | <!--T:12--> | |
− | cd GIMX | + | <code> |
− | + | cd GIMX<br /> | |
+ | make -j 2</code> | ||
<!--T:13--> | <!--T:13--> | ||
Line 27: | Line 48: | ||
==Install== <!--T:14--> | ==Install== <!--T:14--> | ||
− | + | <!--T:15--> | |
− | sudo make install | + | <code> |
+ | sudo make install</code> | ||
− | ==Set the setuid== | + | ==Set the setuid== <!--T:19--> |
+ | <!--T:20--> | ||
A few gimx binaries need root priviledges. | A few gimx binaries need root priviledges. | ||
− | + | <!--T:21--> | |
+ | <code> | ||
+ | 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 41: | Line 66: | ||
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. | ||
− | + | <!--T:18--> | |
− | sudo su | + | <code> |
− | + | sudo su<br /> | |
− | + | ||
− | + | <!--T:23--> | |
− | + | groupadd -f input<br /> | |
− | + | ||
− | + | <!--T:24--> | |
− | + | echo "KERNEL==\"event*\", NAME=\"input/%k\", MODE:=\"660\", GROUP=\"input\"" > /etc/udev/rules.d/99-gimx-input.rules<br /> | |
− | + | echo "KERNEL==\"js*\", NAME=\"input/%k\", MODE:=\"664\", GROUP=\"input\"" >> /etc/udev/rules.d/99-gimx-input.rules<br /> | |
− | + | chgrp -f input /dev/input/event* /dev/input/js*<br /> | |
− | + | chmod -f g+rw /dev/input/event* /dev/input/js*<br /> | |
− | + | ||
+ | <!--T:25--> | ||
+ | chgrp input /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | ||
+ | chmod g+s /usr/bin/gimx-config /usr/bin/gimx-fpsconfig /usr/bin/gimx-launcher<br /> | ||
+ | |||
+ | <!--T:26--> | ||
+ | exit</code> | ||
</translate> | </translate> |
Latest revision as of 13:35, 17 February 2022
This wiki explains how to compile GIMX from a Linux terminal.
Contents
Install development packages
On Ubuntu 20.04:
sudo apt-get install build-essential pkg-config git g++ libwxgtk3.0-gtk3-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
On Ubuntu 18.04 / Raspbian Stretch:
sudo apt-get install build-essential pkg-config git g++ libwxgtk3.0-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
On Ubuntu 14.04:
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
On Raspbian Jessie:
sudo apt-get install build-essential pkg-config 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
On Fedora:
dnf -y install wxGTK-devel bluez-libs-devel glib2-devel libxml2-devel libXi-devel libusb-devel libcurl-devel ncurses-devel mhash-devel(to be completed)
Download GIMX sources
git clone -b master --single-branch --depth 1 --recursive -j8 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 -f 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