Hi all, With this letter I'd like just to share my 'how-to' document. I spend quite a while before everything started working properly. It is far from perfection plus bunch of grammar mistakes, but my hope is that it still can save some time to others.
It is detailed step by step log of how did I install XDirectFB as well as skype (on the server without soundblaster) also it gives an answer to my previous post question: "how to hide XDirectFB so it can be accessed only via vnc". If you don't need any of these, please just ignore it. Here's all the instructions in one file http://www.nabble.com/file/p22683731/public-how-to-XDirectFB.txt public-how-to-XDirectFB.txt And here's the content of this file (should be eventually indexed by search engines): ******************************************************************** * * How to instal DirectFB + XDirectFB + Skype on VirtualMachine (VM) * ******************************************************************** -------------------------------------------------------------- keywords for search engines: DirectFB XDirectFB Skype VirtualMachine VM VMWare "dummy sound device" Ubuntu "dummy sound blaster" "no sound" "double keystroke" vnc aassddff qqwweerrttyy 112233 -------------------------------------------------------------- ssh [email protected] # we'll do all steps as a root sudo bash # install general things apt-get install apt-file <--- this allows us to search packages names by, for instance, header file (from this package) apt-file update <--- if asks for CD, just hit <enter> and wait 60sec. apt-get update apt-get upgrade apt-get install cvs # prepare working directory mkdir -p /home/dmitry/direct-fb-vnc-etc/from-CVS cd /home/dmitry/direct-fb-vnc-etc/from-CVS # get latest DirectFB & XDirectFB from repository cvs -d :pserver:[email protected]:/git/directfb/core/DirectFB.git co -d DirectFB master cvs -d :pserver:[email protected]:/git/directfb/programs/XDirectFB.git co -d XDirectFB master # now, if you examine content of ./XDirectFB/ folder you'll find README file # it gives us an idea, that XDirectFB is not self sufficient and should be compiled # as a part of one of Xserver (xorg or xfree86). We'll go with xorg. For that purpose # you'll need to find perfect version of xorg match to one of provided patch files. # (Obviously, since we'll mix in source of XDirectFB project into xorg, we'll have to # change xorg sources in some way to compile them together) # let us see what xorg version do we need to find ls -la XDirectFB/ * * * xorg-server-1.0.2-directfb.diff xorg-server-1.1.1-directfb.diff xorg-server-1.2.0-directfb.diff xorg-server-1.3.0.0-directfb.diff * * * # ok, let us choose biggest available xorg version number i.e. "xorg-server-1.3.0.0" # Now we'll google for sourced for that particular one and download it. # get it curl http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.3.0.0.tar.bz2 > xorg-server-1.3.0.0.tar.bz2 # extract it into current folder tar xf xorg-server-1.3.0.0.tar.bz2 # Here what we have so far: ls -la drwxr-xr-x 20 root root 4096 2009-03-05 11:02 DirectFB drwxr-xr-x 6 root root 4096 2009-03-05 11:16 XDirectFB drwxrwxrwx 27 root root 4096 2007-04-19 22:14 xorg-server-1.3.0.0 -rw-r--r-- 1 root root 5968263 2009-03-05 11:22 xorg-server-1.3.0.0.tar.bz2 Read this file again: ------------------- from /home/dmitry/direct-fb-vnc-etc/from-CVS/XDirectFB/README ------------------- Short installation instructions: NOTE: DirectFB must be configured with multi application core for XDirectFB to work. Modular X.Org: - Download xorg-server-<version> release from xorg.freedesktop.org. - Apply xorg-server-<version>-directfb.diff - Copy directory "programs/Xserver/hw/directfb" into "xorg-server-<server>/hw/" - Run "autoreconf". - Run "./configure --disable-xorg --disable-dmx --disable-xvfb --disable-xprint ..." (add whatever options you need). - Run "make", run "make install". ----------------------------------------------------------------------------------------------------- # let us follow README: # try to apply patch from XDirectFB to xorg cd /home/dmitry/direct-fb-vnc-etc/from-CVS/ patch -p0 < ./XDirectFB/xorg-server-1.3.0.0-directfb.diff # there should be NO ANY ERRORS during this patch! # if you have any issues here, solve them before you proceed.. # (may be try to get proper version of xorg from other place) # Copy directory "programs/Xserver/hw/directfb" into "xorg-server-<server>/hw/" cp -R XDirectFB/programs/Xserver/hw/directfb xorg-server-1.3.0.0/hw/ -------------------------------------------------------------------------------- # now we have all source code to start making & installing DirectFB & XDirectFB -------------------------------------------------------------------------------- ===============================================[DirectFB install - begin]===================================== cd /home/dmitry/direct-fb-vnc-etc/from-CVS/DirectFB ./autogen.sh [output] I am testing that you have the required versions of libtool, autoconf, and automake. checking for libtool >= 1.3.4 ... You must have libtool installed to compile DirectFB. Install the appropriate package for your distribution, or get the source tarball at ftp://ftp.gnu.org/pub/gnu/ checking for autoconf >= 2.13 ... You must have autoconf installed to compile DirectFB. Download the appropriate package for your distribution, or get the source tarball at ftp://ftp.gnu.org/pub/gnu/ checking for automake >= 1.4 ... You must have automake installed to compile DirectFB. Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.4p1.tar.gz (or a newer version if it is available) Please install/upgrade the missing tools and call me again. [/output] apt-get install libtool apt-get install autoconf apt-get install automake ./autogen.sh At the end of autogen.sh run we can see several missing things: PNG support is missing - many applications won't work correctly! JPEG support is missing - many applications won't work correctly! FreeType2 support is missing - many applications won't work correctly! To find what package name should we install we can either do: 1) search by missing header name: apt-file search some-header-name.h 2) or we might peek on working (other host) machine: dpkg --get-selections | grep libjpeg We also can see this: *** libvncserver-config not found -- building without VNC support. See http://libvncserver.sourceforge.net Question: Do we need to have vnc support build-in into DirectFB? Answer: Actually I installed & run VNC (x11vnc) without it - working fine! apt-get install libjpeg62 apt-get install libjpeg62-dev apt-get install libpng12-0 apt-get install libpng12-dev apt-get install libfreetype6 apt-get install libfreetype6-dev # Now instead of ./autoget.sh we do: ./configure --enable-multi --enable-x11 # configure gives us some WARNING: *** no Carbon/Carbon.h found -- building without Mac OS X support. configure: WARNING: *** Linux-Fusion header not found. Using EXPERIMENTAL Builtin Multi application core! *** configure: WARNING: *** libvncserver-config not found -- building without VNC support. See http://libvncserver.sourceforge.net configure: WARNING: *** libsysfs not found -- Building without sysfs support. configure: WARNING: *** DBox2 Remote input driver will not be built. configure: WARNING: *** DreamBox Remote input driver will not be built. configure: WARNING: *** H3600 Touchscreen driver will not be built. configure: WARNING: *** no tslib -- tslib driver will not be built. # not a big deal, we can compile and install it now: make make install ===============================================[DirectFB install - DONE]===================================== ===============================================[XDirectFB install - begin]===================================== cd /home/dmitry/direct-fb-vnc-etc/from-CVS/xorg-server-1.3.0.0/ autoreconf automake --add-missing autoreconf # 1st attempt to configure: ./configure --disable-xorg --disable-dmx --disable-xvfb --disable-xprint --disable-dri --disable-dga --disable-composite --disable-xtrap --disable-record --disable-xinerama --disable-xevie [output] No package 'randrproto' found => apt-get install x11proto-randr-dev 100K No package 'renderproto' found => apt-get install x11proto-render-dev 80K No package 'fixesproto' found => apt-get install x11proto-fixes-dev 1.1M ! No package 'damageproto' found => apt-get install x11proto-damage-dev 70K No package 'xcmiscproto' found => apt-get install x11proto-xcmisc-dev 60K No package 'xf86miscproto' found => apt-get install x11proto-xf86misc-dev 70K No package 'xf86vidmodeproto' found => apt-get install x11proto-xf86vidmode-dev 85K No package 'xf86bigfontproto' found => apt-get install x11proto-xf86bigfont-dev 65K No package 'scrnsaverproto' found => --disable-screensaver (strange, but doesn't help, so: apt-get install x11proto-scrnsaver-dev) 77K No package 'bigreqsproto' found => apt-get install x11proto-bigreqs-dev 61K No package 'resourceproto' found => apt-get install x11proto-resource-dev 61K No package 'fontsproto' found => apt-get install x11proto-fonts-dev 123K No package 'xf86dgaproto' found => apt-get install x11proto-xf86dga-dev 86K No package 'videoproto' found => apt-get install x11proto-video-dev 98K No package 'resourceproto' found => apt-get install x11proto-resource-dev -0K No package 'xkbfile' found => apt-get install libxkbfile-dev 22M ! (libx11-dev libxdmcp-dev libxkbfile1 x11proto-kb-dev xtrans-dev libx11-dev libxdmcp-dev libxkbfile-dev libxkbfile1 x11proto-kb-dev xtrans-dev) No package 'xfont' found => apt-get install libxfont-dev 800K No package 'fontenc' found => apt-get install libfontenc-dev -0K [/output] # 2nd attempt: # Now retry to run same configure (as on our 1st attempt). # We have other missing packages reported: [output] No package 'xkbui' found => apt-get install libxkbui-dev 135K No package 'xxf86misc' found => apt-get install libxxf86misc-dev 127K No package 'xxf86vm' found => apt-get install libxxf86vm-dev 225K No package 'xaw7' found => apt-get install libxaw7-dev 3.5M ! No package 'xmu' found => apt-get install libxmu-dev -0K No package 'xt' found => apt-get install libxt-dev - seems last 2 were already installed No package 'xpm' found => apt-get install libxpm-dev [/output] apt-get install x11proto-xinerama-dev 73K apt-get install x11proto-record-dev 77K # 3rd attempt: # same configure command as 1st attempt, NOW IT IS OK!!!! # compile XDirectFB and install it make make install ===============================================[XDirectFB install - DONE]===================================== ===============================================[reboot vm with "vga=" kernel parameter - BEGIN]===================================== # in order to start using DirectFB our kernel should create and start using /dev/fb0 device # we add parameter vga=ask or vga=some-mode-goes-here (in my case: vga=791) into cat /boot/grub/menu.lst file: ... kernel /boot/vmlinuz-2.6.22-16-server root=UUID=505ffe1f-2d83-4a8d-b41d-18a1a44007de ro quiet vga=791 splash ... # just in case create a backup copy of that file cp /boot/grub/menu.lst /boot/grub/menu.lst.MY-BACKUP # Note, in this mode you'll see nothing on you VM terminal (no boot messages except "Starting up ... ") # So you'll need to use ssh client to access your VM. # I will not put any other details on how to start your VM with frame buffer device /dev/fb0 # as this readme is mostly about "how to compile it all together". # I fight with "fbset -i" not finding /dev/fb* files. I added "video=vesafb vga=0x311" to grub kern params, but still no luck. # Then I read on one of the forums a mention of # /etc/modprobe.d/blacklist-framebuffer file and in it there was: # "blacklist vesafb" - strange that this wasn't mentioned in dmesg! # also add to following file: /etc/modules - add "vesafb" # now if you run fbset -i you'll get following result: r...@vm:~# fbset -i mode "1024x768-76" # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz geometry 1024 768 1024 768 16 timings 12714 128 32 16 4 128 4 rgba 5/11,6/5,5/0,0/0 endmode Frame buffer device information: Name : VESA VGA Address : 0xd0000000 Size : 3145728 Type : PACKED PIXELS Visual : TRUECOLOR XPanStep : 0 YPanStep : 0 YWrapStep : 0 LineLength : 2048 Accelerator : No # The idea is, than after this step the following command should not give you any errors: fbset -i (if you don't have fbset istlalled, just do: apt-get install fbset ) ===============================================[reboot vm with "vga=" kernel parameter - DONE]===================================== # now try to start XDirectFB. From ssh command line type: XDirectFB # and carefully see its output # If everything goes well your VM terminal will be filled with some color (not black) and you'll see you mouse pointer there! # Now you can install some graphical applications (start from simple ones, like xclock, xcalc, xterm) ===============================================[if you have Fatal server error: could not open default font 'fixed' - begin]===================================== I found solution for taht problem on one china forums (translated by google:) [quote] Fatal server error: could not open default font 'fixed' and so on. This problem is due to the system font is not installed in the directory, copy the system solution fonts Such as / usr/share/fonts/X11 of all fonts to / usr/local/lib/X11/fonts under. If this error has also continued to find font, please find a font directory fonts.alias documents, will be arbitrary Solution: ?????not sure if it can be solved, using a symbol link (ckeck some day): ls -l /usr/local/lib/X11/ ????? for now we do hard-copy and it works fine with XDirectFB server: mkdir -p /usr/local/lib/X11/ cp -R /usr/share/fonts/X11/ /usr/local/lib/X11/fonts ===============================================[if you have Fatal server error: could not open default font 'fixed' - end]===================================== # by now you XDirectFB should work just fine!!!! # you can start it as "XDirectFB &" in a background from some /etc/rc.local export DISPLAY=:0 xcalc & # now you should see nice calculator on your VM terminal! Wow! # now you can do whatever you want with it. Just as a couple hints I'd suggest to install window manager: # (to add nice header with 'minimize/maximize/close' buttons to each window and to be able to move them) apt-get install metacity ===============================================[install vnc - begin]===================================== apt-get install x11vnc # create your password file with plain-text password in it: /etc/passwd.vnc-server # also create script /etc/init.d/vnc-server-starter.sh #!/bin/bash # old way to have vnc running after client disconnects: while true; do x11vnc; sleep 1; done; # new way (we use -forever key) x11vnc -forever -passwdfile /etc/passwd.vnc-server # now VNC server can be started: /etc/init.d/vnc-server-starter.sh ===============================================[install vnc - end]===================================== ==================================[install skype (begin)]==================== apt-cache show skype Version: 2.0.0.72-1 ... ok apt-get install skype apt-get -f install apt-get install skype Also, don't forget to install Skype4Py (if you want have access to skype API from your python scripts) https://developer.skype.com/wiki/Skype4Py/installation download file Skype4Py-1.0.31.0.tar.gz tar xf Skype4Py-1.0.31.0.tar.gz python ./setup.py install ==================================[install skype (end)]==================== Here goes and example of my rc.local.dimon file (which I call from /etc/rc.local) with couple important notes: --------------["rc.local.dimon" begin]----------------- #------------------------------- start X, skype, vnc (begin) --------------- # Remove an issue with double keyboard events # (on my VM I noticed, that all events, like mouse click and keyboard stroke # somehow affects all running graphical applications in a strange way - all # these events are delivered TWICE, so, for example, if you type 'asdf' in # any application (firefox, skype, xterm etc.) you'll see 'aassddff' as a result. # Also, single click on any window header is delivered to app. twice and became # a douple click! Not exactly what we wanted? Here goes my solution:) # On each boot we do (and everything works just fine) mv /dev/input/event1 /dev/input/event1.moved # start X /usr/local/bin/XDirectFB & /bin/sleep 3 # start window manager export DISPLAY=:0 metacity & /bin/sleep 1 # start skype as a user skype (note - we pass some environment.) # STRANGE, BUT THIS DOESNT WORK ON SERVER3: sudo -u skype env DISPLAY=:0 /usr/bin/skype & # This works: su -l skype -c bash -c "DISPLAY=:0 /usr/bin/skype" & # start VNC server /bin/sleep 1 /etc/init.d/vnc-server-starter.sh & #------------------------------- start X, skype, vnc (end) --------------- --------------["rc.local.dimon" end]----------------- PS: if your computer doesn't have sound blaster (for instance it is pure virtual server, running on some soundblasterless huge server :) you need to install dummy sound device: ----------------------------------------------------------- to create dummy sound device we do: http://alsa.opensrc.org/index.php/Quick_Install apt-get install libasound2 alsa-utils alsa-oss http://www.alsa-project.org/main/index.php/Matrix:Module-dummy after installation of alsa I noticed, that root can play sounds even on machine without sound blaster! (don't need to install totem player or xmms, aplay is enouth!-) ---------------------------------------------- r...@www:/home/skype# aplay /tmp/youvegotmail.wav Playing WAVE '/tmp/youvegotmail.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono ---------------------------------------------- but user 'skype' failed to play!!!!!!!! ---------------------------------------------- sk...@www:~$ aplay /tmp/youvegotmail.wav ALSA lib confmisc.c:670:(snd_func_card_driver) cannot find card '0' ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device ALSA lib confmisc.c:391:(snd_func_concat) error evaluating strings ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_concat returned error: No such device ALSA lib confmisc.c:1070:(snd_func_refer) error evaluating name ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such device ALSA lib conf.c:3968:(snd_config_expand) Evaluate error: No such device ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM default aplay: main:550: audio open error: No such device sk...@www:~$ man aplay ---------------------------------------------- ---------------------------------------------- chmod a+rw /dev/snd/* r...@www:/proc/asound# su -l skype sk...@www:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 sk...@www:~$ aplay /tmp/youvegotmail.wav Playing WAVE '/tmp/youvegotmail.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono sk...@www:~$ HERE YOU GO!! Now user 'skype' CAN play sounds, using our dummy driver! ---------------------------------------------- after that skype (don't forted to change sound input/ouput in gui: preferences-> options ) started calling ok!!!! now lets try to call, using wav file. # Google for nice python script, by name: 'call-send-and-record-example.py' # download it to: /home/dmitry/direct-fb-vnc-etc/call-send-and-record-example.py cd /home/dmitry/direct-fb-vnc-etc/ ./call-send-and-record-example-2.py vasyapupkin /tmp/youvegotmail.wav /tmp/out.wav WORKS!!!!!!!!!!!!!!-)))) I could even call my cell phone and heard "you've got mail", but soon enough I run out of 1CAD on my skype account :) Last note, I was not happy with the fact, that VM screen turned into graphical desktop and everyone, passing by hosting computer (that runs VM player) could access it without authorization. I wanted to hide DirectFB in memory (kinda having it pure virtual, accessible only by VNC). As a solution, we found xvfb http://en.wikipedia.org/wiki/Xvfb , then I removed vga=xxx parameter from /boot/grub/menu.lst (so vm boots to textual login prompt - no GUI visible) And now I have all my gui-related applications hidden! I can access them only via password protected vnc! (x11vnc was used as described above) ===============================================[now install xvfb (invisible brame buffer) - begin]===================================== apt-get install xvfb # add a line to /etc/rc.local /etc/rc.local.dimon > /tmp/rc.local.dimon & # and the content of /etc/rc.local.dimon is: # remove an issue with double keyboard events mv /dev/input/event1 /dev/input/event1.moved Xvfb :0 -screen 0 800x600x24 & sleep 2 x11vnc -rfbport 54300 -display :0 -forever -passwdfile /etc/passwd.vnc-server & # we no longer start XDirectFB (though we can have Xvfb AND XDirectFB same time!) exit 0 ===============================================[now install xvfb (invisible brame buffer) - end]===================================== # By the way, we can start several instances of Xvfb simultaneously (think of it as a separate desktops with different resolution) Xvfb :0 -screen 0 800x600x24 & Xvfb :1 -screen 0 1024x768x24 & # and then we can start several vnc servers (to be able to access these desktops) # note - we should use different listening ports x11vnc -rfbport 54300 -display :0 -forever -passwdfile /etc/passwd.vnc-server & x11vnc -rfbport 54301 -display :1 -forever -passwdfile /etc/passwd.vnc-server & # now we can start applications on each of these "desktops": DISPLAY=:0 xcalc & DISPLAY=:0 xclock & # start 2 vnc clients and conect to these "desctops" 192.168.x.x:54300 and 192.168.x.x:54301 How coooooooool is that!!!!!!! Hope you'll succeed, Have a good one!!1 Dmitry dpopov77 at gmail d0t com -- View this message in context: http://www.nabble.com/How-to-hide-DirectFB-tp22481071p22683731.html Sent from the DirectFB Users mailing list archive at Nabble.com. _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
