- Сетевая печать из Ubuntu в Windows
- Сетевая печать из Linux в Windows
- Windows принтер — Ubuntu
- Ubuntu принтер — Windows
- Проблемы при печати в Ubuntu linux
- Сетевая печать из Linux на Windows принтер используя SAMBA
- Ubuntu Documentation
- Overview
- Background
- Ubuntu print server
- Ubuntu print server compatible with Windows (Samba)
- Printing from Ubuntu
- Printing from Windows
- Troubleshooting
Сетевая печать из Ubuntu в Windows
Сетевая печать из Linux в Windows
настройка сетевой печати из Ubuntu в Windows
Windows принтер — Ubuntu
1. Устанавливаем стандартным образом принтер в Windows.
2. Проверяем печать.
3. Делаем общий доступ к данному принтеру.
4. В Ubuntu: Система -> Администрирование -> Печать
5. В открывшемся окне «Печать» кнопка «Добавить»: Сетевой принтер -> Windows Printer via Samba. Кнопка «Browse» открывает окно с выбором сети, компьютера и принтера.
Ubuntu принтер — Ubuntu (без Samba)
Если у Вас куплен принтер Hewlett Packard, желательно обновить пакет Hewlett-Packard’s Linux Imaging and Printing software (HPLIP). Инструкция по установке.Чтобы избежать проблем с печатью графики, советую поменять драйвер, устанавливаемый по умолчанию на pcl3.
1. Устанавливаем принтер в Ubuntu (192.168.0.1): Система -> Администрирование -> Печать
2. В открывшемся окне «Печать»: кнопка «Добавить». Система определяет подключенный к компьютеру принтер и устанавливает его. Если этого не произошло, обратитесь к документации по установке Вашего конкретного принтера.
3. Делаем общий доступ к данному принтеру. В окне «Печать» меню Сервер -> Settings. Ставим галки в пунктах:
-Show printers shared by other systems
-Pablish shared printers connected to this system
4. Нажимаем на установленный принтер и проверяем галки Shared
Теперь установим сетевой принтер на Ubuntu (192.168.0.2): Система -> Администрирование -> Печать
5. В открывшемся окне «Печать»: кнопка «Добавить».
6. В открывшемся окне «Печать» кнопка «Добавить»: Сетевой принтер -> Проткол сетевой печати (ipp). В поле «Host» пишем: http://192.168.0.1:631/printers/Laserjet-2300 . Вместо «Laserjet-2300» пишем название Вашего принтера (точно так, как назван на компьютере 192.168.0.1). Поле «Queue» оставляем пустым. Нажимаем на кнопку «Verify» для проверки доступности принтера.
Ubuntu принтер — Windows
1. Устанавливаем принтер в Ubuntu (192.168.0.1): Система -> Администрирование -> Печать
2. В открывшемся окне «Печать»: кнопка «Добавить». Система определяет подключенный к компьютеру принтер и устанавливает его. Если этого не произошло, обратитесь к документации по установке Вашего конкретного принтера.
3. Делаем общий доступ к данному принтеру. В окне «Печать» меню Сервер -> Settings. Ставим галки в пунктах:
-Show printers shared by other systems
-Pablish shared printers connected to this system
4. Нажимаем на установленный принтер и проверяем галки Shared
Теперь установим сетевой принтер на Windows (192.168.0.2): Пуск -> Настройка -> Принтеры и факсы.
В открывшемся окне «Принтеры и факсы»: «Установка принтера» -> Далее -> Сетевой принтер или принтер подключенный к другому компьютеру -> Подключиться к принтеру в Интернете, в домашней сети или в интрасети. В поле вводим http://192.168.0.1:631/printers/Laserjet-2300 . Вместо «Laserjet-2300» пишем название Вашего принтера (точно так, как назван на компьютере 192.168.0.1).
Данная статья внесена в Ubuntu Wiki по-русски: Предоставление общего доступа к принтеру
Проблемы при печати в Ubuntu linux
У пользователей Ubuntu подсоединённых по локальной сети к Windows машине с общим принтером часто возникают серьёзные проблемы при печати и эта заметка должна помочь справится с ними.
Давайте рассмотрим ситуацию, пусть у нас есть компьютер c Ubuntu 192.168.0.2 на нёмSamba с системой печати CUPS и он по локальной сети подключен к компьютеру с Windows XP192.168.0.1 у которого в свою очередь есть принтер LaserJet 6P на LPT1 порту, расшарен и имеет сетевое имя HPLaserJ. Нам надо печатать документы с машины Ubuntu на этом принтере.
Попытаемся решить эту задачу тривиальным способом Система -> Администрирование -> Печать тамСоздать — Принтер выскакивает окошко Новый принтер -> в Укажите подключение левая панельУстройства выбираем Windows Printer via Samba жмём кнопку Обзор выбираем машину с XP 192.168.0.1 и о ужас там нет нашего расшаренного принтера! Что же делать? Можно например руками прописать в строкуsmb://[рабочая_группа/]сервер[:порт]принтер. Новички в использовании Ubuntu спросят а где им взять рабочую группу? Cервер понятно 192.168.0.1, порт где его брать? Принтер тоже вроде понятно это его расшаренное имя т.е. HPLaserJ.
И в общем получилось у такого пользователя нечто вроде
Аутентификация оставил такой пользователь Запрашивать, если требуется аутентификация
вроде всё, но если нажать кнопку Проверить то связь с принтером отсутствует и значит введённые нами значения не верны! И как бы мы не изгалялись и не рвали свою жопу на фашистский знак связи нет с принтером и не будет и как быть? Чтобы больше не видеть
при попытке отправить задание на печать!
Решения есть два!
Первое пригодно для случая когда на виндовз машинке есть пользователь Guest, т.есть включена запись гостя.
Тогда всё сводится к тому что в строку
Аутентификация -> Ввести параметры аутентификации -> Имя пользователя guest Пароль не вписываем жмём проверить, о ура ура принтер подключен!! Жмём кнопку Далее указываем производителя принтера HP ещё далее выбираем драйвер для LserJet 6P и т.д.
Не забываем после установки зайти в свойства принтера Управление доступом и там задать Разрешить печать всем, кроме указанных пользователей!
Решение второе пригодно для случая когда на виндовз машинке нет пользователя Guest, т.есть выключена запись гостя.
Тогда всё сводится к тому, что в строку smb:// записываем WORKGROUP/192.168.0.1/HPLaserJ
Аутентификация -> Ввести параметры аутентификации -> Имя пользователя winpolzovatel на машине192.168.0.1 Пароль пароль winpolzovatelя и если проверить даёт положительный результат дальше действуем по известной схеме.
Правда бывают моменты, когда и этих действий недостаточно, что же тогда?
Тогда собираем свою волю в кулак и поступаем следующим образом.
Для начала проверяем действительно ли на Windows машине рабочая група WORKGROUP если нет выясняем какая на самом деле и ставим такую же на машине с Ubuntu для этого в терминале
Теперь открываем браузер Firefox и пишем 127.0.0.1:631 в строке адресса жмём Enter попадаем Common UNIX Printing System
здесь жмём Add Printer указываем
Name: HPLaserJet6P
(May contain any printable characters except «/», «#», and space)
Location: HPLaserJet 6P Windows Comp
(Human-readable location such as «Lab 1»)
Description: Printer который меня замучал
(Human-readable description such as «HP LaserJet with Duplexer»)
Далее Device for HPLaserJet6P
Device: Windows Printer via Samba
Далее Device URI for HPLaserJet6P
Для первого случае есть guest
Device URI:smb://guest@192.168.0.1/HPLaserJ
для второго случая нет guest или guest не пашет ка нужно или авторизация через домен
используем формулу 🙂
для нашего случая
далее выбираем имя производителя на странице Make/Manufacturer for HPLaserJet6P это в нашем случаеHP
далее драйвер модели на странице Model/Driver for HPLaserJet6P — понятно что это драйвера HPLaserJet6P
далее выскакивает окно аутентификации проверяющее вас на принадлежность sudo вводите данные суперпользователя Ubuntu и пароль
Printer HPLaserJet6P has been added successfully.
Переходим на вкладку Printers и печатаем тестовую страницу — Print Test Page
Сетевая печать из Linux на Windows принтер используя SAMBA
Задача: есть принтер, подключённый к машине Windows по локальной сети, и есть компьютер с Linux и установленной там системой печати CUPS. Нужна печатать с Linux-машины на Windows-машину.
Решение: с помощью веб-формы CUPS добавляем принтер в Linux и указываем логин guest для печати на Windows машину.
Рассматривать будем на рабочем примере: есть компьютер под Windows XP по адресу 192.168.1.1, на нём по SAMBA виден расшаренный принтер LaserJet 1200, который имеет сетевое имя HPLaserJ. С других машин под Windows печать на него идёт, но через CUPS при попытке отправить задание на печать вылезает ошибка.
При использовании SMB протокола пишет:
Connection failed with error NT_STATUS_ACCESS_DENIED
Если пытаюсь печатать через IPP, получаю:
Unable to connect to SAMBA host, will retry in 60 seconds. foomatic-rip version $Revision$ running.
Пароля на принтеры нет.
Решение проблемы просто до смешного. Добавляем в веб-форме CUPS принтер, как сказано здесь, выбираем способ подключения Windows printer via Samba. Далее в строке адреса пишем:
И всё! Печать пошла!
И почему в гигантской, хотя и бестолковой, документации CUPS это не выделено ярким шрифтом?
В приложениях KDE нужно выставить адрес службы печати на локальный: 127.0.0.1:631.
Если же в вашей Windows-машине используется авторизация через домен, то надо в строке адреса указывать пароль и имя пользователя.
Во избежание излишних нервных перенапряжений, не рекомендую пользоваться именами принтеров с пробелами и кириллицей.
Источник
Ubuntu Documentation
Overview
Ubuntu supports printer sharing over networks, so you can print from your Ubuntu machine, your Windows machine, etc, to another Ubuntu or Windows machine that has a printer attached (ie a «Ubuntu print server» or «Windows print server»).
Background
Ubuntu uses the Common UNIX Printing System («CUPS») to handle printing. CUPS uses the Internet Printing Protocol («IPP») as the basis for managing print jobs and queues. Other protocols are also supported (LPD, SMB, AppSocket a.k.a. JetDirect), some with reduced functionality.
CUPS printer configuration and management is handled by the Printer Admin utility launched from the Gnome menu — System -> Administration -> Printing (If the menu item does not exist you need to add the command system-config-printer to the menu). Also IPP provides web services so after you have configured CUPS appropriately, you can access the printers and jobs via your web browser.
When a locally attached printer is defined, eg using the Printer Admin utility, that printer is automatically published from this «print server» host to the network, depending on the server directives in the CUPS configuration file. A remote Ubuntu «client» host can then be able to see and use the printer attached to the server. The network printer automatically appears in the client’s Printer Admin utility. It simply pops up if CUPS is up and configured correctly and disappears if you stop CUPS at either the Print Server or your local machine.
Ubuntu print server
The Print Server is the Ubuntu computer that is directly connected to the printers.
On the server machine (the one the printer is attached to), open System -> Administration -> Printing (If the menu item does not exist you need to add system-config-printer to the menu). . This will open the Printer Configuration window.
Select Server in the menu bar, and then Settings. This will open the Basic Server Settings window.
Check the second box:
Publish shared printers connected to this server If this computer acts as both a Print Server and a client (it does need access to a printer connected to another computer), select also the first box, «Show printers shared by other systems».
OK
Right click the printer and check the Shared option, if not checked yet
Check that users that you want to be able to use the printer are not excluded. See Properties>Access Control. The default settings may be set to «deny printing for everyone except . »
.
But you might want to «allow printing for everyone».
Ubuntu print server compatible with Windows (Samba)
If your Ubuntu print server shall be able to work also with Windows clients, you must first make sure that the SAMBA package is installed (e.g. using Synaptic package manager). Then, do a little configuration change to SAMBA. In brief, you must uncomment the following lines in /etc/samba/smb.conf — open terminal and run:
In the [printers] section:
When done, restart Samba:
Also, one would want to allow the following ports through a firewall (ufw for example) via:
For more on this, please see here.
Printing from Ubuntu
Now let’s configure the client (the Ubuntu computer from where you want to print):
System -> Administration -> Printing
Add — Network printer
Click Find network printer
- Specify the host IP address or name. (It may also work without, try) (IP address worked for me, hostname did not.)
Click Find
- BUT if both protocols are available, e.g. because you have shared your printer on a Linux box both using CUPS and Samba, prefer CUPS (ipp://) over Samba (smb://), because you won’t be prompted to install a driver in general.
- (to be done) What to do if driver is not in the list
Printing from Windows
Once your Ubuntu print server is set up using SAMBA as described above, you can add the printer in Windows as follows:
- Start
- Devices and Printers
- Add a printer
- Add a network, wireless or Bluetooth printer
Click The printer that I want isn’t listed (unless a miracle happens)
Enter the address manually (\\servername\MyPrinter). Be sure to respect uppercase/lowercase.
Note that searching or browsing for printers in Windows is notoriously unreliable, as it heavily depends on the network setup. Therefore, it is recommended to enter the printer address manually as shown.
Windows will then probably complain about a missing driver, and offer you to choose one manually. This is the easiest option, so select your printer manufacturer and model from the dialog box. (Alternatively, the Samba configuration could be improved so that the driver would be automatically downloaded.) If your printer model isn’t listed, you may try the «Generic» printer.
Tips: You can avoid intermediate SAMBA buffer using direct connection to CUPS/IPP Ubuntu server from Windows workstation. You should manually specify «http://hostname:631/printers/MyPrinter» IPP URL and select printer driver.
Windows print dialog window (Ctrl-P) can take long time (about 30 seconds) to appear. You can reduce the connection time to CUPS IPP printer by disabling option Automatically detect settings in «Control Panel/Internet Explorer -> Internet Options -> Connections -> LAN settings».
Troubleshooting
1. Bypassing firewall.
If there is an firewall either on print server or the client side, there might appear a communications problem. Use this command to update the firewall to get through.
iptables -A INPUT -p tcp —dport 631 -j ACCEPT
- This rule is used for IPP only. If you’re using other protocol, such as SAMBA, you have to adapt.
You might need to use this rule on both sides (server & client) if the firewall is being used on both of them. To apply this rule after each start/restart of the system, use /etc/rc.local .
2. Networking issues.
Be careful about using different network masks/subnets on your network where you would like to share the printer.
If the subnets differs, e.g. on the print server there would be a /24 (255.255.255.0) netwok mask configured, and e.g. on the clients there would be a /16 (255.255.0.0) network mask — perhaps provided by the DHCP server, this might cause a problem that clients won’t be able to detect any shared printer on the server, even if other communications between print server and clients would be possible (e.g. ICMP, ssh) and successful.
If such situation happens, you have to unify the network masks/subnets on all of your stations, e.g. use /24 (255.255.255.
3. IP address
Generally, it is a good idea to assign your print server a static IP address. Instead, using its host name is also possible, but functionality will then depend on proper configuration of your home router, name service, etc.
4. IPv6 Windows (since XP) can print over IPv6 to Ubuntu Linux (tested between Windows XP SP3 and Ubuntu Linux 8.10). Make sure both the Windows and Ubuntu have IPv6 connectivity. You should tick «Allow Printing from the Internet» on the Ubuntu machine. Then use the URL (which resolves to IPv6) of the Ubuntu machine as described above.
5. Mac OS X 10.5.
Will not find your network printer unless you go to the terminal and run cupsctl BrowseRemoteProtocols=cups (see the CUPS 1.4 documentation at http://www.cups.org/documentation.php/doc-1.4/sharing.html). After doing so, you may need to set the network printer as your default printer for it to show up in program «print» menus.
NetworkPrintingWithUbuntu (последним исправлял пользователь penalvch 2015-03-31 03:53:29)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
Источник