(solved)How to use jpegoptim recursively in subfolders.

Hello ,
I want to optimize some images without changing names with many subfolders loaded.
I am not good at shell script. I found this for jpegtran but package does not work.
How can I modifiye it for jpegoptim?
#! /bin/sh
# Usage 1:
# optimize-images.sh /images/dir
# Usage 2:
# cd /images/dir
# optimize-images.sh
EXTENSIONS="jpe?g"
if [ -z "$1" ]; then
DIR="`pwd`"
else
DIR="$1"
fi
# Optimize JPEG images
find "$DIR" -regextype posix-egrep -regex ".*\.($EXTENSIONS)\$" -type f | xargs -I{} jpegtran -optimize -progressive -outfile "{}.optimized" "{}"
# Rename xxx.jpg.optimized -> xxx.jpg
find "$DIR" -name '*.optimized' -print0 | while read -d $'\0' file; do
chown $(stat -c "%U:%G" "${file%.optimized}") "$file"
chmod $(stat -c "%a" "${file%.optimized}") "$file"
mv -f "$file" "${file%.optimized}";
done
ps1: also found this while google in but I dont know where to write it :
optimize() {
jpegoptim *.jpg --strip-all
for i in *
do
if test -d $i
then
cd $i
echo $i
optimize
cd ..
fi
done
echo
optimize
Last edited by ytsejam (2014-03-19 10:20:12)

ytsejam wrote:It is installed.. I checked it and I can see with pkgfile. I am trying to find out where to write that script now .
pkgfile shows what's in the sync databases (in the repos), not what is in the local databases (what do you have on your computer).
ytsejam wrote:
karol,
Thank you for efforts , I needed to logout and login .
optimize() {
jpegoptim *.jpg --strip-all
for i in *
do
if test -d $i
then
cd $i
echo $i
optimize
cd ..
fi
done
echo
works with jpegoptim. I think the same will occur with jpegtran. I had a $PATH value for ruby , it was ruining my bashrc. I commented it and works now.
How exactly were you trying to use the script for jpegtran? Did you put it in your ~/.bashrc? You don't have to put your script location in your $PATH to run it, you just need to use the full path then.

Similar Messages

  • [SOLVED] how to use diffrent iptables rules for different ppp account?

    x86 plantform run arch linux system , have two network interface etn1 eth0 .eth1 connect to internet. eth0 connect to other terminals through switch. want use different iptables rules for different pppoe account .also want to know how to forbidden more than one terminals established pppoe link use same account at the same time .
    Last edited by linuxsir (2013-09-26 06:48:01)

    (You establish PPPoE sessions over the local network to the Arch machine? Which then routes the traffic?)
    first question ,yes that is exactly what i am done. second question i also have a small  scripts on windows pc to solve routes traffic problem
    route -p delete 0.0.0.0
    route -p add 192.168.9.0 mask 255.255.255.0 192.168.9.1
    route -p add 0.0.0.0 mask 0.0.0.0 192.168.22.0
    but after a while i found scripts is not necessary because windows always attempt to use PPPoE sessions as default internet connection local connection is also ok
    and use  -i pppX in my iptables rules dose not  solve my problem , because same account start PPPoE session could be marked as ppp0 or ppp1. it is hard to identified which account start session.

  • [SOLVED] How to use timidity++ and other programs at the same time?

    I have installed timidity following arch wiki instructions - I have soundfont, and I start it in /etc/rc.conf
    It works properly with tuxguitar (and tuxguitar-alsa) or kmid, but I cannot play MIDI and - for example - oggs in amarok at the same time.
    I suspect that the problem is that timidity doesn't use dmix alsa plugin I have made in my ~/.asoundrc.
    The question is: how to tell timidity to use my dmix plugin?
    Last edited by senjin (2007-11-19 19:53:50)

    but they don't define "default" there, but "!default"...
    anyway, I have already both "default" and "!default" defined exactly the same way:
    pcm.!default
    type plug
    slave.pcm "dmixer"
    pcm.default
    type plug
    slave.pcm "dmixer"
    pcm.dmixer
    type dmix
    ipc_key 1024
    slave
    pcm "hw:0,0"
    format "S32_LE"
    channels 2
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 44100
    bindings
    0 0
    1 1
    ctl.dmixer
    type hw
    card 0
    pcm.w_y_h
    type hw
    card 0
    device 0
    pcm.what_you_hear
    type plug
    ttable.0.10 1 # digital mix left
    ttable.1.11 1 # digital mix right
    slave.pcm w_y_h
    pcm.skype
    type asym
    playback.pcm "dmixer"
    capture.pcm "skype_input"
    pcm.skype_input
    type dsnoop
    ipc_key 2048
    slave
    pcm "hw:0,0"
    period_time 0
    buffer_time 0
    period_size 1024
    buffer_size 8192
    rate 44100
    and it doesn't work!
    Last edited by senjin (2007-11-18 17:49:21)

  • [SOLVED] How to use the HDMI output of my laptop (Openbox)

    Hi everyone
    I use ArchLinux along with Openbox, PcManFM, LXterminal (no desktop environment) on my Asus X52F (CPU/GPU = Intel core i3-350M).
    I'd like to be able to use my HDMI output to watch movies on my TV.
    When I used it with Ubuntu/Linux Mint, the HDMI output worked out of the box when I pressed Fn+F8 on my keyboard, but now it doesn't anymore.
    I guess some packages or configuration are missing, because my others multimedia keys (Fn+Fx) to control the brightness of the screen, sound volume... are working, but since I didn't find anything on the wiki, I'm asking you.
    Thank you ;]
    EDIT: Arg, wrong section, sorry
    Last edited by Lowra (2012-02-13 22:26:28)

    What I did to solve it:
    - Installed "lxrandr" from the official repo
    - Configured Openbox to launch lxrandr when I pushed Fn+F8.
    Now, If I want to watch something on my TV through HDMI:
    1) Push Fn+F8
    2) Tick the HDMI button under lxrandr, and click Apply
    3] Enjoy :]

  • [Solved] How to use Oracle Java 6 for specific applications

    I use an IDE called PyCharm. On its download page, it recommends using Java 6 instead of OpenJDK. I currently have jdk7-openjdk installed, and from what I had read in the Arch Wiki on Java, it should be possible to install Oracle Java 6 along side OpenJDK 7.
    However, after installing jdk6-compat and jre6-compat, I still see that I am running OpenJDK 7 when I run the following:
    % java -version
    java version "1.7.0_09"
    OpenJDK Runtime Environment (IcedTea7 2.3.3) (ArchLinux build 7.u9_2.3.3-1-x86_64)
    OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
    ...even after I have set JAVA_HOME and added /opt/java6/bin to my path.
    How can I get PyCharm (or other applications) to use Oracle Java 6 instead of OpenJDK?
    Thanks, and apologies if I've posted in the wrong place.
    Other information that might be helpful:
    Running zsh as default shell
    Using Gnome 3 as DE
    Last edited by Nikorasu (2012-11-17 20:54:33)

    I found the solution.
    For Pycharm, I just needed to add an environment variable PYCHARM_JDK. For running specific applications, I asked this question on the Unix / Linux StackExchange and got an answer there.
    Also, after running PyCharm in Java 6... I would not recommend it. OpenJDK works fine
    Last edited by Nikorasu (2012-11-17 20:55:01)

  • [SOLVED] How to use return parameter of function as paramter of table?

    Hi all,
    As continue of post "ADF Faces: how to execute pl/sql function when page is loaded." I came up with an other problem where I can't find an easy solution for.
    The problem is easy.
    1) I execute a procedure, this returns a value
    2) I have a table which needs one input parameter
    3) How can I bind the return value of the procedure to the input paramter of the table:
    A simple example:
    1) I created a pl/sql function that returns 1
    CREATE FUNCTION zz_return_1
    is
    RETURN NUMBER
    BEGIN
      RETURN 1
    end;2) I exposed the function in my TestModule so I can use it on a jps page.
    3) I created a table TEST_PARAM_1_TABLE with two columns: a, b
    4) I created a view read-only object with one paramter
    SELECT a,b
    FROM zz_scn_test_tab
    where a = :var_15) I added the view object to a jps page as tabe > adf read-only
    6) I added a methodAction and invokeAction to execute the function on page load
    <executables>
          <iterator id="zzscntest1Iterator" RangeSize="10" Binds="zzscntest1"
                    DataControl="TestModuleDataControl"/>
                <invokeAction id="runProc" Binds="ftn_return_1"/>
          </executables>
    <bindings>
          <methodAction id="ftn_return_1"
                        InstanceName="TestModuleDataControl.dataProvider"
                        DataControl="TestModuleDataControl"
                        MethodName="ftn_return_1" RequiresUpdateModel="true"
                        Action="999" IsViewObjectMethod="false"
                        ReturnName="TestModuleDataControl.methodResults.TestModuleDataControl_dataProvider_ftn_return_1_result"/>
          <table id="zzscntest1" IterBinding="zzscntest1Iterator">
              <AttrNames>
                  <Item Value="A"/>
                  <Item Value="B"/>
              </AttrNames>
          </table>
    </bindings>how can I bind the return value of the function to the var_1 variable of the table?
    Additional to this: Is there a way to store the return value in a managed bean?
    for example: if I create a managed bean:
    public class globalVars {
        private Number ftnReturnValue;
        public globalVars() {
        public void setFtnReturnValue(Number ftnReturnValue) {
            System.out.println("return value is set to: " + ftnReturnValue);
            this.ftnReturnValue = ftnReturnValue;
        public Number getFtnReturnValue() {
            return ftnReturnValue;
    }how to store the return value in this ftnReturnValue variable?

    Thanks to Frank,
    I finally got it to work!
    For those with the same problem, this is what I did:
    - I created a VO material_details with one parameter :sequence_num
    - I created a master/detail viewlink from my materials list to the materials_details
    - In the application module, I created a call to the procedure, and within this procedure, I set the sequence_num variable.
        public Number f_ltf3_adf_syf_init(String reporting_group
                                         , String username
                                         , String RAG_code
                                         , String ABC_class
                                         , String SBU_code){
           CallableStatement st = null;
           String stmt = "M_LTF3_SFM_CALC.f_ltf3_adf_syf_init('"+ reporting_group
                                                           +"','"+ username
                                                           +"','"+ RAG_code
                                                           +"','"+ ABC_class
                                                           +"','"+ SBU_code+"')";
           try {
               // prepare the statement
               st = getDBTransaction().createCallableStatement("begin ? := "+stmt+";end;",0);
               st.registerOutParameter(1,2);  // register output parameter as Number
               //execute the statement
               st.executeUpdate();
               //set paramter in detail VO of master/view
               getLtfSyfRevDetails1().setNamedWhereClauseParam("session_seq", (Number)st.getObject(1));
               return (Number)st.getObject(1);
           }catch (Exception e){e.printStackTrace();}
           return null;
        }

  • [SOLVED]how to use a VO that has bind variables in a Tree

    Hi,
    I have 3 view objects that I have linked using ViewLinks.
    My last object - the details is based on a View Object that takes in a bind parameter for use in its where clause.
    Originally when I used this View Object I could set this where clause by creating an ExecuteWithParams action in the page on the Iterator and set an executeable to invoke this when the page loads. This worked fine in the non-tree version.
    However when you use a Tree only the master collection gets turned into an iterator in the page def. Therefore I cannot invoke an ExecuteWithParams and set my bind variable in this way.
    How can I set my bind variable on the view object declaratively ? If it is not possible and I have to do it programmatically then where should I do this - I presume it would have to be in a method that the tree has ?
    thanks in advance.
    Message was edited by:
    Dom

    Hi,
    My Employees equivalent table is actually a xref table.
    It is like this :
    Master table = Skills
    This has a self join so a skill can have a master skills (I guess a bit like MGR)
    So I have 2 views on the skills - one for the top level skills and one for all ones below it.
    Then I have my last VO which is employees_skills_xref. This is a xref to the skills table and can hold many rows - so an employee could have many entries under the Skill names "Oracle technologies" - eg "PL/SQL, SQL, Portal etc"
    the Where clause for this xref VO has to take in the employeeId so that it only returns those rows that pertain to the user.
    This empId is stored in a managed bean,
    hth

  • [SOLVED] How to use GPT GUIDs for referencing partitions in /dev?

    Hi all,
             I wanted to know whether it is possible to use Unique Partition GUID of a GPT partition to setup /dev/disk/by-part-uuid (something like that) and using that path in the bootloader config's 'root= ' kernel parameter.
    It is possible to obtain those GUIDs from gdisk (or maybe from blkid in util-linux-ng - not sure). But how to make udev setup /dev/disk/by-part-uuid like dir with these GUIDs.
    Main info http://marc.info/?l=linux-hotplug&m=129425482207292&w=2 and http://git.kernel.org/?p=linux/kernel/g … b78fc0e100 (currently in 2.6.37 only - but this commit will not work since in Arch initramfs is used). Thanks in advance.
    Last edited by skodabenz (2011-06-11 12:26:08)

    Encypted partitions (not that I use). Also searching will be faster (although not noticable), as parsing partition table is faster than parsing each filesystem and obtaining UUID. See http://www.mail-archive.com/grub-devel@ … 15218.html and http://www.mail-archive.com/grub-devel@ … 15228.html
    Last edited by skodabenz (2011-01-08 21:17:39)

  • [SOLVED] How to use command NETSTAT in archlinux?

    Hi, everyone. Can you please tell me how to enable this NETSTAT command? I can't find this with pacman. In yaourt I found netstat-nat but I am not sure they are the same thing.
    After I yaourted this netstat-nat I still can't use it because netfilter is not enabled in my kernel yet.
    Last edited by zarcher (2011-11-26 01:23:15)

    karol wrote:
    zarcher wrote:
    llawwehttam wrote:
    pacman -Qo /bin/netstat                                                                                                                               ~
    /bin/netstat is owned by net-tools 1.60.20110819cvs-3
    Hope that helps.
    Thanks a lot for your quick answer. It did helped. I pacmaned net-tools and I can use "netstat" now. Cheers!
    net-tools are deprecated and you should be using iproute2 instead: http://www.archlinux.org/news/deprecation-of-net-tools/
    A more general answer to your question: https://wiki.archlinux.org/index.php/FA … is_X_in.3F
    Whoops.
    Apologies for the bad advice. I must have missed that net-tools was deprecated.
    Sadly I have to keep it installed as it is still a dependency of wicd as far as I know.
    EDIT: Decided to get my act together and remove as many deprecated packages as I can. Now using netcfg. I'll have to pay more attention to the news.
    Last edited by llawwehttam (2011-11-25 06:40:06)

  • [Solved]How to use pm-utils?

    Since I installed Arch (about a month ago) I couldn't use suspend or hibernation.
    When I'm trying to suspend usually the first time goes fine but after that the next suspend let hang the system. The computer is still powered up, fans are spinning but no video signal and I can't control the computer without restarting it completely. When I'm trying to hibernate, the system just shuts down - it does nothing else.
    I noticed that this hint could be the source of my problems:
    In some cases, it is possible that running pm-suspend causes hangs or other issues. This may be due to specific "misbehaving" modules. If you know which modules could cause such issues, adding a SUSPEND_MODULES config to /etc/pm/config.d/modules....
    But how find I those misbehaving modules? I don't know what to search for in the log:
    /var/log/pm-suspend.log
    Initial commandline parameters:
    Mo 29. Dez 15:02:25 CET 2014: Running hooks for hibernate.
    Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
    Linux Dun 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux
    Module Size Used by
    fuse 87410 3
    cfg80211 445286 0
    rfkill 18867 1 cfg80211
    ppdev 16782 0
    radeon 1461558 3
    kvm 421519 0
    mousedev 17272 0
    joydev 17063 0
    evdev 21544 10
    mac_hid 12633 0
    snd_hda_codec_realtek 67469 1
    serio_raw 12849 0
    edac_core 47125 0
    r8169 68207 0
    edac_mce_amd 21166 0
    k10temp 12618 0
    snd_hda_codec_generic 63126 1 snd_hda_codec_realtek
    mii 12675 1 r8169
    ttm 73743 1 radeon
    drm_kms_helper 80934 1 radeon
    snd_hda_codec_hdmi 49213 1
    drm 259106 6 ttm,drm_kms_helper,radeon
    snd_hda_intel 26387 5
    hwmon 12930 2 k10temp,radeon
    i2c_algo_bit 12744 1 radeon
    snd_hda_controller 26938 1 snd_hda_intel
    snd_hda_codec 108536 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
    snd_hwdep 17244 1 snd_hda_codec
    sp5100_tco 12864 0
    snd_pcm 88487 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
    i2c_piix4 20857 0
    parport_pc 26351 0
    snd_timer 26614 1 snd_pcm
    parport 35749 2 ppdev,parport_pc
    snd 73436 18 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
    i2c_core 50152 5 drm,i2c_piix4,drm_kms_helper,i2c_algo_bit,radeon
    shpchp 35210 0
    soundcore 13031 2 snd,snd_hda_codec
    wmi 17339 0
    button 12953 0
    acpi_cpufreq 17218 0
    processor 27777 1 acpi_cpufreq
    sch_fq_codel 17343 2
    ext4 501833 1
    crc16 12343 1 ext4
    mbcache 17171 1 ext4
    jbd2 86417 1 ext4
    hid_logitech_dj 17192 0
    hid_generic 12393 0
    usbhid 48595 0
    hid 102220 4 hid_generic,usbhid,hid_logitech_dj
    sd_mod 44398 3
    crc_t10dif 12431 1 sd_mod
    crct10dif_common 12356 1 crc_t10dif
    atkbd 22254 0
    libps2 12739 1 atkbd
    ata_generic 12490 0
    pata_acpi 12771 0
    firewire_ohci 43373 0
    firewire_core 56700 1 firewire_ohci
    xhci_hcd 152911 0
    crc_itu_t 12347 1 firewire_core
    ahci 33291 2
    pata_jmicron 12483 0
    libahci 27158 1 ahci
    ohci_pci 12808 0
    ehci_pci 12512 0
    ohci_hcd 43006 1 ohci_pci
    ehci_hcd 69939 1 ehci_pci
    libata 181518 5 ahci,pata_acpi,libahci,ata_generic,pata_jmicron
    usbcore 199381 6 ohci_hcd,ohci_pci,ehci_hcd,ehci_pci,usbhid,xhci_hcd
    scsi_mod 147543 2 libata,sd_mod
    usb_common 12440 1 usbcore
    i8042 18002 1 libps2
    serio 18282 4 serio_raw,atkbd,i8042
    total used free shared buff/cache available
    Mem: 8178908 1477860 3452596 56972 3248452 6362136
    Swap: 9690452 0 9690452
    /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
    Running hook /etc/pm/sleep.d/90alsa hibernate hibernate:
    /etc/pm/sleep.d/90alsa hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
    Kernel modesetting video driver detected, not using quirks.
    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
    Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
    /usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
    Mo 29. Dez 15:02:26 CET 2014: performing hibernate
    I added "SUSPEND_MODULES="ehci_hcd" to /etc/pm/config.d/modules , but that changes nothing.
    Here are my hw specs:
    -Computer-
    Processor : 4x AMD Phenom(tm) II X4 955 Processor
    Memory : 8177MB (1910MB used)
    Operating System : Arch Linux
    User Name : dun (Unknown)
    Date/Time : So 18 Jan 2015 12:55:47 CET
    -Display-
    Resolution : 3600x1080 pixels
    OpenGL Renderer : Gallium 0.4 on AMD PITCAIRN
    X11 Vendor : (null)
    -Multimedia-
    Audio Adapter : HDA-Intel - HDA ATI SB
    Audio Adapter : HDA-Intel - HDA ATI HDMI
    -Input Devices-
    A4TECH USB Device
    A4TECH USB Device
    Gaming Keyboard
    Gaming Keyboard
    Logitech Unifying Device. Wireless PID:4024
    G11 Keyboard
    Power Button
    Power Button
    HDA ATI HDMI HDMI/DP,pcm : 3=
    HDA ATI HDMI HDMI/DP,pcm : 7=
    HDA ATI HDMI HDMI/DP,pcm : 8=
    HDA ATI HDMI HDMI/DP,pcm : 9=
    HDA ATI HDMI HDMI/DP,pcm : 10=
    HDA ATI HDMI HDMI/DP,pcm : 11=
    HDA ATI SB Front Mic
    HDA ATI SB Rear Mic
    HDA ATI SB Line
    HDA ATI SB Line Out Front
    HDA ATI SB Line Out Surround
    HDA ATI SB Line Out CLFE
    HDA ATI SB Line Out Side
    HDA ATI SB Front Headphone
    -Printers-
    No printers found
    -SCSI Disks-
    ATA SAMSUNG SSD 830
    ATA ST2000DX001-1CM1
    ATA WDC WD15EARS-00M
    Could please someone give me a hint?
    Last edited by Dun (2015-01-19 14:07:05)

    karol wrote:
    When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode
    like this
    It makes the code more readable and - in case of longer listings - more convenient to scroll through.
    Ye usually I do know that but somehow I didn't notice that as a mistake when I wrote it :>
    tomk wrote:pm-utils is very old - last update was over 4 years ago. systemd suspend and hibernate work perfectly for me, I'd suggest you try that instead.
    You are right, thank you very much!
    But why is the Wiki filled with old stuff like pm-utils? Are there people who actually use it or is it just the Wiki being old?
    Edit: Ok systemctl suspend does have some problems too. Sometimes the computer is stuck after waking up from suspension, sometimes before (just like pm-utils did) and sometimes it just shuts down. It's pretty randomly, sometimes it works sometimes not.
    Edit2: Well it seems to work now, only sometimes it causes problems, but overall it works
    Last edited by Dun (2015-01-19 14:06:46)

  • [SOLVED]How to use pulseaudio with in 32 bit chroot on ARch64

    I am trying to running some 32bit software from chroot environment on Arch64.
    I set up pulseaudio on Arch64 property.
    However, within 32 bit chroot, I cannot use pulseaudio.
    For an example,
    arch32 chroot /home/xxxx/Audio > paplay Front_Center.wav
    Connection failure: Connection refused
    How can I fix this?
    Last edited by phabulosa (2008-04-27 19:37:15)

    I made this to work by the following steps:
    1. Install pulseaudio and alsa-plugin stuff in Arch32;
    2. Edit /etc/pulse/default.pa on Arch64 and enable "load-module module-native-protocol-tcp";
    3. Edit /etc/rc.d/pulseaudio and add a line "cp /var/run/pulse/.pulse-cookie /opt/arch32/etc/pulse-cookie" after pulseaudio line in 'start' part;
    4. Add some lines in /etc/hosts.allow on Arch64 (some of them may not be necessary) ;
    pulseaudio-native: 127.0.0.1
    pulseaudio-simple: 127.0.0.1
    pulseaudio-cli: 127.0.0.1
    pulseaudio-http: 127.0.0.1
    esound: 127.0.0.1
    5. Follow the "PulseAudio over Network" in Arch Wiki on Pulse audio http://wiki.archlinux.org/index.php/Pul … er_network and configure my Arch32 as a remote client on the network while setting the server address as 127.0.0.1;
    6. Restart Pulseaudio daemon on Arch64 and Run "paplay" on Arch32 to test.

  • SOLVED: How To Use LDAP over SSL (no certs) from java program

    Trying to connect to OID from Java program (using Grocery Store demo as a test). Want to use SSL with no server certificate. OID is configured, and ldapsearch -U 1 works.
    Tried using URL with ldaps, or adding SECURITY_PROTOCOL,"ssl". In both case the error is 'simple bind failed'.
    Samples on OTN say this should be possible, but then only have code for the non-ssl connection.
    Posting from others with this same question don't seem to have been answered.
    Message was edited by:
    user590350
    I have found that using ConnectionUtil.getSSLDirCtx() from Oracle will make a no-authentication SSL connection. An example in the sample code would be useful.

    Even with Java APIs, There is a way to talk through SSL without bothering about certificates. It's just that you will have to write some code and make some changes in settings.
    Read following to get further information on the same.
    http://kiranthakkar.blogspot.com/2007/04/dummny-certificate-authentication.html
    I don't know or I won't comment whether it's the right approach or not but it's definitely a work around.
    Thanking You
    Kiran Thakkar

  • [SOLVED] How to use Linux Bash to Create an Array of Files in a Dir...

    So I created a bash script which executes at random one PHP script in a directory,
    scripts=(
    flag_videos_which_need_grabbing.php
    grab_video.php
    grab_speaker_image.php
    php -f /home/rt_cron/${scripts[$((RANDOM%${#scripts[*]}))]} > /dev/null 2>&1;
    However, because I change the PHP scripts in that directory frequently I'd like this bash script to actually create its 'scripts' array from the current contents of the /home/rt_cron directory. Basically I need something like this,
    scripts = $(ls /home/rt_cron/*.php)
    Any ideas anyone?
    Last edited by tony5429 (2010-02-10 03:32:35)

    scripts=(`ls /home/rt_cron/*.php`)
    Methinks.
    tony5429 wrote:
    Well just minutes after posting that I found a solution with awk,
    scripts=($(ls /home/rt_cron/*.php | awk -F" " '{$1=$1; print}'));
    You don't need that awk in there at all.
    Last edited by Peasantoid (2010-02-10 03:32:03)

  • How to use filters on ios mobile devices (iPhone/iPad) using GPU rendering (Solved)

    Many moons ago I asked a question here on the forums about how to use filters (specifically a glow filter) on a mobile devices (specifically the iPhone) when using GPU rendering and high resolution.
    At the time, there was no answer... filters were unsupported. Period.
    Well, Thanks to a buddy of mine, this problem has been solved and I can report that I have gotten a color matrix filter for desaturation AND a glow filter working on the iPhone and the iPad using GPU rendering and high resolution.
    The solution, in a nut shell is as follows:
    1: Create your display object... ie: a sprite.
    2. Apply your filter to the sprite like you normally would.
    3. Create a new bitmapdata and then draw that display object into the bitmap data.
    4. Put the new bitmapdata into a bitmap and then put it on the stage or do what you want.
    When you draw the display object into the bitmapdata, it will draw it WITH THE FILTER!
    So even if you put your display object onto the stage, the filter will not be visible, but the new bitmapdata will!
    Here is a sample app I created and tested on the iphone and ipad
    var bm:Bitmap;
    // temp bitmap object
    var bmData:BitmapData;
    // temp bitmapData object
    var m:Matrix;
    // temp matrix object
    var gl:GlowFilter;
    // the glow filter we are going to use
    var sprGL:Sprite;
    // the source sprite we are going to apply the filter too
    var sprGL2:Sprite;
    // the sprite that will hold our final bitmapdata containing the original sprite with a filter.
    // create the filters we are going to use.
    gl = new GlowFilter(0xFF0000, 0.9, 10, 10, 5, 2, false, false);
    // create the source sprite that will use our glow filter.
    sprGL = new Sprite();
    // create a bitmap with any image from our library to place into our source sprite.
    bm = new Bitmap(new Msgbox_Background(), "auto", true);
    // add the bitmap to our source sprite.
    sprGL.addChild(bm);
    // add the glow filter to the source sprite.
    sprGL.filters = [gl];
    // create the bitmapdata that will draw our glowing sprite.
    sprGL2 = new Sprite();
    // create the bitmap data to hold our new image... remember, with glow filters, you need to add the padding for the flow manually. Should be double the blur size
    bmData = new BitmapData(sprGL.width+20, sprGL.height+20, true, 0);
    // create a matrix to translate our source image when we draw it. Should be the same as our filter blur size.
    m = new Matrix(1,0,0,1, 10, 10);
    // draw the source sprite containing the filter into our bitmap data
    bmData.draw(sprGL, m);
    // put the new bitmap data into a bitmap so we can see it on screen.
    bm = new Bitmap(bmData, "auto", true);
    // put the new bitmap into a sprite - this is just because the rest of my test app needed it, you can probably just put the bitmap right on the screen directly.
    sprGL2.addChild(bm);
    // put the source sprite with the filter on the stage. It should draw, but you will not see the filter.
    sprGL.x = 100;
    sprGL.y = 50;
    this.addChild(sprGL);
    // put the filtered sprite on the stage. it shoudl appear like the source sprite, but a little bigger (because of the glow padding)
    // and unlike the source sprite, the flow filter should acutally be visible now!
    sprGL2.x = 300;
    sprGL2.y = 50;
    this.addChild(sprGL2);

    Great stuff dave
    I currently have a slider which changes the hue of an image in a movieclip, I need it to move through he full range -180 to 180.
    I desperately need to get this working on a tablet but cant get the filters to work in GPU mode. My application works too slow in cpu mode.
    var Mcolor:AdjustColor = new AdjustColor();   //This object will hold the color properties
    var Mfilter:ColorMatrixFilter;                           //Will store the modified color filter to change the image
    var markerSli:SliderUI = new SliderUI(stage, "x", markerSli.track_mc, markerSli.slider_mc, -180, 180, 0, 1);   //using slider from http://evolve.reintroducing.com
    Mcolor.brightness = 0;  Mcolor.contrast = 0; Mcolor.hue = 0; Mcolor.saturation = 0;            // Set initial value for filter
    markerSli.addEventListener(SliderUIEvent.ON_UPDATE, markerSlider);                          // listen for slider changes
    function markerSlider($evt:SliderUIEvent):void {
        Mcolor.hue = $evt.currentValue;                        
        updateM();
    function updateM():void{
        Mfilter = new ColorMatrixFilter(Mcolor.CalculateFinalFlatArray());
        all.marker.filters = [Mfilter];
    how would I use your solution in my case
    many thanks.

  • TS3697 There is no camera roll download pop up after connected to iTune, to solve that I used Photo Transfer App to download the Photos, but how can I delete the photos in the camera rolls, as there are 9000 photos in the camera roll

    There is no camera roll download pop up after connected to iTune, to solve that I used Photo Transfer App to download the Photos, but how can I delete the photos in the camera rolls, as there are 9000 photos in the camera roll

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

Maybe you are looking for

  • Office 2013 app-v packages

    In this article, http://blogs.windows.com/itpro/2013/12/02/announcing-mdop-2013-r2/   I see mention of an Office version called "Office 2013 ProPlus App-V Package".    Is this a download?  I don't see it available as one when I login to my VLSC site.

  • Payload Search

    Hi All, This is with reference to the blog by Sravya: ABAP based Trex in XI: Proto We are having SP12 system. The solution suggested in the blog : DATA payload TYPE ref to IF_XMS_PAYLOAD. CALL METHOD xmb_msg->if_xms_message_xmb~get_payload_with_main_

  • MMS for SNMP with eDir 8.8.2

    Hello, We have been using MMS for NetWare, Windows and Linux, with the NDSTRAP.NLM providing eDirectory monitoring with eDir 8.7.3 on NetWare We are moving to eDir 8.8.2, and I was wondering if NWTRAP will still work, or do we need to configure the D

  • I have a big problem with my iPod nano, help!

    i have had an iPod nano with 4gb for since christmas. just the other day i noticed a huge problem. when i hold down the play/pause button to try and turn it off nothing happens. i have made sure the hold button is not on, tried resetting it, plugged

  • Can't Import models

    Hello experts. I'm new in SAP Visual Composer and I am trying to do this [sample|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50ff2c7d-9fb8-2b10-e387-c358f4b30307] but the problem is I can't import the models , I can't even import models th