Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run it on linux? #4

Closed
Ovsyanka opened this issue Nov 11, 2019 · 23 comments
Closed

How to run it on linux? #4

Ovsyanka opened this issue Nov 11, 2019 · 23 comments

Comments

@Ovsyanka
Copy link

Could you share some instuctions how to run it on linux? As I understand I should compile it somehow. But I am ot sure how. I tried to install msbuild, but I didn't succeed so far (I got dependency errors). Is it at least the right direction?

@Ovsyanka
Copy link
Author

Ovsyanka commented Nov 11, 2019

I managed to run it on Arch linux:

  1. Install mono package

  2. run xbuild GK6X.sln

There is warnings:

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

GK6X.sln:  warning : Don't know how to handle GlobalSection ExtensibilityGlobals, Ignoring.
  1. run program
cd Build
sudo mono GK6X.exe

I run it from the Build directory because it expects Data/i18n/langs direcroty in the current path and raise the exception if it is not there:

Unhandled Exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path '.../Data/i18n/langs'.

@pixeltris
Copy link
Owner

Thanks for documenting your findings for getting it to build on Linux. The latest versions of mono should include msbuild so you should be able to use that rather than the deprecated xbuild.

And yes the working directory should be in the Build directory as the code loads files relative to the current working directory rather than relative to where the exe is. It wouldn't be too hard to make the paths relative to the exe location but for now I'll leave it as it is.

@Ovsyanka
Copy link
Author

If I am not mistaken, current arch mono package (6.0.0.334-1) doesn't contain msbuild.

Thanks for your reply. I think it would be nice to add these instructions into documentation page. I could make the PR if you prefere. Should I?

@minego
Copy link

minego commented Dec 4, 2019

Thank you so much! The instructions on this bug were VERY helpful, and now I have a useful keyboard! This is MUCH nicer than the original software and I don't have to boot a VM to use it.

Thank you all so much!

@adrianlshaw
Copy link

Really great software! I have one quick question.

My GK64 came with | mapped to # and it's very annoying. Based on the sample config I'm trying to remap it using the following but it doesn't seem to work. Any advice?

[Base,Layer1,Layer2,Layer3,FnLayer1,FnLayer2,FnLayer3]
[Lighting(White light respiration,Base)]
[Lighting(Windmill,Base)]
[Lighting(Red light respiration,Base)]
[Lighting(Starlish,Base)]
Pause:Delete
|:|

@pixeltris
Copy link
Owner

pixeltris commented Dec 7, 2019

I don't think I added support for mapping special character codes ~<>?:"|{}±!_( etc to their key counterparts. Instead you'll have to find the textual name for that key, the list of keys are defined here

public enum DriverValue : uint
you might have to play around with it to find what you're looking for as I'm not quite sure in this case. You might be looking for the Backslash value? So maybe test doing Backslash:A to first change it to the A key, then find out how to redirect it to what you want it to be by playing around with the values. Note that doing Backslash:Backslash wouldn't do anything as you need to map a key from a value to a different value, using the same value as itself is the same as no change.

Also I think [Lighting(xxxxxx)] clears out the current target layer type which might mess things up. [Base,Layer1,Layer2,Layer3,FnLayer1,FnLayer2,FnLayer3] is used to set up key mappings which should follow in the lines below.

@adrianlshaw
Copy link

Brilliant @pixeltris thanks for the response.

Also I think [Lighting(xxxxxx)] clears out the current target layer type which might mess things up.

Turns out that the ordering of that config did mess things up. I can confirm that Backslash:A works as expected now that I've removed those Lighting lines.

As for the keycode for I've settled with Backslash:AltBackslash, which is good enough for now. Many thanks for the pro tips.

@DonaldTsang
Copy link

Cross-reference #3

@Fletchersan
Copy link

Hello guys,
Newbie to Linux here, wanted to use my keyboard on Ubuntu 18.04 LTS Bionic Beaver.
After following the above steps i got the two following errors
Unhandled Exception:
HidSharp.Exceptions.DeviceUnauthorizedAccessException: Not permitted to open HID class device at /dev/hidraw1.
at HidSharp.Platform.Linux.LinuxHidStream.DeviceHandleFromPath (System.String path, HidSharp.HidDevice hidDevice, HidSharp.Platform.Linux.NativeMethods+oflag oflag) [0x000bb] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.TryParseReportDescriptor (HidSharp.Reports.ReportDescriptor& parser, System.Byte[]& reportDescriptor) [0x0000f] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.RequiresGetInfo () [0x00017] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.GetMaxInputReportLength () [0x00000] in :0
at GK6X.KeyboardDeviceManager.RefreshConnectedDevices () [0x0005d] in <166f4681c3854609829b276666821d7f>:0
at GK6X.KeyboardDeviceManager.StartListener () [0x00020] in <166f4681c3854609829b276666821d7f>:0
at GK6X.Program.Main (System.String[] args) [0x000cd] in <166f4681c3854609829b276666821d7f>:0
[ERROR] FATAL UNHANDLED EXCEPTION: HidSharp.Exceptions.DeviceUnauthorizedAccessException: Not permitted to open HID class device at /dev/hidraw1.
at HidSharp.Platform.Linux.LinuxHidStream.DeviceHandleFromPath (System.String path, HidSharp.HidDevice hidDevice, HidSharp.Platform.Linux.NativeMethods+oflag oflag) [0x000bb] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.TryParseReportDescriptor (HidSharp.Reports.ReportDescriptor& parser, System.Byte[]& reportDescriptor) [0x0000f] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.RequiresGetInfo () [0x00017] in :0
at HidSharp.Platform.Linux.LinuxHidDevice.GetMaxInputReportLength () [0x00000] in :0
at GK6X.KeyboardDeviceManager.RefreshConnectedDevices () [0x0005d] in <166f4681c3854609829b276666821d7f>:0
at GK6X.KeyboardDeviceManager.StartListener () [0x00020] in <166f4681c3854609829b276666821d7f>:0
at GK6X.Program.Main (System.String[] args) [0x000cd] in <166f4681c3854609829b276666821d7f>:0

Help would be appreciated.

@adrianlshaw
Copy link

@Fletchersan Use sudo

@pixeltris
Copy link
Owner

The README has been updated to clarify how to compile / run on Linux / Mac.

@Fletchersan
Copy link

Thanks a lot @everyone! 😅

Faalagorn added a commit to Faalagorn/GK6X that referenced this issue May 17, 2020
Clarified the GUI part and running on Linux – changed sudo for *super user*, as other ways to be root work here (`su`, `doas`, etc.). Also added link to pixeltris#4 so hopefully it's clearer how to compile it.

It's probably worth rewriting somewhere down the line instead of relying to link to issue, but for now I hope it clears up some questions. :)
@adrianlshaw
Copy link

adrianlshaw commented May 17, 2020

After revisiting this project I get a lot of build errors on Ubuntu 18.04 with the mono-complete package. Lots of errors relating to missing definition of basic types like System.Object and System.Int32 etc.

To overcome those errors I use the following command:

xbuild /p:TargetFrameworkVersion=v4.5 /p:TargetFrameworkProfile="" GK6X.sln

Hope this is useful to someone.

@siah-maraat
Copy link

siah-maraat commented Aug 20, 2020

Hi guys,
I'm a macOS user and I am having issues remapping my LAlt and LWin keys to be better suited to macOS

This is what I'm doing.

[Base,Layer1,Layer2,Layer3,FnLayer1,FnLayer2,FnLayer3]
Left GUI:LAlt
Left Alt:LWin

any help would be appreciated.

@AnkushSinghGandhi
Copy link

hey my keyword dosn't give any input but it lights up but some times it works.

@AnkushSinghGandhi
Copy link

can i make keyboard lights white

@izmoz
Copy link

izmoz commented Feb 21, 2022

Hi, i faced with some problems with your software, when i open gui in browser, i've this blurry line in bottom half of screen and i cant hit any button, is it some bug?
Screenshot_20220221_175552

@pixeltris
Copy link
Owner

@tinydumb that's the same problem as in #181 resize your browser to fix it.

@izmoz
Copy link

izmoz commented Feb 21, 2022

@pixeltris thanks a lot, u're saved my ass, because my drivers get broke, have a good day!

@Humam-Hamdan
Copy link

Hi, i downloaded the zip, extracted it, there's no build folder there... where should i execute msbuild?

@Ovsyanka
Copy link
Author

@Humam-Hamdan I believe you downloaded compiled version of the app. Instructions here is for building it yourself from the source code. You can download the source code from the release section Source code (zip) / Source code (tar.gz) or by cloning the repo.

@Humam-Hamdan
Copy link

@Humam-Hamdan I believe you downloaded compiled version of the app. Instructions here is for building it yourself from the source code. You can download the source code from the release section Source code (zip) / Source code (tar.gz) or by cloning the repo.

In that you're right, i noticed that after i closed my pc so i didn't get the chance to relook here again.

@Humam-Hamdan
Copy link

built it, ran it, noting, the terminal window just stays as it is without anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants