0

I am trying to print an ordinary PDF file with some filled table in it from the bash terminal. When I do it as root everything is okay, but when I trying to print it as non-root user I see only tables border lines and graphics printed with no text at all.

I ended up here after hours or researching in the web. Could anyone help please?

I am using the following command to print the file:

lp -d MG2500 /path_to_the_file

I thought that the non-root user should have an access to the fonts. I gave him the permissions with the following commands:

setfacl -m u:User:rx /usr/share/fonts
setfacl -m u:User:rx /usr/share/fonts/*

but with no success. The result was the same: The printer did not print any letters. Only tables border lines and graphics.

My system is: Ubuntu Server 23.04

My printer is: Canon MG2540S (driver MG2500)

  • Check permissions of the spool directory used by the printer driver `/var/spool/cups/`. Make sure that the user who is printing has write access to this directory. After changing permissions restart cups service `sudo systemctl restart cups`. If that's doesn't help check driver files permissions of the printing user, make sure he can read. – Andrey Ivanov May 09 '23 at 07:01
  • Thanks for the tips. But unfortunately nothing helped though I granted 'rwx' access to '/var/spool/cups' '/usr/share/ppd' '/usr/share/cups' (all with subfolders) and restarted cups service. Even rebooted the server itself. But with not success. Again no text - only tables borders and pictures. – miceZipper May 09 '23 at 08:28
  • Check if fonts are installed in root directory `/root/.local/share/fonts/`, do you have same fonts in `/usr/share/fonts/`? You can also run a command `fc-list` under each user to see installed fonts. – Andrey Ivanov May 09 '23 at 09:29
  • I have all fonts installed in `/usr/share/fonts/` and I had no folder `/root/.local/share/fonts` so I created it, copied everything there from the first folder and recached them by `fc-cache -fv` but still no success. I also provided `rwx` permissions to it for the required user of course. – miceZipper May 09 '23 at 09:53
  • The problem is definitely with some resources permissions. Few more things to check: directory `/usr/share/cups/` permissions; compare output of `lp` command with option `-o job-sheets=none` to see if there any differences in driver settings under root and other user. Try to create one more user and print under his account. – Andrey Ivanov May 09 '23 at 10:39

0 Answers0