“UbuntuHelp:HOWTO-enable-cups-browsing”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第3行: | 第3行: | ||
This is quick and dirty HOWTO for CUPS browsing on server. This HOWTO is for some specific issues, ~+'''it should NOT be used'''+~ unless you are testing those issues. ~+'''It leaves CUPS unprotected'''+~. Moreover, anyone can | This is quick and dirty HOWTO for CUPS browsing on server. This HOWTO is for some specific issues, ~+'''it should NOT be used'''+~ unless you are testing those issues. ~+'''It leaves CUPS unprotected'''+~. Moreover, anyone can | ||
print on printers on that server, there is no page counting, etc... | print on printers on that server, there is no page counting, etc... | ||
− | |||
Original from: http://www.grad.hr/~ivoks/ubuntu/cups/HOWTO-enable-browsing | Original from: http://www.grad.hr/~ivoks/ubuntu/cups/HOWTO-enable-browsing | ||
− | |||
[[User:Wikibot|Wikibot]] So, um... what's the correct way to do this, then? [[User:Wikibot|Wikibot]] | [[User:Wikibot|Wikibot]] So, um... what's the correct way to do this, then? [[User:Wikibot|Wikibot]] | ||
− | |||
=== I. Server is Ubuntu Breezy === | === I. Server is Ubuntu Breezy === | ||
− | |||
− | |||
Open terminal and type: | Open terminal and type: | ||
<pre><nowiki> | <pre><nowiki> | ||
第16行: | 第11行: | ||
cat /etc/cups/cupsd-browsing.conf | cat /etc/cups/cupsd-browsing.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
(it should print Browsing On; if not, open that file and edit it) | (it should print Browsing On; if not, open that file and edit it) | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
gksudo gedit /etc/cups/cupsd.conf | gksudo gedit /etc/cups/cupsd.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
When file opens in gedit, search for line "Listen". It should be: | When file opens in gedit, search for line "Listen". It should be: | ||
<pre><nowiki> | <pre><nowiki> | ||
第31行: | 第23行: | ||
Listen IP_ADDRESS_OF_SERVER:631 | Listen IP_ADDRESS_OF_SERVER:631 | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
There shouldn't be any other Listen or Port directive (at least not uncommented). Next is: | There shouldn't be any other Listen or Port directive (at least not uncommented). Next is: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
BrowseAddress | BrowseAddress | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
it should be: | it should be: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
BrowseAddress @LOCAL | BrowseAddress @LOCAL | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Comment out all <code><nowiki>BrowseOrder</nowiki></code> directives, at least for now. Make sure <code><nowiki>BrowseInterval</nowiki></code> is 30. Next is: | Comment out all <code><nowiki>BrowseOrder</nowiki></code> directives, at least for now. Make sure <code><nowiki>BrowseInterval</nowiki></code> is 30. Next is: | ||
<pre><nowiki> | <pre><nowiki> | ||
第52行: | 第39行: | ||
</Location> | </Location> | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
This is how "/" location should look like. | This is how "/" location should look like. | ||
− | |||
Restart cups: | Restart cups: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/cupsys restart | sudo /etc/init.d/cupsys restart | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
=== II. Server is Ubuntu Dapper === | === II. Server is Ubuntu Dapper === | ||
− | |||
− | |||
Open terminal and run: | Open terminal and run: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo /usr/share/cups/enable_browsing 1 | sudo /usr/share/cups/enable_browsing 1 | ||
− | |||
sudo /usr/share/cups/enable_sharing 1 | sudo /usr/share/cups/enable_sharing 1 | ||
− | |||
cat /etc/cups/cups.d/ports.conf | cat /etc/cups/cups.d/ports.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
You should see: | You should see: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
Listen 631 | Listen 631 | ||
Listen /var/run/cups/cups.sock | Listen /var/run/cups/cups.sock | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Now do | Now do | ||
<pre><nowiki> | <pre><nowiki> | ||
cat /etc/cups/cups.d/browse.conf | cat /etc/cups/cups.d/browse.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
You should see: | You should see: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
Browsing on | Browsing on | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Restart cups: | Restart cups: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/cupsys restart | sudo /etc/init.d/cupsys restart | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
=== III. Other Linux distribution or Mac OSX === | === III. Other Linux distribution or Mac OSX === | ||
− | |||
− | |||
On other operating systems, you should mostly follow instructions for Breezy. Only thing that's different is that there is no /etc/cups/cupsd-browsing.conf or /usr/share/cups/enable_browsing. | On other operating systems, you should mostly follow instructions for Breezy. Only thing that's different is that there is no /etc/cups/cupsd-browsing.conf or /usr/share/cups/enable_browsing. | ||
− | |||
It's important to make sure there is a line with Browsing On in /etc/cups/cupsd.conf and other relevant directives (see Ubuntu Breezy instructions). | It's important to make sure there is a line with Browsing On in /etc/cups/cupsd.conf and other relevant directives (see Ubuntu Breezy instructions). | ||
− | |||
Restart cups. | Restart cups. | ||
− | |||
---- | ---- | ||
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] | [[category:CategoryDocumentation]] [[category:CategoryCleanup]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 17:39的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This is quick and dirty HOWTO for CUPS browsing on server. This HOWTO is for some specific issues, ~+it should NOT be used+~ unless you are testing those issues. ~+It leaves CUPS unprotected+~. Moreover, anyone can print on printers on that server, there is no page counting, etc... Original from: http://www.grad.hr/~ivoks/ubuntu/cups/HOWTO-enable-browsing Wikibot So, um... what's the correct way to do this, then? Wikibot
I. Server is Ubuntu Breezy
Open terminal and type:
sudo /usr/share/cups/enable_browsing 1 cat /etc/cups/cupsd-browsing.conf
(it should print Browsing On; if not, open that file and edit it)
gksudo gedit /etc/cups/cupsd.conf
When file opens in gedit, search for line "Listen". It should be:
Listen 631
or
Listen IP_ADDRESS_OF_SERVER:631
There shouldn't be any other Listen or Port directive (at least not uncommented). Next is:
BrowseAddress
it should be:
BrowseAddress @LOCAL
Comment out all BrowseOrder
directives, at least for now. Make sure BrowseInterval
is 30. Next is:
<Location /> Order Deny,Allow Allow From @LOCAL Deny From All </Location>
This is how "/" location should look like. Restart cups:
sudo /etc/init.d/cupsys restart
II. Server is Ubuntu Dapper
Open terminal and run:
sudo /usr/share/cups/enable_browsing 1 sudo /usr/share/cups/enable_sharing 1 cat /etc/cups/cups.d/ports.conf
You should see:
Listen 631 Listen /var/run/cups/cups.sock
Now do
cat /etc/cups/cups.d/browse.conf
You should see:
Browsing on
Restart cups:
sudo /etc/init.d/cupsys restart
III. Other Linux distribution or Mac OSX
On other operating systems, you should mostly follow instructions for Breezy. Only thing that's different is that there is no /etc/cups/cupsd-browsing.conf or /usr/share/cups/enable_browsing. It's important to make sure there is a line with Browsing On in /etc/cups/cupsd.conf and other relevant directives (see Ubuntu Breezy instructions). Restart cups.