-
Notifications
You must be signed in to change notification settings - Fork 8
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
Old haguichi not detecting Terminal/FileManager etc. variables correctly #2
Comments
Hi Fincer, You can find the Exists() method within Command.cs itself on line 235: As you can see it simply executes "command -v {program here}" in a bash shell. If this "command -v" doesn't find a path to the programs binary Haguichi assumes it doesn't exist. The current Vala/GTK3 version is still using the same technique: PS: You should update your Haguichi version! ;P |
Hey, thanks for quick response @ztefn ! I'll check those lines soon. P.S. I know. I'm just too stubborn to do that. :) Fincer |
I didn't know that. Thanks for info, though. It's actually more that I prefer keeping my system without GTK3 packages. Qt5 is my choice, but since the program is not Qt-based, and I really like the idea of Haguichi, I use the old GTK2 version instead. There is a Qt-based hamachi UI program known as Quamachi around, but it's just too ugly. Haguichi's interface is much better. |
Ah, I see... here I thought people rather kept their system without Mono packages... =) Anyway. Please let me know if you find anything problematic with the command detection which could be relevant to the Vala code too. |
Yeah sure! Thanks again for responding! |
I manually tested the following commands (~line 235):
However, these ones return nothing (~meaning null or empty) on my system:
which is the problem. Simply using uppercase Condition Edit: not sure if any help but my bash version is |
I'm not so sure about this. Haguichi itself makes bash return "command not found" by appending So these commands is what you should actually run on your system to get the same output as Haguichi: And to make sure what Haguichi actually determines, please check the debug output: Because it could also be that Haguichi does determine the right commands, but the threads finish only after the CommandsEditor already has been initialized. I recently stripped out the separate detection threads in the Vala code for that same reason: c6e51bb |
Hmm okay. Actually, yeah... Commands
work as expected. This is the terminal output of
I need to investigate this bit further, thanks for the hints! |
I found the solution. Adding |
Might be interesting to also log the output that Haguichi receives, right before the if/else statement: |
Yup. I added
All randomness and strange outputs stopped once I added p.WaitForExit ();. I didn't even need to delete private threads you mentioned before. Sorry for having troubled you with this issue. |
No problem. I'm glad for you having apparently unraveled the C# shenanigans! :) |
Haha thanks! Learning & debugging takes time, though the solutions can be pretty simple after all. It was just too nasty problem to let it be unsolved, anyway. |
Hi there,
the version of Haguichi I use is an old one, 1.0.26 clr 4.0. Why? Because I prefer GTK2 over GTK3.
I have compiled the program multiple times on my KDE5 environment in previous years without problems. I tested the program yesterday again after long time.
I noticed the program didn't correctly set neither variable Terminal (DetermineTerminalThread) nor FileManager (DetermineFileManagerThread) which both have been defined in /src/Command.cs. Terminal variable always returns "gnome-terminal" and FileManager returns "nautilus", though I don't have none of these installed. Instead, I use konsole and dolphin.
As far as I am aware, old haguichi config is stored at $HOME/.config/gconf folder. I tried deleting it, but the problem persisted. I have enabled debug flag for the program but it didn't give any helpful output either.
Before suggesting that I should update my Haguichi version, I'd like to update the source code so that the program gets those variable correctly set or at least I can see konsole & dolphin in CommandsEditor // Settings window as expected.
You have used CSharp Exists() method for detecting a Linux command in /src/Commands.cs. Is this method still valid or is there something else I am not aware of? My mono version is 5.0.0.100.
If this is a source code problem, which method should be used to detect a command? If it's not a source code problem, is there any other configuration files other than those in $HOME/.config/gconf folder?
Sincerely,
Fincer
The text was updated successfully, but these errors were encountered: