LP - Cups - Samba - Print Command
I have an Epson 880 on my windows workstation. I have this shared through cups using samba. This configuration works fine. I can print to the printer without any issues.
The problem is that when I lp something the left margin is always cuts off the first character.
Now I have found a work around using -o page-left=25. Example
----
man tar | lp -dpkraus -o page-left=25
This corrects the issue. However I would like it to do this automatically.
I have tried to edit the smb.conf file with the print command but it does not seem to change anything. Here is my smb.conf
*On a side note why can't I open Linux conf files with notepad? There are strange characters. I have to open it with WordPad. I can not save or edit using either notepad or WordPad because they seem to add strange characters also. Just curious.*
------
# Samba config file created using SWAT
# from Redhat-Fax (127.0.0.1) # Date: 2002/10/01 10:53:56
# Global parameters
[global]
workgroup = PELNET
netbios name = REDHAT-FAX
netbios aliases = Redhat 7.3 Fax System
server string = Samba Server
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n
*passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 dns proxy = No
printing = cups
print command = lp -P %p -o page-left=25 %s -r
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[root]
comment = Root System
path = /
valid users = @root,pdk
admin users = pdk
[pkraus]
path = /var/spool/samba
read only = No
printable = Yes
print command = lpr -r -P%p %s -o left-page=25 printer name = pkraus
oplocks = No
Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
At 11:15 AM 10/1/02 -0400, Paul Kraus wrote:
[...]
Quoted 4 lines
*On a side note why can't I open Linux conf files with notepad? There are strange characters. I have to open it with WordPad. I can not save or edit using either notepad or WordPad because they seem to add strange characters also. Just curious.*
The problem you are seeing has to do with difference in the ways different operating systems mark the end of line (EOL) in text files. Unix/Linux systems use ascii 10 (CTRL-J) to mark end of line, while Windows systems use the two-character sequence ascii 13, ascii 10 (CTRL-M,CTRL-J) that was established by MS-DOS. (I *think* Macs use yet another EOL label, just CTRL-M, but I may be remembering that wrong, or OS-X may have switched it.)
If you open a Linux text file on a Windows system without first concerting it to Windows-format text, you run the risk that the program you open it in will not recognize the EOL markers. This is what happens to you with Notepad. Wordpad is smarter and recognizes both possible EOL markers ... but it you edit and save in Wordpad, it might change the EOL to Windows style, which will cause it to look funny in Linux text editors (lotsa ^M characters), and not work if it is an executable.
Linux has programs called "todos" and "fromdos" to change the EOL markings. This is also the fix that, for example, http clients do when downloading/uploading mime-type text files and ftp clients do when transferring in text (A) mode.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 6 lines
*On a side note why can't I open Linux conf files with notepad? There are strange characters. I have to open it with WordPad. I can not save or edit using either notepad or WordPad because they seem to add strange characters also. Just curious.*
Its the Line Feed/Carriage Return problem.
*nix does it one way MS another.
Notepad doesn't like displaying it.
The answer is to get a decent editor that can open/save files in its native format. If your used to vi on *nix then the latest MS version is a great relief.
See www.vim.org for all things vim.
I think Notetab at www.notetab.com is good at native file support if you don't want vi.
On my own side note most conf file reside in /etc and you want to be careful about sharing conf files even in a trustworthy network.
--
Carl
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs