--- Log opened Tue Mar 20 00:00:52 2018 |
00:23 | | Degi [Degi@Nightstar-77jaiq.dyn.telefonica.de] has quit [Connection closed] |
00:23 | | Derakon[AFK] is now known as Derakon |
00:42 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code |
00:42 | | mode/#code [+o himi] by ChanServ |
01:10 | | Kindamoody|afk is now known as Kindamoody[zZz] |
01:18 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [[NS] Quit: Live Long and Prosper.] |
01:18 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
01:18 | | mode/#code [+o macdjord] by ChanServ |
02:00 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
02:03 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
02:03 | | mode/#code [+o Alek] by ChanServ |
02:29 | | Vornotron [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
02:29 | | mode/#code [+qo Vornotron Vornotron] by ChanServ |
02:37 | <&[R]> | "To fix make error caused by 'crypt' just do ln -s /usr/lib/libcrypt.so /usr/lib/libcrypt.a" *twith* |
02:37 | <&[R]> | *twitch** |
03:24 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
03:27 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
03:27 | | mode/#code [+o Alek] by ChanServ |
03:35 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [[NS] Quit: Live Long and Prosper.] |
03:39 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
03:39 | | mode/#code [+o macdjord] by ChanServ |
03:54 | <@macdjord> | Mahal: Speaking of writing windows shell scripts - I have a ought-to-be-simple task which has quite stumped me. |
03:55 | | Derakon is now known as Derakon[AFK] |
03:55 | < Mahal> | Yes? |
03:55 | <@macdjord> | I need to get the PID of all runing processes with the image name 'foo.exe', and then execute the command 'bar.exe [PID]' once for each such PID found. |
03:56 | < Mahal> | do you want running processes, or applications? |
03:56 | <@macdjord> | Alternately, I need to find the PID of a single running process which has imagename 'foo.exe' and the first command-line argument does /not/ start with a dash, then run 'bar.exe [PID]'. |
03:57 | <@macdjord> | Mahal: Actually, perhaps I'd better explain context here, to be sure I'm not solving the wrong problem. |
03:58 | < Mahal> | -grin- |
03:58 | <@macdjord> | I have a bunch of generally-useful background apps which live in the taskbar. |
03:59 | <@macdjord> | Occasionally, my machine will get into a memory crunch, and I will wish to close all these programs so as to free all resources so I can get things unstuck long enough to perform a graceful shutdown of whatever's hogging the memory (usually Firefox). |
04:00 | < Mahal> | Right |
04:00 | <@macdjord> | Erm, correction. |
04:00 | <@macdjord> | Apps which live in the /system tray/, not the taskbar. |
04:00 | < Mahal> | I figured that's what you meant, actually |
04:01 | <@macdjord> | Unfortunately, under such conditions, just getting the tray icons to respond so I can hit 'Exit' can be slow. So I wanted to write a script which will shut down all these apps programatically. |
04:02 | < Mahal> | hrm |
04:02 | <@macdjord> | Unfortunately, 'taskkill' just sends the 'window closed' singal, which does nothing ebcause these are background apps which are /supposed/ to keep running when you close their windows, and 'taskkill /F' kils the processes forcefully without giving them time to shut down gracefully. |
04:03 | <@macdjord> | Now, fortunately, of the four apps that I want this script to deal with, two of them - Steam and Skype - support a 'shutdown' command-line argument which I can use to tell them to gracefully shut down on their own. |
04:05 | <@celticminstrel> | Then there's me, who just kills Firefox and starts it to solve this problem. >_> |
04:05 | <@celticminstrel> | ^restarts |
04:05 | <@macdjord> | However, the only way I've found to get Dropbox to shut down is to use the 'rmlogotest.exe' which simulates a Windows shutdown for a specific PID. |
04:06 | < Mahal> | It'll be some combination of get-wmiobject / get-process |
04:06 | < Mahal> | but this isn't something I"ve ever needed to do myself, I"m afraid. |
04:07 | <@celticminstrel> | (And I have to do it at least once a day now... :| ) |
04:07 | <@macdjord> | But there are /3/ dropbox.exe processes running, one main and two helpers, and I need to use rmlogotest on the main one. |
04:07 | <@macdjord> | I can tell the difference between them by their command line arguments. And using it on the wrong PID doesn't hurt anything; it just doesn't work. |
04:08 | <@macdjord> | SO either I need to get all 3 PIDs and for-loop over them, or I need to differentiate them by their command-line arguments. |
04:09 | <@macdjord> | 'tasklist /F' can show me the appropriate processes, but it generates a table which has the PIDs buried in it; I need just those 3 integers, without any cruft. |
04:10 | < Mahal> | something like gwmi win32_process filter "name = 'dropbox.exe'" | [taskkill] |
04:11 | | celticminstrel [celticminst@Nightstar-gil1m1.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
04:12 | <@macdjord> | (Additionally, there's one app - GOG Galaxy - which has no known shutdown argument /and/ does not respond to rmlogotest. My tentative plan is just to use `taskkill /F` on it.) |
04:13 | < Mahal> | My own solution to this is not to leave shit running~ |
04:14 | | McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code |
04:14 | | mode/#code [+ao McMartin McMartin] by ChanServ |
04:14 | <@macdjord> | Mahal: I could probably stand to remove GOG Galaxy from my startup apps. Skype and Dropbox kinda /need/ to be running all the time, though, and Steam I use too often to not want preloaded. |
04:18 | <@Alek> | ... really? that's bad coding of them. I would probably try to let them know so they could fix it. |
04:19 | <&McMartin> | I like Qt, but it's hefty enough that no Qt app is free. |
04:22 | <@macdjord> | Alek: There's at least one feature request on their forums for them to implement a useful set of command-line arguments. It's 3 years old. |
05:29 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
05:30 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
05:42 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds] |
05:43 | | Vornlicious [Vorn@Nightstar-pns58m.sub-174-211-15.myvzw.com] has joined #code |
05:47 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
05:47 | | macdjord is now known as macdjord|slep |
06:09 | | Vornotron [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
06:18 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
06:18 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
07:27 | | Vash [Vash@Nightstar-1l3nul.res.rr.com] has joined #code |
09:08 | | Vashicus [Vash@Nightstar-1l3nul.res.rr.com] has joined #code |
09:10 | | Vash [Vash@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
09:13 | | Vashicus is now known as Vash |
09:19 | | Vash [Vash@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
09:48 | | Kindamoody[zZz] is now known as Kindamoody |
09:57 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
09:57 | | mode/#code [+o mac] by ChanServ |
10:00 | | macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
10:59 | | Kindamoody is now known as Kindamoody|afk |
11:04 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
14:44 | | Tamber [tamber@new.furryhelix.co.uk] has quit [Ping timeout: 121 seconds] |
14:48 | | Tamber [tamber@new.furryhelix.co.uk] has joined #code |
14:48 | | mode/#code [+o Tamber] by ChanServ |
14:53 | | Tamber [tamber@new.furryhelix.co.uk] has quit [The TLS connection was non-properly terminated.] |
14:53 | | Tamber [tamber@new.furryhelix.co.uk] has joined #code |
14:53 | | mode/#code [+o Tamber] by ChanServ |
15:21 | <@gnolam> | Nghgh |
15:22 | <@gnolam> | Printers. |
15:22 | <@gnolam> | It's really hard to debug something when the hardware itself is conspiring against you. |
15:29 | | Degi [Degi@Nightstar-3o7vdp.dyn.telefonica.de] has joined #code |
15:35 | <@TheWatcher> | Printers; work of Satan, I tells you. |
15:36 | < Emmy> | amen. |
15:36 | < Emmy> | printers and scanners are the spawn of satan |
15:37 | < Emmy> | i'm fairly certain that the anti-christ has a majority stake in Brother and HP |
15:39 | <~Vornicus> | printers, like email, hate the living |
15:44 | <@gnolam> | "Print this in landscape mode." |
15:44 | <@gnolam> | "Portrait mode? Alright." |
15:44 | <@gnolam> | "No, landscape!" |
15:44 | <@gnolam> | "Portrait, check." |
15:44 | <@gnolam> | "Land. Scape." |
15:44 | <@gnolam> | *printing* "Done! You wanted portrait, right?" |
15:47 | <@gnolam> | Or |
15:47 | <@gnolam> | "Hey printer, what's your current paper size?" |
15:47 | <@gnolam> | "100x62 mm." |
15:47 | <@gnolam> | "Looks ok. What are your margins?" |
15:47 | <@gnolam> | "3 mm." |
15:47 | <@gnolam> | "Sounds small, but alright. So just checking to be sure: what's your printable area?" |
15:47 | <@gnolam> | "80x42 mm." |
15:48 | <@gnolam> | "..." |
15:50 | <&ToxicFrog> | My favourite is still: |
15:50 | <&ToxicFrog> | > Hey print driver, what's the printer's status? |
15:50 | <&ToxicFrog> | "Printer is online, ready to receive jobs, and mostly full of ink!" |
15:50 | <&ToxicFrog> | > Ok, print this. |
15:50 | <&ToxicFrog> | "Printing!" |
15:51 | <&ToxicFrog> | > Are you sure? The printer isn't doing anything. |
15:51 | <&ToxicFrog> | "Yep! Printer has received the job and is starting to print! Just waiting for it to say it's done now!" |
15:51 | <&ToxicFrog> | [I look behind the computer and the printer is not plugged in to it] |
15:52 | <@Alek> | inb4 "offline mode" or "printing to PDF" |
15:54 | <@Alek> | many a time my previous printers' drivers (after the dot matrix I had on my 286) would go into offline mode, while the printer itself is on, plugged in, and not busy. and they would refuse to switch to online mode, too. |
15:55 | <@gnolam> | "Ok, I think I have gotten the worst kinks out of this now. So print me one copy of this test label." |
15:55 | <@gnolam> | "1 copy and 99 blank feeds coming up!" |
16:04 | <@abudhabi> | ToxicFrog: It's like a phantom limb! |
16:04 | <@abudhabi> | But you get to feel the pain. |
16:06 | <&ToxicFrog> | Alek: yeah, no, the driver just always lied about whether the printer was connected |
16:37 | | Tamber [tamber@new.furryhelix.co.uk] has quit [Ping timeout: 121 seconds] |
16:41 | | Tamber [tamber@213.138.113.176] has joined #code |
16:42 | | mode/#code [+o Tamber] by ChanServ |
17:40 | | Tamber [tamber@213.138.113.176] has quit [Ping timeout: 121 seconds] |
17:44 | | Tamber [tamber@213.138.113.176] has joined #code |
17:44 | | mode/#code [+o Tamber] by ChanServ |
17:45 | <&McMartin> | ToxicFrog: I think that one was me, and I traditionally quoted you on that one: |
17:45 | <&McMartin> | "I printed the *shit* out of that document!" |
17:46 | <&McMartin> | But yeah, what's happening *there* is it's reporting from a single process's standpoint, and the whole point of having a multitasking OS is that your printing process has successfully completed when you submitted it to the spooler. |
17:46 | <&McMartin> | It is the *spooler's* job to let you know if the printer is unreachable |
17:50 | | Tamber [tamber@213.138.113.176] has quit [Connection closed] |
17:54 | | Tamber [tamber@new.furryhelix.co.uk] has joined #code |
17:54 | | mode/#code [+o Tamber] by ChanServ |
18:06 | <&ToxicFrog> | McMartin: that one was definitely me as well, at least, since I remember doing it quite vividly |
18:07 | <&ToxicFrog> | And no, this was asking the spooler "are there any pending print jobs and what is their status" |
18:11 | | Emmy is now known as Emmy-Noms |
18:28 | | Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code |
18:33 | <&McMartin> | Oh I see, yeah, that was different than the "I Printed The Shit Out Of That Document" story |
18:33 | <&McMartin> | Because there I was asking the *OS*, because the spooler itself was hidden behind a hypervisor barrier |
18:33 | <&McMartin> | And the answer there turned out to be "you will not go to space today, train your users to check the taskbar on the host system, which is permitted to know this" |
18:46 | | Emmy-Noms is now known as Emmy |
18:55 | | Tamber [tamber@new.furryhelix.co.uk] has quit [Ping timeout: 121 seconds] |
18:58 | | Tamber [tamber@furryhelix.co.uk] has joined #code |
18:58 | | mode/#code [+o Tamber] by ChanServ |
19:17 | | Jessikat [Jessikat@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed] |
19:23 | | Vornlicious [Vorn@Nightstar-pns58m.sub-174-211-15.myvzw.com] has quit [[NS] Quit: Bye] |
19:23 | | Vorntastic [Vorn@Nightstar-1l3nul.res.rr.com] has joined #code |
21:26 | | Vornicus [Vorn@Nightstar-1l3nul.res.rr.com] has quit [Ping timeout: 121 seconds] |
21:29 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
22:48 | <@iospace> | I now have a pi-hole set up |
22:54 | <&McMartin> | What's that? |
22:54 | <&[R]> | It's a pre-packed network thingy for raspberry pi |
22:54 | <&McMartin> | I feel like I've asked this, but if I have, I've totally forgotten the answer |
22:54 | <&McMartin> | Ah |
22:55 | <&[R]> | IIRC it's a filtering proxy? |
22:55 | <@iospace> | yeah, it blocks ad domains |
22:55 | <@iospace> | set it up as your DNS server |
22:56 | <&McMartin> | And then the ad servers must shut their pie holes. Nice. |
23:21 | < Mahal> | DNS forwarder/filterer of some description IIRC. |
23:23 | | Degi [Degi@Nightstar-3o7vdp.dyn.telefonica.de] has quit [Connection closed] |
23:41 | | Derakon[AFK] is now known as Derakon |
23:47 | | celticminstrel [celticminst@Nightstar-gil1m1.dsl.bell.ca] has joined #code |
23:47 | | mode/#code [+o celticminstrel] by ChanServ |
--- Log closed Wed Mar 21 00:00:54 2018 |