-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Auto shutdown/startup script #92
Comments
Im not very familiar with this application, but it seems that it is user based. If you are running this in a service, it is likely not running as the required user. I think you would need a startup app (added to your session startup) and one for logout which I'm not sure how that would work. It would probably be easy enough to have a cron job running for the user to regularly save the session? Im trying some of this out at the moment. Will let you know how I go. [ Update ] |
I am also having issues creating a systemd service that saves the layout when suspending and restores it when resuming. I am getting errors. Presumably because systemd does not have the environment variables set that my user has. If somebody can make this work I'd be so happy :) The zsh scripts themselves work from cli.
|
Not really an issue with LWSM as I am able to run the commands fine. I'm having some trouble getting an auto shutdown/startup script going. Would appreciate it if anyone has any solutions, cheers!
Your Environment
Expected Behavior
No errors
Current Behavior
Dec 26 11:30:40 wuxhua systemd[1]: Starting Linux Window Session Manager Pre-Shutdown Processes...
░░ Subject: A start job for unit save_session.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit save_session.service has begun execution.
░░
░░ The job identifier is 6022.
Dec 26 11:30:40 wuxhua bash[7100]: lwsm: no config file present or it contains invalid json. Creating new one...
Dec 26 11:30:40 wuxhua bash[7100]: /usr/local/lib/node_modules/linux-window-session-manager/dist/index.js:84
Dec 26 11:30:40 wuxhua bash[7100]: throw err;
Dec 26 11:30:40 wuxhua bash[7100]: ^
Dec 26 11:30:40 wuxhua bash[7100]: Error: ENOENT: no such file or directory, mkdir 'undefined/.config/lwsm'
Dec 26 11:30:40 wuxhua bash[7100]: at Object.mkdirSync (node:fs:1334:3)
Dec 26 11:30:40 wuxhua bash[7100]: at mkdirSync (/usr/local/lib/node_modules/linux-window-session-manager/dist/index.js:80:12)
Dec 26 11:30:40 wuxhua bash[7100]: at Object. (/usr/local/lib/node_modules/linux-window-session-manager/dist/index.js:229:5)
Dec 26 11:30:40 wuxhua bash[7100]: at Module._compile (node:internal/modules/cjs/loader:1101:14)
Dec 26 11:30:40 wuxhua bash[7100]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
Dec 26 11:30:40 wuxhua bash[7100]: at Module.load (node:internal/modules/cjs/loader:981:32)
Dec 26 11:30:40 wuxhua bash[7100]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Dec 26 11:30:40 wuxhua bash[7100]: at Module.require (node:internal/modules/cjs/loader:1005:19)
Dec 26 11:30:40 wuxhua bash[7100]: at require (node:internal/modules/cjs/helpers:102:18)
Dec 26 11:30:40 wuxhua bash[7100]: at Object. (/usr/local/lib/node_modules/linux-window-session-manager/cmd.js:3:14) {
Dec 26 11:30:40 wuxhua bash[7100]: errno: -2,
Dec 26 11:30:40 wuxhua bash[7100]: syscall: 'mkdir',
Dec 26 11:30:40 wuxhua bash[7100]: code: 'ENOENT',
Dec 26 11:30:40 wuxhua bash[7100]: path: 'undefined/.config/lwsm'
Dec 26 11:30:40 wuxhua bash[7100]: }
Dec 26 11:30:40 wuxhua systemd[1]: save_session.service: Main process exited, code=exited, status=1/FAILURE
Steps to Reproduce (for bugs)
Script stored in
home/wuxhua/Scripts/save_session.sh
/usr/local/bin/lwsm list
Servicemd Service
`[Unit]
Description=Linux Window Session Manager Pre-Shutdown Processes
DefaultDependencies=no
After=final.target
[Service]
Type=oneshot
ExecStart=bash /home/wuxhua/Scripts/save_session.sh
[Install]
WantedBy=final.target`
The text was updated successfully, but these errors were encountered: