Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
CUPS/プリンター共有のソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
CUPS/プリンター共有
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:プリンター]] [[en:CUPS printer sharing]] [[ru:CUPS printer sharing]] {{Related articles start}} {{Related|Samba}} {{Related|CUPS}} {{Related articles end}} [[CUPS]] では他のシステムとのプリンタ共有を設定することができます。以下では一般的な設定例を説明しています。 ==GNU/Linux システム間== CUPS を GNU/Linux 印刷サーバーにセットアップした場合、他の GNU/Linux システムとプリンターを共有する方法としては比較的簡単なウェブインターフェイスを使うことが推奨されますが、手動で設定することもできます。 cupsd を再起動する前に avahi-daemon を実行する必要があります。 クライアントマシンでは Avahi の .local ホスト名解決を有効にする必要があります。有効にしていないと、クライアントは "Unable to locate printer" というエラーを表示して印刷ができません。詳しくは [[avahi#ホスト名の解決]] を見て下さい。 ===ウェブインターフェイスを使う=== Access http://localhost:631 with a browser and the CUPS administration home page will be displayed. Click on the ''Administration'' tab near the top, select the add printer option and it should automatically detect the connected printer. If not, try turning off the printer and then back on before another attempt. Once the printer has been set up, look under the ''Server'' heading and click the checkbox for "Share printers connected to this system". Now, conclude by clicking ''change settings'' and the server will automatically restart. Selecting "Edit Configuration File" allows making direct edits to the {{ic|cups.conf}} file. This is useful for allowing server access only to certain users or IP addresses, as the example shown below. ===手動セットアップ=== On the server computer (the one directly connected to the printer) simply open up {{ic|/etc/cups/cupsd.conf}} and allow access to the server by modifying the location lines. For instance: <Location /> Order allow,deny Allow localhost Allow 192.168.0.* </Location> Also make sure the server is listening on the IP address the client will be addressing. Add the following line after "# Listen <serverip>:631" (using the server's IP address instead of client's 192.168.0.100): Listen 192.168.0.101:631 To "Show shared printers on the local network" make sure you have the Browsing directive enabled: Browsing On After making modifications, restart CUPS. On the client system, open up (create if not present) {{ic|/etc/cups/client.conf}} and add the ServerName to match the IP address or the name of the server. Add this line: ServerName 192.168.0.101 There are more configuration possibilities, including automatic methods, which are described in detail in http://localhost:631/help/network.html <!-- Someone with CUPS installed could rename the link to the page title --> After making modifications, restart CUPS. {{Note|When adding the printer from the client, if using the Internet Printing Protocol (IPP), put the URI as ipp://192.168.0.101:631/printers/<name-of-printer>}} ====CUPS 1.5.x 以下のサーバーで CUPS 1.6.x クライアントを使う==== As of CUPS version 1.6, the client defaults to IPP 2.0. If the server uses CUPS <= 1.5 / IPP <= 1.1, the client does not downgrade the protocol automatically and thus cannot communicate with the server. A workaround (undocumented as of 2013-05-07, but see [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704238 this bug report]) is to put the following in {{ic|/etc/cups/client.conf}}: ServerName HOSTNAME-OR-IP-ADDRESS[:PORT]/version=1.1 ==GNU/Linux と Windows== ===Linux サーバー - Windows クライアント=== ====IPP で共有==== The '''preferred way''' to connect a Windows client to a Linux print server is using [[wikipedia:Internet_Printing_Protocol|IPP]]. It is a standard printer protocol based on HTTP, allowing you all ways to profit from port forwarding, tunneling etc. The configuration is '''very easy''' and this way is less error-prone than using Samba. IPP is natively supported by Windows '''since Windows 2000'''. To configure the server side proceed as described in the section above to enable browsing. On the Windows computer, go to the printer control panel and choose to 'Add a New Printer'. Next, choose to give a URL. For the URL, type in the location of the printer: http://''host_ip_address'':631/printers/''printer_name'' (where ''host_ip_address'' is the GNU/Linux server's IP address and ''printer_name'' is the name of the printer being connected to, you can also use the server's fully qualified domain name, if it has one, but you may need to set {{ic|ServerAlias my_fully_qualified_domain_name}} in ''cupsd.conf'' for this to work). {{Note|The add printer dialog in windows is quite sensitive to the path to the printer, the dialogue box itself suggests: <nowiki>http://servername:631/printers/printer_name/.printer</nowiki> which will work in a web-browser but '''not''' in the add printer dialogue. (At least, not when using cups as an ipp server). The syntax suggested above: <nowiki>http://host_ip_address:631/printers/printer_name</nowiki> '''will''' work.}} After this, install the native printer drivers for your printer on the Windows computer. If the CUPS server is set up to use its own printer drivers, then you can just select a generic postscript printer for the Windows client(e.g. 'HP Color LaserJet 8500 PS' or 'Xerox DocuTech 135 PS2'). Then test the print setup by printing a test page. ====Samba で共有==== If your client's Windows version is below Windows 2000 or if you experienced troubles with IPP you can also use Samba for sharing. Note of course that with Samba this involves another complex piece of software. This makes this way '''more difficult to configure''' and thus sometimes also '''more error-prone''', mostly due to authentication problems. To configure Samba on the Linux server, edit {{ic|/etc/samba/smb.conf}} file to allow access to printers. File {{ic|smb.conf}} can look something like this: {{hc|/etc/samba/smb.conf|2= [global] workgroup=Heroes server string=Arch Linux Print Server security=user [printers] comment=All Printers path=/var/spool/samba browseable=yes # to allow user 'guest account' to print. guest ok=no writable=no printable=yes create mode=0700 write list=@adm root yourusername }} That should be enough to share the printer, yet adding an individual printer entry may be desirable: {{hc|/etc/samba/smb.conf|2= [ML1250] comment=Samsung ML-1250 Laser Printer printer=ml1250 path=/var/spool/samba printing=cups printable=yes printer admin=@admin root yourusername user client driver=yes # to allow user 'guest account' to print. guest ok=no writable=no write list=@adm root yourusername valid users=@adm root yourusername }} Please note that this assumes configuration was made so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, set up a regular GNU/Linux account and then set up a Samba password on the server. For instance: # useradd yourusername # smbpasswd -a yourusername <!-- After setting up all the needed user accounts, the samba spool directory also needs configuration: {{bc| # mkdir /var/spool/samba # chmod 777 /var/spool/samba }} The next items that need changing are {{ic|/etc/cups/mime.convs}} and {{ic|/etc/cups/mime.types}}: {{ic|mime.convs}}: {{bc| # The following line is found at near the end of the file. Uncomment it. application/octet-stream application/vnd.cups-raw 0 - }} {{ic|mime.types}}: {{bc| # Again near the end of the file. application/octet-stream }} The changes to {{ic|mime.convs}} and {{ic|mime.types}} are needed to make CUPS print Microsoft Office document files. Many users seem to need that. --> After this, restart the Samba daemon. Obviously, there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so it is advised to look at the Samba and CUPS documentation for more help. The {{ic|smb.conf.example}} file also has some good samples that might warrant imitating. ===Windows サーバー - Linux クライアント=== {{Warning|CUPS cannot handle spaces in printer URIs. If your Windows printer name or user passwords have spaces, CUPS will throw "lpadmin: Bad device-uri" error}} ====LPD で共有==== Windows 7 has a built-in LPD server - using it will probably be the easiest approach as it does neither require an installation of ''Samba'' on the client nor heavy configuration on the server. It can be activated in the ''Control Panel'' under ''Programs'' -> ''Activate Windows functions'' in the section ''Print services''. The printer must have ''shared'' activated in its properties. Use a share name without any special characters like spaces, commas, etc. Then the printer can be added in CUPS, choosing LPD protocol. The printer address will look like this: # lpd://windowspc/printersharename Before adding the printer, you will most likely have to install an appropriate printer driver depending on your printer model. Generic PostScript or RAW drivers might also work. ====IPP で共有==== As above, IPP is also the '''preferred''' protocol for printer sharing. However this way might be a bit '''more difficult''' than the native Samba approach below, since you need a greater effort to set up an IPP-Server on Windows. The commonly chosen server software is Microsoft's Internet Information Services (IIS). {{Note|This section is incomplete. Here is a description how to set up ISS in Windows XP and Windows 2000, unfortunately in German [http://www.heise.de/netze/artikel/Ueberall-drucken-221652.html]}} ====Samba で共有==== A '''much simpler way''' is using Window's native printer sharing via Samba. There is almost no configuration needed, and all of it can be done from the CUPS Backend. As above noted, if there are any problems the reason is mostly related to authentication trouble and Windows access restrictions. On the server side enable sharing for your desired printer and ensure that the user on the client machine has the right to access the printer. The following section describes how to set up the client, assuming that both daemons (cupsd and smbd) are running. =====ウェブインターフェイスを使って設定===== The Samba CUPS back-end is enabled by default, if for any reason it is not activate it by entering the following command and restarting CUPS. # ln -s $(which smbspool) /usr/lib/cups/backend/smb Next, simply log in on the CUPS web interface and choose to add a new printer. As a device choose "Windows Printer via SAMBA". For the device location, enter: smb://username:password@hostname/printer_name Or without a password: smb://username@hostname/printer_name Make sure that the user actually has access to the printer on the Windows computer and select the appropriate drivers. If the computer is located on a domain, make sure the user-name includes the domain: smb://username:password@domain/hostname/printer_name If the network contains many printers you might want to set a preferred printer. To do so use the web interface, go into the printer tab, choose the desired printer and select 'Set as default' from the drop-down list. =====手動設定===== For manual configuration stop the CUPS daemon and add your printer to {{ic|/etc/cups/printers.conf}}, which might for example look like this {{hc|/etc/cups/printers.conf|2= <DefaultPrinter MyPrinter> AuthInfoRequired username,password Info My printer via SAMBA Location In my Office MakeModel Samsung ML-1250 - CUPS+Gutenprint v5.2.7 # <= use 'lpinfo -m' to list available models DeviceURI smb://username:password@hostname/printer_name # <= server URI as described in previous section State Idle Type 4 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 AllowUser yourusername # <= do not forget to change this OpPolicy default ErrorPolicy stop-printer </Printer> }} Then restart the CUPS daemon an try to print a test page. To set the preferred printer use the following command # lpoptions -d desired_default_printer_name ===トラブルシューティング=== If there are any problems, the first thing to do is enable debug information by setting {{bc|LogLevel debug}} in {{ic|/etc/cups/cupsd.conf}}. Then restart the CUPS daemon and check for error messages in {{ic|/var/log/cups/error_log}}. A convenient way to do so is # tail -f /var/log/cups/error_log which keeps printing new error messages as they occur. Note: You can also use the web interface to browse this error file. ====GTK アプリケーションで印刷できない==== gtk アプリケーションから印刷しようとすると "getting printer information failed" と表示される場合、{{ic|/etc/hosts}} に次の行を追加してください: # serverip some.name.org ServersHostname ==他のオペレーティングシステム== 他の印刷システムと CUPS を繋げる方法の詳細は CUPS マニュアルにあります。例: http://localhost:631/sam.html#PRINTING_OTHER
このページで使用されているテンプレート:
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
CUPS/プリンター共有
に戻る。
検索
検索
CUPS/プリンター共有のソースを表示
話題を追加