Results 1 to 7 of 7

Thread: Right Click Print from Nautilus

  1. #1
    Join Date
    Oct 2006
    Location
    New York
    Beans
    1,118
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Right Click Print from Nautilus

    I recently used windows and was very happy to make use of the right click->print which can be done on multiple files. Need to print all the files in a directory, simply ctrl+a, right click->print and it's done. Is there a way to do this in ubuntu? It bothers me a little when something is easier in windows. I realize I could probably "ls|xargs lpr" or "lpr *", but I'm looking for something from nautilus.

  2. #2
    Join Date
    Jul 2009
    Beans
    3

    Re: Right Click Print from Nautilus


  3. #3
    Join Date
    Oct 2006
    Location
    New York
    Beans
    1,118
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Right Click Print from Nautilus

    So I had tried something similar, namely just using lpr instead of cupsdoprint. I don't know what the advantages of one versus the other would be. However a command that works from the cli, doesn't seem to work when it's in this script. Any suggestions?

    Code:
    #!/bin/bash
    files=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
    echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS > ~/temp.txt
    lpr $files
    exit 0
    Is that it's not handling the spacing right? When I cat ~/temp.txt I see
    file name.txt
    where there's a space between file and name.
    Last edited by hwttdz; July 17th, 2009 at 05:30 PM.

  4. #4
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Right Click Print from Nautilus

    Post deleted by Kaibob. I don't think I understood the issue being raised by the OP.
    Last edited by kaibob; July 17th, 2009 at 06:26 PM.

  5. #5
    Join Date
    Sep 2009
    Beans
    11

    Re: Right Click Print from Nautilus

    Quote Originally Posted by hwttdz View Post
    So I had tried something similar, namely just using lpr instead of cupsdoprint. I don't know what the advantages of one versus the other would be. However a command that works from the cli, doesn't seem to work when it's in this script. Any suggestions?

    Code:
    #!/bin/bash
    files=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
    echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS > ~/temp.txt
    lpr $files
    exit 0
    Is that it's not handling the spacing right? When I cat ~/temp.txt I see
    file name.txt
    where there's a space between file and name.
    It won't work with files that have spaces in them. Solution with lpr: http://www.frenssen.be/content/print...-menu-nautilus

  6. #6
    Join Date
    Sep 2006
    Beans
    2

    Re: Right Click Print from Nautilus

    Maybe the best solution is to use Nautilus Actions.

    Install nautilus-actions package, execute the "Nautilus Actions Settings" from "System > Preferences" menu and add some action:

    Action Tab
    Nautilus Item
    Context Label : Print
    Display item in selection context menu
    Display item in location context menu (not needed)
    Action Properties: Enabled
    Command Tab
    Profile
    Label: Default
    Command:
    Path: lp
    Parameters: %M (click on the legend button to see additional info)
    Edit the other tabs information as you would like to your nautilus to behave.
    Save the action, restart nautilus and Bingo!
    Your context menu will show up "Print"...
    Last edited by isaquealves; December 12th, 2010 at 02:39 AM. Reason: Message appearance doesn't looks good!

  7. #7
    Join Date
    May 2010
    Location
    Georgia , USA
    Beans
    164
    Distro
    Ubuntu

    Re: Right Click Print from Nautilus

    isaquealves,

    you sir or madam are good.
    worked perfectly

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
  •