[ubuntu-uk] Sharing printer with Cups on Ubuntu server
Daniel Lamb
daniel.lamb at openyourwindows.com
Fri Apr 11 23:45:12 BST 2008
On top of that if you want a nice little script i have attached one here
I found and have used.
Simply add a bat extension at the end and it will map the printer
automatically to your windows pc.
If you need any help with writing it let me know.
Works very well.
Regards,
Daniel
On Fri, 2008-04-11 at 21:41 +0100, Mark Allison wrote:
> http://ubuntuguide.org/wiki/Ubuntu:F...indows_machine
> http://ubuntuguide.org/wiki/Ubuntu:F...Ubuntu_machine
>
> Enjoy. I have a print server set up on Ubuntu server serving Mac OS
> Leopard, Ubuntu clients, XP and Vista.
>
>
> On Fri, Apr 11, 2008 at 6:56 PM, Rob Beard <rob at esdelle.co.uk> wrote:
>
> Andrew Oakley wrote:
> > Rob Beard wrote:
> >> (possibly 7.10 to start with and then 8.04 when it's
> released in a
> >
> > 8.04 is as stable as damnit right now. I've been testing it
> since
> > December, and as of about two weeks ago (Beta), I have had
> no instabilities.
> >
>
>
>
> I guess, it seems fairly stable on my desktop and since it's
> not doing
> anything mission critical then I'm sure it'll be fine.
>
> I've just had a look at the printer, I didn't realise it's a
> printer/scanner/copier!
>
> It is supported on Linux (it's a Samsung CLX-2160 Colour
> Laser/Scanner/Copier) which is supplied with Linux drivers.
> Sods law
> though I bet installing the Linux drivers will only allow me
> to print
> from Windows and not scan from the Windows machine over the
> network.
>
> Saying that though, Samsung do have a networked version of the
> printer
> so maybe it's possible.
>
> I'll have a look at the Windows driver and see what it says.
>
> Rob
>
>
>
> --
> ubuntu-uk at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.ubuntu.org/UKTeam/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20080411/d96f90b9/attachment-0001.htm
-------------- next part --------------
:: Example XP CMD script to install a cups printer.
:: 12 Oct 2006 I hereby place this script in the public domain, nyer.
:: ~~ The Anonymous Author (yes, me!).
:: The script will work happily from remote SAMBA shares even without
:: mapping them to a drive letter. It expects the needed files to live
:: in subdirectories with names that you can figure out, see below.
:: Uses path variable %~dp0 documented at
:: http://www.ss64.com/ntsyntax/parameters.html
:: This is because CMD doesn't like using a UNC path as the current
:: directory.
:: Note that XCOPY doesn't like \\ in the middle of a path.
:: %~dp0 includes \ at the end.
:: But %~dp0somefile.ext is unreadable to humans.
:: XCOPY doesn't mind \.\ in the middle of a path.
:: %~dp0.\somefile.ext is more visually readable.
:: Set some variables to make modifying this script easier.
:: Substitute values here to match your CUPS server.
SET SERVERNAME=cups
SET PRINT_SERVER=http://%SERVERNAME%.example.com
SET PRINT_BASE_URL=%PRINT_SERVER%:631/printers
:: Set the CUPS printer name here for the (first) printer to install.
SET PRINTERNAME=my_printer
:: Set file locations here. (Tests if the file is accessible too.)
SET INF=%~dp0.\cups_unified_driver\cups-windows-6.0\i386\cups6.inf
IF NOT EXIST "%INF%" EXIT /b 1
:: This next value matches something in the .inf file.
:: Easy to figure out what.
:: Tip: Use notepad to open your .inf and guess it.
SET STRING=CUPS Test Driver v6
:: You may want to shorten this a little, depends on your setup.
SET BASENAME=%PRINTERNAME%_using_cups_driver_on_%SERVERNAME%_ipp
:: This doesn't need change unless you have a wierd CUPS setup.
SET URL=%PRINT_BASE_URL%/%PRINTERNAME%
:: Now the action! Install the (first) printer.
:: Install and configure printer driver.
"%WINDIR%\System32\RUNDLL32.EXE" printui.dll,PrintUIEntry /b "%BASENAME%" /if /f "%INF%" /u /r "%URL%" /m "%STRING%"
IF NOT "ERRORLEVEL %ERRORLEVEL%"=="ERRORLEVEL 0" EXIT /b 1
:: You can add more printers in here...
:: .... repeat from "SET PRINTERNAME..." onwards if you want ...
:: Finally, once all printers added, restart the printer service.
START /WAIT "Stop spooler" "%WINDIR%\System32\SC.EXE" STOP spooler
IF NOT "ERRORLEVEL %ERRORLEVEL%"=="ERRORLEVEL 0" EXIT /b 1
START /WAIT "Start spooler" "%WINDIR%\System32\SC.EXE" START spooler
IF NOT "ERRORLEVEL %ERRORLEVEL%"=="ERRORLEVEL 0" EXIT /b 1
ECHO Completed %100, no errors detected.
More information about the ubuntu-uk
mailing list