Wikipedia:Reference desk/Archives/Computing/2010 July 30

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< July 29 << Jun | July | Aug >> July 31 >
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.


July 30[edit]

How to transfer files between two computers using command prompt?[edit]

--75.185.120.28 (talk) 05:33, 30 July 2010 (UTC)

On Windows, if the two computers can reach each other over windows networking (SMB), you can use standard copy commands and refer to files on other computers using UNC paths (\\computer\share\path...). In other cases, you will probably need to mount part of the filesystem somewhere on the other computer's filesystem before you can copy files. Unilynx (talk) 06:18, 30 July 2010 (UTC)
SSHFS is a great way to mount remote computer file systems, resilient to cross-platform issues, network idiosyncrasies, firewalls, and so on. It only requires an ssh server, which can run on any operating system. If you can SSH to it, you can mount it as a file system. With SSHFS on the client, you can use command-line tools or graphical tools exactly as if the file system were local. Nimur (talk) 06:59, 30 July 2010 (UTC)
Alternatively, you could use the "net use" command to map a network share, then use the "xcopy" command to copy the files. Brendan.leo (talk) 10:33, 4 August 2010 (UTC)

On Unix, the appropriate command-line utility depends on what kind of access you have to the other computer.

  • If the other computer is a web server, or public ftp server, then you want curl or wget
  • If you have a secure login on the other computer, then you probably want scp, or rsync -e ssh
  • If you have an insecure login on the other computer, then contact your sysadmin and secure it, but in desperate circumstances you might use rcp or plain rsync

Gdr 18:33, 4 August 2010 (UTC)

FreeBSD guest in Xen[edit]

Hi, is it possible to run an unmodified (i.e. no special Xen-aware kernel) FreeBSD guest in Xen, when the host contains a VT-enabled Intel CPU? --78.43.71.155 (talk) 09:12, 30 July 2010 (UTC)

Security using webcam[edit]

Is there a freeware / opensoft program that allows you to use your webcam like security camera? For example timed recording, and discreet operation (for example if someone were to steal your laptop). I'm using Windows. Also, there is a light on my webcam that I would like to turn off, is there any software that might help me do that? Thanks. Freshofftheufo (talk) 10:08, 30 July 2010 (UTC)

See here for an example of a successful use of such techniques. AndrewWTaylor (talk) 12:07, 30 July 2010 (UTC)
Thanks, that helped me find a couple of applications that even let me record simple avis from the camera. I'm hoping to find one that can record sound on top of the motion-detected video as well, but no luck yet. Freshofftheufo (talk) 15:05, 30 July 2010 (UTC)

wget timestamps[edit]

With the "-p" command you can make wget download to a specific folder, say "-P downloads" for example. I was wondering if there is a way to make it dynamically generate a new foldername, for example giving the folder name a unix time code so that whenever wget is run it downloads to a new unix time code named folder 82.43.88.151 (talk) 13:20, 30 July 2010 (UTC)

You can have the shell run date to generate such a name, and pass it thus: wget YOURPARAMS -P `date | tr " " "_"` -- Finlay McWalterTalk 13:28, 30 July 2010 (UTC)
I'm not sure what you mean by the "shell"? I'm running wget from Windows 7 command prompt and .bat file. Will this still work? 82.43.88.151 (talk) 15:18, 30 July 2010 (UTC)
No. The Windows command prompt is similar to the Unix shell Finlay McWalter refers to, but unfortunately it's in the same way that a Yugo is similar to a Formula One racing car. I suggest you download a simple programming language like Python or Perl, which would allow you to do these kinds of things easily. --Sean 16:45, 30 July 2010 (UTC)
I love to bash Windows as much as the next guy, but on a Windows 7 cmd, echo %DATE%_%TIME% displays the current date and time, so it should be possible to use wget YOURPARAMS -P %DATE%_%TIME% -- 78.43.71.155 (talk) 17:54, 30 July 2010 (UTC)
That sort of works, but produces folders inside folders (30 -> 7 -> 2010). Above Sean suggested a programming language; would php work? I have some very limited knowledge of php, but I don't know how to start programs from php 82.43.88.151 (talk) 18:01, 30 July 2010 (UTC)
PHP: Command line usage, from the official PHP manual, instructs you how to run PHP as a standalone program. If you want to run your program from a PHP-enabled web-server, you can use exec(). That will run the program on the web server. Be aware of the implications and security-risks of running exec() from a publically-viewable web page. Nimur (talk) 17:34, 31 July 2010 (UTC)
I'd be surprised if the %TIME% thing works, as windows time prints with colons, and colons can't be used in file or folder names. -- Finlay McWalterTalk 18:12, 30 July 2010 (UTC)
Both issues can be fixed like this:
FOR /F "tokens=1-5 delims=/_:" %%G IN ('echo %DATE%_%TIME%') DO wget YOURPARAMS -P %%I-%%H-%%G_%%J-%%K
-- 78.43.71.155 (talk) 18:40, 30 July 2010 (UTC)
If you're running in to limitations of cmd, you could always try Windows Powershell as an alternative to the other suggestions Nil Einne (talk) 14:28, 2 August 2010 (UTC)

wget download html first[edit]

I ask here how to make wget download html files first before downloading images when mirroring a site. The answer given was the run it twice with "--no-clobber", however --no-clobber does not work with the "-N" command, which is automatically invoked when mirroring a site. So this solution is impossible to use. Are there any other ways? 82.43.88.151 (talk) 13:24, 30 July 2010 (UTC)

I'm not sure what you're trying to achieve, so it's difficult to know what to do. Do you intend to download the htmls first so you can abort the image mirror, or just so you have a navigable but image-less copy soon while the image mirror runs. I guess you could just do the html-only wget to directory A followed by the main mirror to directory B, and if the second procedure succeeds you could delete A and rename B to A (if you need total continuity, meaning that the folder is being accessed while you do this, have a symlink that you swap from point to A to B and access via the symlink). -- Finlay McWalterTalk 13:36, 30 July 2010 (UTC)
Yeah this is bizarre; if you are mirroring a site by spidering it you *need* to download the HTML first. Only if you are counting on directory list to work can you even know about the images beforehand. The first use case I thought of for this was for mirroring an image hosting service that typically doesn't like just the image being loaded (since it thinks you are viewing it from an embedded link) but those I really doubt would be susceptible to dirlist anyway (most sites aren't). --144.191.148.3 (talk) 15:00, 30 July 2010 (UTC)
I'll try to explain; when mirroring a site with say 300 html pages, wget downloads one html page at a time and then downloads all the images on that page before moving to the next html page. This means that it takes longer to download of all the html pages, because it's downloading images as well, and while it is taking this time the html pages could change, be removed etc. For static sites it doesn't matter, but I want to mirror a fast moving site. So I want it to download all the html files first, so that eve if they are removed I still have a copy, then download all the images on those pages after the html pages have all been safely downloaded. 82.43.88.151 (talk) 15:13, 30 July 2010 (UTC)
You could perform your initial download with these options:
wget --html-extension -k -P unique_temporary_directory YOUR_OTHER_PARAMETERS_AND_THE_DESTINATION_URL_GO_HERE
That will turn all links not pointing to already downloaded files into absolute links.
After that, you will have to sift through the HTML files and extract all URLs from there and pass those to wget again:
wget -P %DATE%_%TIME% --input-file=filename_goes_here.html --force-html --page-requisites --no-host-directories
Since this can be rather tedious, you might employ a for loop to do the grunt work for you:
REM set timestamp variable
FOR /F "tokens=1-5 delims=/_:" %%G IN ('echo %DATE%_%TIME%') DO SET mytimestamp=%%I-%%H-%%G_%%J-%%K
REM run actual command
FOR /F "tokens=*" %%file IN ('dir /b /s unique_temporary_directory\*.html') DO wget -P %mytimestamp% --input-file=%%file --force-html --page-requisites --no-host-directories
Note that this is from my memory, so you should test it in a small scale before aiming it at 4chan's image boards. ;-) -- 78.43.71.155 (talk) 18:14, 30 July 2010 (UTC)

link[edit]

Ages ago I saw a url which looked like somewebsite.com/something.php?google.com and it would redirect you to google.com. I think it was called referer.php or relinker.php or something beginnign with an r. Anyway, was is the name for this called? —Preceding unsigned comment added by 94.78.188.93 (talk) 13:27, 30 July 2010 (UTC)

Referer.php is the name of the PHP script used to perform the forwarding. The name itself is not significant - it could be called polarbearseatme.php, and it would still would work the same way, providing the contents was the same. The ? is used to denote a Variable being passed - in this case, google.com. The script takes the variable and performs an operation on it. Here the operation is to redirect the user to the web address passed in the variable. --Kateshortforbob talk 15:43, 30 July 2010 (UTC)
I know all that, I'm asking if there's a specific name for the operation it was performing (ie bouncing you to another url). I've seen the same thing on deviantart and facebook and I want to know what the term for it is —Preceding unsigned comment added by 94.78.188.93 (talk) 16:05, 30 July 2010 (UTC)
"Redirecting", I suppose. They send you through a redirect page so they can track where you went, so you could call it "link follow tracking" or something like that. --Tango (talk) 16:10, 30 July 2010 (UTC)
The PHP script is most likely performing a HTTP 301, HTTP 302, HTTP 303, or HTTP 307 redirect. The PHP script has the web server return one these status codes with the redirect URL placed inside the HTTP location header. This tells your browser to follow the location the new URL. --—Mitaphane Contribs | Talk 19:51, 3 August 2010 (UTC)
I've seen "deferer.php" on several websites in the past, although none of them use it anymore, preferring to link directly to whatever it is they're linking to. Rebmetpes27 (talk) 16:32, 30 July 2010 (UTC)

Firewall Question[edit]

Hi guys, my google-fu fails me on this one: I'm looking for a firewall concept where the firewall acts like a bridge (i.e. there's no IP assigned to the production-side network interfaces, and the production-side network interfaces share the same subnet), yet still inspects (and, if necessary, blocks) packets. What is the name of such a beast? I'd be interested in doing this in Linux, however, if there's a way to make pfsense or m0n0wall do that, that would be fine, too.

I remember reading about such a concept a while ago, but I forgot the name. I keep thinking "filtering bridge", but that's something different, apparently.

The reason I need this feature is that I would like to grab packets targeted at a specific port (9100) of a certain group of IPs (a bunch of network printers), mangle the data with s small perl/php/bash scrippt, and pass it on to the destination IP. → I'm trying to work around a few brain-dead printer drivers that keep messing with PJL headers. -- 78.43.71.155 (talk) 16:14, 30 July 2010 (UTC)

Instead of trying to sniff this out at the transport layer, why don't you install a software print server, and configure it to pre-process the print requests? This will be more maintainable in the long-run than a mysterious packet-sniffing, print-job-intercepting script. Have your users print to the print-server, which can run CUPS, pre-process jobs using your custom script ("filter"), and then forward the properly formatted request(s) to the hardware (printer). Here's the CUPS manual, and a description of how to set up custom "filters" to preprocess your print jobs. Nimur (talk) 16:42, 30 July 2010 (UTC)
Thanks, I'm aware of CUPS, and using a print server would indeed be my preferred way of solving it, if it wasn't for the so-called support contract. It does not cover changes to the network architecture, so I need a device that is invisible to external support, and that can be unplugged and replaced by a regular CAT5 cable without having to change settings on clients and/or printers. That's what you get for outsourcing parts of IT *sigh*.
IMO, they should come up with a new printer driver, pronto, given the $$$, or rather, €€€ that they're getting paid. Since they don't, and I don't want to spend all day running around resetting printers and manually sorting copies that end up in the wrong outbins, I'm looking for a way out of this mess that doesn't void the support contract, or can at least be reverted easily enough in case of further problems.
Funnily enough, I had the same issue almost 10 years ago while running OS/2 on the clients, and I've kept a copy of the PCL-clean-up script I used back then, so re-implementing it would be a matter of minutes - only back then, the network was still "mine", so I didn't have to worry about "hiding" the print server. -- 78.43.71.155 (talk) 17:02, 30 July 2010 (UTC)
How about a Squid Interceptor? Squids are usually used for HTTP and similar protocols, but you can intercept any traffic on any TCP or UDP port. You may have to recompile, because I think this is not a default option; but there are very good detailed instructions. Nimur (talk) 23:43, 30 July 2010 (UTC)
It's not Squid that does the interception (so no need to get it just for that) but the local firewall. On Linux iptables, it would be the REDIRECT target which can do this. Unilynx (talk) 06:21, 31 July 2010 (UTC)

Forward button problem, continued[edit]

Referring back to [1]:

The steps I have followed so far were similar to those when I asked the first question. I clicked on the e after turning on the computer, clicked on the mail button, signed into Yahoo (no one else uses this computer so I decided to check the "stay signed in"), and went to my inbox, clicked on an email with links, and clicked on three links, two of which were Wikipedia Help Desk archive pages. One was REALLY long and possibly susceptible to the problem, which was why I posted a link to it last week, just in case I decided to experiment with it. I changed the URL because the link was a week behind and clicked on three "next day" links in case the Internet goes out, and on my contributions from there, followed by "next 50" until I found the link to the Computing Reference Desk, and I clicked on the new topic button. More than likely, none of the above has any influence, so what I'm doing from here may cause the forward button problems. I have not had the problem with just the back button lately.

On the Microsoft forum I was told to disable add-ons, but I said I was eventually going to post a list of steps that led to the problems, and THEN maybe somoene would get the message about what was going on. I added the advice I've gotten here (scrolling down by the computer causes the forward button to disappear, which didn't always happen, and ALT-left might cause the problem but actually clicking on "back" wouldn't) and my theories that IE8 as a bug and there is a limit on how much you can have to go forward to or back to, which is why the problem happens on big pages.

At this point, I will save this and go forward to my contributions from the link in this post, and I will click on a Yahoo email that has information on the Deepwater Horizon oil spill which I may need to add to that article.Vchimpanzee · talk · contributions · 16:56, 30 July 2010 (UTC)

Steps (not that it would affect anything, but Norton PC checkup has been downloading updates):
I quit keeping up but I edited Caterpillar Inc. twice and lost the forward button when I backed up to the disambiguation page.Vchimpanzee · talk · contributions · 19:29, 30 July 2010 (UTC)


Hi VChimpanzee. Over the last weeks, we have exhausted our ability to provide you references to assist you with your technical trouble. Your continuous posting of extremely long and elaborate sequences of steps is not going to help us (or anybody) answer your question. As I have mentioned many times before, try to state your problem concisely. We have already linked you to the necessary support web pages; provided information on ways to disable Javascript; offered you alternative web-browsers; and suggested alternative browsing habits. At this point, what do you hope to gain by describing every click of your browsing experience? This is the Computing Reference Desk. If you need help finding something, we can direct you to the appropriate article or resource. If you just wish to complain about your esoteric browser behavior, this is not the appropriate venue to do so. Nimur (talk) 00:04, 31 July 2010 (UTC)

What I hope to accomplish by listing steps is for someone to take the same steps and see the problem. I haven't posted the steps on another forum yet because I'm not clear on what I can post that they won't have a problem with. I can't state the problem concisely because I don't know what it is. I've done my best to explain it and I'm sorry that's not good enough for you.Vchimpanzee · talk · contributions · 15:43, 31 July 2010 (UTC)
I know the history problem has to be IE8 related because it was introduced with IE8. However, when I started a separate topic on the Microsoft forum I was told that was a duplicate of my other topic. It was not, because that's a separate issue. which makes it hard for me to explain things there. I went to that topic again later and got an error message, so I have only the one topic where I'm trying to address all these different problems, and so far all anyone has done is say reinstall IE8. That's too complicated for me. Then there was something about enabling and disabling add-ons. There aren't any that would cause this, and again, I worry about messing things up. I can't put these long lists of steps there because I don't know how people will react to them. Here, I at least got some guidance, but I have yet to really know what I can put on the Microsoft forums that will make the problem clear. I can't explain it here any better than I have.Vchimpanzee · talk · contributions · 16:07, 31 July 2010 (UTC).
Let me try again. "The history problem" is this, and User:Comet Tuttle has seen it. When I am clicking on "Back" (or in my case pressing ALT-left), sometimes the forward button disappears, but clicking on "Back (or pressing ALT-left) gives me the page that would show up if I clicked on "Forward" (or pressed ALT-right).
The other problem is that at some point, especially with long pages, I click on "Back" a certain number of times and the Forward button will no longer function, as if a limit has been reached on the number of pages that the software can handle. I used to have this happen with the back button; it wouldn't go back further, apparently because the pages it would go back to were too large (this precedes IE8 and also happened at libraries). Possible causes suggested have been the computer scrolling down (but that doesn't always make the forward button disappear) and using ALT, which I haven't tested.Vchimpanzee · talk · contributions · 16:16, 31 July 2010 (UTC)
Why worry about it or waste your time on something so trivial? The solution is just to use the History list in your browser to re-visit pages you have been to before. You must be the only person in the world who expects the browser to remember so many steps perfectly. 92.24.185.100 (talk) 16:53, 2 August 2010 (UTC)
VChimpanzee, at this point you're just going to need to submit this bug to Microsoft, and hope for the best. I appreciate you'd like someone to help you come up with a more concise bug report so you can report it to Microsoft with a short list of steps that reproduce the bug every time, but that's a little outside of the remit of the Reference Desk. I wouldn't waste time on those forums anymore, but would try the most direct bug reporting mechanism that you can find (and that link was the most direct general-public bug reporting mechanism I could find.) One last tip: Don't tell them you're "clicking" the Back button, because that means a mouse click; be very specific and tell them you're using Alt-Left-arrow. Best of luck — Comet Tuttle (talk) 17:50, 2 August 2010 (UTC)
To User:92.24.185.100, I believe there is a valid reason for the various problems and just want to see an answer. I eventually did learn about history. There is a back button problem I've had at libraries I haven't been able to reproduce, but I think I had it with IE8, and because there are long pages involved I think it must be an issue with a limit on what the computer can handle. But wanting the back button to work, especially for Yahoo (where we have established it won't because they intentionally have JavaScriopt working this way) is a valid concern since I can't remember where I was, and a lot of history to look through won't help that a lot. I am not, however, trying to solve that problem.
The forward probem seems to have been resolved to some extent since I've found one or more answers by doing this, though the very specific problem of the back button giving me what the forward button should but it's gone--THAT'S a possible bug which I'll report to the site User:Comet Tuttle mentioned. I also have had several other problems which I want to report to that other Microsoft site. These seem like they'd be common problems which are not bugs necessarily. In the past I reported that I lost the Internet but once I got it back, I could go to various sites using windows I wasn't on when the Internet went out. But the Window I was on when the Internet went out just keeps searching and searching. I may have said it here, but I think it wouldn't even allow me to type in a new address.
And just this morning on Firefox, I had a set of rectangles at the bottom of the screen when a pop-up ad came up, adding another one, despite the pop-up blocker. Only the page I was on before the pop-up ad disappeared and didn't reappear until I clicked on the X in the upper right corner of all the rest when I finished. The order of the rectangles at the bottom of the screen also changed. This has happened to me at home.Vchimpanzee · talk · contributions · 18:13, 3 August 2010 (UTC)
To your last point, really you should start a new topic when asking about a new topic; but popup blockers aren't perfect. It's like an arms race, between the popup ad designers and the popup-blocker designers. (I use Adblock with Firefox and haven't seen a popup ad in probably a couple of years.) Comet Tuttle (talk) 23:08, 3 August 2010 (UTC)

A very wide and rather long webpage[edit]

This Tuesday, I saw on a computer a site matching the following characteristics:

  • A dark gray background (something like #222222)
  • The page were very large, requiring scrolling in wide and in long
  • The design where organized in blocks, with spaces between them
  • One of this block were an image, with links at the left, trying to round this corner of image

Have you an idea of which site it could be?

If not, have you an idea of another site using this scrolling "wide, very wide" design, requesting the user to scroll horizontally? --Dereckson (talk) 02:26, 30 July 2010 (UTC)

Someone hacking together a site (badly) by directly writing it in HTML or using a bad WYSIWYG editor could do something like this. The internet is a big place, and there's lots of amatuerish crap out there. --Jayron32 02:37, 30 July 2010 (UTC)
It were here volunteer, with a clean design.
As it's from an hackerspace, it should more than very probably be IT related. --Dereckson (talk) 19:55, 30 July 2010 (UTC)
Here is a Web magazine from Sussex, where every issue is one side-scrolling Web page, enjoy. Sussexonian (talk) 20:28, 1 August 2010 (UTC)
Not only it's wide, but that's pretty fast to load. Thank you. --Dereckson (talk) 20:58, 3 August 2010 (UTC)

Contrast Ratios[edit]

I have several questions about the recent improvement in contrast ratios in PC monitors and TV sets. Not too long ago, 10,000:1 seemed cutting-edge. Now, however, contrast ratios as high as 9,000,000:1 are commonplace.

First of all, how much higher are they expected to go in near future? And second, is there an "upper limit" beyond which the human eye cannot perceive? Pine (talk) 21:49, 30 July 2010 (UTC)

I don't have an answer, but can note that our Contrast ratio article implies that the quoted contrast number is mostly a marketing number to try to win you over, rather than a scientific measurement; and that because of different methods of measuring it, you can't use these numbers to compare a Sony vs. a Samsung. Comet Tuttle (talk) 23:29, 30 July 2010 (UTC)

Android language help[edit]

How can I get my droid to display languages other than Latin-based script and Japanese, Chinese, and Korean? E.g. Arabic shows up as squares. —Preceding unsigned comment added by 18.111.119.237 (talk) 22:50, 30 July 2010 (UTC)

This seems to be a known bug. This forum and this forum both seem to indicate that the UTF-8 encoding rendering engine does not include support for glyphs in many languages. You can wait for a system-update, or download one of the various third-party browser applications that can properly render Arabic text. Nimur (talk) 23:54, 30 July 2010 (UTC)