Artix Linux Forum

Artix Linux => System => Topic started by: swarfendor437 on 25 September 2021, 14:34:26

Title: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 25 September 2021, 14:34:26
Hi, I've found the package on AUR and tried to use Paru following the tutorial here:

https://youtu.be/URCDBY3LaXc?t=251

but after I enter

Code: [Select]
makepkg -si PKGBUILD

I get:

Code: [Select]
=> ERROR: You do not have write permission for the directory $BUILDDIR (/home/swarfendor437/paru).
    Aborting...

As I thought it was a permissions error I tried using sudo and get this:

Code: [Select]
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.

Any help appreciated to install 'canon-pixma-ts5055-complete'.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: SGOrava on 25 September 2021, 14:39:15
I would check the permission on "/home/swarfendor437/paru" and set them correctly (if the path is correct).
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 26 September 2021, 17:51:58
I would check the permission on "/home/swarfendor437/paru" and set them correctly (if the path is correct).

Thanks. Permissions are
User: root
Group: root

Everything else is greyed out.

I've tried to remain as remote from 'root' as possible so as not to screw the install.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: SGOrava on 26 September 2021, 20:15:15
Now you see the problem.

The permissions are set for root, and when program running under your used tries to write something there it will fail.
So my guess is to change owner (permissions?) of that directory to your user.

In normal cases I would try to avoid running AUR helpers fully as root.
Try and see how it goes.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: tintin on 27 September 2021, 08:25:48
Hello,

Personally, I use trizen in "non-root" mode:
Code: [Select]
sudo pacman -Sy trizen
Code: [Select]
trizen package_name
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: strajder on 27 September 2021, 09:13:43
https://wiki.archlinux.org/title/AUR_helpers

I use pikaur and avoid Rust (which paru is written in) as much as possible.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 28 September 2021, 13:08:17
Thanks for the input guys - unable to remove paru usinig either:

Code: [Select]
paru -R paru
or

Code: [Select]
sudo pacman -R paru

Reports Target not found!

Would you suggest I start with a fresh install?
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 28 September 2021, 13:23:35
Hello,

Personally, I use trizen in "non-root" mode:
Code: [Select]
sudo pacman -Sy trizen
Code: [Select]
trizen package_name

Glad to report that trizen worked - has to use Generic IPP - Printer is showing but when attempting to send test page to print nothing happens but the onscreen print queue says job complete.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: ####### on 28 September 2021, 18:24:10
Probably you did something like "sudo git clone"  instead of just "git clone" to get the paru PKGBUILD, so the dir was owned by root, you can check .bash_history for a record of the commands you actually used. You'll need to use root permissions to delete that directory and start again, it's not an error with the YouTube guide afaict. Paru was never built or the actual source code for it downloaded, let alone installed, which is why you can't uninstall it. All you did was download the instructions to build it, but as root. No big problem.  :D
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: strajder on 28 September 2021, 18:42:30
You'll need to use root permissions to delete that directory and start again,
No need to delete, if root ownership is the problem one could do
Code: [Select]
$ cd cloned_repo_dir && sudo chown -R username:username .
where username is the actual user's name on the system.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: ####### on 29 September 2021, 03:33:47
Although often you can get root owned files if you do a git clone I have noticed, so deleting and re-running will keep things as original:
Code: [Select]
$ git clone https://aur.archlinux.org/paru.git
$ rm -r paru
rm: remove write-protected regular file 'paru/.git/objects/pack/pack-757b45c26cde075159c7f0e96e302f9725930c05.idx'? n
rm: remove write-protected regular file 'paru/.git/objects/pack/pack-757b45c26cde075159c7f0e96e302f9725930c05.pack'? n
rm: cannot remove 'paru/.git/objects/pack': Directory not empty
This is being pedantic and probably won't make any difference in this case.  ;D  Actually I've never investigated why these hidden git files are root owned anyway?
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 02 October 2021, 17:06:26
Something I forgot to mention when running 'Printers' in KDE (not CUPS) I get a red box with the following warning:

Failed to group devices: 'The name org.fedoraprojcet.Config.Printing was not provided by any .service files'

Could this be the issue why not printing?
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: tintin on 03 October 2021, 05:47:44
Glad to report that trizen worked - has to use Generic IPP - Printer is showing but when attempting to send test page to print nothing happens but the onscreen print queue says job complete.

Hello,

I have an old Canon IP3000 which works fine on Artix.

I installed this package:
Code: [Select]
sudo pacman -Sy cups-openrc

For Gimp, I added gutenprint.

I don't know if I installed a specific package for my printer (foomatic-db-ppds etc.).
Alaso try:
Code: [Select]
trizen canon

Then if you have openrc:
Code: [Select]
sudo rc-update add cupsd
sudo rc-service cupsd start

I add the user to wheel group:
Code: [Select]
sudo usermod -a -G wheel user
reboot
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 03 October 2021, 10:47:13
Hi tintin,
Thanks for your help. I stopped after the first  command as it reports:

Code: [Select]
: : cups-openrc and cups-runit are in conflict (init-cups). Remove cups-runit? [y/N]

I don't want to break the system but I do think I need to be part of 'wheel' so will look at that first.

Thanks again for your time.

[UPDATE]

Code: [Select]
usermod: user 'user' does not exist

If I try:

Code: [Select]
 sudo usermod swarfendor437 -a -G wheel user
it returns with:

Code: [Select]
Usage: usermod [options] LOGIN

Options:
  -b, --badnames                allow bad names
  -c, --comment COMMENT         new value of the GECOS field
  -d, --home HOME_DIR           new home directory for the user account
  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -f, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -g, --gid GROUP               force use GROUP as new primary group
  -G, --groups GROUPS           new list of supplementary GROUPS
  -a, --append                  append the user to the supplemental GROUPS
                                mentioned by the -G option without removing
                                the user from other groups
  -h, --help                    display this help message and exit
  -l, --login NEW_LOGIN         new value of the login name
  -L, --lock                    lock the user account
  -m, --move-home               move contents of the home directory to the
                                new location (use only with -d)
  -o, --non-unique              allow using duplicate (non-unique) UID
  -p, --password PASSWORD       use encrypted password for the new password
  -R, --root CHROOT_DIR         directory to chroot into
  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files
  -s, --shell SHELL             new login shell for the user account
  -u, --uid UID                 new UID for the user account
  -U, --unlock                  unlock the user account
  -v, --add-subuids FIRST-LAST  add range of subordinate uids
  -V, --del-subuids FIRST-LAST  remove range of subordinate uids
  -w, --add-subgids FIRST-LAST  add range of subordinate gids
  -W, --del-subgids FIRST-LAST  remove range of subordinate gids
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: tintin on 04 October 2021, 05:29:09

Code: [Select]
: : cups-openrc and cups-runit are in conflict (init-cups). Remove cups-runit? [y/N]
Hello,

If you have installed the artix-runit version then you only need cups-runit.


Quote
Code: [Select]
usermod: user 'user' does not exist
No, you replace user with swarfendor437:
Code: [Select]
sudo usermod -a -G wheel swarfendor437

To list the groups you belong to:
Code: [Select]
groups
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 05 October 2021, 22:39:38
OK, Thanks for the new details. My issue appears to be the fact that Canon isn't even listed in the graphical interface of Printers, and

Code: [Select]
lpinfo -m
also confirms this, viz:

DYMO
Epson
Fuji Xerox
Generic
HP
Index
Intellitech
Oki
Raw
Ricoh
Zebra
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: tintin on 06 October 2021, 07:05:34
OK, Thanks for the new details. My issue appears to be the fact that Canon isn't even listed in the graphical interface of Printers, and

Have you installed the drivers provided by Canon?
cnijfilter2 and scangearmp2

Try :
Code: [Select]
trizen cnijfilter2
Code: [Select]
trizen scangearmp2
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 06 October 2021, 12:14:34
Have you installed the drivers provided by Canon?
cnijfilter2 and scangearmp2

Try :
Code: [Select]
trizen cnijfilter2
Code: [Select]
trizen scangearmp2

Hi, after I edited pacman conf file I am still getting this error message (ref my Soundblaster post):

error: config file /etc/pacman.d/mirrorlist-arch could not be read: No such file or directory

I have the complete 'cnijfilter2-master' which includes the ppd for the TS8000 series but KDE Printers refuses to accept it. I still think it is partly an issue that the manufacturer Canon is not present in Printers unlike all other versions of KDE I have used on other distributions like FerenOS and Devuan 3.1.1
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: strajder on 06 October 2021, 12:28:10
https://wiki.artixlinux.org/Main/Repositories
Quote
As of June 2021, all Arch repositories are disabled by default. To enable them, install artix-archlinux-support and follow the on-screen instructions to activate the Arch repositories you want, most likely extra, community and multilib, which contain packages not yet in Artix repositories. Do not enable community alone as it contains packages dependent on others in extra.

https://forum.artixlinux.org/index.php/topic,1923.0.html
Quote
What to do if I have a problem:
First go through wiki.archlinux.org and wiki.artixlinux.org and use the relevant parts (all except the systemd commands on the archlinux wiki) to set up your system really correctly.
Look at the internet to see if anyone has had a similar error (at least 90% of problems have already been solved on the internet before you) - often a question of 5 minutes before solving it here for days and peoples here will look at the internet anyway :-)
Follow the announcements on the main page at artixlinux / archlinux too
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 06 October 2021, 12:51:28
https://wiki.artixlinux.org/Main/Repositories
https://forum.artixlinux.org/index.php/topic,1923.0.html

Hi strajder,
Thank you for your time in responding to me. I am clearly doing something wrong. When I try to install 'artix-archlinux-support' I get:

Code: [Select]
error: config file /etc/pacman.d/mirrorlist-arch could not be read: No such file or directory

I was thinking that I might be better installing the minimal version of Artix and work my way up from that, adding KDE later.

Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: strajder on 06 October 2021, 13:08:29
That error message means exactly what it says: you don't have the file /etc/pacman.d/mirrorlist-arch.

To repeat what I quoted above, you need to install the package artix-archlinux-support and follow the on-screen instructions to activate the Arch repositories. The file /etc/pacman.d/mirrorlist-arch is a part of the archlinux-mirrorlist package, which the artix-archlinux-support package depends on, so it will automatically be installed with it.

This is as plainly said as it can be, really.
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: swarfendor437 on 06 October 2021, 21:55:56
That error message means exactly what it says: you don't have the file /etc/pacman.d/mirrorlist-arch.

To repeat what I quoted above, you need to install the package artix-archlinux-support and follow the on-screen instructions to activate the Arch repositories. The file /etc/pacman.d/mirrorlist-arch is a part of the archlinux-mirrorlist package, which the artix-archlinux-support package depends on, so it will automatically be installed with it.

This is as plainly said as it can be, really.

So to install do I use pacman -S ...
That is what I have been doing ...
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: strajder on 06 October 2021, 22:18:56
That is only the first part. The second part is editing /etc/pacman.conf to include the arch repositories in the correct order, after the artix repositories, as described in the wiki page that I linked. If you installed archlinux-mirrorlist however (a dependency of artix-archlinux-support), the file /etc/pacman.d/mirrorlist-arch should exist.

Code: [Select]
ls -l /etc/pacman.d    # this should return mirrorlist-arch among other files
pacman -Qi artix-archlinux-support archlinux-mirrorlist      # this should give package details instead of error messages
Title: Re: Adding Canon Pixma TS-8100 series printer
Post by: tintin on 07 October 2021, 05:07:11
Hi, after I edited /etc/pacman.conf file I am still getting this error message (ref my Soundblaster post):

error: config file /etc/pacman.d/mirrorlist-arch could not be read: No such file or directory
Hello,

Please see my answer yesterday on:
https://forum.artixlinux.org/index.php/topic,3075.msg20327.html#new  ;)