Wikipedia:Reference desk/Archives/Computing/2011 June 1

From Wikipedia, the free encyclopedia
Computing desk
< May 31 << May | June | Jul >> June 2 >
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.


June 1[edit]

Reconnecting a bash session[edit]

Currently I am using PuTTY on a Windows box to log into an Ubuntu box via ssh. The bash shell is what's running. I used that bash shell to start a very lengthy job on the Ubuntu box. What will happen if I close PuTTY? Will the lengthy job be terminated? If not, is it possible to subsequently re-connect to that bash shell so I can continue to view the output of the job? Comet Tuttle (talk) 00:09, 1 June 2011 (UTC)[reply]

Normally, on a Unix or Linux computer, when your login session terminates, all your jobs end. This is part of the general "contract" for a user-account, as compared to a root-privileged login-account or a daemon login-account; you are a user, and your programs belong to your login. (The fact that your login-session is remote, over an SSH connection, is just a "detail" - the same rules apply even if you're sitting at the console). Some methods exist to circumvent this contract: nohup, and/or disown, in BASH, allows you (or your BASH shell) to request the operating system to allow a job to persist even after you hang up (log-out). This will either persist your job after your login-session terminates; or change ownership of the process to a system daemon, or some other POSIX-approved method to persist your job. On some systems, some user-accounts are not permitted to disown processes; if your system-administrator forbids nohup or disown, you may have to ask permission for them to enable it. (Our nohup article is in somewhat abysmal shape; but you can run the manual page for your ubuntu box, man nohup, and read up-to-date information specific to your computer system. For disown, read the manual for BASH by typing man bash and searching for disown. (Use the key sequence :/disown). The two commands have subtle differences in behaviors. (For clarity and to appease the POSIX-pedants who frequent this desk: on Ubuntu, Debian, and most other Linux, disown does not change the uid for the process; it simply de-registers it from the shell job-list without affecting anything in the kernel process control block. This additional step is necessary on other POSIX kernels that will auto-kill user-jobs who are not owned by terminals or pseudoterminals). Nimur (talk) 03:09, 1 June 2011 (UTC)[reply]
I don't think you should say "This is part of the general "contract" for a user-account". Many multiuser *nix systems have policies against leaving processes running when you log out, and the administrators may take measures to enforce the policy, but it's not part of the standard Unix security model any more than, say, a "no profanity" policy. -- BenRG (talk) 18:14, 1 June 2011 (UTC)[reply]

The usual solution for this is a tool such as GNU screen. --FOo (talk) 03:31, 1 June 2011 (UTC)[reply]

I've used GNU screen before and would definitely recommend it for the OP's task, if they have the privileges to install it.--el Aprel (facta-facienda) 03:44, 1 June 2011 (UTC)[reply]
Thank you Nimur for the complete and precise answer! And I'll take a look at GNU Screen at some point. Thanks! Comet Tuttle (talk) 06:11, 1 June 2011 (UTC)[reply]
Just a note that I strongly support use of screen. I have some servers that I maintain regularly. I set up my bashrc to see if I have an active screen and, if so, connect to it. Otherwise, start a new screen. So, if I ever get cut off for some reason, when I SSH back in, I go right back to where I was. If I exit (which I have to do twice, once for screen and once to get out of SSH), it stops the complete session so I'm not using resources. -- kainaw 14:28, 1 June 2011 (UTC)[reply]

Red Hat Enterprise Linux 6[edit]

Hello Everyone,

  I'm trying to obtain a copy of Red Hat Enterprise Linux 6, but for what's supposed to be FOSS software, it's mighty difficult to obtain. access.redhat.com won't let you access the evaluation download unless you have a corporate email address (which I don't), and resellers will not sell the media kits on their own without a bundled subscription. Does anyone here know of any website from which i can download the .iso files?

  Thanks as always. Rocketshiporion 11:02, 1 June 2011 (UTC)[reply]

Odd. This page seems to let me create a personal login at Red Hat, without supplying a corporate email address. I assume I could then go on to download the free evaluation version of RHEL6 from here. Alternatively, have you considered Centos? It is a free, 100% binary compatible, copy of Red Hat, with no fussy restrictions on downloading... download and burn .iso file(s) then install without (IIRC) signing up first. It is currently at v5.6 but v6.0 is coming soon. Astronaut (talk) 11:13, 1 June 2011 (UTC)[reply]
There's no problem in creating a personal account, but one can only download subscribed software with the personal account. A corporate account is required to download evaluation software. I've uploaded the screenshot flickr here. Rocketshiporion 13:02, 1 June 2011 (UTC)[reply]
Redhat is not marketed as free. It is a subscription service. If you don't pay for the subscription, you don't get the service. Due to the licensing of Linux, they are required to make the source code available - but that doesn't mean that they have to put a big "download me" link on their website. It only means that if you walk in their office and ask, someone will be able to burn a copy of Redhat on a disk for you - if you pay for the disk and the person's time. To get around all of that, Redhat heavily supports (with money, time, and other resources) Fedora. You can download Fedora very easily by going to http://getfedora.com (which does have a very friendly "Download Now!" button). -- kainaw 14:26, 1 June 2011 (UTC)[reply]
The GPL is very specific. It requires that if a binary is distributed, its source-code must also be available from the distributor. That is not legally equivalent to "Red Hat must give anything to anybody who asks for it." If Red Hat doesn't give you free access to a particular binary, even one covered by GPL, Red Hat is not obligated to provide source for that binary, either. See this item on the official FAQ from Free Software Foundation: Does the GPL require that source code of modified versions be posted to the public?
This stipulation (or rather, the legalese in the license that enforces it) is essentially the critical line-item that makes free software viable for commercial purposes; it is the reason why it can be very profitable to sell free software for a fee. Customers who purchase GPL-licensed software are under no obligation to hand it out to the rest of the world; but if they choose to do so, they must also provide source-code. Nimur (talk) 15:38, 1 June 2011 (UTC)[reply]
RHEL being the way it is, I think I might go with the unencumbered CentOS. Rocketshiporion 19:39, 1 June 2011 (UTC)[reply]
You might also want to take a look at Scientific Linux, which also is a recompiled Red Hat Enterprise Linux. --NorwegianBlue talk 22:52, 1 June 2011 (UTC)[reply]

Recover images from formatted SD card[edit]

I've got an SD card that was accidentally formatted and not used since. Is there any free software for Mac that would allow me to recover the images on it? doomgaze (talk) 18:11, 1 June 2011 (UTC)[reply]

PhotoRec, maybe. ¦ Reisio (talk) 18:58, 1 June 2011 (UTC)[reply]
If the file areas haven't been overwritten then you'll likely be able to recover from it. If photorec doesn't work the type of tool you want is called a file carver, and image files are particularly easy to carve. There are many free and open source solutions available. Shadowjams (talk) 21:56, 1 June 2011 (UTC)[reply]
If these images are highly valuable to you, I would recommend that you tread carefully with recovery tools as the act of attempted recovery can thwart more advanced recovery techniques. I have heard many many positive things about companies like DriveSavers that do removable media recovery in clean-rooms with very advanced microscopic-level techniques. They are expensive though -- it's going to depend on how valuable the images are to you -- but they are highly effective. --rocketrye12 talk/contribs 20:09, 2 June 2011 (UTC)[reply]
Clean room recovery is for Winchester hard drives that have suffered some kind of mechanical failure. This drive works fine, and it's not a Winchester drive, so a clean room isn't going to help.
Reading from an SD card will not alter it in any way. The Mac OS might write a small amount of data to the card when it's inserted into the computer, but you can prevent that by write-protecting the card (if it has a write-protect tab—they all do, don't they?). Data recovery software, like PhotoRec, never writes to the device it's trying to recover data from.
It's possible that professionals would be able to recover some overwritten data from a flash drive by reading from the flash chip directly, because of wear leveling. Other than that, there's nothing the professionals can do that you can't easily do yourself. -- BenRG (talk) 21:58, 2 June 2011 (UTC)[reply]
"To protect drives and data from contaminant damage, DriveSavers performs all data recoveries in an ISO-certified cleanroom environment." ref I guess I was referring more broadly to Drivesavers' techniques as far as cleanrooms.
And I've experienced a case where I've used the aforementioned tools to no success but drivesavers was able to recover the data.--rocketrye12 talk/contribs 00:14, 3 June 2011 (UTC)[reply]

Can a multi-monitor rig be achieved with different output modes?[edit]

Hi, I've got a graphics card with two output ports, one VGA and one DVI. If I get a DVI to VGA adapter, can I set up a dual monitor rig? I'm thinking of buying another graphics card, this one with VGA, DVI, and HDMI. If I get a DVI to VGA adapter and an HDMI to VGA, can I set up a tri-monitor rig? --T H F S W (T · C · E) 18:55, 1 June 2011 (UTC)[reply]

The manufacturers often aren't clear on whether you can use multiple outputs at once. So, that leaves you with trial and error. If it does work, you will probably just have a clone of the same image on each output. (You aren't likely to get a different part of the screen shown on each image.) StuRat (talk) 19:02, 1 June 2011 (UTC)[reply]
How about one of the ATI Radeon series? --T H F S W (T · C · E) 19:33, 1 June 2011 (UTC)[reply]
If you aresking if you can use a single video card for a tri-monitor set-up then the answer is you can. You need one of the AMD/ATI cards which support Eyefinity. In theory you need a card with a DisplayPort and two other outputs. If your display has anything other then a DisplayPort you need an active adapter. However according to some sources, as discussed in our article, if you card supports Eyefinity (basically most or all cards in the 5xxx and 6xxx lines) you may be able to use one or two HDMI/DVI-D (in a simplistic fashion they can be considered the same thing) combined with two or one analog/VGAs. It is unlikely you will be able to use 3 analogs since only 2 RAMDACs are included as part of the GPU and it is unlikely the manufacturer included a standalone. I also discussed this in more detail a few weeks back, check the archives. I suggest you ask in more depth for experiences, probably outside the RD, if you can't return the card. I tried [1] but got no response. Nil Einne (talk) 20:38, 1 June 2011 (UTC)[reply]
Re the first question, FWIW: I'm using an NVIDIA GeForce FX 5500 card with a DVI and a VGA port on my home PC. I'm using two monitors, one connected with a VGA cable, the other with a DVI cable (most monitors come with connections for both types of cables these days). Works flawlessly, both with Xp and Ubuntu (using the proprietary drivers). --NorwegianBlue talk 21:35, 1 June 2011 (UTC)[reply]
Looking more carefully there seems to be a question embedded in the title as well. Generally speaking, the card doesn't care if you are using DVI-D and VGA or HDMI and VGA or whatever. Although I should clarify some cards may be limited to only one analog or only one digital output. However I believe most standalone cards still support a minimum of 2 analogs. And 2 digitals has also been supported by many cards for the past perhaps 4+ years either with two DVI-Is or nowadays perhaps a DVI-I and HDMI. (I think there have been at least 2 TDMS on the GPU for quite a long time, however many manufacturers may have thought it better to include one VGA and one DVI-D so people with a single monitor wouldn't need a converter and also some may have preferred one dual link DVI-D rather then a single link DVI-D.) IGPs may be different.
However as per the archived discussion, nowadays some cards come with HDMI, DVI and VGA. In that case while I suspect you can use 2 VGA (using an adapter for the DVI-I), VGA+HDMI, VGA+DVI-D or DVI-D+HDMI (or with a converter DVI-D+DVI-D) it's not something I have experience with. (I would guess the most likely thing not to work is VGA+HDMI.) As per above, other then EyeFinity or professional cards (or the ancient Matrox cards), you are unlikely to get 3 simultaneous outputs.
Also I disagree with StuRat. For the past 8+ years, most cards from ATI/AMD and Nvidia have supported dual output (meaning independent outputs not cloning). ([2] and Radeon R100) As I said, there may be some variance in/confusion over what sort of outputs you can use, but not in the support of dual output in some manner. (Can't speak of driver support in *nux.)
Nil Einne (talk) 23:44, 1 June 2011 (UTC)[reply]
There are graphics cards available, such as the nVidia Quadro NVS450, which support up to four monitors simultaneously. Rocketshiporion 05:41, 2 June 2011 (UTC)[reply]
One of those cards are great, for those who aren't financially challenged. So basically with the proper drivers, using HDMI > VGA and DVI > VGA adapters, I can set up a tri-monitor? --T H F S W (T · C · E) 19:15, 2 June 2011 (UTC)[reply]

Network Printer[edit]

At my work, we have an HP Laserjet color printer HP4000 that has a Netgear PS101 small printer server attached directly to the back, which is then plugged into an ethernet port in the wall. It is currently not installed to any computer. In order to install the printer, I need to figure out the IP address it is currently using. I've tried several options I found through web searches, and none of them have worked, so I thought I'd ask here for fun. To summarize, how can I find the IP address for that networked printer? --Mephisto275 (talk) 19:06, 1 June 2011 (UTC)[reply]

You can use nmap to scan the local subnet. For example, nmap 192.168.0.0-255 The print server should report that it has printing-relevant ports (like 631 IPP) open. Make sure to tell your local network admin you're going to do this (if you are not he) as nmap scans can sometimes trigger internal security software (as they're often used by intruders). -- Finlay McWalterTalk 19:44, 1 June 2011 (UTC)[reply]
In addition, the -O option to nmap will try to identify the host type. For a Netgear ADSL modem I tried it on, it reports the MAC address as being in a range registed to Netgear and the OS as being "MontaVista embedded Linux". -- Finlay McWalterTalk 19:50, 1 June 2011 (UTC)[reply]
A NetGear print server should have a name printed on the label in the format PSnnnnnn. You should be able to use that name to open the built-in web server. ---— Gadget850 (Ed) talk 19:56, 1 June 2011 (UTC)[reply]
Nmap is a great program, which did exactly what I was looking for as far as scanning the entire network for the printer. Thanks so much for brining it to my attention! Unfortunately, it didn't find the printer. Maybe there is something else going on that's keeping the printer from even accessing the network. We recently redid our main network switch, and it might be possible that the wall port for that particular office didn't get plugged back in. Is there anything else that would keep that printer from obtaining an IP address?
Also, the printer server does have a "device name" that matches the format PSnnnnnn. I believe that it becomes the port name once that print server is installed. How exactly do you mean that I can use it to open the built-in web server?--Mephisto275 (talk) 16:17, 2 June 2011 (UTC)[reply]
With regard to nmap: unplug your print server, run nmap (storing its output in a file), plug the print server in (make sure it's on, give it a couple of minutes to get all set up) run nmap again, and take the diff of the two runs. If there is no difference, something is wrong indeed. I think the PSxxx name to which Gadget850 refers is a Windows Internet Name Service name, and if its registration on the network works okay you should be able to point a browser to http://PSxxx and get the print server's web control panel. The manual for the PS101 is here (I'll have a read through that just now...). If this is one of those "look what we found in the cupboard" cases for you, it may be that the PS101 is in a specific configuration (for a network setup that no longer exists). In that case you can restore it to factory default condition with a recessed button on the back (#4 on their diagram, beside the 12V DC receptacle). -- Finlay McWalterTalk 16:34, 2 June 2011 (UTC)[reply]
Does the printer itself have a network configuration page somewhere in the settings menu? Astronaut (talk) 11:03, 4 June 2011 (UTC)[reply]
The printer does have a print configuration option, but it does not include an IP address in what it prints out. --Mephisto275 (talk) 16:43, 7 June 2011 (UTC)[reply]

HTML/CSS Table help[edit]

Resolved

Hello! Here's an example of a table layout that I'm trying to make for my personal website. As you can see, basically I want a two-cell, one-row borderless table, with an image in the right cell and text in the left. I'd like both cells to be the same width, but the (wrong) way I've been doing this is by adding <br /> to control the width of the text cell, otherwise the width extends all the way to the edges of the browser window. This is especially annoying to deal with this way when I take out and add parts to the text.

  1. How can I force both cells to be the same width, or set my own width for both cells (obviously, the right cell isn't a problem, since I can control the size of the image)?
  2. Also, as the table stands now, the text is centered vertically. How can I force the text to begin at the top of the cell and push unused space to the bottom, instead of distributing it to the top and bottom?
  3. How can I justify the text in the cell?

Thank you for your help.--el Aprel (facta-facienda) 19:20, 1 June 2011 (UTC)[reply]

Never mind on 1 and 3. One can specify a height and width in <td>, and use style="justify". I'm still interested in 2, though.--el Aprel (facta-facienda) 19:34, 1 June 2011 (UTC)[reply]
For #2, use <td valign="top">. Rocketshiporion 19:47, 1 June 2011 (UTC)[reply]
Great, thanks!--el Aprel (facta-facienda) 20:06, 1 June 2011 (UTC)[reply]

ftfy ¦ Reisio (talk) 00:13, 3 June 2011 (UTC)[reply]

Change from Gnome to LXDE[edit]

Hello again! I have a ≈10-year-old computer running Debian lenny and Gnome. Although I have it boot up to the console, I occasionally use startx and run Gnome, which is really slow because of low RAM. I'd like to change to something more lightweight, like LXDE. What configuration files do I need to change after I #apt-get install lxde so that I when I run $startx it brings me to LXDE instead? Thank you!--el Aprel (facta-facienda) 22:15, 1 June 2011 (UTC)[reply]

It's a while since I used Debian, but I'm pretty sure there's a selection somewhere on the login screen where you choose which window manager you want to use. So after you install LXDE, I think that all you have to do is to boot it into graphical mode once, and then select LXDE from the login screen when you log in. Later, if you start up in console mode, it should be your default window manager when you run startx. --NorwegianBlue talk 22:46, 1 June 2011 (UTC)[reply]
startx is a frontend to xinit, which is typically configured through either ~/.xinitrc or ~/.xsession. These files are simple shell scripts that are run as-is by xinit (and thus by startx). Some links on how to edit those files: [3] [4] [5]. --Link (tcm) 08:17, 2 June 2011 (UTC)[reply]