LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-28-2024, 11:25 AM   #16
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,826

Rep: Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499Reputation: 1499

Quote:
Originally Posted by allend View Post
LC_TIME=en_GB.UTF-8 when I would expect LC_TIME="en_US.UTF-8"
There is a small change in the order between different English locales:
Code:
$ LC_TIME=en_GB.UTF-8 date
Sun 28 Apr 19:20:58 EEST 2024
$ LC_TIME=en_US.UTF-8 date
Sun Apr 28 19:20:59 EEST 2024
$ LC_TIME=en_AU.UTF-8 date
Sun 28 Apr 2024 19:21:00 EEST
 
Old 04-29-2024, 05:59 PM   #17
zalois
LQ Newbie
 
Registered: May 2013
Distribution: Slackware x64 Current
Posts: 19

Rep: Reputation: Disabled
Click image for larger version

Name:	Screenshot_20240429_215400.jpg
Views:	13
Size:	235.5 KB
ID:	42749

Click image for larger version

Name:	Screenshot_20240429_215408.png
Views:	12
Size:	118.9 KB
ID:	42750

Click image for larger version

Name:	Screenshot_20240429_220001.png
Views:	11
Size:	179.2 KB
ID:	42751

Click image for larger version

Name:	Screenshot_20240429_220009.png
Views:	7
Size:	95.1 KB
ID:	42752

Click image for larger version

Name:	Screenshot_20240429_220449.jpg
Views:	4
Size:	207.9 KB
ID:	42753
I have used this recent update, but I am only able to complete the process of adding a printer. The printer is still not in the list and cannot be used.
 
Old 04-29-2024, 06:01 PM   #18
zalois
LQ Newbie
 
Registered: May 2013
Distribution: Slackware x64 Current
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by zalois View Post
Attachment 42749

Attachment 42750

Attachment 42751

Attachment 42752

Attachment 42753
I have used this recent update, but I am only able to complete the process of adding a printer. The printer is still not in the list and cannot be used.
Click image for larger version

Name:	pdags.png
Views:	11
Size:	94.6 KB
ID:	42754
 
Old 04-30-2024, 09:03 AM   #19
pdags
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 9
I think HP is screwing with the locale somewhere, which is big no-no if that's whats happening. You should be able to work around it by running the setup utility from a shell and explicitly setting LC_CTYPE to 'C' or 'POSIX':

Code:
$ LC_CTYPE=POSIX hp-setup
you can also skip the GUI nonsense and run interactive with

Code:
$ LC_CTYPE=POSIX hp-setup -i
If the printer is added successfully you should see it in the CUPS webUI: http://localhost:631/printers/?

I sort of suspect the real fix is to either:
  • change the generated models.dat file to only have ASCII characters. AFAIK HP are the ones distributing it, so if it should be ASCII then they should ensure there are no non-ascii characters in there.
  • or if models.dat is allowed to have non-ascii characters, they should open the file properly to begin with instead of relying on the default, platform dependent, open behavior.

But I'm not a python guy, and character encoding is right up there with handling time correctly in things I hate dealing with, so I'm .

TL;DR I can live with this workaround, but YMMV.
 
Old 04-30-2024, 10:05 AM   #20
zalois
LQ Newbie
 
Registered: May 2013
Distribution: Slackware x64 Current
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by pdags View Post
I think HP is screwing with the locale somewhere, which is big no-no if that's whats happening. You should be able to work around it by running the setup utility from a shell and explicitly setting LC_CTYPE to 'C' or 'POSIX':

Code:
$ LC_CTYPE=POSIX hp-setup
you can also skip the GUI nonsense and run interactive with

Code:
$ LC_CTYPE=POSIX hp-setup -i
If the printer is added successfully you should see it in the CUPS webUI: http://localhost:631/printers/?

I sort of suspect the real fix is to either:
  • change the generated models.dat file to only have ASCII characters. AFAIK HP are the ones distributing it, so if it should be ASCII then they should ensure there are no non-ascii characters in there.
  • or if models.dat is allowed to have non-ascii characters, they should open the file properly to begin with instead of relying on the default, platform dependent, open behavior.

But I'm not a python guy, and character encoding is right up there with handling time correctly in things I hate dealing with, so I'm .

TL;DR I can live with this workaround, but YMMV.

I used your code, but still did not succeed.
 
Old 05-01-2024, 07:27 AM   #21
pdags
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 9
Weird. You could try to reinstall hplip to make sure nothing is in a bad state. As root,
Code:
slackpkg reinstall hplip
?

What's the output if you don't use the gui?

Code:
hp-setup -i -bnet
What does lpstat show?
Code:
lpstat -t
Failing all that, I wouldn't bother messing with hplip. Just add the printer through CUPS directly through the web UI usually found at http://localhost:631
 
1 members found this post helpful.
Old 05-01-2024, 07:39 AM   #22
pdags
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 9
Alternatively, consider driverless printing https://wiki.debian.org/CUPSDriverlessPrinting

To find the URIs, as my user:
Code:
$ driverless
ipps://HP%20OfficeJet%20Pro%209010%20series%20%5BFA8F40%5D._ipps._tcp.local/
$ ippfind
ipp://gutenberg1.local:631/ipp/print
As root, add the print queue:
Code:
# lpadmin -p HP_OfficeJet_Pro_9010 -v ipp://gutenberg1.local:631/ipp/print -E -m everywhere
As my user again, check the printer staus:
Code:
$ lpstat -t                                                                                                                                                          in bash at 08:23:44
scheduler is running
system default destination: HP_OfficeJet_Pro_9010
device for HP_OfficeJet_Pro_9010: ipp://gutenberg1.local:631/ipp/print
HP_OfficeJet_Pro_9010 accepting requests since Wed 01 May 2024 08:24:47 AM EDT
printer HP_OfficeJet_Pro_9010 is idle.  enabled since Wed 01 May 2024 08:24:47 AM EDT
And done. Printer shows up in CUPS, System Settings->Printers, etc. Seems a lot simpler than messing with drivers and PPDs.
 
1 members found this post helpful.
Old 05-01-2024, 07:34 PM   #23
zalois
LQ Newbie
 
Registered: May 2013
Distribution: Slackware x64 Current
Posts: 19

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by pdags View Post
Weird. You could try to reinstall hplip to make sure nothing is in a bad state. As root,
Code:
slackpkg reinstall hplip
?

What's the output if you don't use the gui?

Code:
hp-setup -i -bnet
What does lpstat show?
Code:
lpstat -t
Failing all that, I wouldn't bother messing with hplip. Just add the printer through CUPS directly through the web UI usually found at http://localhost:631





Thank you very much, i'll try your plan.
 
Old 05-02-2024, 06:23 AM   #24
pdags
LQ Newbie
 
Registered: Mar 2011
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by zalois View Post
Thank you very much, i'll try your plan.
Make sure you update before you reinstall. Looks like there is a new build of hplip available https://git.slackware.nl/current/com...15e355bf512059 and now that I've run my mouth for so long I'm dying to know if it actually fixes the issue for anyone besides me
 
Old 05-02-2024, 08:42 PM   #25
zalois
LQ Newbie
 
Registered: May 2013
Distribution: Slackware x64 Current
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by pdags View Post
Make sure you update before you reinstall. Looks like there is a new build of hplip available https://git.slackware.nl/current/com...15e355bf512059 and now that I've run my mouth for so long I'm dying to know if it actually fixes the issue for anyone besides me

Thank you for generously sharing your findings. I will try my best to solve this problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The createrepo operation fails with UnicodeDecodeError exception PeterSteele Red Hat 6 05-07-2013 06:47 PM
[SOLVED] Python3 shelve UnicodeDecodeError vmsda Programming 2 05-03-2013 03:32 AM
--current, hplip won't setup to network capable multifunction printer Old_Fogie Slackware 6 04-18-2011 02:20 AM
HPlip woes on --current ; Sharing printer gets broken if the hplip gui is launched Old_Fogie Slackware 2 10-28-2010 10:23 AM
wxpython UnicodeDecodeError cs-cam Programming 0 02-07-2006 05:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration