Today, virtual printing is suddenly needed in the virtual machine, so it is a bit difficult to avoid too much software installed in the virtual machine, occupying space. In Fedora17, the practice is as follows: 1. first install the virtual printer and virtual Nic tool: yuminstallcupscups-pdftunctl2. open the port: Manage-& gt; firewall, check the network printing server 3. configure the printer in the browser. The URL is localhost: 631. Click Administration and select Shar.
Today, virtual printing is suddenly needed in the virtual machine, so it is a bit difficult to avoid too much software installed in the virtual machine, occupying space,
In Fedora 17, the procedure is as follows:
1. First install the virtual printer and virtual Nic tool:
Yum install cups-pdf tunctl
2. Open the Port:
Manage-> firewall, select network printing server
3. Configure the printer in the browser:
The URL is localhost: 631
Click Administration and check Share printers connected to this system, Allow printing from the Internet, Allow users to cancel any job (not just their own)
Click change settings
4. Create a virtual NIC:
A. Modify/etc/sysctl. conf.
Where:
Net. ipv4.ip _ forward = 1
Bnew file/etc/rc. d/rc. local
Input:
#! /Bin/bash
Tunctl-t tap0
Ifconfig tap0 10.0.2.2 netmask 255.255.255.0 up
Iptables-t nat-a postrouting-o p35p1-s 10.0.2.0/24-j MASQUERADE
P35p1 is the Network Card Name of your machine.
Save and add the running permission.
C. restart the computer
5. Configure VirtualBox:
Network> network adapter 1> enable network connection> bridge> tap0
Enable Nic 2 and use NAT
6. Configure the virtual machine:
Assume a is an XP system. After entering the system, open the network connection. Configure the IP address 10.0.2.x for the corresponding configuration of network adapter 1, and set the IP address to 10.0.2.x. Set the IP address to be greater than 2. netmask2017255.255.0. You can disable DNS configuration.
B. in IE, enter Hypertext Transfer Protocol: two bars 10.0.2.2: 631. The cups page is displayed. click printers and click cups-pdf.
C. Copy the website, choose "Printer" and "fax"> "right-click" Add Printer ">" Network Printer ">" printer connected to the Internet, home, and office networks ">" paste address ">" Generic "and" Microsoft color printer "as the printer driver item
D. Share the/var/spool/cups-pdf/ANONYMOUS directory of the host.
Then you can proceed ~