Re: [Dorset] Gnome Schedule and script command
Hi Tim, > Ok, to be honest I did not understand a lot of what was said in your > posts but after several hours of rereading your messages and lots of > goggling :-) I'm still doing that, lastly for git(1). Every time, it sinks in that little bit more. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
On 29/10/16 15:00, Ralph Corderoy wrote: Hi Patrick, It may be that the only way to terminate Firefox cleanly from outside of Firefox is to simulate a Ctrl+Q keystroke, or the GUI equivalent. Yes, I forgot about multiple windows, only using one myself. Ctrl-Q is the right way. (And easier that getting to the equivalent menu item.) http://www.semicomplete.com/projects/xdotool/ is one program for sending keypresses, there are others. All are X clients needing an X display to contact, so we're back to that DISPLAY issue again, but Tim may well be happy assuming the desired display is `:0'. Cheers, Ralph. Ok, to be honest I did not understand a lot of what was said in your posts but after several hours of rereading your messages and lots of goggling I came up with the following script p=$(pidof firefox) kill $p sleep 10 export DISPLAY=':0.0' /opt/firefox/firefox & It will run from the cli and gnome-schedule and will launch Firefox, the only down side is the fact that it will only open up to the opps we had a problem, would you like to restore your open tabs. While that is a bit of a pain I can live with it. Thanks for your help and pointing me in the right direction. Tim -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] How to configure "Reply-To" correctly for list?
Hi Patrick, > I was more inclined to question my own mail user agent's behaviour > than the configuration of the list, since it seems to work fine for > everyone else. Yes, didn't think you were complaining; just providing the information you needed about the list's choices to help understand the observations. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] How to configure "Reply-To" correctly for list?
On Saturday 29 Oct 2016, at 15:38:52, Ralph Corderoy wrote: > The relevant documentation is > https://www.gnu.org/software/mailman/mailman-admin/node11.html > and this list's settings are > > first_strip_reply_to = 0 > reply_goes_to_list = 0 > reply_to_address = '' I was more inclined to question my own mail user agent's behaviour than the configuration of the list, since it seems to work fine for everyone else. I had expected that somehow the default behaviour of KMail would be to disregard the Reply-To address when dealing with mailing lists. I now know that my expectation was incorrect and in fact "Reply-To" overrides the "List-Post" address. Given that my Reply-To and From addresses are the same, I can simply remove the Reply-To. It is superfluous and I had configured it without understanding the implications. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] How to configure "Reply-To" correctly for list?
Hi Patrick, The relevant documentation is https://www.gnu.org/software/mailman/mailman-admin/node11.html and this list's settings are first_strip_reply_to = 0 reply_goes_to_list = 0 reply_to_address = '' Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] How to configure "Reply-To" correctly for list?
On Saturday, 29 October 2016 15:10:39 BST Patrick Wigmore wrote: > Hi All, > > I've just noticed that my messages to this list seem to be set up > so that replies to them by default go straight to me rather than > the list. This seems wrong to me. Does anyone know what > configuration I need to change in KMail so that replies go to the > list by default? > > I have "Reply-to" set to my own address in my configuration, but > I would not expect that to apply to list emails. Do I need to > remove that? (As an experiment, I will remove it for this > message.) All I did was click reply. -- Terry Coles -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] How to configure "Reply-To" correctly for list?
On Saturday 29 Oct 2016, at 15:10:39, Patrick Wigmore wrote: > I have "Reply-to" set to my own address in my configuration > (As an experiment, I will remove it for this message.) That seems to solve the problem. Apologies for any inconvenience. Patrick -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
[Dorset] How to configure "Reply-To" correctly for list?
Hi All, I've just noticed that my messages to this list seem to be set up so that replies to them by default go straight to me rather than the list. This seems wrong to me. Does anyone know what configuration I need to change in KMail so that replies go to the list by default? I have "Reply-to" set to my own address in my configuration, but I would not expect that to apply to list emails. Do I need to remove that? (As an experiment, I will remove it for this message.) Patrick -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
Hi Patrick, > It may be that the only way to terminate Firefox cleanly from outside > of Firefox is to simulate a Ctrl+Q keystroke, or the GUI equivalent. Yes, I forgot about multiple windows, only using one myself. Ctrl-Q is the right way. (And easier that getting to the equivalent menu item.) http://www.semicomplete.com/projects/xdotool/ is one program for sending keypresses, there are others. All are X clients needing an X display to contact, so we're back to that DISPLAY issue again, but Tim may well be happy assuming the desired display is `:0'. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
On Saturday 29 Oct 2016, at 14:29:54, Patrick Wigmore wrote: > It may be that the only way to terminate Firefox cleanly from > outside of Firefox is to simulate a Ctrl+Q keystroke I tried > xdotool search --name "Mozilla Firefox" key ctrl+q which worked. (You probably need to set DISPLAY appropriately if running it from cron job.) But I think it's X-specific, so not much good if everything is going to end up using Mir or Wayland in the future. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
Hi Tim, On Saturday 29 Oct 2016, at 13:06:25, Ralph Corderoy wrote: > Firefox's handling of TERM is unsavoury. It doesn't treat it > like a user's request to quit. You may find one of the > programs that lets you script user actions on the X server is > better, e.g. pretending Firefox's window manager frame's close > icon was clicked. I concur with what Ralph has said here. Using Firefox with KDE's session manager, I've even had it offer to restore the "Restore Session" tab once or twice! (Which then went on to restore my original tabs.) Approaches involving closing Firefox's windows will not work well with multiple Firefox windows. When you have more than one Firefox window open, closing one window just closes that window and permanently discards its tabs, rather than quitting the application. Firefox will also continue running after all ordinary browser windows are closed if its Library window is still open. It may be that the only way to terminate Firefox cleanly from outside of Firefox is to simulate a Ctrl+Q keystroke, or the GUI equivalent. Patrick -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
Hi Tim, > Here is the bash script > > #!/bin/bash > #Restart Firefox > > killall firefox; sleep 1; firefox & That's assuming firefox exits after receiving the TERM signal before the one-second sleep is up. You'd be better off Testing with pidof if it's running, if not just exit. Sending it the TERM, like you are. Looping, testing with pidof again to wait for it to exit. Sleep for a second on each iteration. Have a maximum number of iterations before giving up. If you didn't give up, and it's now quit, start it. > If I run the script from the cli it will restart, but still says > "Sorry Firefox unexpectedly closed.." when Firefox restarts. Firefox's handling of TERM is unsavoury. It doesn't treat it like a user's request to quit. You may find one of the programs that lets you script user actions on the X server is better, e.g. pretending Firefox's window manager frame's close icon was clicked. Another reason why it might not be restarting is because the whole idea is a bit broken. :-) Firefox is an X client and needs an X server to connect to for an `X display', i.e. screen, keyboard, and mouse. That typically comes from the DISPLAY environment variable. That's set when you login and the X server is created for you. The cron job won't have any DISPLAY set at all, most likely, so Firefox won't know what X server to use. You may find DISPLAY has the same value from one login to the next so you attempt to set it in the environment of Firefox, e.g. `DISPLAY=:0.0 firefox', but it might not. http://stackoverflow.com/a/33104722 has some other tips on stopping that "resume" page, but I expect you just want all the tabs to come back as they were. I find browser.sessionstore.restore_pinned_tabs_on_demand set to true useful. It restores the tabs with their titles but doesn't load the page unless I move to that tab. Saves a delay and bandwidth hit. > After Ralph post I looked and I found the three entries for my the > three scripts. I though it was in crontab but now I can not find the > entries anywhere. `crontab -l' will list your crontab. `sudo crontab -l' will list root's. `strace -e file crontab -l >/dev/null' gives the clue at the end that these reside in /var/spool/cron/$USER, as crontab(1) here says. Cheers, Ralph. -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR
Re: [Dorset] Gnome Schedule and script command
On 27/10/16 23:58, Ralph Corderoy wrote: Hi Tim, I have tried adding /home/mit/scripts to my PATH and reverting back to what I had in the command window before ./firefoxrestart.sh but that did not work. ... I found that using this in the command window allows the script to be run from the script folder using gnome schedule /home/mit/scripts/firefoxrestart.sh If you were previously using ./firefoxrestart.sh then it's very likely scripts/firefoxrestart.sh would work instead. I don't know how Gnome Schedule works, perhaps it just uses cron behind the scenes, but if not, crontab(5) isn't too hard to figure out and it works whilst the machine is turned on and you're logged out. But perhaps that doesn't occur. Cheers, Ralph. Well for what ever reason it is not working now, it shuts down Firefox but it does not restart it. What else is not helping is that when Firefox restarts it restarts with the "Sorry Firefox unexpectedly closed, would you like to restore your tab from your last session" (or something like that), previously it would relaunch and open all my tabs (the option in Firefox is to restart with the tabs from last session). I watched the schedule run and Firefox will close and then nothing happens. Here is the bash script #!/bin/bash #Restart Firefox killall firefox; sleep 1; firefox & If I run the script from the cli it will restart, but still says "Sorry Firefox unexpectedly closed.." when Firefox restarts. As far as I can tell gnome-schedule is just a Gui for cron (or crontab). After Ralph post I looked and I found the three entries for my the three scripts. I though it was in crontab but now I can not find the entries anywhere. I did read crontab will run as a users so can be found in your user folder but other than an entry showing the 3 scripts in gnome schedule I can not find anything. I guess the next move would be to configure crontab by hand and do away with gnome schedule but just want to check that I am not missing anything obvious. Firefox is version 49.0.2 and my system is Debian testing based. Tim -- Next meeting: Bournemouth, Tuesday, 2016-11-01 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR