FreeBSD good advices

FreeBSD good advices:

Flash

FreeBSD + Firefox + flash. It is not really my guide, I just collected some useful ideas into one.
  1. Install www/firefox
  2. Install www/linux-flashplugin7
  3. Install devel/linuxthreads
  4. Install www/linuxpluginwrapper
  5. Download patch for rtld-elf:
    # fetch http://www.jail.se/freebsd/rtld_dlsym_hack.diff
                  
  6. Apply the patch:
    # cd /usr/src/libexec/rtld-elf
    patch < /path/to/patch
    
    make
    make install
    make clean
    
                  
  7. Create links:
    # cd /usr/local/lib/browser_plugins
    rm libflashplayer.so flashplayer.xpt
    ln -s ../npapi/linux-flashplugin/flashplayer.xpt
    ln -s ../npapi/linux-flashplugin/libflashplayer.so
                  
  8. Add the following strings to /etc/libmap.conf:
                  
    
    [/usr/local/lib/npapi/linux-flashplugin/libflashplayer.so]
    libpthread.so.0                 pluginwrapper/flash7.so
    libdl.so.2                      pluginwrapper/flash7.so
    libz.so.1                       libz.so.3
    libstdc++-libc6.2-2.so.3        libstdc++.so.4
    libm.so.6                       libm.so.4
    libc.so.6                       pluginwrapper/flash7.so
                  
                

sysctl

hw.ata.wc=1
I have FreeBSD 6.1 on my HP/Compaq nx9030 laptop. I've copied FreeBSD 6.1 iso file from one partition to another two times:
0: time shown 175 s, mc - 2.74 Mb/s
1: time shown 375 s, mc - 5,51 Mb/s
Please, read ata(4) and tuning(7) for details. This option may be dangerous.
This options should be set before kernel start, i.e. use /boot/loader.conf

kern.corefile=/var/tmp/%N.core
kern.sugid_coredump=1
The first one controls the name of the file. %N is the process name, also available options are %P - PID, %U - UID.
FreeBSD traditionally uses %N.core by default.

Second one says that a process that changes user or group credentials whether real or effective should create a corefile. By default it will not.
Just put this to /etc/sysctl.conf

FreeBSD

autologin

How to make some user login automatically?

  1. Add to the /etc/gettytab file the following strings:
    
    test:\
      :al=test:ht:np:sp#115200:
              
    test:\ - entry name, autologin will use this username;
    al=test - autologin username;
    ht - terminal has real tabs;
    np - 8-bit chars;
    (optional) sp#115200 - line speed;

  2. Edit /etc/ttys file:
    
    ttyv0   "/usr/libexec/getty test"         cons25 on  secure
              
    Usual Pc changed with test.

DCOP

ksnapshot

My aim is to take screenshot of a selected region. I'm using ksnapshot which is a part of kdegraphics port, but ksnapshot is too interactive for me ;)
I'd like to have the following steps:
hotkey -> region selection -> save dialog -> quit
After a few minutes I found the following way:
  1. Start ksnapshot using dcopstart:
    # setenv pid `dcopstart ksnapshot`
                
  2. Send signals using dcop:

    Asks ksnapshot to set the grab mode to "Region":
    # dcop $pid interface setGrabMode 2
                
  3. Start selection of a region:
    # dcop $pid interface slotGrab
              
  4. Save file dialog:
    
    # dcop $pid interface slotSaveAs
                
  5. Quit:
    # dcop $pid interface exit
    
                
It's easy to make simple script.

Feel free to contact, e-mail <keyhell@keyhell.org>





Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.