Code Monkey home page Code Monkey logo

Comments (12)

johannesjo avatar johannesjo commented on September 24, 2024 1

Yes I meant bash :) was answering from my mobile...

Another alternative would be debugging the gnome shell extension directly, by using lg: https://stackoverflow.com/questions/8425616/how-to-test-debug-gnome-shell-extensions-is-there-any-tool-for-that

I'm assuming that, because the extension might not use the node version defined by nvm, as the path for that is usually set by some configuration in the .bashrc etc. Could be a different issue of course. It's not really a login shell, but in the context of the extension the .bashrc is most likely not loaded.

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024 1

There is a watcher for the exit code of lwsm. If the error code is anything else than 0 the message appears (the wording could probably be better). So it means that lwsm is throwing some sort of error. I don't know what the proper way is to get the console output. The only documentation available is for the C (Rust??) version of the lib (https://developer.gnome.org/pygobject/stable/glib-functions.html#function-glib--child-watch-add). It's really not much fun programming gnome shell extensions...

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024

Hey there. What you could try is to fiddle with the extension setting "Path to lwsm" you can find it under the "extension panel" in the "tweaks" application. On my system – also using nvm, but also yarn – that's /home/myuser/.config/yarn/global/node_modules/.bin/lwsm.

Let me know if this works out for you.

from linux-window-session-manager.

happybeing avatar happybeing commented on September 24, 2024

Thanks, but I already confirmed that the path is OK (using tweak UI):

I tried changing the path in the extension config but can confirm that is correct (because if I invalidate it I get an error about it not finding the executable).

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024

Sorry. I missed that part. The question is what the correct path means. You need the path to the one used by Ubuntu in a bash login shell, which might be a different one. There are several possibilities. It's hard to guess but you could try the node version shipping with Ubuntu and install lwsm globally for that. Adding the nvm node version to the .profile might be another option.

from linux-window-session-manager.

happybeing avatar happybeing commented on September 24, 2024

No worries, I could have been clearer 😄

I don't understand why you think the path is the issue. If I set an invalid path I get a different result (a few seconds delay and then a different error) which suggests lwsm is running.

Is that what you'd expect if I wasn't using the 'one used by Ubuntu in a book login shell'? (I assume you mean 'bash' not 'book' there).

And do you really mean 'login shell' or just 'bash terminal'?

from linux-window-session-manager.

happybeing avatar happybeing commented on September 24, 2024

It's not really a login shell, but in the context of the extension the .bashrc is most likely not loaded.

Seems a reasonable bet. In the meant time I have traced and fixed an issue I had with nvm/node but that hasn't solved this. So I have used lg as suggested, but it gives not more info. I can 'Show Errors' for the lwsm extension, but it says it hasn't generated any errors yet, and it stays like that even when I get the 'UNKNOWN ERROR' notification trying to save using the extension. So maybe the extension isn't generating error output, but just failing and returning an error code.

I tried removing it with npm and installing with yarn global add linux-window-package-manager and then updating the path for the extension but the symptoms haven't changed.

I tried using both the path which is a symlink, and the path that the symlink points to (as you are: /home/myuser/.config/yarn/global/node_modules/.bin/lwsm). No improvement!

It is definitely finding and running the executable: if I add a spurious character to the path I get an immediate Error: no lwsm executable and telling me to set the path correctly.

So I suspect lwsm runs, does some work (for about seven seconds), and then tries to do something which causes it to exit prematurely, but without an error message. Any ideas what it might be failing on - permissions maybe?

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024

Thanks for the effort your putting into this.

I'm assuming that restoring or saving the very same configuration of open applications runs fine from the command line? I'm running out of ideas then. :(

One more thing you could do is to add some more logging to the extension itself. I don't have my laptop with me atm the moment so I can't give you more detailed instructions. The file of the extension is this one: https://github.com/johannesjo/gnome-shell-extension-window-session-manager/blob/master/extension.js
The file can usually be found in HOME_PATH + '/.local/share/gnome-shell/extensions/[email protected]/'.
With global.log you can print stuff to the weird lg console. You need to restart gnome for the changes to the effect (which can be done via 'r' from the very same window you're starting lg from). Would be interesting to know what error the lwsm command is throwing...

from linux-window-session-manager.

happybeing avatar happybeing commented on September 24, 2024

Just took a quick look at the code and the error message (UNKNOWN ERROR) suggests lwsm executes ok (although it doesn't create a new session so I may be wrong here) because:

https://github.com/johannesjo/gnome-shell-extension-window-session-manager/blob/master/extension.js#L279

No time to debug more for now, but I'll probably poke more at some point.

from linux-window-session-manager.

happybeing avatar happybeing commented on September 24, 2024

Small update. Info from extension.js / _execLwsm

executable looks fine
success is 'true' (lwsm has spawned ok)
status is 32512 (web search not too helpful, but others have reported this error when spawning. It maps to 7F0 / 127 which might well be command not found, although it seems odd this would take 7 seconds)

So I tried changing executable to '/bin/ls' and, this is strange. I still get an error, but a different status (512 instead of 32512). This suggests the 32512 is indeed that it's not finding the lwsm exectutable.

I've messed around a bit further, but not really getting anywhere!

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024

That's all rather confusing to me to be honest. Maybe it's related to the gnome version installed? Maybe they changed or even broke something. Can't really tell you atm which version I got, but I'm pretty sure that it is older than 3.30.1.

from linux-window-session-manager.

johannesjo avatar johannesjo commented on September 24, 2024

I am closing this. Please let me know if the issue persists with the newest version.

from linux-window-session-manager.

Related Issues (20)

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.