Thread
:
nPrint - simple printing solution for N8X0'rs!
View Single Post
linux_author
2008-02-24 , 15:14
Posts: 282 | Thanked: 69 times | Joined on Dec 2007 @ Penniless Park, Fla.
#
9
- i know it's bad form to post a reply to one's own post, but as an update on this feeble-minded printing solution:
i added an ash 'read' statement to the original script, and hardwired in a user- and hostname:
#!/bin/sh
# printit.sh - simple print for 770, n8x0
echo "File to print:"
read file
cat $file | ssh a_user@remote_box '( lpr )'
exit 0
- the desktop entry:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=printit
Exec=/home/user/apps/printer.sh
Icon=qgn_list_gene_default_app
- and an osso-xterm one-liner (which gets around a convoluted '-e' osso-xterm option command line) named printer.sh and stored under /home/user/apps:
#!/bin/sh
/usr/bin/osso-xterm -e /home/user/apps/printit.sh
- selecting the printit menu item opens an osso-xterm window which prompts for a filename (type full pathname to the file, such /home/user/MyDocs/foo.pdf or /media/mmc1/mypics/foo.gif), and then waits for an ssh password prompt on the remote box (OS X, *BSD, or Linux) hosting the *nix print server and lpr command...
- i guess one could put in an 'ls' command for a specific directory before prompting for the filename as a reminder - perhaps:
ls /home/user/print_folder/
- anyhow, now i have printing off the task menu!
- hope this helps someone!
Quote & Reply
|
The Following 2 Users Say Thank You to linux_author For This Useful Post:
debernardis
,
timsamoff
linux_author
View Public Profile
Send a private message to linux_author
Find all posts by linux_author