Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 November 15

From Wikipedia, the free encyclopedia
Computing desk
< November 14 << Oct | November | Dec >> November 16 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 15

[edit]

Shutting down Win 7 without installing updates

[edit]

In Windows Vista, when there were updates ready to install but it wasn't convenient to install them at that time, you used to be able to choose an option from the Start key that allowed you to shut down without installing updates.

In Windows 7, that's apparently gone. Windows Update has an option that says (approximately) "download updates but let me choose when to install them", but as far as I can tell, it doesn't actually work, which is unbelievably annoying. There's no way to predict how long the updates will take, and in the mean time, you can't reboot into Linux and use a decent OS. You certainly don't want to force-power-down the machine while updates are going on.

So I was thinking of the following crude workaround: When the Start key shows updates ready to install, if you don't want to install them yet, just close all apps, wait a little bit for any cached writes to be flushed to disk, and then press the power key and hold it for five seconds. Hopefully, that force-powers-down the machine before any updates can start, so it should be reasonably safe. Maybe it'll have to do a filesystem check the next time you start Windows, but that never seems to take *that* long.

Is this a reasonably safe workaround? Is there any risk that the updates will start before the machine can power down? --Trovatore (talk) 00:06, 15 November 2013 (UTC)[reply]

I don't know about your method, but this page has a few workarounds for Win7 to shut down without installing. --Mark viking (talk) 00:30, 15 November 2013 (UTC)[reply]
Thanks much! I will try that next time. However, I am somewhat skeptical, because it says "You can also skip this problem entirely by changing Windows Update from automatic to manual", and as I noted above, that doesn't actually work. --Trovatore (talk) 00:34, 15 November 2013 (UTC)[reply]

This doesn't answer the question but does solve the problem; disable updates altogether. 82.44.76.14 (talk) 00:35, 15 November 2013 (UTC)[reply]

Trovatore, note that there is a difference between "download updates but let me choose when to install them" and "never check for updates" (ie you have to manually tell Windows to check for updates). I assure you that the latter does work (on my installation of Win7 Ultimate SP1). There's also "check ... but let me choose whether to download". Mitch Ames (talk) 09:29, 15 November 2013 (UTC)[reply]
OK, that's probably true, but then what is "download updates but let me choose when to install them" supposed to mean, assuming it's not just a bug? Does it mean it won't make me install it as long as I don't shut down? That's a little silly if that's what it means. --Trovatore (talk) 20:48, 15 November 2013 (UTC)[reply]
On mine, a box pops up that says "Updates are ready to download", then I can check or uncheck the ones to install. I then must pick the "Install" button to start the install. If I log out, it doesn't do any updates. StuRat (talk) 05:08, 16 November 2013 (UTC)[reply]
Well, ideally, though, I want them to download automatically; that's useful. I just want a way to shut down without installing, if it's not convenient to install at the time. Next time I'll try one of the methods from Mark viking's link and see if they work. --Trovatore (talk) 05:11, 16 November 2013 (UTC)[reply]
Yes the point of the 'choose when to install them' is it will not install them after downloading but rather will download them and wait for you to choose to install them. This includes if you choose to install them when shutting down, which it makes the default choice for shutting down (but it's still a choice).
If you choose the default Windows update option to install the updates at a certain time, it will download after installing which means you won't generally have to wait to shutdown unless it so happens to be installing when you want to shutdown, but your computer may wake up at random times or you may be asked to restart at inopportune times (particularly if you have a random schedule or your computer is generally off so can't schedule the updates well) if that's required by the update.
IIRC it's been like that in most versions of Windows since some XP update. The only possible difference in Windows 7 (it's been a while since I've used 7) is the option to shut down without installing updates is a bit more hidden but as per the links, it's definitely still there.
Nil Einne (talk) 08:48, 18 November 2013 (UTC)[reply]
Well, if your first and second sentences are true, then there's a bug. It doesn't work. The "shutdown" button shows the little shield that means updates will be installed, and no alternative "shutdown without installing" option is offered. --Trovatore (talk) 18:15, 18 November 2013 (UTC)[reply]

diff colors?

[edit]

Several Unix utilities (notably ls) have in recent years acquired "colorized" versions. I'm pretty sure that diff is not one of them, although based on our article (specifically the Usage, Context format, and Unified format sections) one would be forgiven for getting the impression that it is. I assume that the colorizing there is for the benefit of the Wikipedia reader, but that it is not representative of the actual output of any mainstream version of diff (yet). But before I change the page to say that, I wanted to make sure by asking here. Anybody seen colorized diff output in the wild? —Steve Summit (talk) 00:42, 15 November 2013 (UTC)[reply]

I can hardly reference my answer, but "no," I have not seen diff produce colorized output text; and I've worked on many different types of unix boxen. Almost all of the diff tools I've seen are directly GNU diffutils or a slightly tweaked derivative. Neither the source for the version I run on my machine, nor the source for the latest version from the FSF, (nor the source for the "diff" utility built into my subversion client) include ANSI control characters of the sort that are commonly used to colorize command line applications (in the spirit of LS_COLORS).
For clarity, I assume we are categorically excluding file comparison tools that use graphic interfaces, like Xcode's FileMerge and Perforce's version integrator utility. Those are not "diff-like" enough to call "diff." Nimur (talk) 01:15, 15 November 2013 (UTC)[reply]
Hm... git help diff reveals that their utility does colorize! Evidently I haven't been reading the man pages lately... Nimur (talk) 01:17, 15 November 2013 (UTC)[reply]
Yeah, whatever happened to that? You know, I saw a survey that said only 32% of adults had read a man page for pleasure in the last year. --Trovatore (talk) 21:16, 15 November 2013 (UTC) [reply]
Sure, pipe diff output through colordiff to get pretty colors. git diff, vim -d and emacs diff mode also have color options. --Mark viking (talk) 01:56, 15 November 2013 (UTC)[reply]
The colours in ls are usually the result of an alias set up by default on Linux installations. If you unalias ls the colours will go away. Astronaut (talk) 15:37, 15 November 2013 (UTC)[reply]

My PC prefers my neighbour's Wifi !

[edit]

Hello Learned Ones ! Like most senior people around here, I moved from open country to downtown (winters ! ), & am puzzled at the great number of surrounding Wifi boxes my PC detects. Among others, my landing neighbour's, which is not protected by any WEP key and is always on, and to which my PC systematically prefers to connect itself when I open it. What issues may I expect if I let my PC connect itself to my neighbour's Wifi ? Does my neighbour detect my being a clandestine passenger on his Wifi ? Thanks a lot beforehand for your answers ( and best regards to Katie Ryan A if she is around) Arapaima (talk) 10:56, 15 November 2013 (UTC)[reply]

Unless your neighbor is a little tech savvy, they will likely never know that you're using their WiFi. And due to the fact that you say you're in a city and their WiFi is unsecured, they probably aren't all that savvy. They would just need to scan the network, which is easy to do, to find that you're on it. Even then, it would just give your IP address and not anything like "Joe's computer". And there would be no way of telling if it was you or somebody on another floor of the building, next door, etc. I'm also assuming that you're not streaming video games and movies all day long as well. If you're just doing a normal amount of surfing and downloading, then they won't detect any decrease in speed. Dismas|(talk) 11:07, 15 November 2013 (UTC)[reply]
It could also be a NSA Honeypot_(computing). It could also be a Bait_car. See paranoia.196.214.78.114 (talk) 13:40, 15 November 2013 (UTC)[reply]
I just leave mine open all the time. At first I unscrewed the antenna when I was online on wire, but decided not to care. There are ways to use the router's firmware to find out how many are online, but I've forgotten how. I mean, I'm connected to the world Internet, right? What can happen locally is a trifling risk by comparison. My biggest security need is when banking online, and that's entirely by smartphone because the bank's Anroid app provides much better security than any Web page access can. So, a little common sense can give you enough armor without piling on so much that it hampers action. Standard Wi-Fi encryption methods are not a terribly heavy burden, but the protection they provide is even lighter, as are the dangers in that direction. Jim.henderson (talk) 13:54, 15 November 2013 (UTC)[reply]
Actually this depends significantly on the computer setup. In many case, for a home user set up, the computer firewall may be set up with limited protection for the LAN. With some modern OSes (definitely Windows), you may be asked when connecting to a new wifi whether to treat it as a public wifi hotspot or a private LAN with the default being to treat it as a public, but with the OP not remembering the first ever connection, who knows what they choose? And note that for a desktop, it's unlikely it would normally connect to a wifi hotspot or expected to be taken around, so a person is even less likely to bother with a secure password or to ensure the settings are properly configures (poor settings may expose stuff over the internet but most people are behind a NAT and often some simple firewall meaning that there's a lot lower risk).
All this means services like Remote Desktop and fild sharing may enabled, available on something treated as a LAN which could include the neighbours wifi but not the internet, and poorly protected. These sort of security practices may not be recommended by experts but are likely common because they are convenient and rarely a problem, particularly in a family (as opposed to flatting) setup.
I would also note people have different levels of concern about privacy. While it's true most sites/services that really need it, particularly those using a login will use SSL and so the connection over wifi will not be at risk, many people don't bother, even when SSL is available for stuff like their internet searches or general browsing. Yet they may still have some concerns for their privacy. While it's possible, perhaps likely that their ISP and various government agencies (NSA, various GCHQs, FSB etc) are monitoring their activity to some extent, and it's likely similarly possible for a highly interested party to do likewise and particularly with recent media reports, people may express some concern, these concerns are still fairly abstract for many.
I suspect many people will be much more concerned if their neighbour knows they're regularly searching for photos of their neighbours spouse (or their neighbour) or visiting 'my neighbour from hell' sites, as these concerns are a lot less abstract. It's possible your neighbour could still do this by breaking in to your wifi but there's good reasons to think it's a much higher risk if you're voluntarily connecting to your neighbours unprotected wifi (both from the neighbour and from anyo other neighbour who decided to have fun).
04:37, 18 November 2013 (UTC)
Sorry, I'm a bit busy today and probably won't be able to get an answer for you, but if you let us know what operating system your computer is running, I'm sure someone around here will be able to track down some instructions for your particular setup. Katie R (talk) 14:28, 15 November 2013 (UTC)[reply]
If you have a Mac, do System Preferences -> Network, be sure your own WiFi connection is selected, then click 'Advanced' and you'll see a list of Preferred Networks. This list will probably have your neighbor's WiFi on it. Select the neighbor's network, hit '–' and then 'Apply' and from now on it shouldn't try to connect to that network unless deliberately chosen. On Windows 7, the corresponding settings are probably in Control Panel -> Network and Internet -> Manage Wireless Networks. EdJohnston (talk) 15:29, 15 November 2013 (UTC)[reply]
I'm puzzled that your computer would ever try to connect to a WiFi network without you telling it to. I've never seen that behavior - so I'm skeptical that this "just happened".
I should point out that using someone else's WiFi connection is illegal - and while it may seem like a victimless crime - that's far from being true. For one thing, you're slowing down their connection to the Internet - which is not a nice thing to do - but far, far worse, they may have a data connection that has bandwidth caps - so you might cause them to hit those caps when they otherwise wouldn't - which might deny them acceess to the Internet - or (most likely) result in them getting an outrageous bill for their usage.
These things are serious matters. I have sometimes agreed with neighbors to share my WiFi network with them (once for free because it was a little old lady who only wanted to see pictures of her grandkids online and post to Facebook - and once where the person agreed to pay me a small amount each month to help out with the cost). But if I found someone using my network without my prior agreement, I'd persue the matter most vigorously.
Furthermore - when you use someone else's WiFi, especially if it's unsecured, you're leaving your computer wide open to all sorts of malware and other nastiness. It's a common trick to leave open an unsecured WiFi connection and write software to scan data packets for credit card information, usernames and passwords sent to well-known banking and credit card sites, Amazon, PayPal and so forth.
Overall, this is a dangerous thing to do - so you need to prevent it from happening.
Another comment I have is about the number of nearby WiFi connections. It's not uncommon to have a dozen or more WiFi networks in range at any one time - and with that many of them, it's easy for your own to be continually competing for bandwidth with them. I use an Android app on my tablet called "WiFi Analyzer" that shows the amount of radio power being received from other WiFi sources nearby in a graphical form. If your WiFi router is on the same frequency as others nearby, it won't perform well. Fortunately, hardly anyone knows how to change that frequency - so most routers operate on whatever band they were shipped with. So it's worth looking to see which band is least used by your neighbors and to dig out the manual and figure out how to switch your router over to use it. I did that when I moved house recently and despite having more than a dozen neighbors in range, I now have a band all to myself. Things like Netflix work *so* much better having done that! I was also able to reposition my router to maximize the signal strength throughout the house using that same tool. I now make a point of checking for other new WiFi sources every few weeks so I can see if someone new moved in and muscled in on "my" band!
SteveBaker (talk) 16:23, 15 November 2013 (UTC)[reply]
Well, a computer shouldn't auto-connect to a network that it has never previously been connected to, but once it has connected one time, it might well connect automatically on later occasions. Looie496 (talk) 17:49, 15 November 2013 (UTC)[reply]
That's certainly true - but why would you connect to a neighbor's network even once without permission? I suppose the best spin one could put on this would be if you'd connected to an open network that coincidentally had the exact same name sometime in the past...but even then, I'm not sure that the WiFi software on your computer would get confused. I'm pretty sure it can distinguish different networks with the same name - I've used two WiFi routers (with same name and password) in the same building before and had my software automatically pick the one with the best signal strength - and to do that, it has to see them as separate machines. SteveBaker (talk) 19:39, 15 November 2013 (UTC)[reply]
Well, now, if your router is called 2WIRE573 and your neighbor's is 2WIRE381, honestly I could understand someone clicking on it by mistake. Who remembers these things? --Trovatore (talk) 22:42, 15 November 2013 (UTC)[reply]
I've had similar things happen with networks that have the same name on my smartphone. The biggest examples are at McDonald's or Dunkin Donuts. Many of their locations have free wi-fi which my phone connects to automatically even at physical locations I've never been to. Dismas|(talk) 21:15, 15 November 2013 (UTC)[reply]
Yes I have the same thing with my Android smartphone. While it's true the phone is obviously capable of telling the access points apart (at a minimum, they have different MAC addresses), if you look at the wpa_supplicant.conf on a rooted phone (I'm presuming this is also documented somewhere), it only stores the SSID and key and a few other stuff like priority and whether to autojoin. So this behaviour isn't surprising.
It makes sense, as if you are in a location with multiple APs (say a university or large office building or are lucky enough to have free locale-wide civic wifi), you don't want to have to connect to every single one manually, but instead want the phone to choose the best AP. (And note while whether a device is set up to be an access point or a bridge or repeater affects how the device itself works, I'm not entirely sure whether connecting devices are supposed to know.) For that matter, if you are roaming between disparate campuses or if you pay for some commercial wifi service, it's easier this way. (Even in the case of Starbucks or Mcdonalds, this is likely preferred.)
Anyway back to the main story, Windows has definitely had the ability to automatically connect to unprotected access points since Windows XP (I know someone who connected to someone else's home wifi connection while travelling and there was discussion of the implications) [1] and it seems some drivers also turned this on [2] (and I know from personal experience that Windows 7 at least also tries to detect and tell you if you're behind a captive portal).
I don't believe there's a similar option in stock Android devices (you can be notified) or iOS ones, perhaps at least partially because they also generally have the option of mobile data networks.
In any case, if this is a desktop or notebook never taken outside of the house, it's probably wise to disable automatically connecting. And as I mentioned above, there are good reasons why it's best to stick to your home wifi even if we ignore the ethical issues. On the other hand, I'm not entirely sure whether any of the stock setting options will make Windows prefer an unprotected wifi you never connected to over a home wifi you choose as preferred, so there may be something else going on.
Incidentally, this is rarely a problem in NZ where perhaps because of cultural issues, router defaults and the tiny data caps, it's very rare to find an unsecured wifi, purposeful or not.
Nil Einne (talk) 06:21, 18 November 2013 (UTC)[reply]
Thanks a lot to all ! 99% of supra are way above my understanding, but i'm glad the matter raised some interest among you. See you ! Steve, hope I wont ever ever, whatever be the cause, stand in the box in front of you sitting on the bench with a periwig & a mallet !!! ;-) Arapaima (talk) 08:32, 18 November 2013 (UTC)[reply]

Portability of HID Keyboards & Mice.

[edit]

I'm making a device (whose final development I plan to Kickstart sometime next week!) that behaves like a USB HID keyboard and mouse.

I know the device works great with Linux and Windows - and it should work with any computer/tablet/smart-phone that can use an external HID keyboard and/or mouse...however I'm unclear that all modern computers, tablets and smart-phones are able to do that.

Can anyone confirm for me that (at least):

  • Apple computers
  • iPad's
  • iPhone's
  • Android tablets & phones

...work OK with HID/USB keyboard and/or mouse.

I note (for example) that my Nexus 7 tablet supports Bluetooth keyboards - and I'm trying to get a hold of one of those special USB On-The-Go cables to try my HID "keyboard" to be sure that works...HOWEVER, I've noticed that hardly any software supports using a HID keyboard in games (eg using the arrow keys to move around instead of the touch-screen). This seems like just laziness on the part of the implementors.

I'm also interested to discover whether HID joysticks are widely supported and whether there are restrictions on what they can actually do.

Basically, anything you know about odd restrictions or limitations of HID keyboards and mice is valuable.

SteveBaker (talk) 16:03, 15 November 2013 (UTC)[reply]

Original Google Nexus 7, Android 4.3 stock, no-name OTG cable off Amazon marketplace:
  • keyboard: works okay in text applications like AK Notepad. Games (tried Metal Slug 3, Bladeslinger) ignore it.
  • mouse: works okay in stock launcher (shows a mouse pointer as you'd expect); apps that expect touch events (Angry Birds Space, Contre Jour) work fine - I expect they're not distinguishing mouse and touch events. Bladeslinger (the only 3d shooter-type game I have on it) doesn't respond to mouse
  • generic usb gamepad (usb ident as "Gioteck PS3"): nothing notices it
  • Genuine Microsoft XBOX360 wired controller (Xinput): nothing notices it
  • mass storage (flash memory stick): I use 3rd party app "Nexus Media Importer". Supposedly 4.4 and CyanogenMod can properly mount usb-mass-storage without apps like this.
My 2 year old HTC Desire S phone (android 2.3) does not support OTG. -- Finlay McWalterTalk 17:32, 15 November 2013 (UTC)[reply]
That kinda mirrors what I found with a Bluetooth keyboard - so probably they appear the same to applications. Thanks for such a comprehensive report! SteveBaker (talk) 19:34, 15 November 2013 (UTC)[reply]
Looking at this report, a 360 controller works fine, it's just that many games don't think to look for it. The relevant section of the Android API shows, as you'd expect, that apps can enumerate the available devices, get their ids and capabilities, and get MotionEvents from them. But, as you've determined, OTG cables are rarely used and so games often don't support them. -- Finlay McWalterTalk 09:43, 16 November 2013 (UTC)[reply]
Steve, if you're intending to productize your peripheral hardware and ensure that it's compatible with iPhones and iPads (i.e., plugs into the iPad), you should join the MFi standardization and licensing program (in addition to joining the iOS Developer program). I don't know how much that costs, but it should not be prohibitive; you can build it into the cost of funding your Kickstarter. And you should plan to attend WWDC next year! There is no better place to bring yourself up to speed on "how custom hardware peripherals just work" with iOS.
You should definitely be aware that what you can hack up and make work in your home laboratory might not "just work" on 33.8 million other devices - this is generally true for all products, not only Apple hardware. But Apple provides resources to help developers create products that will work on all 33.8 million phones that were sold in the last three months, plus the unfathomable number of phones, pods, pads, already out in the wild! There are more instances of iOS than the average programmer's 32-bit register can comprehend... they live in many countries with many wireless regulatory authorities and a variety of "quirks" you never thought to think about. Keep that in mind when you're implementing standard protocols. Don't cut corners or deviate from the standard. And, the standard for peripheral hardware that works with iPads and iPhones is MFi, or BlueTooth, or the external accessories framework.
You can also use standard wireless protocols, like Bluetooth and 802.11 WiFi; "Note: Bluetooth low energy accessories do not interface with the External Accessory framework and are not required to be MFi compliant. Instead, apps use the CoreBluetooth framework to communicate with Bluetooth low energy accessories from iOS or OS X."
Here is Getting Started for Core Bluetooth, and Technical Q&A 1657. Nimur (talk) 18:28, 16 November 2013 (UTC)[reply]