-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Touché doesn't start on Ubuntu 18.04 #18
Comments
Hi! It looks like your config file (placed at If you are not familiar with XML, feel free to post it here so I can help you to fix it |
I should have added that this happens even without a config file. I did notice that the error was coming from the XML parsing library, so I tried adding the default config from the touchegg repo, but that didn't work either. |
Is there a fallback location for the config file somewhere that might be picked up instead? 🤔 |
Ah, found it: Line 36 in ccd7bcf
This file looks OK, and yet I still get the error. This is very odd! |
Yes, as you found out, the system level config file is placed at If Could you copy and paste the contents of your config file, pleas? (System and/or home please) |
Actually hang on -- I wonder if this is some weird issue with |
Ah-ha, here we go -- for whatever reason, |
More clues! Here's a comment from somebody running into the same issue -- paradoxxxzero/gnome-shell-system-monitor-applet#520 (comment) Looks like it's an issue with my version of Gnome Shell being older, which makes sense since I'm on 18.04. I previously installed Touché on 20.04 and had no issues. Yay for breaking changes in the Gnome API 😞 |
Alright, one last comment, then I'm done with all the spam. I managed to hack it to a working state by simply returning If you get around to adding a conditional to fix this for older Gnome versions I'm happy to test it out for you! Cheers, and thanks for building all this -- it's great and makes using Linux on my laptop a much, much nicer experience. |
Hi and thanks for investigating this. I wish every bug report were like this one, where the reporter solve their own bug 😆 Yes, it looks like the API is broken so, 2 options here:
/**
* @param {string} path File path.
* @returns {string} The file contents.
*/
static readFile(path) {
const file = Gio.File.new_for_path(path);
const [success, contents] = file.load_contents(null);
if (!success) {
// TODO Handle this error
throw new Error('Error loading config file');
}
let str = ByteArray.toString(contents, 'UTF-8');
// Workaround for GNOME 3.28:
// https://github.com/JoseExposito/touche/issues/18
// https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/520#issuecomment-489533051
if (str.match(/GjsModule byteArray/)) {
str = `${contents}`;
}
GLib.free(contents);
return str;
} |
I just tested it and it worked, fixed in master in case you want to build it 😄 |
Thank you so much! Sorry for the delay, I had a busy week 😬 |
Describe the bug
Touché doesn't start on Ubuntu 18.04
Expected behaviour
The main window should appear
Actual behaviour
Nothing happens :P
Logs
When running manually from the terminal, this is all I get:
Nothing appears, nothing else happens, and I have to Ctrl+C out of the app.
Your environment
The text was updated successfully, but these errors were encountered: