Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread Peter Humphrey
On Thursday, 8 September 2022 21:40:25 BST Wols Lists wrote:
> On 08/09/2022 21:24, Lee wrote:
> > Who needs to go to the hassle maintaining a printer of their own, buying
> > cartridges, paper etc? I set up an online account at my neighborhood
> > Kinkos, and I just upload whatever docs I need and they print out in HD
> > whatever I need for pennies a page. Ymmv.
> 
> YMMV. But if your neighbouhood Kinkos is fifty miles away your mileage
> most definitely does vary :-)

What is a Kinkos?

-- 
Regards,
Peter.






Re: [gentoo-user] qbittorrent crashes after to many files open error

2022-09-08 Thread Dale
Mateusz Okulus wrote:
>> root@fireball / # sysctl fs.file-max
>> fs.file-max = 3289952
>> root@fireball / # sysctl -w fs.file-max=32899520
>> fs.file-max = 32899520
>> root@fireball / # cat /proc/sys/fs/file-max
>> 32899520
> On my pc the limit is 2^63. But this is max files for kernel, which is
> different for max files per user and max files per process.
>
> For example if I run:
>
> $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
> Limit Soft Limit   Hard Limit   Units
> Max open files524288   524288   files
>
> 524288 = 2^19
>
> QBittorrent increases it's process limit to hard limit. With 10 TB of
> torrents it's hard to tell if it's a bug or just 500k files is not
> enough, I'd say it's probably the latter.
>
> It seems you can change the default hard limit in
> /etc/security/limits.conf
>
> For example:
>
> # 2^24, increased from 2^19
> * hard nofile 16777216
>
> Then after reloging:
>
> $ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
> Limit Soft Limit   Hard Limit   Units
> Max open files16777216 16777216 files
>
> So this works, at least for me.
>
> Check also limits.conf man page.
>
> Regards,
> mmokulus
>
> .
>


It appears the change I made wasn't what was needed.  I took a nap,
after doing today what I used to do on Friday, which involves going to
Doctor, getting shots, then shopping around town etc etc.  Anyway, I
woke up to Qbittorrent being gone.  It crashed at some point.  In the
notification thingy, it had a few of the file open errors again.  So, I
ran some of the commands you posted, my hard limit was set to 4096.  I
whipped out my calculator and doubled it.  I set it in the limits.conf
file like so: 

root@fireball / # cat /etc/security/limits.conf | grep nofile
#    - nofile - max number of open file descriptors
*   hard    nofile  8192
root@fireball / #


I logged out and back in.  I ran the command you shared and it was
indeed set to the new amount.  I'm going to upgrade qbittorrent to the
new version again and test it some more. 

Thanks much for the help.  Maybe this will fix it.

Dale

:-)  :-) 



Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread Ramon Fischer

Hello Alan,


(meanwhile, Windows can print to the thing effortlessly)

I guess, that you are going to configure a network printer.

I will try to explain you my setup; maybe you or others can derive 
something from this.


Make sure, that the user, which you configure the printer with, is a 
member of the group "lpadmin":


   $ gpasswd --add  lpadmin
   $ getent group lpadmin
   lpadmin:x::

On the server-site, the configuration file "/etc/cups/cupsd.conf" should 
be configured like so. See comments for explanations:


   # Only listen for connections from the local machine.
   Listen localhost:631
   # custom - 20210706 - rfischer: set custom listen address to
   "192.168.1.80" to make it available via the network
   Listen 192.168.1.80:631
   Listen /run/cups/cups.sock

   # custom - 20210706 - rfischer: make cups available via "hostname"
   or "domain"
   ServerAlias *

   # Restrict access to the server...
   #
   #  Order allow,deny
   #
   # custom - 20210706 - rfischer: allow access from "localhost" and
   via the network
   
  Order allow,deny
  Allow localhost
  Allow from 192.168.1.*
   

   # Restrict access to the admin pages...
   #
   #  Order allow,deny
   #
   # custom - 20210706 - rfischer: make administration page available
   via the network
   
  Encryption Required
  Order allow,deny
  Allow localhost
  Allow from 192.168.1.*
   

Restart the daemon on the server-site:

   $ systemctl restart cups

This will also restart the Systemd socket unit "cups.socket" and 
"cups.path".


Make sure, that CUPS is running on "192.168.1.80:631":

   $ ss -tulpan | grep "631"
   tcp    LISTEN   0    5  192.168.1.80:631 0.0.0.0:*  
   users:(("cupsd",pid=2190,fd=8))
   tcp    LISTEN   0    5  127.0.0.1:631
   0.0.0.0:*   users:(("cupsd",pid=2190,fd=7))
   tcp    LISTEN   0    5 [::1]:631   [::]:*
   users:(("cupsd",pid=2190,fd=6))


If printing via hostname is desired, you can add the following entry for 
your local DNS server:


   192.168.1.80 cups.intern

This Forward DNS lookup entry can also be entered on the client-site in 
the configuration file "/etc/hosts".


Your CUPS isntance should be now available via "cups.intern:631". There 
you should be able to configure your printer.


I configured the server-site via USB:

   usb:/?serial=

In the best case, CUPS already has a pre-installed printer driver or you 
have a PPD (PostScript Printer Description) file, which you can upload, 
when adding the printer.


Once configured, the directory tree of "/etc/cups/" on the server-site 
should look like this:


   $ tree -ugp --noreport --charset iwantprintableasciiplease /etc/cups
   /etc/cups
   |-- [-rw--- root lp  ]  classes.conf
   |-- [-rw-r--r-- root root    ]  cups-browsed.conf
   |-- [-rw-r--r-- root root    ]  cupsd.conf
   |-- [-rw-r--r-- root root    ]  cups-files.conf
   |-- [drwxr-xr-x root root    ]  interfaces
   |-- [drwxr-xr-x root lp  ]  ppd
   |   |-- [-rw-r- root lp  ] .ppd
   |-- [-rw--- root lp  ]  printers.conf
   |-- [-rw-r--r-- root root    ]  raw.convs
   |-- [-rw-r--r-- root root    ]  raw.types
   |-- [-rw-r--r-- root root    ]  snmp.conf
   |-- [drwx-- root lp  ]  ssl
   |   |-- [-rw-r--r-- root root    ]
   .crt
   |   |-- [-rw-r--r-- root root    ]
   .key
   `-- [-rw-r- root lp  ]  subscriptions.conf

Since I do not want to install the printer driver on every client and 
let the clients render the pages, I want to let the server handle these 
things.


On the client-site (localhost:631) therefore, I can just add the printer 
via "http/s" or "ipp/s" and transfer everything either via "IPP 
everywhere" or "raw":


   ipps://cups.intern:631/printers/

Be aware, that "raw" is deprecated and newer versions of CUPS will 
remove it. So "IPP everywhere" would be the choice, but I stick to 
"raw", since the former shuffles print jobs for some reason, when I want 
to print multiple files via "lpr  " on either 
the client- or server-site.


You should now be able to print a test page on the client- and server-site.

Much success and a pinch of luck! :)

-Ramon

On 08/09/2022 18:52, Alan Grimes wrote:
Ok. I'm going to have to do it. I'm going to have to get my blessed 
printer working.


It is the finest laser printer money can buy. God himself uses it to 
process the paperwork involved in assigning souls to either heaven or 
hell... What I'm saying is that the printer is such an immaculate 
example of printing perfection that linux is going to give me absolute 
hell getting it working.


I will be sthocked if I can get it working in less than two weeks 
working full time and without influcting a migraine and/or an ulcer on 
myself.


(meanwhile, Windows can print to the thing effortlessly)

Right now linux is so broken that the CUPS web interface will deny all 
attempts to administer the 

Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread Wols Lists

On 08/09/2022 21:24, Lee wrote:
Who needs to go to the hassle maintaining a printer of their own, buying 
cartridges, paper etc? I set up an online account at my neighborhood 
Kinkos, and I just upload whatever docs I need and they print out in HD 
whatever I need for pennies a page. Ymmv.


YMMV. But if your neighbouhood Kinkos is fifty miles away your mileage 
most definitely does vary :-)


Cheers,
Wol



Re: [gentoo-user] qbittorrent crashes after to many files open error

2022-09-08 Thread Lee
Divine punishment perhaps?

Lee 

On Wed, Sep 7, 2022, 10:26 PM Dale  wrote:

> Howdy,
>
> As some know, I discovered torrentting a while back.  It has caused
> issues ever since.  LOL  I recently upgraded qbittorrent.  Other than
> having to limit some speed settings since it would make my desktop
> response slow, it has worked OK, better than ktorrent at least.  Then a
> couple days ago, perhaps related to a upgrade, it would crash.  In the
> notifications I would find a error like below.  I have changed the names
> to protect the innocent.  ;-)
>
> An I/O error occurred for torrent 'ABCDEF'.
> Reason: ABCDEF file_open (/home/dale/Desktop/Videos/ABCDEF error: Too
> many open files
>
>
> I did a google search and found out more info which lead me to this
> eventually:
>
>
> https://www.tecmint.com/increase-set-open-file-limits-in-linux/
>
> Then this:
>
> root@fireball / # sysctl fs.file-max
> fs.file-max = 3289952
> root@fireball / # sysctl -w fs.file-max=32899520
> fs.file-max = 32899520
> root@fireball / # cat /proc/sys/fs/file-max
> 32899520
>
>
> So, I increased the limit on open files by a factor of ten, I added a
> zero on the end.  It was easy enough and didn't require a calculator or
> other fancy maths.  Question is, is this a better fix or could it just
> be qbittorrent itself having issues?  Could there be more to this or
> something else causing this error?
>
> I was using qbittorrent-4.4.5 but downgraded to qbittorrent-4.4.4.  I'm
> hoping one or the other will fix this crashing issue.  It did only start
> after the upgrade but could be a coincidence to I guess.
>
>
> By the way, the 10TB drive I bought a couple weeks or so ago, well, this
> is it now.
>
> /dev/mapper/10tb   9.1T  8.7T  345G  97% /mnt/10tb
>
>
> The 14TB is supposed to be here this weekend.  I have really got to
> create a solution to this.  My current plan, make the 14TB my backup
> drive.  Put the 10TB in my rig, for now.  It's getting full too.  ROFL
> I could cut off the internet I guess.  ROFLMBO
>
>
> Thoughts on the files open error?  Qbittorrent crashing?  Anyone else
> ran into this before?  Proper solution?  Better solution?
>
>
> Dale
>
> :-)  :-)
>
>
>


Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread Lee
Who needs to go to the hassle maintaining a printer of their own, buying
cartridges, paper etc? I set up an online account at my neighborhood
Kinkos, and I just upload whatever docs I need and they print out in HD
whatever I need for pennies a page. Ymmv.

Lee 

On Thu, Sep 8, 2022, 11:05 AM tastytea  wrote:

> On 2022-09-08 12:52-0400 Alan Grimes  wrote:
>
> > […]
> >
> > Right now linux is so broken that the CUPS web interface will deny
> > all attempts to administer the printer and reject any password. The
> > config file is written in moonspeak, I just need the motherfucking
> > thing to say yes when I tell it to do a thing. I expect it to take
> > 2-3 days just to get over this hurdle.
>
> I solved this problem by replacing the contents of every 
> block with:
>
>   Order allow,deny
>   Allow localhost
>   Allow from fd69:0:0:0:*
>   Allow from 192.168.69.*
>
> > How can people actually go around installing linux on people's
> > computers as if they were doing them a favor when it really is this
> > bad?
>
> It's not bad at all if you use a distribution with a better default
> configuration, pre-installed drivers and a pre-installed GUI for setting
> up the automatically detected printer in less than 5 clicks.
> Unless you have a printer from a shitty company, of course.
>
>


Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread Michael
On Thursday, 8 September 2022 19:04:42 BST tastytea wrote:
> On 2022-09-08 12:52-0400 Alan Grimes  wrote:
> > […]
> > 
> > Right now linux is so broken that the CUPS web interface will deny
> > all attempts to administer the printer and reject any password. The
> > config file is written in moonspeak, I just need the motherfucking
> > thing to say yes when I tell it to do a thing. I expect it to take
> > 2-3 days just to get over this hurdle.
> 
> I solved this problem by replacing the contents of every 
> block with:
> 
>   Order allow,deny
>   Allow localhost
>   Allow from fd69:0:0:0:*
>   Allow from 192.168.69.*
> 
> > How can people actually go around installing linux on people's
> > computers as if they were doing them a favor when it really is this
> > bad?
> 
> It's not bad at all if you use a distribution with a better default
> configuration, pre-installed drivers and a pre-installed GUI for setting
> up the automatically detected printer in less than 5 clicks.
> Unless you have a printer from a shitty company, of course.

You'll need the right drivers for the printer you have.  This page is a good 
start for CUPS and usually it doesn't take long to connect to the printer and 
start printing.

https://wiki.gentoo.org/wiki/Printing

Modern printers invariably offer their own http(s) web GUI for administration, 
which may also need configuring, but just printing alone should be achievable 
by using the guidance in the wiki above.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Getting printer working, the road of Pain.

2022-09-08 Thread tastytea
On 2022-09-08 12:52-0400 Alan Grimes  wrote:

> […]
> 
> Right now linux is so broken that the CUPS web interface will deny
> all attempts to administer the printer and reject any password. The
> config file is written in moonspeak, I just need the motherfucking
> thing to say yes when I tell it to do a thing. I expect it to take
> 2-3 days just to get over this hurdle.

I solved this problem by replacing the contents of every 
block with:

  Order allow,deny
  Allow localhost
  Allow from fd69:0:0:0:*
  Allow from 192.168.69.*
 
> How can people actually go around installing linux on people's
> computers as if they were doing them a favor when it really is this
> bad?

It's not bad at all if you use a distribution with a better default
configuration, pre-installed drivers and a pre-installed GUI for setting
up the automatically detected printer in less than 5 clicks.
Unless you have a printer from a shitty company, of course.



Re: [gentoo-user] qbittorrent crashes after to many files open error

2022-09-08 Thread Mateusz Okulus
> root@fireball / # sysctl fs.file-max
> fs.file-max = 3289952
> root@fireball / # sysctl -w fs.file-max=32899520
> fs.file-max = 32899520
> root@fireball / # cat /proc/sys/fs/file-max
> 32899520

On my pc the limit is 2^63. But this is max files for kernel, which is
different for max files per user and max files per process.

For example if I run:

$ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
Limit Soft Limit   Hard Limit   Units
Max open files524288   524288   files

524288 = 2^19

QBittorrent increases it's process limit to hard limit. With 10 TB of
torrents it's hard to tell if it's a bug or just 500k files is not
enough, I'd say it's probably the latter.

It seems you can change the default hard limit in
/etc/security/limits.conf

For example:

# 2^24, increased from 2^19
* hard nofile 16777216

Then after reloging:

$ grep 'Limit\|open' /proc/$(pgrep qbittorrent | head -1)/limits
Limit Soft Limit   Hard Limit   Units
Max open files16777216 16777216 files

So this works, at least for me.

Check also limits.conf man page.

Regards,
mmokulus