openrc the system behind nemesis: printing as an example

Arch based Porteus community project
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#1 by francois » 04 May 2017, 11:09

openrc is the system behind nemesis
https://wiki.manjaro.org/index.php?titl ... to_systemd

Some adjustments could not even be done without it. In my case, I could not get nemesis printing go without a special openrc package called cups-openrc-20170309-1.

Printing-nemesis-openrc package:
To install printing capabilities to nemesis:

Code: Select all

pman -S cups-openrc avahi-openrc simple-scan system-config-printer shared-mime-info
Though this package should be activated automatically by pman it does not.

Code: Select all

pman -S system-config-printer --force

Code: Select all

rc-update add avahi-daemon default
rc-service cupsd start
rc-update add cupsd default
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

Re: openrc the system behind nemesis: printing as an example

Post#2 by francois » 11 May 2017, 08:15

Output of system-config-printer command line:

Code: Select all

root ~ # system-config-printer

(system-config-printer.py:3677): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

(system-config-printer.py:3677): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:493:ensure_surface_for_gicon: assertion failed: (destination)
Aborted
root ~ #
Someone has a cue?
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#3 by francois » 08 Oct 2017, 14:39

reinstalling system-config-printer with the --force option did the job.
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#4 by francois » 27 Oct 2017, 02:36

More recently, I got another problem. Rolling distros come with rolling problems:

Code: Select all

[porteus ~]# system-config-printer

(system-config-printer.py:5274): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted
[porteus ~]#
The solution:
https://bbs.archlinux.org/viewtopic.php?id=223801

Code: Select all

[porteus ~]# pman -S shared-mime-info
Thus this has to be added to the printing package.

The first post has been corrected to provide a functional printing package for nemesis kde-plasma edition.
Yeah! :celebrate3:
Carpe diem.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 1022
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

openrc the system behind nemesis: printing as an example

Post#5 by ncmprhnsbl » 27 Oct 2017, 03:24

be aware that shared-mime-info is in 002-gui.xzm
it's possible that reinstalling it causes the install file(see /var/lib/pacman/local/shared-mime-info/install) to be run..
which does this:

Code: Select all

post_remove() {
  if [ -d usr/share/mime ]; then
    rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
    rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
    rmdir --ignore-fail-on-non-empty usr/share/mime
  fi
}
which may be all thats necessary..
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#6 by francois » 27 Oct 2017, 03:46

So you suggest instead to run the script? It has to be run only once. How do I put that in root copy? :(
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#7 by francois » 28 Oct 2017, 17:26

[porteus modules]# ./script-share-mime-info
bash: ./script-share-mime-info: Permission denied
[porteus modules]#
Carpe diem.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 1022
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

openrc the system behind nemesis: printing as an example

Post#8 by ncmprhnsbl » 28 Oct 2017, 22:03

executable?
chmod +x script-share-mime-info
francois wrote:
27 Oct 2017, 03:46
It has to be run only once. How do I put that in root copy?
i don't know.. maybe more like a wrapper script for system-config-printer that runs this first ..?
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#9 by francois » 29 Oct 2017, 20:56

From guest mode I was able to build brscan4 from AUR with octopi. And then just installed my brother printer as a scanner.
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#10 by francois » 29 Oct 2017, 22:55

Still problem with following error:
Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
script-share-mime-info:

Code: Select all

#!/bin/bash

post_remove() {
  if [ -d usr/share/mime ]; then
    rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
    rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
    rmdir --ignore-fail-on-non-empty usr/share/mime
  fi
}

exit 0

Code: Select all

[porteus printing-nemesis]# ls -l
total 86484
-rw-r--r-- 1 root root 60157952 Oct 27 02:17 printing-nemesis.xzm
-rwxrwxrwx 1 root root      363 Oct 28 17:23 script-share-mime-info
-rw-r--r-- 1 root root   688128 Oct 27 02:26 shared-mime-info-1.9-1-x86_64.pkg.xzm
-rw-r--r-- 1 root root 27709440 Oct 27 02:21 system-config-printer-1.5.9-3.xzm
[porteus printing-nemesis]# ./script-share-mime-info
[porteus printing-nemesis]# rc-service cupsd start
avahi-daemon  | * Starting avahi-daemon ...                                       [ ok ]
cupsd         | * Starting cupsd ...                                              [ ok ]
[porteus printing-nemesis]# system-config-printer

(system-config-printer.py:3600): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.

(system-config-printer.py:3600): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.

(system-config-printer.py:3600): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.

(system-config-printer.py:3600): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted
[porteus printing-nemesis]# gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
[porteus printing-nemesis]# system-config-printer
(system-config-printer.py:3615): Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted
[porteus printing-nemesis]# 
This is the thread for the solution, proposing reinstall shared-mime-info: pacman -S shared-mime-info:
https://bbs.archlinux.org/viewtopic.php?id=223801
Any comments?

In addition to be effective module shared-mime-info-1.9-1-x86_64.pkg.xzm has to be loaded after system-config-printer, so needs a z- at the beginning: z-shared-mime-info-1.9-1-x86_64.pkg.xzm
Thanks.
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5127
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus artix
Location: C'est l'hiver: la neige soudainement est là à Montréal.

openrc the system behind nemesis: printing as an example

Post#11 by francois » 20 Nov 2017, 02:42

Scanning with nemesis.
For the scanner trying debtap from aur to build from the brscan4 .deb package
https://github.com/helixarch/debtap/blo ... /README.md

And to enable scanner changing 40-libsane.rules to include brother printers
https://forums.linuxmint.com/viewtopic.php?t=223372
Open a shell/terminal by ctrl-alt-T
execute: sudo gedit /lib/udev/rules.d/40-libsane.rules
Then enter the following 2 lines just before the line LABEL="libsane_rules_end":
# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"

Save the file and restart your computer.
Carpe diem.

Post Reply