Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 03:53
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
need a little help making a script.
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

PostPosted: Thu 13 Oct 2005, 17:56    Post_subject:  need a little help making a script.  

Whats up guys? I am trying to make a script do something that might seem strange to you but I think it will be cool when I am all done. I have almost no script making skills but what I am trying to do isn't hard. I place the script into /usr/bin and call it lpr, the script code follows:

cp $1 /print/

simple enough right? all i want it to do is when i want to print someting (anything) it copys the file into the directory /print/ instead of actually printing anything. For some reason it's not working. I can do it but only if im in the /usr/bin directory. I can "lpr (name of file)" and it works fine of course when i am in /usr/bin, but if im at ~/ or something it says "Cant open lpr." Also when I use gui programs like abiword or mozilla i dont know what happens but the file doesnt end up in /print/ when i push the print button.

Any help would be good. thanks.
Back to top

Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Thu 13 Oct 2005, 18:53    Post_subject:  

Sounds to me like you need to use "/usr/bin/lpr (name of file)" instead of "lpr (name of file)"

Sometimes it just works like that Neutral

Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send_private_message Visit_website 
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Thu 13 Oct 2005, 20:18    Post_subject:  

to see what is happening, try putting this in the /usr/bin/lpr script:
echo "cp $1 /print/" >> /tmp/lpr.txt
xmessage -center "cp $1 /print/"
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0408s ][ Queries: 11 (0.0038s) ][ GZIP on ]