Best of Technical Support
Is it possible in Linux (I don't care which distribution, I mean the system architecture) to have two screens, i.e., two monitors on the same machine? Also with two graphics cards, of course. Is it possible to have them running together, either in text mode or serving X? And is it possible to have only one actual X desktop, but two virtual ones projected over two different screens? —Eduardo Garcia, egarcia@msl.es
The “two screens” support you've mentioned is called multi-headed display support. It is the ability to use two (three and so on) monitors simultaneously and usually make them act as one huge virtual desktop. The commercial X servers such as Accelerated X (http://www.xig.com/) and Metro-X (http://www.metrolink.com/) already have such support, and recently XFree supports this too (but it is not stable enough, in my opinion). Be aware, though, that your hardware (graphics card) must also support this. —Mario de Mello Bittencourt Neto, mneto@argo.com.br
With XFree 4.0, you can run X on two cards and two monitors, either as independent sessions or as one big screen (Xinerama). It should also be possible to get XFree 4.0 to open one X session on the secondary screen (i.e., not the one Linux is displaying console messages on) and keep text mode in the other monitor, but there isn't a convenient way to switch back and forth between the two screens (you'd have to use CTRL+ALT+FN). Frame buffer (FB) support will also work with two video cards, so my guess is that the FB application gets to say which FB display to write on. —Marc Merlin, marc_bts@valinux.com
As installation of XFree86 4.0 is not for the faint-hearted, you may want to hold off until RPM packages start to appear before trying it. —Erik Ratcliffe, erik@calderasystems.com
It depends on your X server software. XFree86 version 4 (which is more recent than the version included in your Red Hat distribution) has some support for multi-headed configurations; you can check their release notes under http://www.xfree86.org/. —Scott Maxwell, maxwell@ScottMaxwell.org
What is the scope of fopen? That is, when you use this system call, where exactly does it look for the file we want to open?
—Kumhaar, kumhaar@yahoo.com
If you supply an absolute file name (that is, one that starts with a “/”), then fopen starts at the root directory. Otherwise, the file name is relative, so fopen starts looking for the file in the process's current working directory. This directory is initially the same as the parent process's current working directory (so if you ran the program from a shell, it's whatever directory you were in when you ran it), but the current working directory can be changed by calling chdir or fchdir. By the way, as a pedantic note, fopen is not a system call; it's a C library function. fopen does part of its work in terms of the system call open. —Scott Maxwell, maxwell@ScottMaxwell.org
The fopen library function is the analog of the low-level open system call. You use it mainly for files and terminal input/output. When you need explicit control over devices, you are better off with the low-level system calls, as they eliminate potentially undesirable side effects from libraries, like input/output buffering.
If successful, fopen returns a non-null FILE * pointer. If it fails, it returns the value NULL, defined in stdio.h.
fopen uses the open system call. Here is how the open system call works:
1. When the kernel receives an open system call, it starts the function called sys_open. You can find the code in the kernel source in fs/open.c. sys_open (const char * filename, int flags, int mode)
2. From the file name, sys_open will try to get the associated inode structure. This inode structure is located in the directory where the file is (the directory is a special file). To get the inode of the directory with the relevant information, sys_open will have to recurse by starting to read the current directory to get the inode of the relative directory, and so on.
If the file name starts with a /, the process is the same, except that it will start with inode 2 (inode number of /) on the root partition.
3. Once the inode of the file is found, sys_open will read the file operation associated with the file's inode, and run the open method associated with that inode/file.
This open method may be related to a device module if the file is a device (see major number and /proc/devices) or to a specific file system (df -k filename -> proc swap ext2 ...)
4. This open method returns a “struct file *” which is associated with a file descriptor.
sys_open will return a file descriptor, an integer greater than 0. If sys_open fails, it returns an integer less than 0. fopen will then associate this file descriptor (int) to a file stream (FILE *).
I hope this helps. —Emmanuel-Robert Mayssat, emayssat@valinux.com
fopen(2) takes two parameters. The first is the file to open, and the second tells the system to open it for reading, writing, reading and writing, and other options. If you do not specify a path to the file to open, fopen() will look for that file in the current directory. —Chad Robinson, Chad.Robinson@brt.com
Feel free to refer to the manual pages: use Chapter 2 for the system calls (e.g., man 2 open) and Chapter 3 for library functions (man 3 fopen). —Alessandro Rubini, alessandro.rubini@linux.it
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- One advantage with VMs
1 hour 20 min ago - about info
1 hour 53 min ago - info
1 hour 54 min ago - info
1 hour 55 min ago - info
1 hour 57 min ago - info
1 hour 58 min ago - abut info
2 hours 39 sec ago - info
2 hours 1 min ago - info
2 hours 3 min ago - info
2 hours 4 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Re: hangup after running sbin/loader in 6.2 install
I'm trying to get RedHat 6.2 running on an old Pentium 1. The frustrating thing is that I did get it running (with an improperly configured X) and then in my stupidity, I tried to reinstall it to fix X. (I didn't know about XConfig86). Now the install won't work. I think I have some sort of partition/formatting problem with my hard disk. Any suggestions?
tronsgar@cs.ualberta.ca