Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 August 26

From Wikipedia, the free encyclopedia
Computing desk
< August 25 << Jul | August | Sep >> August 27 >
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.


August 26

[edit]

iWork Serial Number

[edit]

I recently installed iWork onto my Mac. However, the installation requires me to enter a serial number. I can't seem to find number. I've already tried several codes that were on the box but none of them worked. What should I do?--ChromeWire (talk) 00:14, 26 August 2010 (UTC)[reply]

Possibly, you had a trial version which requires a serial number, and now have a retail version which does not, and...it gets in a twist, according to this thread, where it explains you need to remove the trial. Maybe that will help, or maybe someone will come along with a more definitive answer. Chzz  ►  01:35, 26 August 2010 (UTC)[reply]

I did previously have the trial version so I tried removing iWork from my computer but it still asks for the serial number.--ChromeWire (talk) 16:01, 26 August 2010 (UTC)[reply]

Yep...did you see that thread? deleted all files in the /library/Caches in both root and user accounts and deleted any .plist files that had the word iWorks in them in both Preferences folders and To the above, add /Library/Application Support/iWork '09. It works.  Chzz  ►  12:13, 29 August 2010 (UTC)[reply]

Improving reliability of Wikipedia bot

[edit]

I have written and operated a Wikipedia bot (User:PSBot) that scans the proposed deletion category every thirty minutes to find de-nominated articles. The source code (written in JavaScript) is at User talk:PSBot/Deprods. Recently, my Windows 7 desktop computer (which I have run the bot on so far) has blue-screen crashed about once a month, taking the bot down with it. Additionally, I need to be able to apply security updates to my desktop computer as well. Therefore, I would like to move the bot to a separate computer running Linux, FreeBSD, etc. to improve reliability. Preferably, the computer I would like to use for this purpose is an Apple Power Mac G4 Server with 384 MB of RAM.

  • Which distribution of Linux (or FreeBSD, etc.) is the easiest to get working on the PowerPC Mac platform and will work reliably within the limited amount of RAM?
  • Currently, the script runs within an Adobe AIR-based application. Which JavaScript environment should I run the code under on the G4 Server: Chromium, Firefox, or another?
  • The bot framework I am using is quite limited. Am I better off rewriting the bot, especially since I want to add some more features? (I am aware of all requirements of Wikipedia's bot policy.) If so, in what programming language and using which bot framework? (It has to be relatively easy for a JavaScript programmer to learn.)

Thanks, PleaseStand (talk) 05:37, 26 August 2010 (UTC)[reply]

Old versions of Ubuntu (6.10) can officially run on PowerPC Mac G4; here is the Ubuntu Apple Desktop Support page. Unofficial ports of more modern versions are also available: read here about newer versions of Ubuntu for PowerPC. (Direct link: Ubuntu-9.10-PowerPC cd-image for Apple G4 and its ilk... this file is around 800 MB).
Regarding architecture changes: yes, think about platform portability. Given that your hardware is now "esoteric" and "unsupported", you will have to migrate at some point in the future (when your widget burns out and you can't buy a new one because they don't make PowerMac G4s anymore...). So start thinking about portable languages. Javascript is a good start, but it probably lacks the performance and the power for an internet-scalable bot. You could rewrite from scratch - but there's another alternative: Rhino. This is a JavaScript environment for Java (if you're unfamiliar, don't let the names confuse you - Java is a full-blown application programming language largely unrelated to JavaScript). This is probably the best "standalone" environment for your JavaScript purposes, because it doesn't carry the overburden of a web-browser (and since you are writing a bot, you don't really need the weight of a browser's DOM implementation layer).
I have only just recently started playing with Mozilla Rhino, but I'm already enthused at how powerful it is. When you desire, you can use Rhino to interpret all of your existing JavaScript; it can be very lightweight and efficient. And when you want, you can write a fullblown Java application, and Rhino will seamlessly hook your JavaScript and Java application together, giving you access to functions and data from all the standard Java libraries, and your own custom Java code. You can thus use dynamic typing, loose syntax, and runtime interpretation - all the while leveraging the scope and utility of compiled Java code and standard libraries. With about ten lines of Java program code, you can basically house your existing JavaScript in a much more powerful framework - and most importantly, it is platform-portable and can be implemented with entirely free software (OpenJDK, for example) - unlike Adobe Air! Nimur (talk) 06:22, 26 August 2010 (UTC)[reply]


Disk recovery (part two)

[edit]

Hello everyone, and a big thank you to everyone who helped me yesterday. Well, events have moved on and thinking that the disk was on its last elbows and only had a limited time left, I bit the bullet and typed

 dd if=/dev/sdb4 of=~/recover

So now I have a 40GB file called 'recover' which I think contains the content of the bad disk. Does any wikiguru know of any tips or tricks to extract file content (just text) from this? I still have the other ideas above in reserve. Best wishes, Robinh (talk) 08:35, 26 August 2010 (UTC)[reply]

Sure. The fact it went through the whole partition without issue's a promising sign. What was the partition formatted as? If there's no other problem you can just mount it outright. sudo mkdir /recovered ; sudo mount /dev/sda4 /recovered
If the file table's destroyed in some way then it matters what the partition type was. NTFS? NTFS has the MFT at the beginning of the drive and then a copy in the middle. ext2 (or 3 or 4), it has a node system that's robust against failures. Fat32? Whatever the system is the best approach is to try and mount the original system. If that doesn't work then try to fix the original system. Your last case approach is to "file carve" the remaining data. In most cases data will be stored sequentially on the disc, so if you know what file's start and end looks like then there are programs to look for that and export out what they find. It's not an easy process, and you'll have to sort through a lot of junk, but it will find files. Shadowjams (talk) 08:51, 26 August 2010 (UTC)[reply]
By the way, in case sda4's gone, but you have the file, you can do losetup -f ./recover and it will allow you to then "mount" /dev/loopX to whatever you want. You need to figure out what X is though. Check the losetup man page. Shadowjams (talk) 08:54, 26 August 2010 (UTC)[reply]
It's preferable to leave the choice of the loop device and attaching it to the file (as well as detaching it automatically on unmount!) to mount. Just do mount -o loop ~/recover /mnt (+ whatever other options you want to give to the mount command, such as ro).—Emil J. 11:57, 26 August 2010 (UTC)[reply]
Thank you shadowjams. I had no idea you could mount a file. Anyway, one thing at a time. I tried to mount recover as you said but got an error reading "unknown filesystem type 'LVM2_member'". Any ideas? Robinh (talk) 08:56, 26 August 2010 (UTC)[reply]
This indicates that the disk is an LVM volume. Mounting LVM volumes on systems where they were not created seems to be a frequently encountered, but solvable, problem, just googling for LVM2_member will give you a plenty of ideas. Since you were able to copy the disk image without errors, there is a good chance that it is actually mountable with the right setup.—Emil J. 12:12, 26 August 2010 (UTC)[reply]
Well that suggests that whatever you're trying to mount either isn't a file system or was one but is now damaged. The mount command is very particular, so even a small error in the headers will cause it to balk.
losetup (loop setup) is the best way to mount disc images in linux/unix, but if the image is damaged in some way then you'll have problems. Generally, how did you come to this situation in the first place? Are you trying to recover your entire filesystem or just a few key files? Most data on most file-systems is stored sequentially and so if you were to look at every byte on the drive you'd actually see most data perfectly. Data carving relies on that fact. If files are huge or your drive is incredibly fragmented then you might have problems, but if there's somethign specific you really need then it's probably easier to find. Shadowjams (talk) 09:00, 26 August 2010 (UTC)[reply]
Thanks for this. I really really appreciate it. I have five or six files (all text); I don't care about the rest. I have discovered that the command 'strings' is good and can do strings recover | egrep -C 100 "whichfern" [the string whichfern is one that occurs in my recovered file]. I will study the manpage for losetup and see if that can work (I'm not sure what X is). Very best wishes, Robinh (talk) 09:10, 26 August 2010 (UTC)[reply]
No problem. I've gnashed too many teeth with the same problem to have someone else have to go through the same thing. Strings is a great command for this kind of thing. In that case you don't even need to losetup the file, you could just do dd if=file_im_intersted_in.img | strings | grep -A 10 -B 10 'whichferm'. That will probably get most of what you want. You can also do the same thing using |hexdump -C|grep ..... and then grep for it. When hexdump gives you an answer it will be prefaced with a hex number. That hex number is the number of bytes it's seen. So take that number, divide by 512 (because dd does it by "blocks/sectors" which are almost always 512 bytes) and then "skip" that many bytes with dd (e.g., dd if=whatever skip=1024). I realize this is a lot of information to take in, but I think you know what you're doing, so hopefully this provides you with a little bit of direction. Good luck. If you need more help please post here and I'll be back to respond within the next 24 hours. Shadowjams (talk) 09:18, 26 August 2010 (UTC)[reply]
(edit conflict)If file -s ~/recover reports the file as a valid partition, you can just let mount handle it with (as root)mkdir /mnt/recover ; mount -o ro,loop ~/recover /mnt/recover. That will attempt to mount the disk image read-only onto /mnt/recover. If you've got the disk space, I'd copy the image, and then attempt to recover the image by using fsck -f ~/recover.
You could also try PhotoRec.
http://www.cgsecurity.org/wiki/PhotoRec#Media lists DD raw images as supported file format, so your ~/recover file should work just fine.
Also, despite the name PhotoRec, it is able to detect more than 320 different file formats, including various office file types, see: http://www.cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec
-- 78.43.71.155 (talk) 19:40, 26 August 2010 (UTC)[reply]

Java applet issues.....

[edit]

I run a Java applet to connect to IRC called "PJIRC". Its a very nice web based chat client, but when i play a full screen game and come back to my client afterwards, the area where the applet is supposed to appear is usually black, and i cant interact with anything. I have to refresh the web page, therefore resetting my connection to the IRC server.... VERY annoying.

Does anyone know what causes this or how to fix it? Thanks! :)

74.117.245.62 (talk) 10:58, 26 August 2010 (UTC)[reply]

Google

[edit]

Google keeps bugging me to change the email address from "@googlemail.com" to "@gmail.com". Do I have to change it? Will they eventually forced the change on it? When / if they do, will the old address not work and I'll have to update everything? 82.44.54.25 (talk) 15:25, 26 August 2010 (UTC)[reply]

They use googlemail.com primarily in Germany and the UK because of legal issues with gmail.com. Once those legal issues are fixed, they will have no need for googlemail.com, but might continue using it just for brandname recognition. As for which they prefer to use, it depends on your country. -- kainaw 15:36, 26 August 2010 (UTC)[reply]

New laptop battery

[edit]

Hello all I have a HP pavillion dv6700 notebook. I would like to put a new battery in it, one that lasts 8 hours as my current battery lasts only around an hour and a half. Do such batteries exist for my laptop? If I were to purchase a new one I would like it to fit inside the laptop. Thanks in advance for any help. RichYPE (talk) 16:00, 26 August 2010 (UTC)[reply]

What you need is a 12 cell battery. You can find several of them on Amazon: [1]. Just make sure that it's compatible with DV6500 before you buy. Note that how long the batter lasts deponds on usage and power settings on the laptop. Also, the 12 cell batteries are larger and heavier than the normal 6 cell ones. Have a look at this site for battery maintenance tips: [2]. - Akamad (talk) 18:26, 26 August 2010 (UTC)[reply]


Many thanks for your help. I have ordered a 12 cell battery. RichYPE (talk) 22:49, 29 August 2010 (UTC)[reply]

Downloading a clean copy of wininit.exe

[edit]

My wininit.exe file got infected by malware in my Windows 7 machine. Where can I download a clean copy of it? --Belchman (talk) 18:32, 26 August 2010 (UTC)[reply]

You should be able to repair your install with the Windows 7 install disk, assuming you have one. Downloading Windows system files from the internet seems like a bad idea, they'll most likely be viruses. 82.44.54.25 (talk) 18:36, 26 August 2010 (UTC)[reply]
But the thing is that I don't need to "repair" (whatever the "repair" program exactly does) everything, it's just one file. --Belchman (talk) 19:02, 26 August 2010 (UTC)[reply]
I would do the repair from disc, too. And of course I'd follow the Wikipedia:Reference desk/Computing/Viruses suggestions about creating and habitually using a non-administrator account, to reduce the likelihood of future infections. Comet Tuttle (talk) 19:07, 26 August 2010 (UTC)[reply]
Another option is to just try running SFC /scannow (as an administrator) and Windows will scan all the system files and put back any that aren't the correct versions - wininit.exe is one of those protected file (assuming it hasn't already put it back that is!).  ZX81  talk 19:09, 26 August 2010 (UTC)[reply]

I've uploaded wininit.exe from my own Windows 7 (32-bit) which you can download [Link removed] if you want. I suggest you try and run the repair program on the install disk first, since my version might not be compatible with yours, and incorporating system files into your OS which were download from "someone on the internet" is not very safe practice (I could be an evil botnet owner or something). 82.44.54.25 (talk) 19:18, 26 August 2010 (UTC)[reply]

I have removed the link; I don't believe Wikipedia's copyright policy allows it (see WP:LINKVIO). Microsoft Windows system files are copyrighted. PleaseStand (talk) 21:33, 26 August 2010 (UTC)[reply]
Thank you very much 82.44.54.25 and others. --Belchman (talk) 06:20, 27 August 2010 (UTC)[reply]

What makes you think that wininit.exe is infected or that nothing else is? Did a malware or virus scanner say so? Which scanner was it, what infection did it claim, and what directory is the file in? Viruses infect as many executable files as they can, and other forms of malware don't infect files at all. It seems much more likely to me that this is either a false alarm or a malware executable unrelated to the Windows executable by the same name. In the latter case, you should delete it, not replace it. -- BenRG (talk) 23:18, 26 August 2010 (UTC)[reply]

Watch

[edit]

I'm looking for a free program that can monitor several web pages and alert if the page content changes, sort of like the Wikipedia watchlist does, but for any web page. I searched via google but could only find a commercial program 82.44.54.25 (talk) 20:58, 26 August 2010 (UTC)[reply]

Have you considered using a free web service rather than a program that you have to run? WatchThatPage is free, though they request donations if you're a heavy user or a company. Comet Tuttle (talk) 21:11, 26 August 2010 (UTC)[reply]

Wrong Screws = Laptop failure?

[edit]

I have a Dell Inspiron 1200.

I wanted to clean the heat sink (and the fan) - to remove the dust accumulation etc.

So I started unscrewing all the screws I could find, as there was no special compartment for the heat sink, like how there is for RAM, and the Hard drive. Not having read the manual or other instructions...I tried to pull different locations (outside cover) to get to the motherboard.

I still could not get to it...so I gave up, and screwed everything back up.

The laptop would not power up...After pressing the power button...The power led light (along with caps lock, scroll lock..) stayed on for a few seconds...before automatically shutting off.

So then I read the manual on the internet regarding disassembling the laptop.

It said to note where you remove the screws from etc. http://support.dell.com/support/edocs/systems/ins2200/en/SM/begin.htm which I did not do, and I probably mixed them when I screwed everything back again.

Per the documentation: http://support.dell.com/support/edocs/systems/ins2200/en/SM/sysboard.htm I did the following:

1. Remove the hard drive.

2. Remove the optical drive.

3. Remove the memory module.

4. Remove the keyboard.

5. Remove the Mini PCI card. (there was no PCI card in my laptop)

6. Remove the modem.

7. Remove the display assembly.

8. Remove the palm rest.

9. Remove the microprocessor thermal-cooling assembly.

I cleaned it. Then when I went to put it back together. I believe I lost 1 or 2 screws. And I must have put wrong size screws in some places.

But now it started up fine.

I ordered replacement screws from eBay.

2 weeks later...

When I put the replacement screws inside the laptop (the back of the laptop) - It would not power up (like earlier - the led light stays powered on but nothing starts up).

Anyways, I went and disassembled the laptop again. Then re-assembled it - only this time I screwed as little as possible.

The laptop booted up fine...so then I started putting screws back on one by one...testing after every few screws whether it continued to boot up - to see which one was the culprit.

I was able to locate the area where when it is screwed it causes the laptop not to boot up. This time I did not screw that location.

A few hours later the same problem came back.

Now I removed half the screws from the back of my laptop...just to get it to start up again....

Now should I just leave it like this - unscrewed?

If the screw fits and gets tightened that means I am using the correct screw right?

Why is this happening (not booting up when everything is screwed)?

--33rogers (talk) 21:15, 26 August 2010 (UTC)[reply]

Are you sure that the screws are actually the problem? After all, you said you "...tried to pull different locations to get to the motherboard". Perhaps in doing so you damaged something else, perhaps even cracked your motherboard. Minor damage can lead to problems when things warm up, things expand and tiny cracks widen and prevent electrical signals being passed around the circuitry. Even worse, if you've got a loose screw or two rolling around the insides, it could be creating short circuits where ever it touches. The screws used in a laptop are often different lengths in different locations due to the tight spaces inside. Using a too long screw can easily cause the end of the screw to touch components under the fixing point. Unfortunately, your lack of care in disassembling your laptop and your later lack of care trying to fix it again (when you "...must have put wrong size screws in some places") may well have damaged your laptop beyond repair. However, if you want to try again, I suggest you carefully take it apart again and ensure you have correctly identified and accounted for all the screws, then reassemble it following the service manual instructions exactly - paying particular attention to getting the right screws in the right holes (for example, if a screw seems to have come to the end of its available turns and the component is still loose, you probably have the wrong screw; do not be tempted to put some force into tightening it a little more). Astronaut (talk) 23:21, 26 August 2010 (UTC)[reply]
Slightly off topic as my PC assembly/re-build experience is not with laptops, but the length of the screws when mounting the Hard Disk Drive(HDD) can be a factor. As mentioned by Astronaut, if a HDD (or other) mounting screw is too long it may reach the printed circuit board and possibly damage it or earth a track/trace to the chassis or laptop equivalent. After looking at the "Removing the Hard Drive" instructions it seems this is less likely to be a factor. I also concur with Astronauts other comments.
• 33rogers, did you take note of and follow the advice about "Protecting Against Electrostatic Discharge"?, as that might cause weird problems. This link shows the type of equipment you should try to use if you are going to delve inside your computer.
220.101 talk\Contribs 04:37, 27 August 2010 (UTC) Updated 04:53, 27 August 2010 (UTC)[reply]
I did not follow the advice about "Protecting Against Electrostatic Discharge" as I already tried to get to the heat sink (area where dust is collected) without reading the manual beforehand. When it refused to start up, (and probably because I had smaller screw left over and it would not fit), then I looked up the manual. By then I assumed it was too late. --33rogers (talk) 07:58, 27 August 2010 (UTC)[reply]


Is there a way to know for sure which screw goes where, considering that there are now (probably) wrong screws in different locations?

http://support.dell.com/support/edocs/systems/ins2200/en/SM/display.htm

"8. From the bottom of the computer, remove the two M2.5 x 5-mm screws labeled "D."

Image Link:

http://support.dell.com/support/edocs/systems/ins2200/en/SM/displa11.jpg

Now this screw doesn't fit (i.e. this screw does not tighten at all).

Only the M2.5 x 8-mm screws work - probably because I used this one earlier when I was not supposed to?

Below is the first location which when screwed the laptop would NOT boot up; all other locations were screwed.

Then when I tried later, it did not boot again.

(Very frustrated because I spent 6 hours just re-assembling everything) So then I started removing screws, and kept trying until it started.

The screws below are now removed:

Now it starts and works.

Should I leave it as is, with the screws removed, for day to day use?

Unfortunately, your lack of care in disassembling your laptop and your later lack of care trying to fix it again, when you put wrong size screws in some places, may well have damaged your laptop beyond repair.

Do you think it is worth the time disassembling & then reassembling again? --33rogers (talk) 07:50, 27 August 2010 (UTC)[reply]

Laptop Screws

[edit]
Re: "way to know for sure which screw goes where", please see Before you begin/Screw Identification According to the table there, the only 3mm diameter screws(M3 x 3mm) are for the HDD "door", which if you are unfamiliar with the sizes may help you identify them. Note: "M3 x 3mm"=3mm diameter x 3mm long.
  • If you are not going to move your laptop around, then I suppose you could get away with leaving the screws out. (Gaffer tape may be an alternative) BUT beware of the fact that pulling tape off the roll can generate a static charge!
  • The fact that it does boot up makes me think that it has not been damaged by static electricity, but I cannot be certain. A charge of only 50 volts, that you would never feel, could easily damage the micro-processor or other components as they work on far lower voltages.
Flexible flat cable
  • It is possible that a cable is being 'pinched' by the case and shorting out, if it is not in the correct position as you close the case. Sometimes they are simply taped to hold them in the right spot. A flexible flat cable(see pic) may have been loosened, and making intermittent contact that becomes an open circuit as as you close the case. Note they can also be a brownish colour and look like a piece of transparent tape with wires or tracks inside. 220.101 talk\Contribs 09:01, 27 August 2010 (UTC)[reply]