Results 1 to 3 of 3

Thread: Adding complicated Menu Items

  1. #1
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Adding complicated Menu Items

    I want to open LibreOffice and Zotero at the same time as LibreOffice has to have Zotero running in firefox or stand alone to use the LibreOffice plugin. I already have made a new menu item to open Zotero, but how do I make a new menu to open them both at once?

    I thought the commad should be thus
    libreoffice --writer %U && ~/Zotero/run-zotero.sh
    or
    libreoffice --writer %U; ~/Zotero/run-zotero.sh
    Any thoughts?

    Should I just make a command line alias?

    AlphaA
    Last edited by alphaamanitin; January 18th, 2013 at 06:33 AM. Reason: wrong slashed for quotes
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  2. #2
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    805
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Adding complicated Menu Items

    You're going to run into two problems if you use these commands in an Xfce launcher

    1) Xfce doesn't interpret shell syntax like ~, ; and &&. So only the first command will run. You need to wrap the whole thing inside a call to a shell.

    2) Even if you managed to make the chained commands work, it would wait for LibreOffice to quit before executing Zotero. You want to run both in parallel right? For that, you need to fork Libreoffice with a single &.

    So the command to put in your launcher would be:
    Code:
    bash -c "libreoffice --writer %U & ~/Zotero/run-zotero.sh"
    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  3. #3
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Adding complicated Menu Items

    Thanks, that worked. Just finally got around testing it.

    AlphaA
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •