PDA

View Full Version : Trying to compile and setup logitch g15tools



leadgolem
8th June 2007, 01:18 PM
Here are the steps I've taken so far.

1. Installed a couple of necessary packages.
yum install libusb-devel libdaemon-devel
2. Got all the code downloaded from here. (http://g15tools.sourceforge.net/) libg15-1.2.2.tar.bz2 g15daemon-1.2.7.tar.bz2 libg15render-1.2.tar.bz2 g15composer-3.1.tar.bz2 g15lcd-1.2.tar.bz2
3. Uncompressed them all into there respective folders.
4. Did ./configure make make install, for all but g15lcd-1.2 in there respective folders. All that went fine.
5. The readme file for g15lcd-1.2 says just to compile with make. Did that.
6. Added g15lcd folder to $PATH

Now I have a couple of questions.

A. Does the fedora 7 kernel support uinput?

I need to specify the /dev/ location of my keyboard.
B. How do I determine what that is?

alpha645
8th June 2007, 03:05 PM
What you are looking for can be found in /dev/input . Looking in my /dev/input I see a uinput so that should answer your first question. Your second question is a little harder for me. I get in /dev/input:

event1 till event 5 , mice , mouse0 and uinput.

Those event0 till 5 are probably your keyboard :) . To find out which one is correct, do this:

Open a terminal and become root:

cd /dev/input

cat event0

Now hit some keys and see if the terminal gives some 'weird' output. In my case event4 was the one.

leadgolem
9th June 2007, 04:50 AM
uh... There's no uinput in my /dev/input folder...
I'm sorry, what does it mean if I don't have a /dev/input/uinput?

Ok, my keyboard is /dev/input/event4

foolish
9th June 2007, 11:58 AM
Added g15tools to the fedora package maintainers wishlist: http://fedoraproject.org/wiki/PackageMaintainers/WishList

Hopefully someone who owns the hardware wants to step up and maintain this for Fedora.

leadgolem
9th June 2007, 12:18 PM
Since I really have no idea what I'm doing, I very much hope so.

alpha645
9th June 2007, 01:03 PM
I'm not sure, but the Human Interface code in the kernel (if I correctly recall) is a module. You need to probe it...

leadgolem
9th June 2007, 06:06 PM
Thank you :) I
modprobe uinputand now I have uinput in my /dev/input.

leadgolem
9th June 2007, 06:37 PM
Ok, looks like g15daemon places itself in /usr/sbin. Adding that to my $PATH. Hmm, looks like I need a script to be run by the superuser on every startup. So... Anyone know how to accomplish that, in gnome? Here are the relevant sections from the readme.
G15daemon must be run by the superuser,
root, as it writes to system logs. There is a sample init script
in the contrib directory that could be used to run the daemon on
system startup.and
For a number of reasons, by default the keys on the G15 arent us-
able - especially without g15daemon :) With g15daemon running,
the kernel will know all about the new keys, but your 'X' server
won't without a bit of help. In the contrib subfolder of the
g15daemon distrobution, you'll find an xmodmaprc script. To have
all those new keys working in X11, you'll need to have xmodmap
read that file on every startup. Depending on your distro,
xmodmap may automatically load the file if it is copied to
${HOME}/.Xmodmap otherwise you will have to load it yourself.
There is an example xmodmap.sh file in the contrib directory that
will do this, if it's placed (for instance) in kde's Autostart
folder.

leadgolem
9th June 2007, 07:24 PM
Correct me if I'm wrong, but isn't /etc/rc.local run as root at system startup?

leadgolem
9th June 2007, 08:46 PM
Ok, I got it working. I'm to tired to write a how-to at the moment. I'll do that when I wake up.

leadgolem
9th June 2007, 08:57 PM
Oh, one thing. Is there a proper place for me to put the script used to launch everything?

leadgolem
10th June 2007, 07:44 AM
Finished the tutorial, take a look (http://forums.fedoraforum.org/forum/showthread.php?t=157542)if you're interested.

LaPirre
3rd July 2007, 01:56 PM
I've made some RPMs for the g15daemon and g15tools (mainly for personal usage, as I prefer having my installation completely package-based. But someone else might find them useful too).

You'll find them here (Fedora 7):
libg15-1.2.2-1.fc7.i386.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/libg15-1.2.2-1.fc7.i386.rpm)
libg15render-1.2-1.fc7.i386.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/libg15render-1.2-1.fc7.i386.rpm)
g15composer-3.1-3.fc7.i386.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/g15composer-3.1-3.fc7.i386.rpm)
g15daemon-1.2.7-1.fc7.i386.rpm (http://lazone.shacknet.nu/downloads/linux/g15daemon/g15daemon-1.2.7-1.fc7.i386.rpm)
(I can't guarantee these URLs to always work. But if you need the rpms (or srpms), just drop me an e-mail).

You'll need to (atleast) perform the following steps:
> yum install libusb-devel libdaemon-devel
> rpm -Uvh libg15-1.2.2-1.fc7.i386.rpm libg15render-1.2-1.fc7.i386.rpm g15daemon-1.2.7-1.fc7.i386.rpm
> chkconfig --add g15daemon
> service g15daemon start

If you also plan to use/write some scripts for the LCD-screen, perform the following steps:
> rpm -Uvh g15composer-3.1-2.fc7.i386.rpm
> chkconfig --add g15composer
> service g15composer start
This will start the g15composer without a new display instance, but merely to listen for new screen commands on /var/run/g15composer which most scripts i've seen seems to use.

leadgolem
3rd July 2007, 02:13 PM
I installed the above rpms, and
modprobe uinputWhen I try to
service g15daemon startI get
An Error Occurred - 3 : ( Unable to configure the linux kernel UINPUT driver ) receivedThis is probably due to the 64bit kernel I'm currently running. I'll email LaPirre and try rebuilding the src.rpms.

LaPirre
3rd July 2007, 02:40 PM
g15daemon-1.2.7-1.fc7.src.rpm (http://lazone.shacknet.nu/downloads/linux/g15daemon/g15daemon-1.2.7-1.fc7.src.rpm)
g15composer-3.1-3.fc7.src.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/g15composer-3.1-3.fc7.src.rpm)
libg15-1.2.2-1.fc7.src.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/libg15-1.2.2-1.fc7.src.rpm)
libg15render-1.2-1.fc7.src.rpm (http://lazone.shacknet.nu/downloads/linux/g15tools/libg15render-1.2-1.fc7.src.rpm)

By the way, the "modprobe uinput" is performed in the init script of the g15daemon (so you don't have to run that prior to executing "service g15daemon start").

leigh123linux
3rd July 2007, 02:54 PM
I installed the above rpms, and
modprobe uinputWhen I try to
service g15daemon startI get
An Error Occurred - 3 : ( Unable to configure the linux kernel UINPUT driver ) receivedThis is probably due to the 64bit kernel I'm currently running. I'll email LaPirre and try rebuilding the src.rpms.

Interested ? ( k9copy-1.1.1.3-1.x86_64.rpm )

leadgolem
3rd July 2007, 03:22 PM
Hey leigh, actually, I already downloaded it. I just won't have time to test it until tonight.

LaPirre, thank you. I'll report back tonight.

Edit: leigh, your archive appears corrupt.

leadgolem
3rd July 2007, 07:44 PM
It looks like the g15 stuff is simply not compatible with the 64bit arch. Oh well, it would have been nice.
rpmbuild --rebuild libg15-1.2.2-1.fc7.src.rpm
Installing libg15-1.2.2-1.fc7.src.rpm
error: No compatible architectures found for build

leigh123linux
3rd July 2007, 08:31 PM
Hey leigh, actually, I already downloaded it. I just won't have time to test it until tonight.

LaPirre, thank you. I'll report back tonight.

Edit: leigh, your archive appears corrupt.

ok try this one

http://media1.filewind.com/g.php?filepath=8460

LaPirre
3rd July 2007, 09:28 PM
I've updated the rpms/srpms now (added x86_64 as BuildArch), please re-download the srpms and try to issue a new "rpmbuild --rebuild" on those srpms.

I've also made some changes on the g15composer rpm/srpm (updated to version 3.1-3).
There was some issues with using uid/gid=0 for the main pipe on /var/run/g15composer, causing
all new LCD-screen instances created via this pipe, to also get uid/gid=0 with permissions of 620,
hence preventing the user to issue any commands to that pipe.

The g15composer rpm now creates the group g15composer, whereas only members of this group is allowed to use the "main" pipe on /var/run/g15composer, and pipes derived from it. Don't forget to add users to the "g15composer" group, which should be allowed to use the pipe though.

Please let me know how it works out with the new srpms.

leigh123linux
3rd July 2007, 10:49 PM
I've updated the rpms/srpms now (added x86_64 as BuildArch), please re-download the srpms and try to issue a new "rpmbuild --rebuild" on those srpms.

I've also made some changes on the g15composer rpm/srpm (updated to version 3.1-3).
There was some issues with using uid/gid=0 for the main pipe on /var/run/g15composer, causing
all new LCD-screen instances created via this pipe, to also get uid/gid=0 with permissions of 620,
hence preventing the user to issue any commands to that pipe.

The g15composer rpm now creates the group g15composer, whereas only members of this group is allowed to use the "main" pipe on /var/run/g15composer, and pipes derived from it. Don't forget to add users to the "g15composer" group, which should be allowed to use the pipe though.

Please let me know how it works out with the new srpms.

You forgot to change the path in the sources from /usr/lib to /usr/lib64


Here are some 64 bit packages

g15-x86_64 (http://media9.filewind.com/g.php?filepath=15533)

leadgolem
5th July 2007, 08:50 PM
Nice, working like a charm now.

If neither of you have any objections, I will host these files on my filefront account and add them to my G15 how to.:)

leigh123linux
5th July 2007, 08:52 PM
Nice, working like a charm now.

If neither of you have any objections, I will host these files on my filefront account and add them to my G15 how to.:)


Feel free :cool:

LaPirre
5th July 2007, 09:04 PM
Please do, as then I won't have to worry about my urls to be up :)

leadgolem
5th July 2007, 09:29 PM
Thank you both. The binaries are now available from my filefront account, and the how-to has been updated.

I do have a question about the src.rpms though. Will these compile and run on both x86_64 and I386 archs?

If so, I will post them as an additional link in the how-to. That way, someone using another x86_64 rpm based linux distro could rebuild them for their distro.

If not, could you bounce me versions for both 32 and 64bit archs?

That way the how-to should be helpful for anyone using an rpm based distro, and make it easier for people to get there g15 fully functional in F8.

leigh123linux
6th July 2007, 12:11 AM
Thank you both. The binaries are now available from my filefront account, and the how-to has been updated.

I do have a question about the src.rpms though. Will these compile and run on both x86_64 and I386 archs?

If so, I will post them as an additional link in the how-to. That way, someone using another x86_64 rpm based linux distro could rebuild them for their distro.

If not, could you bounce me versions for both 32 and 64bit archs?

That way the how-to should be helpful for anyone using an rpm based distro, and make it easier for people to get there g15 fully functional in F8.

Hi,

I have fixed the src.rpm's so that they will compile for i386 & x86_64 arch's OK

http://media9.filewind.com/g.php?filepath=16030

Leigh


Name: g15daemon
Summary: A linux daemon for the logitech G15 keyboard
Version: 1.2.7
Release: 1.fc7
Packager: Pierre Larsson <lapirre@gmail.com>
License: GPL
Group: System/Hardware
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
Source0: http://downloads.sourceforge.net/g15daemon/g15daemon-%{version}.tar.bz2
Patch0: %{name}-rc.init.patch
Buildarch: i386 x86_64
Requires: libdaemon,libg15
BuildRequires: libdaemon-devel
Provides: %{name}

%description
G15daemon takes control of the G15 keyboard, allowing the use of all
keys through the linux kernel uinput device driver. It also controls
the use of the keyboard's LCD display, allows multiple, simultaneous
client applications to connect, and gives the user the ability to switch
between client apps at the press of a button.

%package devel
Summary: Development headers for %{name}
Group: Development/Libraries
Provides: %{name}-devel
Requires: %{name}

%description devel
This package contains necessary header files for %{name} client development.

%prep
%setup -q
%patch -p0

%build
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
install -m755 -D contrib/g15daemon-rc.init $RPM_BUILD_ROOT/etc/init.d/g15daemon

%clean
rm -rf $RPM_BUILD_ROOT

%files
/etc/init.d/g15daemon
%{_libdir}/libg15daemon_client.a
%{_libdir}/libg15daemon_client.la
%{_libdir}/libg15daemon_client.so
%{_libdir}/libg15daemon_client.so.1
%{_libdir}/libg15daemon_client.so.1.0.2
/usr/sbin/g15daemon
%doc /usr/share/doc/g15daemon-1.2.7
%doc /usr/share/man/man1/g15daemon.1.gz

%files devel
%{_includedir}/g15daemon_client.h
%doc /usr/share/man/man3/g15daemon_client_devel.3.gz

%changelog
* Sun Jul 1 2007 Pierre Larsson <lapirre@gmail.com>
- Added support for chkconfig to init.rc script
* Sun Jul 1 2007 Pierre Larsson <lapirre@gmail.com>
- Initial spec file created

leadgolem
6th July 2007, 01:21 AM
Thank you. I'll add them to the how-to shortly.

It's nice to have friends who know how to do things you don't.:)