question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lwsm works from command line but not the Gnome desktop extension

See original GitHub issue

Your Environment

  • Version used: 2.1.28
  • Operating System and version: Ubuntu 18.10
  • Desktop Environment: Gnome 3.30.1
  • Node version: 8.11.3

Expected Behavior

I have the Gnome lwsm desktop extension installed and want to be able to save and load using that.

Current Behavior

I can save and restore using the command line, and saved sessions are listed in the desktop extension, but when I attempt to save or restore using the desktop extension I see a status notification “lwsm: save test” for a couple of seconds, and then it changes to “lwsm: save test UNKNOWN ERROR”.

I get the same result if I try to restore one of the sessions saved using the command line. But if I restore from the command line, it works fine.

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).

The extension is accessible in gnome ‘tweak UI’, and I can use that to change the path to lwsm, and to enable and disable the extension.

Steps to Reproduce (for bugs)

Click on the extension icon, type a description and click the save icon.

NOTE: I have nvm installed and had problems locating the executable because I’m using node 8.12 by default, but somehow have lwsm installed only for 8.11.3. So to use lwsm in the terminal I have to nvm use 8.11.3 first. This doesn’t appear to be related, but I mention it in case. I’m also wondering how to fix this! For now I’ll just use an alias for lwsm.

Supplementary Question:

Is there a simple way to have the terminal windows restored to their current directory?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
johannesjocommented, Apr 28, 2019

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…

1reaction
johannesjocommented, Apr 27, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lwsm fails with "command failed: locate <name>.desktop" #4
I installed lwsm with the following command ☁ ~ npm install -g linux-window-session-manager npm WARN deprecated node-uuid@1.4.8: Use uuid ...
Read more >
How do I enable and disable GNOME extensions from the ...
I made a animated gif of what I'm trying to do from the terminal to explain it better. I'm not trying to enable...
Read more >
linux-window-session-manager - npm
This is a library / command line tool that let's you save and reload your opened programs and the positions of their windows....
Read more >
How to Use GNOME Shell Extensions [Complete Guide]
Brief: This is a detailed guide showing you how to install GNOME Shell Extensions manually or easily via a browser. While discussing how...
Read more >
Ubuntu 22.04: Install Gnome Extensions Manager (Workaround)
Gnome Shell delivers core user interface functions for Gnome, such as switching windows and launching apps. Some of the interface elements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found