Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
So thats another avenue that might be checked out.
Computers are to be made to handle that stuff, so why not let them do what they do best?
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
Cheers, Gene Heskett
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Thanks, Michael
On Sunday 10 March 2019 12:56:17 Michael wrote:
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Dunno, I write my stuff in bash, and while that might work, its gibberish to me. My fault of course, but...
Thanks, Michael
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
Cheers, Gene Heskett
Anno domini 2019 Sun, 10 Mar 11:56:17 -0500 Michael scripsit:
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Sure it works. But you have to make sure that you kill the ssh instance when logging out of TDE :-)
Thanks, Michael
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On Monday 11 March 2019 04:49:49 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:56:17 -0500
Michael scripsit:
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Sure it works. But you have to make sure that you kill the ssh instance when logging out of TDE :-)
I am not, at least consciously. Is that why a logout here is a full hot reboot?
Thanks, Michael
- To unsubscribe, e-mail:
trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
Cheers, Gene Heskett
Hi Gene!
Anno domini 2019 Mon, 11 Mar 07:49:50 -0400 Gene Heskett scripsit:
On Monday 11 March 2019 04:49:49 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:56:17 -0500
Michael scripsit:
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Sure it works. But you have to make sure that you kill the ssh instance when logging out of TDE :-)
I am not, at least consciously. Is that why a logout here is a full hot reboot?
That logout behaviour can be configured somewhere in tcontrol (I have mine to just fhut down the machine and don't ask me again). The problem with the ssh example is that when user A logs out and ssh is not closed, and a user B logs in, then B still has the portredirection of A in place ... which could lead to funny helpdesk calls, 'cause the cure number 1 aka "reboot" will seamingly fix the problem for user B ... till user A wants to log in and calls the helpdeskt which tells him to reboot which solves the problem for user A till user B wants to log in and calls ... *sigh* ... things could be so easy if users just were not creative :-)
Nik
Thanks, Michael
- To unsubscribe, e-mail:
trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
Cheers, Gene Heskett
On Monday 11 March 2019 09:40:53 Dr. Nikolaus Klepp wrote:
Hi Gene!
Anno domini 2019 Mon, 11 Mar 07:49:50 -0400
Gene Heskett scripsit:
On Monday 11 March 2019 04:49:49 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:56:17 -0500
Michael scripsit:
On Sunday 10 March 2019 11:02:50 am Gene Heskett wrote:
On Sunday 10 March 2019 11:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote: > Is there a way to make TDE aware of running non-Trinity > applications so that they can be resurrected after > Logout/Login? I have at least one X11-based application > (X2 - The Programmer's Editor) that I use extensively, and > it would be nice if it could remember across Logout/Login > events. I'm wondering if something like a DCOP wrapper > might do the job? > > Leslie > > > > ---------------------------------------------------------- >---- ------ -
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Hi Kate; I have some stuff in that caregory, and since I'm the only (sorta human) user, I've found a start stanza for such in /etc/rc.local works well if it doesn't need a login. And since I setup ssh-keys, all that stuff now works well after a fresh boot. So all my other machines that are alive, are mounted to /sshnet at a reboot without my having to remember 4 to 6 of those commands to do by hand each time.
Gene, Kate,
Would either of these work for launching several of these types of Konsole commands like (using keys for login):
ssh "$PORT" -L 11111:$IP:25 -L 22222:$IP:110 "$ACCOUNT@$IP"
at TDE login?
Sure it works. But you have to make sure that you kill the ssh instance when logging out of TDE :-)
I am not, at least consciously. Is that why a logout here is a full hot reboot?
That logout behaviour can be configured somewhere in tcontrol (I have mine to just fhut down the machine and don't ask me again). The problem with the ssh example is that when user A logs out and ssh is not closed, and a user B logs in, then B still has the portredirection of A in place ... which could lead to funny helpdesk calls, 'cause the cure number 1 aka "reboot" will seamingly fix the problem for user B ... till user A wants to log in and calls the helpdeskt which tells him to reboot which solves the problem for user A till user B wants to log in and calls ... *sigh* ... things could be so easy if users just were not creative :-)
Nik
Yeah Nik, but we are creative. Like my email handling here. This reply was as the result of hitting the + key, which takes me to the next unread message, I chose to reply to list (or I can tap the + key to go to the next unread). clicked on that button, and now I'm typing. When I've said with my fingers what I want, a ctrl+return sends it.
Wash, rinse, repeat.
Fetchmail runs and gets new mail on a 3 minute loop, hands it off to procmail which runs it past spamd, then clamd, which sends the spam straight to the spam folder, the detected viri to a mailfile I delete occasionally, and puts the rest into /var/spool/mail.
Inotifywait sees the closing of that file and exits with the name of that file, which saves the name for a couple millisecs, in a bash script that sends kmail a getmail message and restarts inotifywait. I start "mailwatcher" in the /etc/init.d facility, and kmail is started when I log in. So all I do is the wash. rinse, repeat.
Computers are for doing your work for you, so make em do it. :) Besides, I'm getting lazy in my dotage, in addition to being slowly converted to bionic. I've gained plastic eyes and a pacemaker in the last 5 months since I hit 84. ;-)
As D.A. said, thanks for the fish. Yes I'm careing for my wife of 30 years this fall, whose slowly failing from COPD and osteoporosis, but I have enough other interests to keep me out of the bars. I'm in the middle of bringing a 5th machine tool to life, a 600x390mm gantry mill, by running it with LinuxCNC. So my garage and a shop building in the back yard both runeth over, plus I have most of the last 3 fancy blanket chests I'm making cut out, but got some badly warped mahogany for lids. I stuck the supplier for another $400 in air dried mahogany over that. I cut all the Green & Green joinery for those on a cnc mill, now awaiting assembly once warmer weather arrives and I can work outside. Too many hobbies for an old fart and the limited amount of real estate under roof and heated.
Take care now Nik.
Cheers, Gene Heskett
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 2019/03/11 01:16 AM, J Leslie Turriff wrote:
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
Hi Leslie, on my system I run firefox as a different user (from the menu check the "run as different user" settings for the program). This means the program is launched by tdesu. Somehow, this seems to do the trick, after logout and login, firefox restart automagically. Not sure if this trick works all the time, but you can give it a try :-)
Cheers Michele
On 2019-03-10 20:52:26 Michele Calgaro via trinity-users wrote:
On 2019/03/11 01:16 AM, J Leslie Turriff wrote:
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
Hi Leslie, on my system I run firefox as a different user (from the menu check the "run as different user" settings for the program). This means the program is launched by tdesu. Somehow, this seems to do the trick, after logout and login, firefox restart automagically. Not sure if this trick works all the time, but you can give it a try :-)
Cheers Michele
Hmmm... not sure how Firefox got into this discussion; I'm concerned with making TDE aware that e.g. an X11 app (which does not seem to directly participate in desktop activity) is open during Logout/Login processing.
Leslie
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500 J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called xsm ruled the desktop. In that long forsaken world evil crept in in the form of timy little gnomes that insisted the old standard was outdated and a new standard needed to be praised. These followers of freedesktop.org brought the gnome session manager with them, and it did no good. Then there came the merceneries and refugies from the world of funny icons and they brought with them the not-invented-here session management. Nowadays the world is devided into different religions of session management, some doing good (TDE), some falling flat on their belly and calling it progress, but non talking to one another 'cause that's deemed to be heresy.
In other words: most gnome applications do not have any sense of session management compareable to tde. Most old X11 applications do work with xsm - at least you can query them for their state and get the required arguments to restore the state. Virtually any java application does not know what session management is all about. Firefox et al. do some kind of session management on their own, which in most cases does not work. Now you can choose ... pestilence, colera, ebola or pocks :-(
Nik
On Monday 11 March 2019 05:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called xsm ruled the desktop. In that long forsaken world evil crept in in the form of timy little gnomes that insisted the old standard was outdated and a new standard needed to be praised. These followers of freedesktop.org brought the gnome session manager with them, and it did no good. Then there came the merceneries and refugies from the world of funny icons and they brought with them the not-invented-here session management. Nowadays the world is devided into different religions of session management, some doing good (TDE), some falling flat on their belly and calling it progress, but non talking to one another 'cause that's deemed to be heresy.
In other words: most gnome applications do not have any sense of session management compareable to tde. Most old X11 applications do work with xsm - at least you can query them for their state and get the required arguments to restore the state. Virtually any java application does not know what session management is all about. Firefox et al. do some kind of session management on their own, which in most cases does not work. Now you can choose ... pestilence, cholera, ebola or pocks :-(
Nik
Nicely put, Nik. And too close to the truth. Way too close.
Cheers, Gene Heskett
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Leslie
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Kate
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Leslie
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called xsm ruled the desktop. In that long forsaken world evil crept in in the form of timy little gnomes that insisted the old standard was outdated and a new standard needed to be praised. These followers of freedesktop.org brought the gnome session manager with them, and it did no good. Then there came the merceneries and refugies from the world of funny icons and they brought with them the not-invented-here session management. Nowadays the world is devided into different religions of session management, some doing good (TDE), some falling flat on their belly and calling it progress, but non talking to one another 'cause that's deemed to be heresy.
In other words: most gnome applications do not have any sense of session management compareable to tde. Most old X11 applications do work with xsm - at least you can query them for their state and get the required arguments to restore the state. Virtually any java application does not know what session management is all about. Firefox et al. do some kind of session management on their own, which in most cases does not work. Now you can choose ... pestilence, colera, ebola or pocks :-(
Nik
So I guess you're saying that there's no way to get TDE to notice my X2, then.
Leslie
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote:
Is there a way to make TDE aware of running non-Trinity applications so that they can be resurrected after Logout/Login? I have at least one X11-based application (X2 - The Programmer's Editor) that I use extensively, and it would be nice if it could remember across Logout/Login events. I'm wondering if something like a DCOP wrapper might do the job?
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500 J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote:
On Sunday 10 March 2019, J Leslie Turriff wrote: > Is there a way to make TDE aware of running non-Trinity > applications so that they can be resurrected after Logout/Login? > I have at least one X11-based application (X2 - The Programmer's > Editor) that I use extensively, and it would be nice if it could > remember across Logout/Login events. > I'm wondering if something like a DCOP wrapper might do the > job?
Load the application into your autostart dir. /home/foo/.trinity/autostart Also, check the program's setting to see if it has an autostart feature.
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > On Sunday 10 March 2019, J Leslie Turriff wrote: > > Is there a way to make TDE aware of running non-Trinity > > applications so that they can be resurrected after > > Logout/Login? I have at least one X11-based application (X2 - > > The Programmer's Editor) that I use extensively, and it would > > be nice if it could remember across Logout/Login events. > > I'm wondering if something like a DCOP wrapper might do > > the job? > > Load the application into your autostart dir. > /home/foo/.trinity/autostart > Also, check the program's setting to see if it has an autostart > feature.
Yes, that would work if I wanted it to start at every login, not just if it was running when I logged out...
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Leslie
On 03/20/2019 11:46 PM, J Leslie Turriff wrote:
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie,
To accomplish what you want, you application needs a .desktop file which is basically how kde session-manager keeps track of what is running when logout. You can
$ cat ~/.kde/share/config/ksmserverrc
(or make the TDE name changes needed, I don't think the config files are renamed)
Anyway, you can create a desktop file for whatever application you have that you want to restart (easiest way is with kmenuedit and just create an icon for your program and TDE will create an entry in ~/.local/share/applications.
If I recall correctly, once TDE can associate the running application with a desktop file in applications it can restart, then the session manager can add it to ksmserverrc for restart on login
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500 J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
> On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > Is there a way to make TDE aware of running non-Trinity > > > applications so that they can be resurrected after > > > Logout/Login? I have at least one X11-based application (X2 - > > > The Programmer's Editor) that I use extensively, and it would > > > be nice if it could remember across Logout/Login events. > > > I'm wondering if something like a DCOP wrapper might do > > > the job? > > > > Load the application into your autostart dir. > > /home/foo/.trinity/autostart > > Also, check the program's setting to see if it has an autostart > > feature. > > Yes, that would work if I wanted it to start at every login, > not just if it was running when I logged out...
Once upon a time there was a little kingdom where all applications held the X11 standards high and the grand master of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Leslie
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
> > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > Is there a way to make TDE aware of running > > > > non-Trinity applications so that they can be resurrected > > > > after Logout/Login? I have at least one X11-based > > > > application (X2 - The Programmer's Editor) that I use > > > > extensively, and it would be nice if it could remember > > > > across Logout/Login events. I'm wondering if something > > > > like a DCOP wrapper might do the job? > > > > > > Load the application into your autostart dir. > > > /home/foo/.trinity/autostart > > > Also, check the program's setting to see if it has an > > > autostart feature. > > > > Yes, that would work if I wanted it to start at every > > login, not just if it was running when I logged out... > > Once upon a time there was a little kingdom where all > applications held the X11 standards high and the grand master > of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Wow! Yes, that is the X2 program I'm speaking of, and your example will help very much. Thank you.
Leslie
Anno domini 2019 Sun, 24 Mar 10:40:24 -0500 J Leslie Turriff scripsit:
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote: > On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit: > > > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > > Is there a way to make TDE aware of running > > > > > non-Trinity applications so that they can be resurrected > > > > > after Logout/Login? I have at least one X11-based > > > > > application (X2 - The Programmer's Editor) that I use > > > > > extensively, and it would be nice if it could remember > > > > > across Logout/Login events. I'm wondering if something > > > > > like a DCOP wrapper might do the job? > > > > > > > > Load the application into your autostart dir. > > > > /home/foo/.trinity/autostart > > > > Also, check the program's setting to see if it has an > > > > autostart feature. > > > > > > Yes, that would work if I wanted it to start at every > > > login, not just if it was running when I logged out... > > > > Once upon a time there was a little kingdom where all > > applications held the X11 standards high and the grand master > > of session management called > > So I guess you're saying that there's no way to get TDE to > notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Wow! Yes, that is the X2 program I'm speaking of, and your example will help very much. Thank you.
Leslie
Please post what you ended up with.
BTW, ther is an error in this line:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print
should be: for ID in $(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print
... whithout the 2 '"'.
Nik
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On 2019-03-25 03:05:56 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Sun, 24 Mar 10:40:24 -0500
J Leslie Turriff scripsit:
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote: > On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote: > > On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > > > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500 > > .> > J Leslie Turriff scripsit: > > > > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > > > Is there a way to make TDE aware of running > > > > > > non-Trinity applications so that they can be > > > > > > resurrected after Logout/Login? I have at least one > > > > > > X11-based application (X2 - The Programmer's Editor) > > > > > > that I use extensively, and it would be nice if it > > > > > > could remember across Logout/Login events. I'm > > > > > > wondering if something like a DCOP wrapper might do > > > > > > the job? > > > > > > > > > > Load the application into your autostart dir. > > > > > /home/foo/.trinity/autostart > > > > > Also, check the program's setting to see if it has an > > > > > autostart feature. > > > > > > > > Yes, that would work if I wanted it to start at every > > > > login, not just if it was running when I logged out... > > > > > > Once upon a time there was a little kingdom where all > > > applications held the X11 standards high and the grand > > > master of session management called > > > > So I guess you're saying that there's no way to get TDE > > to notice my X2, then. > > You can use the autostart dir [1], but you'll need to do the > work yourself. You could add a wrapper to starting X2 and a > script in the autostart dir. Or better would be a check script > in the shutdown dir (if it exists) and a corresponding script > in the autostart dir. > > Here's some out of context code from something else, > hack-and-slash as needed. > > #!/bin/bash > /path-to-X2/X2 > Pid=`pgrep -f /path-to-X2/X2` > if [ "$Pid" != "" ] ; then > # echo Already running... > # ps "$Pid" > touch /home/foo/.trinity/apps-to-restart/X2 > exit > fi > > In any event, what you want can be done, it just might be > painful. > > Best, > Michael > > [1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Wow! Yes, that is the X2 program I'm speaking of, and your example will help very much. Thank you.
Leslie
Please post what you ended up with.
I will. I'm not sure what to do to trigger the first part that collects the info about active instances when shutting down TDE?
BTW, ther is an error in this line:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print
should be: for ID in $(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print
... whithout the 2 '"'.
Nik
Okay, thanks. (I was a bit disconcerted to find that while xwininfo was already installed on my machine, xdotool was not. (?) )
Leslie
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
> > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > Is there a way to make TDE aware of running > > > > non-Trinity applications so that they can be resurrected > > > > after Logout/Login? I have at least one X11-based > > > > application (X2 - The Programmer's Editor) that I use > > > > extensively, and it would be nice if it could remember > > > > across Logout/Login events. I'm wondering if something > > > > like a DCOP wrapper might do the job? > > > > > > Load the application into your autostart dir. > > > /home/foo/.trinity/autostart > > > Also, check the program's setting to see if it has an > > > autostart feature. > > > > Yes, that would work if I wanted it to start at every > > login, not just if it was running when I logged out... > > Once upon a time there was a little kingdom where all > applications held the X11 standards high and the grand master > of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
This is quite helpful, and I'm making some progress with it. The main problem I'm having right now is that X2 doesn't put the program arguments in the window title, as you said, but it also doesn't pass its PID to X, so that there's no easy way to match it to the output of ps, which does have the arguments. ps appears to write its information in PID order, and xprop writes a line _TDE_NET_WM_USER_CREATION_TIME(CARDINAL) = nnnnnnnnn which ought to help match them up. Now I just have to figure out how to append the ps output to the xprop output. I know how to do it in Rexx, but not in bash.
I don't understand what the second statement in the restore routine is for. | A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') at this point in the restore process (at TDE startup) there should be no running instances of X2; the next line creates the instances. | /path/to/xx $FILE &
Leslie
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote:
On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit:
> > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > Is there a way to make TDE aware of running > > > > non-Trinity applications so that they can be resurrected > > > > after Logout/Login? I have at least one X11-based > > > > application (X2 - The Programmer's Editor) that I use > > > > extensively, and it would be nice if it could remember > > > > across Logout/Login events. I'm wondering if something > > > > like a DCOP wrapper might do the job? > > > > > > Load the application into your autostart dir. > > > /home/foo/.trinity/autostart > > > Also, check the program's setting to see if it has an > > > autostart feature. > > > > Yes, that would work if I wanted it to start at every > > login, not just if it was running when I logged out... > > Once upon a time there was a little kingdom where all > applications held the X11 standards high and the grand master > of session management called
So I guess you're saying that there's no way to get TDE to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Leslie
Okay, I seem to have a working script (attached) that remembers the X applications I'm concerned with (thank you, Nik); now, how do I tell Trinity to execute it at shutdown time before it kills said applications?
Leslie
Anno domini 2019 Fri, 19 Apr 15:28:14 -0500 J Leslie Turriff scripsit:
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote: > On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit: > > > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > > Is there a way to make TDE aware of running > > > > > non-Trinity applications so that they can be resurrected > > > > > after Logout/Login? I have at least one X11-based > > > > > application (X2 - The Programmer's Editor) that I use > > > > > extensively, and it would be nice if it could remember > > > > > across Logout/Login events. I'm wondering if something > > > > > like a DCOP wrapper might do the job? > > > > > > > > Load the application into your autostart dir. > > > > /home/foo/.trinity/autostart > > > > Also, check the program's setting to see if it has an > > > > autostart feature. > > > > > > Yes, that would work if I wanted it to start at every > > > login, not just if it was running when I logged out... > > > > Once upon a time there was a little kingdom where all > > applications held the X11 standards high and the grand master > > of session management called > > So I guess you're saying that there's no way to get TDE to > notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Leslie
Okay, I seem to have a working script (attached) that remembers the X applications I'm concerned with (thank you, Nik); now, how do I tell Trinity to execute it at shutdown time before it kills said applications?
Leslie
Good question. At least there are applications that can stop the logout process, so it definitly can be done. Maybe dcop is the way to go?
If nobody comes up with the correct way to do it, I'll suggest you call your script every 5 minutes or so. Do not remove the old config at the beginning (line 22-24), as this leaves you in a bad state when the script is killed while running. Instead create a temporary file and move it over at the end of the script. Also check if twin is still running before you move the new file - maybe add a delay of 10 seconds (or how long it usually takes to logout) before moving the file.
Nik
On 2019-04-19 15:28:14 J Leslie Turriff wrote:
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote:
On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote: > On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500
.> > J Leslie Turriff scripsit: > > > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > > Is there a way to make TDE aware of running > > > > > non-Trinity applications so that they can be > > > > > resurrected after Logout/Login? I have at least one > > > > > X11-based application (X2 - The Programmer's Editor) > > > > > that I use extensively, and it would be nice if it > > > > > could remember across Logout/Login events. I'm > > > > > wondering if something like a DCOP wrapper might do the > > > > > job? > > > > > > > > Load the application into your autostart dir. > > > > /home/foo/.trinity/autostart > > > > Also, check the program's setting to see if it has an > > > > autostart feature. > > > > > > Yes, that would work if I wanted it to start at every > > > login, not just if it was running when I logged out... > > > > Once upon a time there was a little kingdom where all > > applications held the X11 standards high and the grand master > > of session management called > > So I guess you're saying that there's no way to get TDE > to notice my X2, then.
You can use the autostart dir [1], but you'll need to do the work yourself. You could add a wrapper to starting X2 and a script in the autostart dir. Or better would be a check script in the shutdown dir (if it exists) and a corresponding script in the autostart dir.
Here's some out of context code from something else, hack-and-slash as needed.
#!/bin/bash /path-to-X2/X2 Pid=`pgrep -f /path-to-X2/X2` if [ "$Pid" != "" ] ; then # echo Already running... # ps "$Pid" touch /home/foo/.trinity/apps-to-restart/X2 exit fi
In any event, what you want can be done, it just might be painful.
Best, Michael
[1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Leslie
Okay, I seem to have a working script (attached) that remembers the X applications I'm concerned with (thank you, Nik); now, how do I tell Trinity to execute it at shutdown time before it kills said applications?
Leslie rememberXapps
I just noticed that, while most editors display the path to the file currently in view in the title bar, that information is not necessarily complete because more than one file argument might have been passed on the command line; also, any program switches are not displayed there. If the program passes its PID to X, the xprop command can retrieve that, and ps ef can be used to retrieve the original argument list. Unfortunately, X2 neither displays the current file's path nor passes its PID to X. :-(
Leslie
Anno domini 2019 Thu, 25 Apr 20:46:55 -0500 J Leslie Turriff scripsit:
On 2019-04-19 15:28:14 J Leslie Turriff wrote:
On 2019-03-21 09:48:36 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 20 Mar 23:46:39 -0500
J Leslie Turriff scripsit:
On 2019-03-15 02:52:33 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Thu, 14 Mar 22:40:38 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:15:13 Michael wrote: > On Thursday 14 March 2019 06:26:16 pm J Leslie Turriff wrote: > > On 2019-03-11 04:12:29 Dr. Nikolaus Klepp wrote: > > > Anno domini 2019 Sun, 10 Mar 11:16:03 -0500 > > .> > J Leslie Turriff scripsit: > > > > On 2019-03-10 10:35:32 BorgLabs - Kate Draven wrote: > > > > > On Sunday 10 March 2019, J Leslie Turriff wrote: > > > > > > Is there a way to make TDE aware of running > > > > > > non-Trinity applications so that they can be > > > > > > resurrected after Logout/Login? I have at least one > > > > > > X11-based application (X2 - The Programmer's Editor) > > > > > > that I use extensively, and it would be nice if it > > > > > > could remember across Logout/Login events. I'm > > > > > > wondering if something like a DCOP wrapper might do the > > > > > > job? > > > > > > > > > > Load the application into your autostart dir. > > > > > /home/foo/.trinity/autostart > > > > > Also, check the program's setting to see if it has an > > > > > autostart feature. > > > > > > > > Yes, that would work if I wanted it to start at every > > > > login, not just if it was running when I logged out... > > > > > > Once upon a time there was a little kingdom where all > > > applications held the X11 standards high and the grand master > > > of session management called > > > > So I guess you're saying that there's no way to get TDE > > to notice my X2, then. > > You can use the autostart dir [1], but you'll need to do the work > yourself. You could add a wrapper to starting X2 and a script in > the autostart dir. Or better would be a check script in the > shutdown dir (if it exists) and a corresponding script in the > autostart dir. > > Here's some out of context code from something else, > hack-and-slash as needed. > > #!/bin/bash > /path-to-X2/X2 > Pid=`pgrep -f /path-to-X2/X2` > if [ "$Pid" != "" ] ; then > # echo Already running... > # ps "$Pid" > touch /home/foo/.trinity/apps-to-restart/X2 > exit > fi > > In any event, what you want can be done, it just might be > painful. > > Best, > Michael > > [1] Mine seems to be called: /home/michael/.trinity/Autostart
You're apparently misunderstanding what I'm looking for. I don't want this program to Always start when I login, only when it was running at the time that I previously logged out. That's why I wondered if some sort of DCOP wrapper might be appropriate.
Leslie
As your editor is not xsession-aware you have to wrap it some shell script, that just saves the state of x2 in the form of commandline invocation in a file when it's close due to TDE shutdown. So there is no invocation of X2 when no X2 was open when TDE closed the session. At TDE login you execute that file with invocations and be happy. Sure, you have to manage some stuff like which desktop to put it, window placement etc. but that's not that complicated.
Nik
Yes, but what to put in that wrapper? That's what my original question was.
Ah, ok. I do not know X2, is it this one? http://www.tangbu.com/x2main.shtml If yes, then there is one notable things about the application (but correct me if I'm wrong): The X11 application "xx" does not set the X11 window title to the filename of the file that's edited - which makes it an extremly hostile application and difficult to find the filename in a general solution. The terminal application "x" does neither, but you can get the filename from the current instance if you parse the escape-sequence (<ESC>[H, then some chatter and there comes the filename).
Anyway, the geometry of each window and the desktop where it runs on can be found like this:
for ID in $(xwininfo -all -root|awk '/"X2 Editor Version 2.08.1"/ {print $1}'); do echo $(xprop -id $ID|awk '/_NET_WM_DESKTOP/{print $3}') \ $(xwininfo -id $ID|awk '/geometry/ {print $2}'| tr -c '[0-9]' ' ') \ $(/do/some/black/magic/to/get/filename/from/X2) done > /some/place/to/store
Example /some/place/to/store: 2 484 559 58 0 /tmp/a.txt 4 100 100 100 100 /tmp/b.txt
To restore each window you basicly do something like this - nota bene: if x2 were a nice application, you would not have to do this trickery to get it's window id:
cat /some/place/to/store | while read DESKTOP W H X Y FILE; do A=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') /path/to/xx $FILE & sleep 1 B=$(xwininfo -all -root|awk '/X2 Editor Version 2.08.1/ {print $1}') ID=$(echo $A $B|tr ' ' '\n'|sort|uniq -u) xdotool set_desktop_for_window $ID $DESKTOP xdotool windowsize $ID $W $H xdotool windowmove $ID $X $Y done
I hope that get's you started. As I do not know how you use X2 (xx or x ...), I cannot give you a hint how to obtain the filename of a window instance.
Nik
Leslie
Okay, I seem to have a working script (attached) that remembers the X applications I'm concerned with (thank you, Nik); now, how do I tell Trinity to execute it at shutdown time before it kills said applications?
Leslie rememberXapps
I just noticed that, while most editors display the path to the file currently in view in the title bar, that information is not necessarily complete because more than one file argument might have been passed on the command line; also, any program switches are not displayed there. If the program passes its PID to X, the xprop command can retrieve that, and ps ef can be used to retrieve the original argument list. Unfortunately, X2 neither displays the current file's path nor passes its PID to X. :-(
Leslie
Yes, that's why you need a wrapper around X2 that saves the commandline somewhere. Like so:
# x2wrapper /path-to-X2/X2 $* & echo $! $* > /tmp/$!.commandline
Additionally - if you open a file from within the editor - you could run X2 with strace and capture all calls to "open".
Nik
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
In TDE R14.1.0 there will be a TDEDocker application (modified from KDocker http://kdocker.sourceforge.net/). This allows to run applications docked in the systray. I don't know if this retains things across logout/login sessions, but you may want to write this down and give it a try when R14.1.0 is released. Yes, you will need to way for a while for this, but we are edging closer each month :-)
Cheers Michele
On 2019-03-14 20:40:35 Michele Calgaro via trinity-users wrote:
In TDE R14.1.0 there will be a TDEDocker application (modified from KDocker http://kdocker.sourceforge.net/). This allows to run applications docked in the systray. I don't know if this retains things across logout/login sessions, but you may want to write this down and give it a try when R14.1.0 is released. Yes, you will need to way for a while for this, but we are edging closer each month :-)
Cheers Michele
Actually, it looks like KShutdown provides the capability for what I need.
• Start KShutdown • Go to Settings -> Configure KShutdown • Highlight "End current session" • Click on 'Edit' • Near the bottom left, check 'Run command' and enter the path to the script to run (mine is ~/bin/rememberXapps) and any necessary delay (I set it to 1 second). • Click on 'OK' • Click on 'OK' again • Close KShutdown (minimizes it to the tray)
To end the session, restore KShutdown and click on 'Start'
Leslie
Anno domini 2019 Wed, 24 Apr 18:47:39 -0500 J Leslie Turriff scripsit:
On 2019-03-14 20:40:35 Michele Calgaro via trinity-users wrote:
In TDE R14.1.0 there will be a TDEDocker application (modified from KDocker http://kdocker.sourceforge.net/). This allows to run applications docked in the systray. I don't know if this retains things across logout/login sessions, but you may want to write this down and give it a try when R14.1.0 is released. Yes, you will need to way for a while for this, but we are edging closer each month :-)
Cheers Michele
Actually, it looks like KShutdown provides the capability for what I need.
• Start KShutdown • Go to Settings -> Configure KShutdown • Highlight "End current session" • Click on 'Edit' • Near the bottom left, check 'Run command' and enter the path to the script to run (mine is ~/bin/rememberXapps) and any necessary delay (I set it to 1 second). • Click on 'OK' • Click on 'OK' again • Close KShutdown (minimizes it to the tray)
To end the session, restore KShutdown and click on 'Start'
Leslie
Hi!
This looks like a good way :-)
Nik
To unsubscribe, e-mail: trinity-users-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-users-help@lists.pearsoncomputing.net Read list messages on the web archive: http://trinity-users.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
On 2019-04-25 02:32:20 Dr. Nikolaus Klepp wrote:
Anno domini 2019 Wed, 24 Apr 18:47:39 -0500
J Leslie Turriff scripsit:
On 2019-03-14 20:40:35 Michele Calgaro via trinity-users wrote:
In TDE R14.1.0 there will be a TDEDocker application (modified from KDocker http://kdocker.sourceforge.net/). This allows to run applications docked in the systray. I don't know if this retains things across logout/login sessions, but you may want to write this down and give it a try when R14.1.0 is released. Yes, you will need to way for a while for this, but we are edging closer each month :-)
Cheers Michele
Actually, it looks like KShutdown provides the capability for what I need.
• Start KShutdown • Go to Settings -> Configure KShutdown • Highlight "End current session" • Click on 'Edit' • Near the bottom left, check 'Run command' and enter the path to the script to run (mine is ~/bin/rememberXapps) and any necessary delay (I set it to 1 second). • Click on 'OK' • Click on 'OK' again • Close KShutdown (minimizes it to the tray)
To end the session, restore KShutdown and click on 'Start'
Leslie
Hi!
This looks like a good way :-)
Nik
I haven't actually tried it yet. :-)
Leslie
Hi Leslie,
Am Donnerstag, 25. April 2019 schrieb J Leslie Turriff:
Actually, it looks like KShutdown provides the capability for what I need.
• Start KShutdown • Go to Settings -> Configure KShutdown • Highlight "End current session" • Click on 'Edit' • Near the bottom left, check 'Run command' and enter the path to the script to run (mine is ~/bin/rememberXapps) and any necessary delay (I set it to 1 second). • Click on 'OK' • Click on 'OK' again • Close KShutdown (minimizes it to the tray)
To end the session, restore KShutdown and click on 'Start'
Thanks for that hint. I didn't know that the TDE shutdown dialog is an individual program, and more than that, configurable. Good to know.
Kind regards, Stefan
On 2019-04-25 07:45:27 Stefan Krusche wrote:
Hi Leslie,
Am Donnerstag, 25. April 2019 schrieb J Leslie Turriff:
Actually, it looks like KShutdown provides the capability for what I need.
• Start KShutdown • Go to Settings -> Configure KShutdown • Highlight "End current session" • Click on 'Edit' • Near the bottom left, check 'Run command' and enter the path to the script to run (mine is ~/bin/rememberXapps) and any necessary delay (I set it to 1 second). • Click on 'OK' • Click on 'OK' again • Close KShutdown (minimizes it to the tray)
To end the session, restore KShutdown and click on 'Start'
Thanks for that hint. I didn't know that the TDE shutdown dialog is an individual program, and more than that, configurable. Good to know.
Kind regards, Stefan
KShutdown is a component that is separate from the regular shutdown process.
Leslie