Open curiousercreative opened 3 years ago
Thanks for opening this up. Did you try going through the troubleshooting section for the apps that are not working?
@johannesjo it's been a little while since I worked around this, so I can't recall if any of the troubleshooting was effective. FWIW, all of my apps open with my workaround...
@johannesjo it would be a separate PR, but I have added this mapping to my config file for user installed flatpak Chromium: "chromium-browser.Chromium-browser": "org.chromium.Chromium.desktop"
Looking at the logs I wonder why there are not desktop files found with the standard method. Maybe they are stored in a different location on your system? Would be good to know, so we can add it to the searched locations.
@johannesjo it seems to find them as they are all restored. Or does alternative guessing approach mean looking for something other than desktop files? I believe the desktop locations including Chromium are standard search locations already. I only need that rule because the desktop file name doesn't seem to match the window name. Would it be helpful for me to send you a session file? I haven't looked at it very closely, but it doesn't seem to have any sensitive info in it...
Or does alternative guessing approach mean looking for something other than desktop files?
Yes. It's a bit complicated. The first method uses the commands from the apps desktop files, which could contain additional startup params. The alternative approach checks /proc/${win.wmPid}/cmdline
. Not really sure what all the implications are tbh, but I vaguely remember that the alternative approach didn't work for every app as expected.
Yes please. A session file would be helpful. If you don't want to post it here, you can also send it to contact@super-productivity.com (though I would prefer to have it here ;)).
@johannesjo here it is. I notice multiple entries for apps for different display sizes/arrangements, but I was receiving the errors with clean sessions with a singly display size.
{
"name": "common-energy",
"displaysCombinations": [
{
"id": "6912x2160",
"windowList": [
{
"windowId": "0x3400007",
"windowIdDec": 54525959,
"wmCurrentDesktopNr": 0,
"states": [],
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 5567,
"wmClassName": "gnome-calendar.Gnome-calendar",
"x": 3790,
"y": 378,
"width": 1822,
"height": 1840,
"simpleName": "Gnome-calendar",
"executableFile": "/usr/bin/gnome-calendar"
},
{
"windowId": "0x4200001",
"windowIdDec": 69206017,
"states": [
"_NET_WM_STATE_MAXIMIZED_HORZ",
"_NET_WM_STATE_MAXIMIZED_VERT"
],
"wmCurrentDesktopNr": 0,
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "atom.Atom",
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 5597,
"x": 0,
"y": 54,
"width": 3840,
"height": 2106,
"simpleName": "Atom",
"executableFile": "atom.desktop",
"desktopFilePath": "/usr/share/applications/atom.desktop"
},
{
"windowId": "0x6a00005",
"windowIdDec": 111149061,
"states": [],
"wmCurrentDesktopNr": 0,
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "slack.Slack",
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 2,
"x": 5533,
"y": 432,
"width": 1379,
"height": 1728,
"simpleName": "Slack",
"executableFile": "com.slack.Slack.desktop",
"desktopFilePath": "/home/curiouser/.local/share/flatpak/exports/share/applications/com.slack.Slack.desktop"
},
{
"windowId": "0x3c00010",
"windowIdDec": 62914576,
"states": [],
"wmCurrentDesktopNr": 0,
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 5579,
"wmClassName": "Mail.Thunderbird",
"x": 3840,
"y": 432,
"width": 1708,
"height": 1728,
"simpleName": "Thunderbird",
"executableFile": "thunderbird.desktop",
"desktopFilePath": "/usr/share/applications/thunderbird.desktop"
},
{
"windowId": "0x4c0001b",
"windowIdDec": 79691803,
"states": [],
"wmCurrentDesktopNr": 0,
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "chromium-browser.Chromium-browser",
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 2,
"x": 0,
"y": 54,
"width": 2415,
"height": 2106,
"simpleName": "Chromium-browser",
"executableFile": "org.chromium.Chromium.desktop",
"desktopFilePath": "/home/curiouser/.local/share/flatpak/exports/share/applications/org.chromium.Chromium.desktop"
},
{
"windowId": "0x3600078",
"windowIdDec": 56623224,
"states": [
"_NET_WM_STATE_FOCUSED"
],
"wmCurrentDesktopNr": 0,
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 7818,
"wmClassName": "tilix.Tilix",
"x": 2358,
"y": 8,
"width": 1534,
"height": 2200,
"simpleName": "Tilix",
"executableFile": "tilix"
}
]
},
{
"id": "7456x2466",
"windowList": [
{
"windowId": "0x2a000a8",
"windowIdDec": 44040360,
"states": [],
"wmCurrentDesktopNr": 0,
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 5188,
"wmClassName": "tilix.Tilix",
"x": 2902,
"y": 8,
"width": 1534,
"height": 2514,
"simpleName": "Tilix",
"executableFile": "tilix"
},
{
"windowId": "0x3a00007",
"windowIdDec": 60817415,
"wmCurrentDesktopNr": 0,
"states": [],
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 6758,
"wmClassName": "gnome-calendar.Gnome-calendar",
"x": 4332,
"y": 688,
"width": 1790,
"height": 1836,
"simpleName": "Gnome-calendar",
"executableFile": "/usr/bin/gnome-calendar"
},
{
"windowId": "0x4200007",
"windowIdDec": 69206023,
"states": [
"_NET_WM_STATE_MAXIMIZED_HORZ",
"_NET_WM_STATE_MAXIMIZED_VERT"
],
"wmCurrentDesktopNr": 0,
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "atom.Atom",
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 6771,
"x": 0,
"y": 54,
"width": 4384,
"height": 2412,
"simpleName": "Atom",
"executableFile": "atom.desktop",
"desktopFilePath": "/usr/share/applications/atom.desktop"
},
{
"windowId": "0x5c00005",
"windowIdDec": 96468997,
"states": [],
"wmCurrentDesktopNr": 0,
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "slack.Slack",
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 2,
"x": 6070,
"y": 738,
"width": 1381,
"height": 1727,
"simpleName": "Slack",
"executableFile": "com.slack.Slack.desktop",
"desktopFilePath": "/home/curiouser/.local/share/flatpak/exports/share/applications/com.slack.Slack.desktop"
},
{
"windowId": "0x3e00010",
"windowIdDec": 65011728,
"states": [],
"wmCurrentDesktopNr": 0,
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 6753,
"wmClassName": "Mail.Thunderbird",
"x": 4384,
"y": 738,
"width": 1692,
"height": 1716,
"simpleName": "Thunderbird",
"executableFile": "thunderbird.desktop",
"desktopFilePath": "/usr/share/applications/thunderbird.desktop"
},
{
"windowId": "0x200005",
"windowIdDec": 2097157,
"states": [
"_NET_WM_STATE_FOCUSED"
],
"wmTitle": "WTF UTF8_STRING",
"wmClassName": "chromium-browser.Chromium-browser",
"wmCurrentDesktopNr": 0,
"wmType": "_NET_WM_WINDOW_TYPE_NORMAL",
"wmPid": 2,
"x": 0,
"y": 54,
"width": 2954,
"height": 2412,
"simpleName": "Chromium-browser",
"executableFile": "org.chromium.Chromium.desktop",
"desktopFilePath": "/home/curiouser/.local/share/flatpak/exports/share/applications/org.chromium.Chromium.desktop"
}
]
}
]
}
Thank you!
Would you mind posting also the output of locate gedit.desktop
(from root)?
Would you mind posting also the output of
locate gedit.desktop
(from root)?
@johannesjo just now seeing this, sorry! I had to install locate (sudo apt install mlocate
on debian/ubuntu/pop-os) but here's the output:
$ sudo locate gedit.desktop
/usr/share/app-install/desktop/gedit:gedit.desktop
/usr/share/applications/org.gnome.gedit.desktop
Thanks. How you can work around this is to manually provide a mapping for gedit in the main config file under ~/.config/lwsm/config.json
. There under the key WM_CLASS_AND_EXECUTABLE_FILE_MAP
you should add "gedit.Gedit": "org.gnome.gedit.desktop",
.
:ghost: Brief Description
Saving session with som applications fails
:pancakes: Action version
lwsm save SESSION_NAME
Steps To Reproduce
Steps to reproduce the behavior:
lwsm save SESSION_NAME
:police_car: Expected behavior
Session should be saved and later restored by
lwsm restore SESSON_NAME
:heavy_plus_sign: Additional context
Pop!_OS 20.04, 20.10 Kernel 5.8, 5.11
Here's the stdout from a save after I removed the re-throw of the exception (so that it would proceed with save and throw all exceptions):