johannesjo / gnome-shell-extension-window-session-manager

An indicator that let's you save and restore your open apps and the window positions and arrangements over multiple real and virtual displays.
MIT License
91 stars 18 forks source link

I get "No input for desktop file path for window" for 3 apps, some of them quite common #18

Closed NinjaTurtle007 closed 4 years ago

NinjaTurtle007 commented 4 years ago

For example it does it for telegram, keepassxc and toggl, all of them quite common apps. Not sure why it doesn't work out of the box for such apps. Here is the full terminal output, hoping this will make the app work out of the box at least for the common apps :) Otherwise great app, the only one that does this actually! I use it on 3 monitors.

lwsm save test1 0x2600061 has no wmClassName. Win: { windowId: ' 0x2600061', windowIdDec: 39845985, wmCurrentDesktopNr: 0, states: [], wmType: '_NET_WM_WINDOW_TYPE_NORMAL' } findDesktopFile cant find file; searched patterns [] util: Generic Error findDesktopFile cant find file; searched patterns undefined util: [Arguments] { '0': 'findDesktopFile cant find file; searched patterns' } Input Handler Error: No input for desktop file path for window "keepassxc.keepassxc". Please fix this manually in config file for this session in ~/.lwsm/{currentSessionName}.json

LWSM was unable to guess the location of your executable/desktop file.

There are 3 things, that you can do now:

Either you can locate the executable or desktop file manually for the application which isn't started (e.g. via the locate command), and add it to ~/.lwsm/{currentSessionName}.json. If you want to persist the mapping you might also want to open ~/.lwsm/config.json and edit the WM_CLASS_AND_EXECUTABLE_FILE_MAP property by adding a mapping for 'keepassxc.keepassxc'.

If there is a desktop file for the application you might want to add it's location to the DESKTOP_FILE_LOCATIONS property in ~/.lwsm/config.json to make sure this folder is also searched the next LWSM tries to guess an desktop file path.

If you want LWSM to ignore the application, you can add the application to the ignore list in ~/.lwsm/config.json which is located under the WM_CLASS_EXCLUSIONS property.

If everything fails please open up an issue at: https://github.com/johannesjo/linux-window-session-manager/issues

undefined findDesktopFile cant find file; searched patterns [] util: Generic Error findDesktopFile cant find file; searched patterns undefined util: [Arguments] { '0': 'findDesktopFile cant find file; searched patterns' } Input Handler Error: No input for desktop file path for window "telegram-desktop.TelegramDesktop". Please fix this manually in config file for this session in ~/.lwsm/{currentSessionName}.json

LWSM was unable to guess the location of your executable/desktop file.

There are 3 things, that you can do now:

Either you can locate the executable or desktop file manually for the application which isn't started (e.g. via the locate command), and add it to ~/.lwsm/{currentSessionName}.json. If you want to persist the mapping you might also want to open ~/.lwsm/config.json and edit the WM_CLASS_AND_EXECUTABLE_FILE_MAP property by adding a mapping for 'telegram-desktop.TelegramDesktop'.

If there is a desktop file for the application you might want to add it's location to the DESKTOP_FILE_LOCATIONS property in ~/.lwsm/config.json to make sure this folder is also searched the next LWSM tries to guess an desktop file path.

If you want LWSM to ignore the application, you can add the application to the ignore list in ~/.lwsm/config.json which is located under the WM_CLASS_EXCLUSIONS property.

If everything fails please open up an issue at: https://github.com/johannesjo/linux-window-session-manager/issues

undefined findDesktopFile cant find file; searched patterns [] util: Generic Error findDesktopFile cant find file; searched patterns undefined util: [Arguments] { '0': 'findDesktopFile cant find file; searched patterns' } Input Handler Error: No input for desktop file path for window "TogglDesktop.Toggl Desktop". Please fix this manually in config file for this session in ~/.lwsm/{currentSessionName}.json

LWSM was unable to guess the location of your executable/desktop file.

There are 3 things, that you can do now:

Either you can locate the executable or desktop file manually for the application which isn't started (e.g. via the locate command), and add it to ~/.lwsm/{currentSessionName}.json. If you want to persist the mapping you might also want to open ~/.lwsm/config.json and edit the WM_CLASS_AND_EXECUTABLE_FILE_MAP property by adding a mapping for 'TogglDesktop.Toggl Desktop'.

If there is a desktop file for the application you might want to add it's location to the DESKTOP_FILE_LOCATIONS property in ~/.lwsm/config.json to make sure this folder is also searched the next LWSM tries to guess an desktop file path.

If you want LWSM to ignore the application, you can add the application to the ignore list in ~/.lwsm/config.json which is located under the WM_CLASS_EXCLUSIONS property.

If everything fails please open up an issue at: https://github.com/johannesjo/linux-window-session-manager/issues

undefined saveSessionForDisplayToDb: no session file present yet for "test1", creating a new one... SAVED SESSION: test1

johannesjo commented 4 years ago

Thanks for reporting. There already should be an etnry for keepassxc in the default config. Maybe you could try updating to the latest version? I also added one for telegram, but was unable to install toggl myself. Could you maybe provide a PR for that in this repo: https://github.com/johannesjo/linux-window-session-manager ?

There is a guide on how to add new mappings in the readme. You would have to edit this file: https://github.com/johannesjo/linux-window-session-manager/blob/master/src/defaultConfig.ts

NinjaTurtle007 commented 4 years ago

I forgot to mention that toggl is chrome app. It's basically a site that I set in chrome to open as an app. However there are many apps that are used like that so might be handy to make it work for chrome based apps in general (well chromium in my case but it's the same)

I usually only update when gnome extensions tells me there is an update, how to update outside of that?

johannesjo commented 4 years ago

What browser are you using? Chrome Web Apps and Brave Web Apps should already work.

NinjaTurtle007 commented 4 years ago

Chromium

johannesjo commented 4 years ago

I just checked with chromium and it seems to work fine. Did you try the latest version of lwsm?

NinjaTurtle007 commented 4 years ago

Nope, I update only when gnome extensions tells me to. How to update outside of it?

johannesjo commented 4 years ago
npm update -g linux-window-session-manager

Should do the trick :)

NinjaTurtle007 commented 4 years ago

It looks like my nodejs version is too new (10) should I ignore this?

user@user:~$ npm update -g linux-window-session-manager npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ user@user:~$

johannesjo commented 4 years ago

Might be you also need to update npm before:

npm install -g npm@latest
NinjaTurtle007 commented 4 years ago

Again a problem because im with version 10. and it supports up to 9 but haven't tested yet if it works ok now, just for your info here is the output of those updates:

sudo npm install -g npm@latest sudo: unable to resolve host user: Name or service not known [sudo] password for user: Sorry, try again. [sudo] password for user: npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js

johannesjo commented 4 years ago

Sorry I forgot to reply to you. There are lots of guides on how to install node on Linux. Once properly set up, you should be able to install and use the app just fine.

https://www.google.com/search?q=install+node+and+npm+ubuntu&oq=install+node+and+npm+ubuntu&aqs=chrome..69i57j0l5.7002j0j7&sourceid=chrome&ie=UTF-8