Re: [PLUG] Parts shopping for new desktop
Or mount it on an old record player. On 33 rpm, you'll get a chance every couple seconds! ;-) On Tue, Feb 6, 2018 at 10:53 PM, Tomas Kuchtawrote: > I love your suggestion Dennis, priceless! > > > > On Feb 6, 2018 9:26 PM, "Denis Heidtmann" wrote: > >> My previous desktop did not have front USB, so I had a short extension >> cable bringing USB to the front. Now that was 2.0, so I do not know if >> something running at 10Gbps could tolerate such a solution, but I bet not. >> I believe the reason for SATA Express is that it can accommodate higher >> bandwidth. And that bandwidth may be the reason Gen 2 it is relegated to >> the back. >> >> Just turn your machine around. No need for those lights and buttons and >> drives. >> >> -Denis >> >> On Tue, Feb 6, 2018 at 9:17 PM, John Jason Jordan wrote: >> >> > On Tue, 6 Feb 2018 20:40:15 -0800 >> > Denis Heidtmann dijo: >> > >> > >I did a brief search and found a prediction that the SATA Express "may >> > >never catch on." >> > >> > That may be a true prediction, but at the moment a SATA Express port >> > plus the device to mount in the front panel is the only way I can find >> > to get USB 3.1 Gen. 2 in the front of a desktop computer. I can find >> > plenty of motherboards that offer ports accessible in the back of the >> > computer, but I don't want to have to crawl around on the floor behind >> > the computer to plug in a portable drive. >> > >> > For the benefit of those who may be wondering what I'm yammering about, >> > let me clarify the current situation re USB. USB 1.1 is now so old that >> > it is safely forgotten, having been replaced by USB 2.0 (480Mbps). USB >> > 2.0 was then replaced by USB 3.0 (5Gbps). USB 3.0 was recently >> > superseded by USB 3.1 (10Gbps). However, for reasons I cannot grasp, it >> > has been decided to rename USB 3.0 as 'USB 3.1 Generation 1' and the >> > new 10Gbps version as USB 3.1 Generation 2.' The result is a mass of >> > confusion on vendors' web sites as most older copy has not been >> > updated. >> > >> > My computing makes moderately heavy use of disc I/O. At this time I >> > have no portable devices with USB 3.1 Gen 2, but the computer I'm >> > replacing is 7-8 years old, so I am building a new one that I hope will >> > serve my needs for just as long. It won't be very long before Gen 2 >> > becomes the norm, so it makes sense to be ready for it. >> > ___ >> > PLUG mailing list >> > PLUG@pdxlinux.org >> > http://lists.pdxlinux.org/mailman/listinfo/plug >> > >> ___ >> PLUG mailing list >> PLUG@pdxlinux.org >> http://lists.pdxlinux.org/mailman/listinfo/plug >> > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
I love your suggestion Dennis, priceless! On Feb 6, 2018 9:26 PM, "Denis Heidtmann"wrote: > My previous desktop did not have front USB, so I had a short extension > cable bringing USB to the front. Now that was 2.0, so I do not know if > something running at 10Gbps could tolerate such a solution, but I bet not. > I believe the reason for SATA Express is that it can accommodate higher > bandwidth. And that bandwidth may be the reason Gen 2 it is relegated to > the back. > > Just turn your machine around. No need for those lights and buttons and > drives. > > -Denis > > On Tue, Feb 6, 2018 at 9:17 PM, John Jason Jordan wrote: > > > On Tue, 6 Feb 2018 20:40:15 -0800 > > Denis Heidtmann dijo: > > > > >I did a brief search and found a prediction that the SATA Express "may > > >never catch on." > > > > That may be a true prediction, but at the moment a SATA Express port > > plus the device to mount in the front panel is the only way I can find > > to get USB 3.1 Gen. 2 in the front of a desktop computer. I can find > > plenty of motherboards that offer ports accessible in the back of the > > computer, but I don't want to have to crawl around on the floor behind > > the computer to plug in a portable drive. > > > > For the benefit of those who may be wondering what I'm yammering about, > > let me clarify the current situation re USB. USB 1.1 is now so old that > > it is safely forgotten, having been replaced by USB 2.0 (480Mbps). USB > > 2.0 was then replaced by USB 3.0 (5Gbps). USB 3.0 was recently > > superseded by USB 3.1 (10Gbps). However, for reasons I cannot grasp, it > > has been decided to rename USB 3.0 as 'USB 3.1 Generation 1' and the > > new 10Gbps version as USB 3.1 Generation 2.' The result is a mass of > > confusion on vendors' web sites as most older copy has not been > > updated. > > > > My computing makes moderately heavy use of disc I/O. At this time I > > have no portable devices with USB 3.1 Gen 2, but the computer I'm > > replacing is 7-8 years old, so I am building a new one that I hope will > > serve my needs for just as long. It won't be very long before Gen 2 > > becomes the norm, so it makes sense to be ready for it. > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
My previous desktop did not have front USB, so I had a short extension cable bringing USB to the front. Now that was 2.0, so I do not know if something running at 10Gbps could tolerate such a solution, but I bet not. I believe the reason for SATA Express is that it can accommodate higher bandwidth. And that bandwidth may be the reason Gen 2 it is relegated to the back. Just turn your machine around. No need for those lights and buttons and drives. -Denis On Tue, Feb 6, 2018 at 9:17 PM, John Jason Jordanwrote: > On Tue, 6 Feb 2018 20:40:15 -0800 > Denis Heidtmann dijo: > > >I did a brief search and found a prediction that the SATA Express "may > >never catch on." > > That may be a true prediction, but at the moment a SATA Express port > plus the device to mount in the front panel is the only way I can find > to get USB 3.1 Gen. 2 in the front of a desktop computer. I can find > plenty of motherboards that offer ports accessible in the back of the > computer, but I don't want to have to crawl around on the floor behind > the computer to plug in a portable drive. > > For the benefit of those who may be wondering what I'm yammering about, > let me clarify the current situation re USB. USB 1.1 is now so old that > it is safely forgotten, having been replaced by USB 2.0 (480Mbps). USB > 2.0 was then replaced by USB 3.0 (5Gbps). USB 3.0 was recently > superseded by USB 3.1 (10Gbps). However, for reasons I cannot grasp, it > has been decided to rename USB 3.0 as 'USB 3.1 Generation 1' and the > new 10Gbps version as USB 3.1 Generation 2.' The result is a mass of > confusion on vendors' web sites as most older copy has not been > updated. > > My computing makes moderately heavy use of disc I/O. At this time I > have no portable devices with USB 3.1 Gen 2, but the computer I'm > replacing is 7-8 years old, so I am building a new one that I hope will > serve my needs for just as long. It won't be very long before Gen 2 > becomes the norm, so it makes sense to be ready for it. > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
On Feb 6, 2018 11:17 PM, "John Jason Jordan"wrote: On Tue, 6 Feb 2018 20:40:15 -0800 Denis Heidtmann dijo: >I did a brief search and found a prediction that the SATA Express "may >never catch on." That may be a true prediction, but at the moment a SATA Express port plus the device to mount in the front panel is the only way I can find to get USB 3.1 Gen. 2 in the front of a desktop computer. I can find plenty of motherboards that offer ports accessible in the back of the computer, but I don't want to have to crawl around on the floor behind the computer to plug in a portable drive. How about a short usb extension cable to a usb on the back? ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
I am also looking, 2-3 even 4 yr old design would do it for me, although a 4X display is very tempting since I use my computer as a TV On Tue, Feb 6, 2018 at 8:59 PM, Russell Seniorwrote: > I was just doing an installation on a 10 year old computer. One solution is > being less bleeding edge. :-) > > On Feb 6, 2018 8:40 PM, "Denis Heidtmann" > wrote: > > > I did a brief search and found a prediction that the SATA Express "may > > never catch on." > > > > -Denis > > > > On Tue, Feb 6, 2018 at 8:29 PM, John Jason Jordan > wrote: > > > > > For CPU I have settled on Intel i7 6700 or maybe 7700. The problems is > > > the motherboard because I insist on a USB 3.1 Gen. 2 port on the front > > > of the case, and that means an adapter like the following: > > > > > > https://tinyurl.com/ycbkjf55 > > > > > > Unfortunately, that adapter requires a SATA Express connector, and I > > > can't find any motherboards with a SATA Express connector - lots of > > > regular SATA3 connectors, but no SATA Express connectors. > > > > > > Shopping is a PITA. Any suggestions welcome! > > > ___ > > > PLUG mailing list > > > PLUG@pdxlinux.org > > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
I was just doing an installation on a 10 year old computer. One solution is being less bleeding edge. :-) On Feb 6, 2018 8:40 PM, "Denis Heidtmann"wrote: > I did a brief search and found a prediction that the SATA Express "may > never catch on." > > -Denis > > On Tue, Feb 6, 2018 at 8:29 PM, John Jason Jordan wrote: > > > For CPU I have settled on Intel i7 6700 or maybe 7700. The problems is > > the motherboard because I insist on a USB 3.1 Gen. 2 port on the front > > of the case, and that means an adapter like the following: > > > > https://tinyurl.com/ycbkjf55 > > > > Unfortunately, that adapter requires a SATA Express connector, and I > > can't find any motherboards with a SATA Express connector - lots of > > regular SATA3 connectors, but no SATA Express connectors. > > > > Shopping is a PITA. Any suggestions welcome! > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Parts shopping for new desktop
I did a brief search and found a prediction that the SATA Express "may never catch on." -Denis On Tue, Feb 6, 2018 at 8:29 PM, John Jason Jordanwrote: > For CPU I have settled on Intel i7 6700 or maybe 7700. The problems is > the motherboard because I insist on a USB 3.1 Gen. 2 port on the front > of the case, and that means an adapter like the following: > > https://tinyurl.com/ycbkjf55 > > Unfortunately, that adapter requires a SATA Express connector, and I > can't find any motherboards with a SATA Express connector - lots of > regular SATA3 connectors, but no SATA Express connectors. > > Shopping is a PITA. Any suggestions welcome! > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
[PLUG] Parts shopping for new desktop
For CPU I have settled on Intel i7 6700 or maybe 7700. The problems is the motherboard because I insist on a USB 3.1 Gen. 2 port on the front of the case, and that means an adapter like the following: https://tinyurl.com/ycbkjf55 Unfortunately, that adapter requires a SATA Express connector, and I can't find any motherboards with a SATA Express connector - lots of regular SATA3 connectors, but no SATA Express connectors. Shopping is a PITA. Any suggestions welcome! ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
I have presently export DISPLAY=:0. I do not know what the : means, and why would you choose 1 rather than zero? Note that presently the window does appear, but the command wmctrl -k does not seem to do anything. I will be giving anacron an opportunity tomorrow with Wes' suggestion added. -Denis On Tue, Feb 6, 2018 at 1:57 PM, Tomas Kuchtawrote: > I do not believe that you will be able to open graphical window using cron. > The best you can hope for is sending notifications or emails. > > If you have the strength to continue with random experiments. Try: export > DISPLAY :1 > In your script before launching the window. Although that will likely be > blocked because the executing user is different than the user owning the > graphical environment. > > The only sure way, I can think of, would be to use existing or write own > notification system. This would run after login, by the user and accept > your notification messages for displaying. > > Hope it helps, Tomas > > On Feb 6, 2018 1:45 PM, "Ali Corbin" wrote: > > > Another thing to try is to use the full path, in case the cron > environment > > doesn't include $PATH > > > > On Tue, Feb 6, 2018 at 1:39 PM, wes wrote: > > > > > try sudo wmctrl, the same way you're doing sudo zenity. > > > > > > -wes > > > > > > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann < > > denis.heidtm...@gmail.com > > > > > > > wrote: > > > > > > > I have a script which runs daily via anacron. I want the script to > > > launch > > > > a zenity window to notify the user, so I issue the command wmctrl -k > on > > > > before zenity and wmctrl - off after. This is supposed to minimize > > all > > > > open windows to ensure that the zenity window will be visible. I > > have a > > > > test script to show that it works. Both scripts are owned by root, > but > > > > editable by me. I have run the test script from a command line > login > > > > using sudo, as well as from a Gnome terminal. The test script > behaves > > as > > > > intended--the desktop is cleared of all open windows. I inserted a > > test > > > > zenity window at the beginning of the real script to verity that when > > > > launched by anacron it would behave the same way. It does not! It > > does > > > > not minimize open windows, but the zenity window does appear on top > of > > > the > > > > open windows. > > > > > > > > What is different about the anacron launch? I have been monkeying > with > > > > this thing for quite a while. I tried wmctrl -R but that did not > > behave > > > as > > > > I had hoped. wmctrl -k does what I want except when anacron is doing > > the > > > > launching. > > > > > > > > Ideas? > > > > > > > > -Denis > > > > > > > > Test script: > > > > > > > > #!/bin/bash > > > > # test to get zenity to work when script is not called from an X > window > > > > # change to a non-X login (^ alt F2), call this w/sudo, then go back > > to X > > > > (^ alt F7) > > > > # to see if a zenity window shows up. > > > > # feb 5 2018 the above worked--all open windows minimized. > > > > > > > > > > > > Notification () { > > > > # pass title, text of notice, and timeout as 3 parameters > > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > > wmctrl -k on > > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > > --timeout="$TIMOUT" > > > > RETRNCODE=$? > > > > wmctrl -k off > > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > > } > > > > > > > > sleep 30 > > > > > > > > export DISPLAY=:0 > > > > # test of launch of zenity > > > > Notification "Test of zenity (backup_checksh)" "This should minimize > > all > > > > open windows." 20 > > > > # remove when satisfied that launch works. > > > > > > > > Top of real script: > > > > > > > > #!/bin/bash > > > > > > > > Notification () { > > > > # pass title, text of notice, and timeout as 3 parameters > > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > > wmctrl -k on > > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > > --timeout="$TIMOUT" > > > > RETRNCODE=$? > > > > wmctrl -k off > > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > > } > > > > export DISPLAY=:0 > > > > # test of launch of zenity > > > > Notification "Test of zenity (backup_checksh)" "This should minimize > > all > > > > open windows." 5 > > > > # remove when satisfied that launch works. > > > > MAX_TIME=$((7 * 24 * 3600)) > > > > ___ > > > > PLUG mailing list > > > > PLUG@pdxlinux.org > > > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > > > ___ > > > PLUG mailing list > > > PLUG@pdxlinux.org > > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > >
Re: [PLUG] bash; anacron; wmctrl question
On the $DISPLAY variable, I thought that is what export DISPLAY=:0 was supposed to do. It must be doing something, since the zenity window does appear on my desktop. It is just that the wmctrl -k does not seem to work. I will be trying Wes' suggestion tomorrow when anacron gets another shot at it. How might I enable logging, and which log files? -Denis On Tue, Feb 6, 2018 at 1:50 PM, John Meissenwrote: > > denis.heidtm...@gmail.com said: > > What is different about the anacron launch? > > 1) check log files. Enable logging and check log files. Save script output. > > 2) Pobably the fact that the shell process executing the script doesn't > have a > $DISPLAY environment variable defined... Where would you expect it to open > the > window? > > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
yup. -wes On Tue, Feb 6, 2018 at 2:22 PM, Denis Heidtmannwrote: > You mean sudo -u household wmctrl...? > > -Denis > > On Tue, Feb 6, 2018 at 1:39 PM, wes wrote: > > > try sudo wmctrl, the same way you're doing sudo zenity. > > > > -wes > > > > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann < > denis.heidtm...@gmail.com > > > > > wrote: > > > > > I have a script which runs daily via anacron. I want the script to > > launch > > > a zenity window to notify the user, so I issue the command wmctrl -k on > > > before zenity and wmctrl - off after. This is supposed to minimize > all > > > open windows to ensure that the zenity window will be visible. I > have a > > > test script to show that it works. Both scripts are owned by root, but > > > editable by me. I have run the test script from a command line login > > > using sudo, as well as from a Gnome terminal. The test script behaves > as > > > intended--the desktop is cleared of all open windows. I inserted a > test > > > zenity window at the beginning of the real script to verity that when > > > launched by anacron it would behave the same way. It does not! It > does > > > not minimize open windows, but the zenity window does appear on top of > > the > > > open windows. > > > > > > What is different about the anacron launch? I have been monkeying with > > > this thing for quite a while. I tried wmctrl -R but that did not > behave > > as > > > I had hoped. wmctrl -k does what I want except when anacron is doing > the > > > launching. > > > > > > Ideas? > > > > > > -Denis > > > > > > Test script: > > > > > > #!/bin/bash > > > # test to get zenity to work when script is not called from an X window > > > # change to a non-X login (^ alt F2), call this w/sudo, then go back > to X > > > (^ alt F7) > > > # to see if a zenity window shows up. > > > # feb 5 2018 the above worked--all open windows minimized. > > > > > > > > > Notification () { > > > # pass title, text of notice, and timeout as 3 parameters > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > wmctrl -k on > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > --timeout="$TIMOUT" > > > RETRNCODE=$? > > > wmctrl -k off > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > } > > > > > > sleep 30 > > > > > > export DISPLAY=:0 > > > # test of launch of zenity > > > Notification "Test of zenity (backup_checksh)" "This should minimize > all > > > open windows." 20 > > > # remove when satisfied that launch works. > > > > > > Top of real script: > > > > > > #!/bin/bash > > > > > > Notification () { > > > # pass title, text of notice, and timeout as 3 parameters > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > wmctrl -k on > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > --timeout="$TIMOUT" > > > RETRNCODE=$? > > > wmctrl -k off > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > } > > > export DISPLAY=:0 > > > # test of launch of zenity > > > Notification "Test of zenity (backup_checksh)" "This should minimize > all > > > open windows." 5 > > > # remove when satisfied that launch works. > > > MAX_TIME=$((7 * 24 * 3600)) > > > ___ > > > PLUG mailing list > > > PLUG@pdxlinux.org > > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
You mean sudo -u household wmctrl...? -Denis On Tue, Feb 6, 2018 at 1:39 PM, weswrote: > try sudo wmctrl, the same way you're doing sudo zenity. > > -wes > > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann > > wrote: > > > I have a script which runs daily via anacron. I want the script to > launch > > a zenity window to notify the user, so I issue the command wmctrl -k on > > before zenity and wmctrl - off after. This is supposed to minimize all > > open windows to ensure that the zenity window will be visible. I have a > > test script to show that it works. Both scripts are owned by root, but > > editable by me. I have run the test script from a command line login > > using sudo, as well as from a Gnome terminal. The test script behaves as > > intended--the desktop is cleared of all open windows. I inserted a test > > zenity window at the beginning of the real script to verity that when > > launched by anacron it would behave the same way. It does not! It does > > not minimize open windows, but the zenity window does appear on top of > the > > open windows. > > > > What is different about the anacron launch? I have been monkeying with > > this thing for quite a while. I tried wmctrl -R but that did not behave > as > > I had hoped. wmctrl -k does what I want except when anacron is doing the > > launching. > > > > Ideas? > > > > -Denis > > > > Test script: > > > > #!/bin/bash > > # test to get zenity to work when script is not called from an X window > > # change to a non-X login (^ alt F2), call this w/sudo, then go back to X > > (^ alt F7) > > # to see if a zenity window shows up. > > # feb 5 2018 the above worked--all open windows minimized. > > > > > > Notification () { > > # pass title, text of notice, and timeout as 3 parameters > > TITLE=$1; MSG=$2; TIMOUT=$3 > > wmctrl -k on > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > --timeout="$TIMOUT" > > RETRNCODE=$? > > wmctrl -k off > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > } > > > > sleep 30 > > > > export DISPLAY=:0 > > # test of launch of zenity > > Notification "Test of zenity (backup_checksh)" "This should minimize all > > open windows." 20 > > # remove when satisfied that launch works. > > > > Top of real script: > > > > #!/bin/bash > > > > Notification () { > > # pass title, text of notice, and timeout as 3 parameters > > TITLE=$1; MSG=$2; TIMOUT=$3 > > wmctrl -k on > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > --timeout="$TIMOUT" > > RETRNCODE=$? > > wmctrl -k off > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > } > > export DISPLAY=:0 > > # test of launch of zenity > > Notification "Test of zenity (backup_checksh)" "This should minimize all > > open windows." 5 > > # remove when satisfied that launch works. > > MAX_TIME=$((7 * 24 * 3600)) > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
Thinking little more about it - you might be able to get around the access permissions - to display stuff on other user's screens by using xhost command as part of user's default environment setup at login. That however is breaking the security - you can imagine how the desktop would look if random users can display stuff on your desktop. Beside annoyances, I can imagine fake terminals, browsers, etc. and windows covering whole screen without the closing button. Tomas On Feb 6, 2018 1:57 PM, "Tomas Kuchta"wrote: > I do not believe that you will be able to open graphical window using > cron. The best you can hope for is sending notifications or emails. > > If you have the strength to continue with random experiments. Try: export > DISPLAY :1 > In your script before launching the window. Although that will likely be > blocked because the executing user is different than the user owning the > graphical environment. > > The only sure way, I can think of, would be to use existing or write own > notification system. This would run after login, by the user and accept > your notification messages for displaying. > > Hope it helps, Tomas > > On Feb 6, 2018 1:45 PM, "Ali Corbin" wrote: > >> Another thing to try is to use the full path, in case the cron environment >> doesn't include $PATH >> >> On Tue, Feb 6, 2018 at 1:39 PM, wes wrote: >> >> > try sudo wmctrl, the same way you're doing sudo zenity. >> > >> > -wes >> > >> > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann < >> denis.heidtm...@gmail.com >> > > >> > wrote: >> > >> > > I have a script which runs daily via anacron. I want the script to >> > launch >> > > a zenity window to notify the user, so I issue the command wmctrl -k >> on >> > > before zenity and wmctrl - off after. This is supposed to minimize >> all >> > > open windows to ensure that the zenity window will be visible. I >> have a >> > > test script to show that it works. Both scripts are owned by root, >> but >> > > editable by me. I have run the test script from a command line >> login >> > > using sudo, as well as from a Gnome terminal. The test script >> behaves as >> > > intended--the desktop is cleared of all open windows. I inserted a >> test >> > > zenity window at the beginning of the real script to verity that when >> > > launched by anacron it would behave the same way. It does not! It >> does >> > > not minimize open windows, but the zenity window does appear on top of >> > the >> > > open windows. >> > > >> > > What is different about the anacron launch? I have been monkeying >> with >> > > this thing for quite a while. I tried wmctrl -R but that did not >> behave >> > as >> > > I had hoped. wmctrl -k does what I want except when anacron is doing >> the >> > > launching. >> > > >> > > Ideas? >> > > >> > > -Denis >> > > >> > > Test script: >> > > >> > > #!/bin/bash >> > > # test to get zenity to work when script is not called from an X >> window >> > > # change to a non-X login (^ alt F2), call this w/sudo, then go back >> to X >> > > (^ alt F7) >> > > # to see if a zenity window shows up. >> > > # feb 5 2018 the above worked--all open windows minimized. >> > > >> > > >> > > Notification () { >> > > # pass title, text of notice, and timeout as 3 parameters >> > > TITLE=$1; MSG=$2; TIMOUT=$3 >> > > wmctrl -k on >> > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" >> > > --timeout="$TIMOUT" >> > > RETRNCODE=$? >> > > wmctrl -k off >> > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout >> > > } >> > > >> > > sleep 30 >> > > >> > > export DISPLAY=:0 >> > > # test of launch of zenity >> > > Notification "Test of zenity (backup_checksh)" "This should minimize >> all >> > > open windows." 20 >> > > # remove when satisfied that launch works. >> > > >> > > Top of real script: >> > > >> > > #!/bin/bash >> > > >> > > Notification () { >> > > # pass title, text of notice, and timeout as 3 parameters >> > > TITLE=$1; MSG=$2; TIMOUT=$3 >> > > wmctrl -k on >> > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" >> > > --timeout="$TIMOUT" >> > > RETRNCODE=$? >> > > wmctrl -k off >> > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout >> > > } >> > > export DISPLAY=:0 >> > > # test of launch of zenity >> > > Notification "Test of zenity (backup_checksh)" "This should minimize >> all >> > > open windows." 5 >> > > # remove when satisfied that launch works. >> > > MAX_TIME=$((7 * 24 * 3600)) >> > > ___ >> > > PLUG mailing list >> > > PLUG@pdxlinux.org >> > > http://lists.pdxlinux.org/mailman/listinfo/plug >> > > >> > ___ >> > PLUG mailing list >> > PLUG@pdxlinux.org >> > http://lists.pdxlinux.org/mailman/listinfo/plug >> > >> ___ >> PLUG mailing list >> PLUG@pdxlinux.org >>
Re: [PLUG] bash; anacron; wmctrl question
I do not believe that you will be able to open graphical window using cron. The best you can hope for is sending notifications or emails. If you have the strength to continue with random experiments. Try: export DISPLAY :1 In your script before launching the window. Although that will likely be blocked because the executing user is different than the user owning the graphical environment. The only sure way, I can think of, would be to use existing or write own notification system. This would run after login, by the user and accept your notification messages for displaying. Hope it helps, Tomas On Feb 6, 2018 1:45 PM, "Ali Corbin"wrote: > Another thing to try is to use the full path, in case the cron environment > doesn't include $PATH > > On Tue, Feb 6, 2018 at 1:39 PM, wes wrote: > > > try sudo wmctrl, the same way you're doing sudo zenity. > > > > -wes > > > > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann < > denis.heidtm...@gmail.com > > > > > wrote: > > > > > I have a script which runs daily via anacron. I want the script to > > launch > > > a zenity window to notify the user, so I issue the command wmctrl -k on > > > before zenity and wmctrl - off after. This is supposed to minimize > all > > > open windows to ensure that the zenity window will be visible. I > have a > > > test script to show that it works. Both scripts are owned by root, but > > > editable by me. I have run the test script from a command line login > > > using sudo, as well as from a Gnome terminal. The test script behaves > as > > > intended--the desktop is cleared of all open windows. I inserted a > test > > > zenity window at the beginning of the real script to verity that when > > > launched by anacron it would behave the same way. It does not! It > does > > > not minimize open windows, but the zenity window does appear on top of > > the > > > open windows. > > > > > > What is different about the anacron launch? I have been monkeying with > > > this thing for quite a while. I tried wmctrl -R but that did not > behave > > as > > > I had hoped. wmctrl -k does what I want except when anacron is doing > the > > > launching. > > > > > > Ideas? > > > > > > -Denis > > > > > > Test script: > > > > > > #!/bin/bash > > > # test to get zenity to work when script is not called from an X window > > > # change to a non-X login (^ alt F2), call this w/sudo, then go back > to X > > > (^ alt F7) > > > # to see if a zenity window shows up. > > > # feb 5 2018 the above worked--all open windows minimized. > > > > > > > > > Notification () { > > > # pass title, text of notice, and timeout as 3 parameters > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > wmctrl -k on > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > --timeout="$TIMOUT" > > > RETRNCODE=$? > > > wmctrl -k off > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > } > > > > > > sleep 30 > > > > > > export DISPLAY=:0 > > > # test of launch of zenity > > > Notification "Test of zenity (backup_checksh)" "This should minimize > all > > > open windows." 20 > > > # remove when satisfied that launch works. > > > > > > Top of real script: > > > > > > #!/bin/bash > > > > > > Notification () { > > > # pass title, text of notice, and timeout as 3 parameters > > > TITLE=$1; MSG=$2; TIMOUT=$3 > > > wmctrl -k on > > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > > --timeout="$TIMOUT" > > > RETRNCODE=$? > > > wmctrl -k off > > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > > } > > > export DISPLAY=:0 > > > # test of launch of zenity > > > Notification "Test of zenity (backup_checksh)" "This should minimize > all > > > open windows." 5 > > > # remove when satisfied that launch works. > > > MAX_TIME=$((7 * 24 * 3600)) > > > ___ > > > PLUG mailing list > > > PLUG@pdxlinux.org > > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
Another thing to try is to use the full path, in case the cron environment doesn't include $PATH On Tue, Feb 6, 2018 at 1:39 PM, weswrote: > try sudo wmctrl, the same way you're doing sudo zenity. > > -wes > > On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmann > > wrote: > > > I have a script which runs daily via anacron. I want the script to > launch > > a zenity window to notify the user, so I issue the command wmctrl -k on > > before zenity and wmctrl - off after. This is supposed to minimize all > > open windows to ensure that the zenity window will be visible. I have a > > test script to show that it works. Both scripts are owned by root, but > > editable by me. I have run the test script from a command line login > > using sudo, as well as from a Gnome terminal. The test script behaves as > > intended--the desktop is cleared of all open windows. I inserted a test > > zenity window at the beginning of the real script to verity that when > > launched by anacron it would behave the same way. It does not! It does > > not minimize open windows, but the zenity window does appear on top of > the > > open windows. > > > > What is different about the anacron launch? I have been monkeying with > > this thing for quite a while. I tried wmctrl -R but that did not behave > as > > I had hoped. wmctrl -k does what I want except when anacron is doing the > > launching. > > > > Ideas? > > > > -Denis > > > > Test script: > > > > #!/bin/bash > > # test to get zenity to work when script is not called from an X window > > # change to a non-X login (^ alt F2), call this w/sudo, then go back to X > > (^ alt F7) > > # to see if a zenity window shows up. > > # feb 5 2018 the above worked--all open windows minimized. > > > > > > Notification () { > > # pass title, text of notice, and timeout as 3 parameters > > TITLE=$1; MSG=$2; TIMOUT=$3 > > wmctrl -k on > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > --timeout="$TIMOUT" > > RETRNCODE=$? > > wmctrl -k off > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > } > > > > sleep 30 > > > > export DISPLAY=:0 > > # test of launch of zenity > > Notification "Test of zenity (backup_checksh)" "This should minimize all > > open windows." 20 > > # remove when satisfied that launch works. > > > > Top of real script: > > > > #!/bin/bash > > > > Notification () { > > # pass title, text of notice, and timeout as 3 parameters > > TITLE=$1; MSG=$2; TIMOUT=$3 > > wmctrl -k on > > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > > --timeout="$TIMOUT" > > RETRNCODE=$? > > wmctrl -k off > > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > > } > > export DISPLAY=:0 > > # test of launch of zenity > > Notification "Test of zenity (backup_checksh)" "This should minimize all > > open windows." 5 > > # remove when satisfied that launch works. > > MAX_TIME=$((7 * 24 * 3600)) > > ___ > > PLUG mailing list > > PLUG@pdxlinux.org > > http://lists.pdxlinux.org/mailman/listinfo/plug > > > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] bash; anacron; wmctrl question
try sudo wmctrl, the same way you're doing sudo zenity. -wes On Tue, Feb 6, 2018 at 1:27 PM, Denis Heidtmannwrote: > I have a script which runs daily via anacron. I want the script to launch > a zenity window to notify the user, so I issue the command wmctrl -k on > before zenity and wmctrl - off after. This is supposed to minimize all > open windows to ensure that the zenity window will be visible. I have a > test script to show that it works. Both scripts are owned by root, but > editable by me. I have run the test script from a command line login > using sudo, as well as from a Gnome terminal. The test script behaves as > intended--the desktop is cleared of all open windows. I inserted a test > zenity window at the beginning of the real script to verity that when > launched by anacron it would behave the same way. It does not! It does > not minimize open windows, but the zenity window does appear on top of the > open windows. > > What is different about the anacron launch? I have been monkeying with > this thing for quite a while. I tried wmctrl -R but that did not behave as > I had hoped. wmctrl -k does what I want except when anacron is doing the > launching. > > Ideas? > > -Denis > > Test script: > > #!/bin/bash > # test to get zenity to work when script is not called from an X window > # change to a non-X login (^ alt F2), call this w/sudo, then go back to X > (^ alt F7) > # to see if a zenity window shows up. > # feb 5 2018 the above worked--all open windows minimized. > > > Notification () { > # pass title, text of notice, and timeout as 3 parameters > TITLE=$1; MSG=$2; TIMOUT=$3 > wmctrl -k on > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > --timeout="$TIMOUT" > RETRNCODE=$? > wmctrl -k off > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > } > > sleep 30 > > export DISPLAY=:0 > # test of launch of zenity > Notification "Test of zenity (backup_checksh)" "This should minimize all > open windows." 20 > # remove when satisfied that launch works. > > Top of real script: > > #!/bin/bash > > Notification () { > # pass title, text of notice, and timeout as 3 parameters > TITLE=$1; MSG=$2; TIMOUT=$3 > wmctrl -k on > sudo -u household zenity --question --title="$TITLE" --text="$MSG" > --timeout="$TIMOUT" > RETRNCODE=$? > wmctrl -k off > return $RETRNCODE # return codes: 0 = YES, 1 = cancel, 5 = timeout > } > export DISPLAY=:0 > # test of launch of zenity > Notification "Test of zenity (backup_checksh)" "This should minimize all > open windows." 5 > # remove when satisfied that launch works. > MAX_TIME=$((7 * 24 * 3600)) > ___ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug