openrc the system behind nemesis: printing as an example

Arch based Porteus community project
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 5136
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

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: 5136
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: 5136
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: 5136
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: 1030
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: 5136
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: 5136
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: 1030
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: 5136
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: 5136
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: 5136
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.

User avatar
francois
Contributor
Contributor
Posts: 5136
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#12 by francois » 16 Dec 2017, 03:19

@nm...
Thanks for updating base modules. This made printing capabilities simpler. First post updated accordingly. :)
Carpe diem.

User avatar
francois
Contributor
Contributor
Posts: 5136
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#13 by francois » 16 Dec 2017, 04:30

Breakthru with the scanner for brother scanner using debtap. :D

1.0 Install debtap a .deb to .pkg.tar.xz converter, debtap is from AUR and base-devel and git are needed.
1.1 Add guest to sudoers to be able to compile package from normal user account in /home/guest
/etc/sudoers file
...
## User privilege specification
##
root ALL=(ALL) ALL
guest ALL=(ALL) ALL #to be added
...

1.2 Add needed packages to compile from AUR and install debtap with git.

Code: Select all

pman -S base-devel
Install with git:

Code: Select all

https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
[porteus debtap]# su guest
[guest@porteus debtap]$ git clone https://aur.archlinux.org/debtap.git
[guest@porteus debtap]$  cd /home/guest/debtap/
[guest@porteus debtap]$ ls
PKGBUILD                       debtap-3.1.4.tar.gz  pkg
debtap-3.1.4-2-any.pkg.tar.xz  debtap.install       src
[guest@porteus debtap]$ makepkg -si
[guest@porteus debtap]$ exit
exit
Update debtap:

Code: Select all

[porteus debtap]# debtap -u
[porteus debtap]# cd ..
[porteus guest]# ls
brscan4-0.4.2-1.amd64.deb  debtap
2.0 Compile the brscan4 scanning driver.
2.1 Download brscan4.deb from brother website to /home/guest folder:
http://support.brother.com/g/s/id/linux ... ml#brscan4

2.2 Convert brscan4.deb with debtap and install it.

Code: Select all

[porteus guest]# debtap brscan4-0.4.2-1.amd64.deb
...
[porteus guest]# ls
brscan4-0.4.2-1-x86_64.pkg.tar.xz  brscan4-0.4.2-1.amd64.deb  debtap
[porteus guest]# pacman -U brscan4-0.4.2-1-x86_64.pkg.tar.xz
2.3 Install brscan4 with the following instructions, this is an eample for the MFC-7860DW brother printer:
viewtopic.php?f=39&t=1336

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:~# brsaneconfig4 -a name=scanner model=MFC-7860DW ip=192.168.0.107
root@porteus:~# brsaneconfig4 -q | grep scanner
  0 scanner             "MFC-7860DW"        I:192.168.0.107
root@porteus:/opt/brother/scanner/brscan4#
2.4 Make sure your printer is on and tart simple-scan, given that you have installed this utility. The scanner should work flawlessly.

AAAAAAAAHHHHHHHHHHHHHHHH! Enjoy! :punk:
Carpe diem.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 1030
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#14 by ncmprhnsbl » 16 Dec 2017, 05:00

shouldn't need to install git, it's already in core.
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
francois
Contributor
Contributor
Posts: 5136
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#15 by francois » 16 Dec 2017, 05:16

Removed. :)
Carpe diem.

Post Reply