Article title: Allow remote Windows to access a local Linux printer. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
You don't need to talk about the CUPS service. anyone who has used linux knows what it is and how good it is! This is the most fundamental premise of this article.
Samba, of course, is more difficult to use, but today it is not the same. it is too powerful, complicated to configure, and more suitable for it.
Here I will talk about two methods: each has its own advantages and disadvantages.
1. use the RAW mode of cups.
2. use rdesktop to share the real printing of cups.
The first method has the following advantages: printer drivers can be printed as long as windows is supported;
The second method has the following advantages: it is not limited to LAN. as long as the client can access windows, windows can be found no matter where the linux client is.
The disadvantage is the opposite of each other's advantages. Of course, there is also a disadvantage, that is, it is fixed in linux client remote login.
Next we will talk about their configuration methods: Follow the features of the official original version.
I,
1. add a printer in linux. it is best to use the web (http: // localhost: 631) format.
2. select RAW mode when adding a driver.
3. edit/etc/cups/cupsd. conf to add the allowed windows CIDR block in the Location option.
4. edit/etc/cups/mime. convs and find the following line:
# Application/octet-stream application/vnd. cups-raw 0-
Remove comments.
5. edit/etc/cups/mime. type and find the following line:
# Application/octet-stream
In the same way as 4, remove comments.
6. switch to windows, add a printer, Network (http), and load the correct driver.
7. test.
II,
Rdesktop-r printer: printer configuration name = "Print driver name" remote host or ip address,
To add other parameters, see man online documentation. By the way, the following linux resources are shared to windows:
Rdesktop: in addition to bringing a local disk to the remote end, it also supports serial ports and printers. now the remote desktop client function on Windows is available in Linux. -R parameter format:-r comport: COM1 =/dev/ttyS0 // redirect serial/dev/ttyS0 to COM1-r comport: COM1 =/dev/ttyS0, COM2 =/dev/ttyS1 // redirect multiple serial ports-r disk: floppy =/mnt/floppy // redirect/mnt/floppy to remote shared disk 'floppy '-r disk: floppy =/mnt/floppy, cdrom =/mnt/cdrom, root =/, c =/mnt/c // redirect multiple disks-r clientname = // The client name displayed for the redirected disk settings-r lptport: LPT1 =/dev/lp0 // redirect the parallel port/dev/lp0 to the LPT1-r lptport: LPT1 =/dev/lp0, LPT2 =/dev/lp1 // multiple parallel port redirection-r printer: mydeskjet // printer redirection-r printer: mydeskjet = "HP LaserJet IIIP" // printer redirection-r sound: [local | off | remote] // sound redirection this is a situation where linux is accommodating windows, if The Server is also linux, it is necessary to learn about The Linux Terminal Server Project. Maybe one day some ERP systems in China can be migrated in Linux. The server is also completely replaced with linux, and there is no need to know the above two methods.