<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>User's View of /dev/fb*</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="fbdev.html"><EM>The Linux/m68k Frame Buffer Device</EM></A>
 <b>:</b> <EM>User's View of <code>/dev/fb*</code></EM><BR>
<b>Previous:</b> <A HREF="fbdev1.html"><EM>Introduction</EM></A><BR>
<b>Next:</b> <A HREF="fbdev3.html"><EM>Programmer's View of <code>/dev/fb*</code></EM></A>


<HR NOSHADE>
  <H2><A NAME="2"></A>2. User's View of <code>/dev/fb*</code></H2>
<p>From the user's point of view, the frame buffer device looks just like any
other device in <code>/dev</code>. It's a character device using major 29, the
minor specifies the frame buffer number.</p>
<p>By convention, the following device nodes are used (numbers indicate the device
minor numbers):</p>
<p>
<dl>
<dt><b>  0 = <code>/dev/fb0</code></b><dd><p>First frame buffer</p>
<dt><b> 32 = <code>/dev/fb1</code></b><dd><p>Second frame buffer</p>
<dt><b>...</b><dd>
<dt><b>224 = <code>/dev/fb7</code></b><dd><p>8th frame buffer</p>
</dl>
</p>
<p>For backwards compatibility, you may want to create a symbolic link from
<code>/dev/fb0current</code> to <code>fb0</code>.</p>
<p>The frame buffer devices are also `normal' memory devices, this means, you can
read and write their contents. You can, for example, make a screen snapshot by</p>
<p>
<blockquote><code>
<pre>
    cp /dev/fb0 myfile
    
</pre>
</code></blockquote>
</p>
<p>There also can be more than one frame buffer at a time, e.g. if you have a
graphics card in addition to the built-in hardware. The corresponding frame
buffer devices (<code>/dev/fb0</code> and <code>/dev/fb1</code> etc.) work
independently.</p>
<p>Application software that uses the frame buffer device (e.g. the X server) will
use <code>/dev/fb0</code> by default (older software uses
<code>/dev/fb0current</code>). You can specify an alternative frame buffer device
by setting the environment variable <code>&#36;FRAMEBUFFER</code> to the path
name of a frame buffer device, e.g. (for sh/bash users):</p>
<p>
<blockquote><code>
<pre>
    export FRAMEBUFFER=/dev/fb1
    
</pre>
</code></blockquote>
</p>
<p>or (for csh users):</p>
<p>
<blockquote><code>
<pre>
    setenv FRAMEBUFFER /dev/fb1
    
</pre>
</code></blockquote>
</p>
<p>After this the X server will use the second frame buffer.</p>


 <HR NOSHADE>
<A HREF="fbdev.html"><EM>The Linux/m68k Frame Buffer Device</EM></A>
 <b>:</b> <EM>User's View of <code>/dev/fb*</code></EM><BR>
<b>Previous:</b> <A HREF="fbdev1.html"><EM>Introduction</EM></A><BR>
<b>Next:</b> <A HREF="fbdev3.html"><EM>Programmer's View of <code>/dev/fb*</code></EM></A>



</BODY>
</HTML>
