Giter Club home page Giter Club logo

logigsk's Introduction

LogiGSK

A Java based software package to control Logitech G series keyboards, the following keyboards are supported:

G910 Orion Spectrum and Orion Spark
G810 Orion Spectrum
G610 Orion (Brown and Red)
G410 Atlas Spectrum

The code to control the keyboard leds is based on code from MatMoul g810-led project.

Ready to deploy jars can be found at LogiGSK

Features:
The software contains the following features:

  • A freestyle selector, where any key can be selected individually and given any colour.
  • An effect selector where one of multiple effects can be selected, current working effects are:
    • Fixed Colour effect
    • Breathing effect with speed slider and colour chooser
    • Colour Cycle effect with speed slider
    • Colour Wave effect (Horizontal, Vertical, Centre Out) with speed slider
    • Star effect with star and sky colour chooser
  • A zone based selector, where individual zones can be given different colours
  • A startup effect selector, where keyboard startup effect can be set to one of the following:
    • Colour Wave
    • Fixed Colour
  • A brightness slider to control brightness of selected profile (doesn't work with animated effects)
  • Save profile and Load profile options (works with fixed colour profiles and animated effect profiles)
  • Set button, used for setting current profile for current user

Service
The software comes with a service part (daemon) which is responsible for applying animated effect profiles or fixed colour profiles on startup or after resume from suspend or hibernate. The Service is implemented through a daemon program which is also implemented using Java but with the use of apache commons JSVC. The main job of the service is to detect whether a supported keyboard is connected and if so apply the animated effect profiles or fixed colour profiles on startup or after resume from suspend or hibernate. Both main program and daemon feature a hotplug feature where it detects if a supported keyboard is connected and applies a profile if one has been chosen previously for this type of keyboard.

The daemon part will be responsible in connecting to a future android app that will also control keyboard colours and effects. It will also retrieve useful information from the computer (CPU, memory, etc...).

Important Note
The current supported layouts are US_QWERTY layout for all keyboards and US_QWERTY and UK_QWERTY Layout for all G910 Models, if your layout is not included, please open and issue and I would try to add it as soon as possible.

If you want to contribute, you are more than welcome. In order to add a layout, there are a few main things you have to do (That I can think of).

  1. Create a class for your specific model and layout, you can see an example of this in the source code such as the G910SpectrumUSQWERTY Class. It's easy to write this class, you just need to create an image of your keyboards layout in in a way that all the white letter and symbol markings on that image are made transparent using GIMP, Photoshop or any other program (and please try to stick to the resolution used for other layouts, have a look at the .png files in the source). After you have finished the PNG image, use it in the class file, and align the JPanels with their corresponding keys. Please make sure that your select the appropriate keys for your model and layout. Make sure you change the code in your class file to suit your layout. And make sure that the class file you create abides by the template set in other layout class files.
  2. Add the corresponding code to use your class in the LogiGSK class, have a look at that class and you will know what to do.
  3. Add a layout enumeration such as KeyG910USQWERTY and make suitable additions in the Keyboard class.
  4. Check other classes to make sure you add your layout where other layouts are used. An example of this is to change the StarEffect class by adding your corresponding layout.

These are the main things that I can remember now. If I remember anything else I will add it later. If you need help please don't hesitate to ask.

If you do find it too difficult to do yourself, just send me a link of your keyboards image and I will try my best and add it to the program as soon as I have sometime.

Installation

Using provided package creator script file (best way)

  • Clone and extract repository
  • To get a .deb package run sudo ./logigsk-buildpackage deb
  • To get a .rpm package run sudo ./logigsk-buildpackage rpm (Please note that rpm are created using alien tool through converting .deb package to .rpm)
  • To get both packages run sudo ./logigsk-buildpackage
  • Install the resulting package
  • To uninstall do so through your package manager, example in Ubuntu sudo apt-get remove logigsk.

Please note that the package creator script logigsk-buildpackage uses Apache Ant, java, alien and dpkg tools to compile the source code to create executable jars which in turn are used along with other scripts to create the final package, you can trace every step in logigsk-buildpackage for a better understanding

Using provided package files (second best way)

Using provided INSTALL script (third best way)

  • Clone and extract repository
  • Run the script by typing sudo ./INSTALL
  • To uninstall run sudo logigsk UNINSATLL

Please note that this script is very similar to the package creating script but it doesn't create a package, but rather installs the files directly to the directories bypassing the package installation through package manager step. it also differs from the package installation step in that it has an UNINSTALL script which can be executed by running sudo logigsk UNINSATLL.

Service not starting automatically?

A link to the service starting script is created by default in the local autostart directory for the user installing the LogiGSK program. If the autostart directory is not found in $HOME/.config/ it will not create the startup link thus the service will not start automatically on login. To solve this problem, search for the user's local autostart directory and create the startup link as following:
ln -sf /usr/share/logigsk/LogiGSK.sh "$HOME/.config/autostart/LogiGSK.sh"
please remember to replace $HOME/.config/autostart/ with the corresponding location for the user's local autostart in your system. Please note that in some systems you have to create the autostart directory, and that in some systems autostart can't be used, if that is the case, just make sure that you use any available startup option in your environment and add the /usr/share/logigsk/LogiGSK.sh script to the startup apps. Please make sure that the script is run as local user and not root.

Service not running due to selected display?

Please note that the default DISPLAY variable that is set here is :0, please check your display variable by typing the following in bash: echo $DISPLAY. And please note that the default desktop that is set to KDE. Please find out your current desktop by typing something like the following: echo $XDG_CURRENT_DESKTOP. Once you have found both variables please change their corresponding values in you LogiGSK file as follows:
sudo vim /usr/share/logigsk/LogiGSK
Once you have made the changes start the service by running:
logigsk-service start

###JSVC not running due to directory structure change

Thank to Julian Thatcher @andrakis Please refer to #28 (comment)

Free Style


Effects


Zones


Startup Effect


Fixed Colour Effect


Breathing Effect


Colour Wave


Colour Cycle


Star Effect


Settings




logigsk's People

Contributors

jonbitzen avatar mohamadsaada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

logigsk's Issues

Package Builder Fails Under Ubuntu 18.04

I tried to build the deb again and this line appears to break the build as it now returns nothing:

USER=`who | grep ':0' | grep -o '^\w*' | head -n1`

when this runs the USER variable remains empty which causes the package build to fail.

I modified mine to just set

USER=<My_UserName>

Which got it to work for me and I was able to install. See issue #28 for help with starting the service in 18.x by the way.

Cannot install on CentOS 7

Attempting to install on CentOS 7, using the following command:

sudo yum install logigsk-1.0.0.rpm

This is using the .rpm file provided in the README.

Get the following error:

Downloading packages:
Running transaction check
Running transaction test


Transaction check error:
  file / from install of logigsk-1.0.0-2.noarch conflicts with file from package filesystem-3.2-21.el7.x86_64
  file /usr/bin from install of logigsk-1.0.0-2.noarch conflicts with file from package filesystem-3.2-21.el7.x86_64

Error Summary
-------------

Pressed Key effect

The most useful effect by far is the pressed key one: with the whole keyboard with one, fixed color, once you press a key, it changes to a selected color, then slowly (adjustable) changes back to its original color.

Rather than looking pretty, this is ideal to realize whether you've hit one or two keys when your aim isn't all there. Or, you can always give me some pointers on how to code an effect, and I'll gladly do it.

Cheers!

CLI, set and exit?

Hi,

Thanks for putting this together!

However, it does not suit my use case - I do not want yet another daemon running and taking up memory. I have a simple G610 (monochrome) and just want to set LEDs upon X.org starting... like xset does for NumLock, CapsLock and ScrollLock.

Any plans to support that use case?

Cannot find amy VM in Jaca Home

kemi@HeavyTuned:/usr/share/logigsk$ java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

kemi@HeavyTuned:/usr/share/logigsk$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"

kemi@HeavyTuned:/usr/share/logigsk$ ./LogiGSK start
Starting the LogiGSK service...
Cannot find any VM in Java Home /usr/lib/jvm/default-java
The LogiGSK service has started.

Very hard to install

I just tried to install but it's rather complicated.
It would be cool to have an installation script ...
I test it in VM, if script is not fully tested, make a branch for testing

Media keys no longer work

I have Ubuntu 18.04.3 LTS and after I install LogiGSK (and restart my laptop in order to make it work) the media keys from the keyboard no longer work. They do work before I install this, but after that install and restart they no longer do. I also noticed that the G Keys tab it's just an empty page, not sure if the issue is related to this.

I use this at my office and what I do now is to install this tool Monday morning, restart, apply my saved settings, then uninstall, restart and continue to use the keyboard like this until Friday when I shut down the laptop over weekend and the settings are lost so I have to repeat the process next week.

Hard-coded java home location

After compiling via instructions and installing, I found that the program did not pick up the globally set JAVA_HOME variable. Instead, it seems to be hard coded to /usr/lib/jvm/default-java . I had to create a symbolic link via the following command:

sudo ln -s $JAVA_HOME /usr/lib/jvm/default-java

Pop!_OS Post-Installation script failure // Method 1 Install [FIX INCLUDED]

Encountered the following error when installing on Pop!_OS

Error:
Error while installing package: installed logigsk package post-installation script subprocess returned error exit status 1

Steps I took to fix this:

  • Manually created folder /etc/pm/sleep.d as it did not exist.
  • Edited /var/lib/dpkg/info/logigsk.postinst and changed :0 to :1 as on Pop!_OS the default display is :1 instead of :0
  • Ran dpkg --configure logigsk
  • Install was successful

I'd suggest performing an OS check in the Post Install Script

Check4Pop=`cat /etc/os-release|grep -m 1 -o "Pop\!_OS"`
if [ "$Check4Pop" == "Pop!_OS" ]; 
then
    USER=`who | grep ':1' | grep -o '^\w*' | head -n1`
else
    USER=`who | grep ':0' | grep -o '^\w*' | head -n1`
fi

Unable to access jarfile

Most of the installation went okay, however when attempting to launch I am confronted with this error:

Error: Unable to access jarfile /usr/share/logigsk/LogiGSK.jar
I am running as root and im still getting the same error.

german layout for logitech g910 orion spectrum

hello,

as from the title, I'd like to use your software, it works, even if the volume wheel, using the US layout, was deactivated. My keyboard version is german QWERTZ.
Could it be possible to add it to your software?

Thank you

driver for g keys

first off love this piece of software and thank you for making it. in my browsing I have found a working driver for the g910 macro keys at https://github.com/JSubelj/g910-gkey-macro-support I think it should work with other model keyboards but do not have them to test but it seems like it could be used in logiGSK for gkeys

How do I run this on a distro that doesn't already have usb4java?

This seems to work fine on Ubuntu, or at least the version I was using did. I had to reinstall my os so I went with Debian. This won't run on Debian. I can run the deb package installer and it installs but it doesn't run. When I try to run the jar file from the terminal with java -jar LogiGSK.jar, I get the following error:

Error: Unable to initialize main class Logi.GSeries.Keyboard.LogiGSK Caused by: java.lang.NoClassDefFoundError: org/usb4java/LibUsbException

There is no instance of a "usb4java" or a "libusb4java" or anything similar in any Debian or Arch repository. I tried compiling usb4java myself but it gives me this error.
fatal error: jni.h: No such file or directory 10 | #include <jni.h>
Anyway, Debian ended up not working on that pc due to nvidia driver issues so I installed Arch instead. Same exact problem and I'm stuck at the same dead end - I can't overcome the missing jni.h problem.

Has anyone figured out how to make it work on Arch (or Debian) yet?

Support for FR_AZERTY Layout

Hi,

Have you plan to add the french FR_AZERTY Layout.

I've try to make it myself but i'm far away from success :/

Thanks for your work

Big "This-can't-be-right"

Hi,
0

root@lk-ws:/home/sammy/leds/LogiGSK# ./INSTALL
This program requires java but it's not installed. Aborting.
This program requires javac but it's not installed. Aborting.
This program requires jsvc but it's not installed. Aborting.
This program requires ant but it's not installed. Aborting.
compiling the project using Apache Ant
./INSTALL: line 25: ant: command not found
cp: cannot stat '/home/sammy/leds/LogiGSK/dist/LogiGSK.jar': No such file or directory
chmod: cannot access '/usr/share/logigsk/LogiGSK.jar': No such file or directory
cp: cannot stat '/home/sammy/leds/LogiGSK/dist/lib/.jar': No such file or directory
chmod: cannot access '/usr/share/logigsk/lib/
.jar': No such file or directory
failed to setup LogiGSK service startup file in autostart, please refere to website for more details.
LogiGSK has been successfully installed

There's something fundamentally wrong with this picture.... specially considering the last line :-)

Add to AUR

Would be really helpful if someone could add this to the AUR, I'm not really sure how to do that.

Ubunutu 18.04 Appears to break this!

After upgrading to 18.04 from 17.04 I get this message when trying to start the service:

Starting the LogiGSK service...
Cannot find any VM in Java Home /usr/lib/jvm/default-java
The LogiGSK service has started

I also tried to build the deb again and this line appears to break the build as it now returns nothing:

USER=`who | grep ':0' | grep -o '^\w*' | head -n1`

when this runs the USER variable remains empty which causes the package build to fail.

Color does not change

Dear developers, I've successfully installed LogiGSK 1.0, and opened the software. However, whatever I've set in the software does not show anything changed on my keyboard, any ideas?

JRE Kubuntu update just broke LogiGSK?

Hi team,
I'm no expert but it looks like a routine Kubuntu system update included a JRE update and now LogiGSK won't launch. Manual launch attempt:

Starting the LogiGSK service... Cannot find any VM in Java Home /usr/lib/jvm/default-java The LogiGSK service has started.

my apt log

Start-Date: 2018-08-21 17:40:22 Commandline: packagekit role='update-packages' Requested-By: [OBFUSCATED] (1000) Upgrade: libapt-inst2.0:amd64 (1.6.3, 1.6.3ubuntu0.1), apt:amd64 (1.6.3, 1.6.3ubuntu0.1), libapt-pkg5.0:amd64 (1.6.3, 1.6.3ubuntu0.1), openjdk-11-jre-headless:amd64 (10.0.1+10-3ubuntu1, 10.0.2+13-1ubuntu0.18.04.1), openjdk-11-jre:amd64 (10.0.1+10-3ubuntu1, 10.0.2+13-1ubuntu0.18.04.1), wpasupplicant:amd64 (2:2.6-15ubuntu2, 2:2.6-15ubuntu2.1), apt-utils:amd64 (1.6.3, 1.6.3ubuntu0.1) End-Date: 2018-08-21 17:40:30

All the best and thanks for the cool util :)

Software does not work on Kali Linux

Hi, I'm using the last dist of Kali linux, I,v tried everything, compile the pkg by myself, donwload the deb and rpm from the repo and installed they etc.. i can install the soft but when i open it nothing happens. I"m using a G610

Special keys (Media button) not working

Hi Mohamad,

thanks for the special tool :)
After the installation I have the problem that the keys Volume, Start, Stop, Last and Next do not work anymore.
Im using Linux Mint 19.1.

Thanks a lot!

Add DE_QWERTZ layout

Hey, just writing you really quick because I've been waiting for a project like yours since I got this keyboard!

I have the german version of the g910 Orion Spark. In principle, I was going to add my Keyboard as described in your README, but ran into some problems.
First and foremost: There is no clean Image of the german keyboard layout for the g910. The official windows configuration program is simply using the english layout. Now we could probably do that too, but it would be unclean.
The best clean picture of the g910 I found is this one:
http://www.hardbloxx.de/wp-content/uploads/2015/03/Logitech-G910-Orion-Spark-RGB_4.jpg
I will try to edit it, but wanted to hear your opinion. Adding the special keys without providing them clearly in the layout would be a possibility.

Second: what version of Java/IDE settings do you use? I'm using intellij with Java 8 openjdk, but I seem to be getting quite a few errors with your code.

And Last: You mention that I'd have to add the keyboard class to quite a few other classes. In the Star class, it seems I need the amount of keys to iterate over etc. What other properties do I need and how can I obtain them the easiest? If you have some kind of workflow that solves this faster than manual counting, that would probably safe me a lot of time.
For this, it would also be interesting to know if the keycount includes for example G-Keys.

As mentioned above, I will try to complete this and provide a pull request by next week, if you accept an unfinished patch containing only the additional class and declared additional keys, I could provide it sooner. Thank you for your time and this awesome project!

no effect when pressing "set"

I have a logitech g910 keyboard. I'm running ubuntu 18.04 with kde-plasma and I got the software to install without issue. The keyboard shows up in the GUI but when I press the 'set' button nothing happens. Still stuck on the default rainbow wave effect.

G-Keys input not working?

It seems that the G-keys for the G910 keyboard are not working on Ubuntu 16.04. The G-Key pane in the application is blank. Output in xev (both sudo and non-sudo) shows no output/input at all from these keys.

The LEDs do control just fine, though!

(also, excellent program! - I was able to build successfully and install.)

ES_QWERTY on G810

I'm trying to do it by myself, but I find some obstacles.

Right now, the lsusb command reports that my keyboard (G810 ES_QWERTY) ID is 046d:c337, which, if I understood well your code, is the same as an G910 Orion Spark UK_QWERTY.

a few effects work

First of all, thank you for you work.
I installed it through the first method, Ubuntu open correctly LogiGSK, I set the effects without any error message but most do not work.
The keyboard works fine on Windows 7. On Ubuntu 16.04 work only these types of lighting:
-EFFECTS:
fixed colour
breathing
colour cycle

-ZONES
Multimedia

It is still a step forward but I would like to be able to use more features.
I use Ubuntu 16.04 with openjdk 8.
Any suggestions? Can I fix something?
Thanks

Having issues getting it working

System: Xubuntu 16.04 LTS

I need some help on getting this working, I've installed it but the service wont start even tho I started it and I got a error saying

Starting the LogiGSK service...
Cannot locate Java Home
The LogiGSK service has started.

tho I did

export JAVA_HOME=/usr/lib/jvm/jre-8-oracle-x64

really wish this was just a install and use instead of this unneeded complications..

Ubuntu 14.04 and G910

Hello Mohamad,

First and foremost, thank you very much for doing what Logitech refuses to do, which is to help us enjoy what should be a great product.
I have the G910, everything works well in windows, I can get the LED setting to stick in Ubuntu if I close Lcore process before rebooting, If I don’t well I get the supra annoying rainbow effect when I want to work in Ubuntu which I use for my work.
I have installed LogiGSK, by downloading .deb, and having Ubuntu software centre install. have the app's Icon in bash. Howevber when I start it, nothing happens, no GUI or anything else, no error message either.

I'm pretty sure the issue is here and not with your software. Any idea of what I could do to at least jam the rainbow and get a minimal backlight working, any color at this point would make me happy!
could I be missing some repository component?

Again, thank you very much for your time and efforts!

Eric Bergeron

Stuck in Loading Screen

Hi, first of all: thanks for the work!
I'm using Kubuntu 17.04 and the Logitech g910 orion spectrum.
I tried to build my own package and installed it - the program closed immediately after the start.
With the Install script I'm getting so far that the program starts and shows loading but stays there - I'm able to click on "File" but the only thing I can click on is "Exit". When I click on "Edit" the entry "Settings" appears clickable but nothing happens when you click it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.