You are not logged in.
(I asked this question in the XFCE forums as well, but I generally have better results here, so forgive the crosspost.)
I'm running XFCE, and I have a saved "Default" session, which restores a bunch of terminal windows/tabs on startup, to their appropriate workspace, with their titles, etc. I'd like to know if there's a way to run commands in particular terminals at this time, so that, for example, I can automatically SSH into remote servers, start a "top" process—things like that.
I've seen a few questions about scripting this in general, but not as part of XFCE Session, and since this already correctly sets up everything on login, it would nice if I could just add something to the process.
Offline
https://wiki.archlinux.org/title/Xfce#Autostart
https://specifications.freedesktop.org/ … 01s06.html - specifically "Terminal"
You can also just run a script that fires a bunch or terminals w/ specific commands (typically "-e")
Offline
Right, I know I can write my own script to do this. My point was that, XFCE Session is already opening up terminal windows/tabs in the right locations and with the right configurations, and I'd like to know if there's any way I can build on this existing functionality, instead of having to write new stuff from scratch to accomplish it.
Offline
You would have to modify the session file data - I have no idea what format it's in, but you can check $XDG_CACHE_HOME/sessions/ (or ~/.cache/sessions/). What's in the file(s) there? If they are text files listing commands to launch those terminals, you can modify those commands to add the programs to run within the terminals. They may also be sqlite database(s) which would need to be explored to find the commands and similarly modify them.
But in order for such edits to be effective, you'd have to configure xfwm to not save settings on exit otherwise each time you exit your wm it will overwrite your changes.
Last edited by Trilby (2023-04-14 19:59:53)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If the session stores commands, it should™ properly store a command that runs a TE w/ a process inside.
Starting a terminal w/ a shell and from that shell run stuff™ and expecting the session to restore that stuff™, previously started by an interactive shell, isn't realistic - or desireable (what context would have to be restored, what if stuff™ is a command to terminate the session?)
Offline