maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Printing with N900 (https://talk.maemo.org/showthread.php?t=56932)

theonelaw 2011-01-25 05:09

Re: Printing with N900
 
Quote:

Originally Posted by rotoflex (Post 927521)
Thank you, but I am now getting a connection refused when I try to reach http://localhost:631/

I removed then re-installed cups & edited the cupsd.conf file, but still can't bring it up. Any ideas?

My hack approach was drowning in permission problems,
so I went into cupsd.conf and set everything wide open
(which violates everything you would ever want to do security-wise,
but my goal was just to 'make this work' :( and go back and sort out
why libpam and the permissions game :rolleyes: are not working later)

allow root
allow localhost
order allow, deny

I had to chmod virtually everything in /etc/cups to 755

here is my cupsd.conf file:
Code:

#
#
#  Sample configuration file for the Common UNIX Printing System (CUPS)
#  scheduler.  See "man cupsd.conf" for a complete description of this
#  file.
#

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel warning

Printcap /etc/printcap


# Administrator user group...
SystemGroup lpadmin


# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow root
  Allow all
</Location>

# Restrict access to the admin pages...
<Location /admin>
#  AuthType BasicDigest
#  AuthClass Group
#  AuthGroupName lpadmin
#  Encryption Required
  Order allow,deny
  Allow localhost
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
#  AuthType Default
#  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
#    Require user @OWNER @SYSTEM
    Order allow,deny
    Allow localhost
    Allow root
    Allow all
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
#    AuthType Default
#    Require user @SYSTEM
    Order allow,deny
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
#    AuthType Default
#    Require user @SYSTEM
    Order deny,allow
    Allow localhost
    Allow root
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
#    Require user @OWNER @SYSTEM
    Order allow,deny
    Allow localhost
    Allow root
    Allow all
  </Limit>

  <Limit All>
    Order allow,deny
    Allow localhost
    Allow root
    Allow all
  </Limit>
</Policy>
#
#

there are possibly other things I neglected to mention,
but my focus was on getting this to work
so if you have problems just ask, I will soon reflash and do the whole thing again from scratch to make sure I have it right.
I am using power-kernel 46 but I do not think that has any effect on things.
I have a few other apps installed but nothing which should have made a difference to cups

cheers

theonelaw 2011-01-25 05:19

Re: Printing with N900
 
Quote:

Originally Posted by db_tobago (Post 927631)
Thanks for figuring this out guys.

After installing cups/cups-client/cups-pdf/gtklp how much rootfs space are you left with?


Regards

56m at the moment,
but this is my test unit and I have been shovelling so that may
due to a lot of other thing (fennec was big)

I have (in addition to the cups/gtklp/libpam) on my test unit the following:

fennec
opera
gps recorder
mc
claws-mail
conky
mypaint
freoffice
gnumeric
xtide
leafpad
sketch
advanced clock plugin
filebox
fapman
PyGTKeditor
Canola (don't even remember loading this one or why !)
PDF reader
gps data logger
notes
evince
panorama
vumeter
copernicium
rootsh

but you don't need any of this to for cups (i think?)

db_tobago 2011-01-27 01:05

Re: Printing with N900
 
no. finally able to do command line printing after soft linking the backend folder.

nice work you guys. this brick/phone keeps improving

mase 2011-02-10 17:56

Re: Printing with N900
 
There is still the problem, that the cups install script cannot execute
getcwd. That's the reason, that the symlinks are not made.
I recompiled leafpad and removed the --disable-print. However after
ctrl-p no printers are listed.

mase 2011-02-12 05:15

Re: Printing with N900
 
You don't need to install the whole cups server to print with a network printer.
I described in the first post.

mase 2011-02-15 14:06

Re: Printing with N900
 
I have rebuilt leafpad and removed the printer disable in the rules file.
However there is not print entry in the menu and ctrl+p opens a printer
dialog without any printer listed.
I don't know, how to enable printer support here. Maybe the gtk libs
have been build with printing disabled.

mase 2011-02-15 16:54

Re: Printing with N900
 
Got it!
I repackaged gtk+2.0 with printing support. I've incremented the package version
to avoid the update to the original version. You don't have to install the dev and
doc packages on the device.
http://rapidshare.com/files/448095611/gtk_2.0.tar.gz

Here is leafpad with printing support. You have to press ctrl+p to open the
printing dialog. There is no menu option to enter it.
http://rapidshare.com/files/44809682...emo2_armel.deb

mase 2011-02-15 16:58

Re: Printing with N900
 
Here is abiword:
http://rapidshare.com/files/44809749...emo5_armel.deb

mase 2011-02-15 17:45

Re: Printing with N900
 
As pictureviewer I wanted to rebuild evince, but I failed with gnome-doc-utils,
which is not installable and I could not rebuild it. Any other suggestions (must be
gtk2.0)?
Also gnumeric did not provide printing after a rebuild.

peterleinchen 2011-02-16 22:23

Re: Printing with N900
 
Keep on mase !
And thanks. :)


All times are GMT. The time now is 12:16.

vBulletin® Version 3.8.8