Virtual Machine sharing host virtual printer in Fedora17

Source: Internet
Author: User
Tags change settings
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 ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.