Wikipedia:Reference desk/Archives/Computing/2009 March 16

= March 16 =

Saving output in a text file
I have another question. I am a very novice user on Linux. How can I get my program (after I compile it) to run in the background so that I will have the shell available to me and I can log out of the computer and then check back the next day? What exactly is the command? In addition, I am using cout in my code for output which shows up in my shell. How can I get that display to be saved in a log file or something? I know I can always code it to write to a file but besides that what is the command to make it save the output in a text file?

Right now, I am using

g++ program.cpp

./a.out

Thanks!-Looking for Wisdom and Insight! (talk) 01:05, 16 March 2009 (UTC)


 * You might find Redirection (Unix) and Job control (Unix) helpful. –  7 4   01:15, 16 March 2009 (UTC)

Dude, that was awesome. That is exactly what I was looking for. Thanks a lot man!-Looking for Wisdom and Insight! (talk) 01:35, 16 March 2009 (UTC)

i was wondering this my self the other day....

this is the best explanation that i found: http://www.tuxfiles.org/linuxhelp/iodirection.html

Basicly use a close bracket and then filename after the command that you are running —Preceding unsigned comment added by 86.149.254.51 (talk) 03:09, 16 March 2009 (UTC)

Preventing PLESK from disclosing my email address
I have a PLESK VPS hosting account running on Apache/2.0.55 (Ubuntu)

Due to my set up, i occasionally get an error message that is showing on my site:

- Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster. Error 404 www.example.com Mon Mar 16 00:05:43 2009

On the 3rd line of text the word "webmaster" is converted to an A tag with href pointing to my my emailaddress

I UNDERSTAND what and why a 4040 error might occur

BUT i don't understand how to turn it off.

Or more exactly - how to prevent the darn server from displaying my email address to all and sundry.

I really think its a silly idea to give away the main admins email address because its a bit like saying "if you want to hack this server - here's the weakest link"

Perhaps somwone could suggest a grep search thatr works ...i tired:

grep "If you think this is a server error, please contact"

But that that did not seem to dig up anything on the box

I have looked into the error_docs folder on a couple of my vhosts directories ...but no error docs look like this message.

It seems to be an apache error notice

Anyway - thanks in advance for any help and tips.

generally - I'd really love to know how to lock down a PLESK server to prevent it from revealing my personal details. —Preceding unsigned comment added by 86.149.254.51 (talk) 03:01, 16 March 2009 (UTC)
 * Do you actually have to login with your email address, because if not I'd question if it really does weaken your server security, but you are right and it is indeed an Apache "error". Normally you would change ServerAdmin in the vhosts or better yet add an ErrorDocument line to point it to a file, but I'm assuming you don't have access to the Apache config files (you said it's a hosted account so I seriously doubt you do).


 * In the root of your website you could try creating a single file called .htaccess (with the . as the first character) with the contents of:


 * ErrorDocument 404 /404.html


 * And then any files not found would display http://www.yoursite.com/404.html instead. Please note this is completely reliant on your host allowing .htaccess overrides and if it doesn't work then I'm afraid there isn't much you can do except contact them and ask for them to setup a custom 404 error page like the others. Hope this helps! ZX81  talk  09:59, 16 March 2009 (UTC)

hi, thanks for the input. I have looked at my custom 404 error document and it is different to the 404 error being displayed - so any changes made to it are not affecting the error message. I beleive it might be a server-wide error message as opposed to a virtual-host-wide error message.

With regards to the concept of the email addy being the weakest link - generally the email being displayed on these error notices is also the email addy that receive top-level server passwords, and is the 'credential' that can be used by server admins to act on instructions from the customer.

E.g Dear support, please could you backup my site onto disk and send it to "SCAMS r US, Nigeria"

Also often email login credentials are not often ssl encrypted- which means that they are easy to sniff and hijack.

Also it is an invite for more spam. Any spam email harvesting software can now monitor changes to DNS records and pick up the email addy's off fresh new servers. To get a list of webhost customers. One wonders why Apache, Cpanel and PLESK don't have their own email addys on there....if it aint so bad- praps they could put their own email there instead by default.

RAID with different sizes of disks
What implementations of RAID 1, 5 and 6 can be used with disks of unequal capacity? Neon Merlin  04:45, 16 March 2009 (UTC)


 * See JBOD. I think it is not logical with any of the raid modes you mention. 75.62.6.87 (talk) 09:35, 16 March 2009 (UTC)
 * It depends how fussy your RAID controller is, but yes, you can use disks of different capacities with RAID 1, 5 and 6, but the RAID array on each disk will only be as large as the smallest disk (and the remaining space on each disk will be unused/wasted). ZX81  talk  10:03, 16 March 2009 (UTC)

Allowing blocked users to edit cetain pages
The reference desk seems to be an inappropriate place to ask this question, but developers at mediawiki.org reply to questions posted at mw:Project:Support desk rather slowly...

Anyway, here is my question: when $wgBlockAllowsUTEdit is set to true, blocked users will be able to edit their own talk pages. However, is it possible to allow blocked users to edit certain pages(something like Wikipedia:Appealing)? Regards.—Bencmq (talk) 05:42, 16 March 2009 (UTC)
 * Try WP:HD —Preceding unsigned comment added by 194.80.240.66 (talk) 08:17, 16 March 2009 (UTC)


 * No, this question is not about Wikipedia. It's about MediaWiki. --wj32 t/c 18:08, 16 March 2009 (UTC)


 * If memory serves there is a feature that allows you to limit given users to certain namespaces. The intention for this was that the arbcom would be able to interdict individuals, and they'd be able to edit the arbitration namespace, but not the article space. This is an alternative mechanism to blocking, I think. 87.113.41.20 (talk) 21:38, 16 March 2009 (UTC)


 * Using that method will require you to put the "special" pages in a special namespace. If you haven't created special namespaces yet, look into it on mediawiki.com - it isn't too difficult.  Just remember that you need to declare both the namespace and the talkspace for the namespace.  I messed that up the first time and when you clicked "discussion" in one namespace, it jumped to another namespace. --  k a i n a w &trade; 22:25, 16 March 2009 (UTC)
 * Actually there is a discussion going on at zhwp regarding the appealing procedure after blocking. Anyway, they shall ask bugzilla. Thank you for all your help. --Bencmq (talk) 02:50, 17 March 2009 (UTC)

Thunderbird reply quote header
Currently when I reply to a mail, Mozilla Thunderbird just puts "So-and-so said:" before the quoted text of the original email, which is not very descriptive. I know that some other people's email clients include stuff like the date and subject, like this: -Original Message- From: So-and-so Sent: Thursday, January 1, 2009 12:00 AM To: Me Subject: foobar

How do I customize my Thunderbird reply quote header to be more like that? --76.167.241.45 (talk) 09:24, 16 March 2009 (UTC)


 * I'm not sure how to make Thunderbird display full headers for quotes, but it's always there. Gmail, for example, shows nice quotes and hides the full headers. You can still view them by using "Show original message". --wj32 t/c 18:15, 16 March 2009 (UTC)


 * You don't get it. It's not "there" if the email client that made the reply doesn't put it there. That's the problem. You can't tell me that it's there when it is not. Gmail hides quotes and you can show them, but of course it can only show what is there. So it only shows what my email client puts there, which is just "So-and-so said:". Why don't you try this yourself? --76.167.241.45 (talk) 05:05, 17 March 2009 (UTC)


 * Sorry. Perhaps this can help you: . --wj32 t/c 05:36, 17 March 2009 (UTC)

want to remove U3 from my pen drive
I bought a Sandisk pen drive (Cruzer titanium) which worked ok under Fedora Core 3 (i.e. I didn't notice at the time that the drive has U3, since it didn't show up). Now under Fedora 10 the U3 partition appears as a CD drive and offers to (hah!) autorun the windows exe's in the U3 partition. I don't run Windows and want to get rid of the U3 crap completely. Any idea how to do that (without running windows code, of course)? The U3 article seems to have been the locus of some, er, partisan editing and looking through the rev history there were once some mentions of useful info existing somewhere, but not enough to make it easy to locate any. Thanks 75.62.6.87 (talk) 09:26, 16 March 2009 (UTC)
 * I'm afraid you'll need access to a Windows machine to remove it, but you simply need to download the executable from the U3 website and just run it whilst on a Windows PC with the U3 flash drive connected. The process only takes a few minutes, but as you probably guessed it will wipe the flashdisk in the process. ZX81  talk  10:07, 16 March 2009 (UTC)


 * Wouldn't blasting and restoring the partition off the drive (with, for example, gparted) achieve the same result, without resorting to booting to windows and running yet more mystery software? Dog Day Today (talk) 12:30, 16 March 2009 (UTC)


 * Unfortunately, no. It appears that the U3 flash drive has firmware on it that presents the extra volume, and no amount of fdisk, parted, or even dd would make it go away.  --  JSBillings  13:09, 16 March 2009 (UTC)


 * You can use the partition manager in Windows (I used XP) to eliminate the factory set partitions. --Ephilei (talk) 18:58, 16 March 2009 (UTC)

Vista and Outlook
I am trying to copy my past e-mails onto a new vista machine. What sub-folder should I copy the pst files into? Kittybrewster  &#9742;  12:57, 16 March 2009 (UTC)
 * On my Vista machine, the default path to "Outlook.pst" is
 * C:\Users\\AppData\Local\Microsoft\Outlook\
 * --Andreas Rejbrand (talk) 14:08, 16 March 2009 (UTC)
 * How do I get to see that place in windows explorer? I can't get into AppData though it tells me it already exists when I try to create it. Kittybrewster  &#9742;  14:45, 16 March 2009 (UTC)
 * (Oops; these instructions are for Windows XP, and Microsoft hid the option elsewhere in Vista. Sorry for the confusion; please follow Wj32's directions below instead.) Windows is "protecting" you. To disable this "feature" in Explorer, go to "Tools → Folder Options… → View" and select "Show hidden files and folders" then click "OK". –  7 4   16:41, 16 March 2009 (UTC) (edited –   7 4   20:22, 16 March 2009 (UTC))
 * Using firefox but tried in IE. Tools .... options ... then I can't find "View". Kittybrewster  &#9742;  17:27, 16 March 2009 (UTC)


 * Not Internet Explorer. Windows Explorer. Open up Documents. Press Alt and the menu bar will appear. Go to Options → Folder Options → View. Alternatively you could just type in  into the address bar. --wj32 t/c 18:12, 16 March 2009 (UTC)


 * The simplest way to open a particular folder in Windows, hidden or not, it to use the "Run" command. Simply press Win+R, type the path (e.g. C:\Users\\AppData\Local\Microsoft\Outlook\) and press Enter. --Andreas Rejbrand (talk) 20:21, 16 March 2009 (UTC)


 * I'm sorry if I'm wrong because I'm not a Vista user, but 2k and XP have a folder option shortcut in Control Panel. Try to see Control Panel. Oda Mari (talk) 16:03, 17 March 2009 (UTC)

Multiple live video on a single screen
Hello! We're conducting an event, and we have several live videos being shot from various angles. Is there a way to get all these videos onto a single display that can be projected onto a screen? Do I need any special hardware for this? And what software do I use? I'd really appreciate a solution that would not involve buying new hardware.--Seraphiel (talk) 15:50, 16 March 2009 (UTC)


 * What you appear to be asking for is a video splitter. I know it sounds backwards.  It sounds like you are taking a single video and splitting it up.  What it actually does is take multiple video inputs and splits the screen into sections such that each video may be shown on the screen at the same time.  I am sure there are programs that can do this, but you'll have to figure out how to get multiple video inputs into the computer.  All those video cards will likely be more expensive than a video splitter - especially just leasing one from a local dealer. --  k a i n a w &trade; 22:22, 16 March 2009 (UTC)