user 1000

2018-07-09 Thread Bernard Schoenacker
bonjour,

je souhaiterai pouvoir changer le nom du 1^er utilisateur est ce possible ?

merci
slt
bernard



Re: terminal will not wak after hibernation

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 05:27:44PM -0400, Celejar wrote:
> On Sat, 7 Jul 2018 20:32:03 +0100
> Joe  wrote:
> 
> > On Sat, 7 Jul 2018 11:24:59 -0400
> > Dan Ritter  wrote:
> 
> ...
> 
> > > The majority of machines can do suspend-to-RAM and/or
> > > suspend-to-disk and wake up smoothly afterwards.
> > > 
> > 
> > I'll take your word for it. I've never seen such a combination. I give
> > suspend a try on my Gigabyte/AMD sid machine now and then, but it seems
> > to work for no more than two weeks in any year. Currently it is
> > leaving orphaned inodes, so I'm not experimenting too much.
> > 
> > Years ago, I used to spend time fixing it, but after a while I realised
> > it would only break again a month later, so I've stopped bothering.
> > I've yet to see a laptop/netbook screen backlight come on again after
> > suspend...
> 
> ?! Many people have suspend working fine (although many certainly
> don't); suspend-to-ram has been working flawlessly (AFAICT) out of the
> box on my Lenovo ThinkPad W550s.

In the APM days, Debian/Linux suspend was flawless for years.

Then ACPI came along and things have been iffy for a decade.

However, suspend-to-RAM (suspend, as opposed to hibernate) has worked
very well here (Lenovo X220) for the last few years.

Possibly OP/Joe has some customization he regularly implements,
causing his problem? IDK of course...

Good luck,



Re: More on locale

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 06:37:19PM +0100, John wrote:
> A short time ago I sought your advice about messages  I am getting
> about locales  I thought I did what was suggested but I still see
> 
>   CC   libclamav_internal_utils_nothreads_la-strlcat.lo
> ../libtool: line 1748: warning: setlocale: LC_CTYPE: cannot change
> locale (en_US.UTF-8)
> when compiling, and
> 
> (firefox-esr:11622): Gtk-WARNING **: Locale not supported by C library.
> Using the fallback 'C' locale.
> 
> from firefox.  There are other similar.   I have not got this problem
> on any other machine.  How can I fix it, and ensure it does not happen
> again?

I'm not sure, but try running locate on your locale e.g.:

$ locate en_US.UTF-8
/usr/share/X11/locale/en_US.UTF-8
/usr/share/X11/locale/en_US.UTF-8/Compose
/usr/share/X11/locale/en_US.UTF-8/XI18N_OBJS
/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE
/usr/share/doc/libx11-dev/i18n/compose/en_US.UTF-8.html


If you don't have those (or similar) locale files, you need to enable
and generate that (evidently required, based on your environment)
locale.

Good luck,



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Michael Stone

On Mon, Jul 09, 2018 at 07:05:52PM -0400, Dan Ritter wrote:

On Mon, Jul 09, 2018 at 06:53:44PM -0400, Michael Stone wrote:

On Mon, Jul 09, 2018 at 06:39:29PM -0400, Dan Ritter wrote:
> You're both missing the main point, which is that a Brother
> printer with BRscript/3 is essentially a Postscript printer, and
> you can treat it as one. No drivers needed.

So you can use it as an all-in-one postscript printer/scanner?


You can use it as a printer. As far as I know there is no such
thing as a "postscript scanner".


Well, the original question (see subject line) was about all-in-one 
printers, which implies more than just printing. It would be sad to see 
the point of the question lost in all the back and forth.



The Brother all-in-ones tend to have "scan-to-network" abilities,
though, and that doesn't require a driver -- just an internal
FTP or SAMBA server to receive the files. My workplace has a
bunch of these. Walk up, select Scan, select Network, and put
your document(s) in. You get PDFs or TIFFs in your filesystem.


That's more of a document scan feature, not so great for scanning tasks 
where you want more control.




Re: BTRFS and debian

2018-07-09 Thread David Christensen

On 07/09/18 11:17, Ge wrote:

Hi there!
I am new here.


Welcome! :-)



I am trying to install debian on a VM to test it before i install it on
my laptop. 


What hardware?  What host OS?  What hypervisor?


Since its a laptop i would like to encrypt the hard drive. 


Disk encryption is a discussion unto itself.  One choice is a laptop 
with firmware that supports self-encrypting drives (SED) and a matching 
HDD/SSD.  One software choice for Stretch is dm-crypt/LUKS.



I
would also like to be able to return my whole system to a previous state
or just my home directory.


Backup/recover, imaging, snapshots, version control, etc., are yet more 
discussions.  Since the subject line includes btrfs, subvolumes and 
snapshots may be an option:


https://en.wikipedia.org/wiki/Btrfs#Subvolumes_and_snapshots


I would need to work through the various use-cases to figure out what 
can be done with the subvolume mounted and in use, with the subvolume 
mounted but not in use, and with the subvolume not mounted.  (I use 
dd(1) to image partitions, with the LUKS container closed and/or the 
file system not mounted.)




I would like to ask

1. Whats the appropriate layout?
My current layout is:

LVM VG Laptop-vg LV root 16.9GB Linux device mapper (linear)
#1  16.9GB  f   btrfs   /


LVM VG Laptop-vg LV swap 4.3GB Linux device mapper (linear)
#1  4.3GB   f   swapswap

Encrypted volume (sda5_crypt)-21.2GB Linux device mapper (crypt)
#1  21.2GB  K   lvm

SCSI1 (0,0,0) (sda) 21.2GB ATA QEMU HARDDISK
#1  primary 254.8MB K   ext2/boot
#5  logical 21.2GB  K   crypto  (sda5_crypt)


I use 16 GiB SSD's and/or 16 GiB USB flash drives for system drives.  I 
wipe and test them using the manufacturer's diagnostic tool before 
installing Debian, or just wipe them with dd(1) if I do not have a tool. 
 In the Debian Installer, I choose 'manual' for 'partitioning method', 
create a new partition table (MBR), and create three primary partitions:


1   ~1 GiB btrfs mounted at /boot
2   ~2 GiB LUKS (random key) with swap
3  ~10 GiB LUKS (passphrase) with btrfs mounted at /

10 GiB root is enough for single-user Xfce workstation (my bulk data is 
on a file server).


The last ~3 GiB are unallocated -- for over-provisioning, because the 
drives have different numbers of sectors, and because of the GB/ GiB 
stupidity.




Should i make a different partition for /home/ ?


I don't -- I put my bulk data on a file server, including all e-mail 
attachments.  My home directory is ~1 GB.



(If/when I want to travel with my laptop, I will need to figure out how 
to set up a VPN to my file server.)




2.I will obviously make the / partition btrfs. Do i have to use btrfs
also on my boot partition?


No, but I do.



3.Is there any btrfs GUI program to manage my system on debian stretch
or on debian buster? or i can only do this from the command line?


STFW I see:

http://carfax.org.uk/btrfs-gui
http://snapper.io/


Stretch has a package for Snapper:

https://packages.debian.org/search?keywords=snapper=names=stable=all


(I use the included command-line tools.)


David



Re: terminal will not wak after hibernation

2018-07-09 Thread Celejar
On Sat, 7 Jul 2018 20:32:03 +0100
Joe  wrote:

> On Sat, 7 Jul 2018 11:24:59 -0400
> Dan Ritter  wrote:

...

> > The majority of machines can do suspend-to-RAM and/or
> > suspend-to-disk and wake up smoothly afterwards.
> > 
> 
> I'll take your word for it. I've never seen such a combination. I give
> suspend a try on my Gigabyte/AMD sid machine now and then, but it seems
> to work for no more than two weeks in any year. Currently it is
> leaving orphaned inodes, so I'm not experimenting too much.
> 
> Years ago, I used to spend time fixing it, but after a while I realised
> it would only break again a month later, so I've stopped bothering.
> I've yet to see a laptop/netbook screen backlight come on again after
> suspend...

?! Many people have suspend working fine (although many certainly
don't); suspend-to-ram has been working flawlessly (AFAICT) out of the
box on my Lenovo ThinkPad W550s.

Celejar



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Ben Caradoc-Davies

On 10/07/18 10:39, Dan Ritter wrote:

You're both missing the main point, which is that a Brother
printer with BRscript/3 is essentially a Postscript printer, and
you can treat it as one. No drivers needed.


And AFAIK models with BR-Script3 support also support PCL6, for which we 
have great CUPS/foomatic generic driver support. PostScript is lovely, 
but can sometimes be afflicted by crazy font substitution problems that 
do not seem to affect PCL6.


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Dan Ritter
On Mon, Jul 09, 2018 at 06:53:44PM -0400, Michael Stone wrote:
> On Mon, Jul 09, 2018 at 06:39:29PM -0400, Dan Ritter wrote:
> > You're both missing the main point, which is that a Brother
> > printer with BRscript/3 is essentially a Postscript printer, and
> > you can treat it as one. No drivers needed.
> 
> So you can use it as an all-in-one postscript printer/scanner?

You can use it as a printer. As far as I know there is no such
thing as a "postscript scanner".

The Brother all-in-ones tend to have "scan-to-network" abilities,
though, and that doesn't require a driver -- just an internal
FTP or SAMBA server to receive the files. My workplace has a 
bunch of these. Walk up, select Scan, select Network, and put
your document(s) in. You get PDFs or TIFFs in your filesystem.

-dsr-



Re: how to remove a file and change dns server

2018-07-09 Thread Ben Caradoc-Davies

.tsil siht no noitnevnoc eht si gnitsop mottoB

On 09/07/18 19:12, Long Wind wrote:

  Thank Ben! i just return home
my old resolv.conf has that line too
but i use twm and don't have easy gui app for Network Manager


You should be able to run nm-connection-editor manually at the command line.


but i don't miss them


You do now.


and could you help me delete that resolv.conf?


Unless you reconfigure NetworkManager, resolv.conf will just be 
rewritten whenever NetworkManager makes a connection. I see two options: 
either configure NetworkManager, or stop using it. You could mess with 
the configuration files in /etc/NetworkManager/system-connections, but I 
recommend instead using nm-connection-editor.


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Michael Stone

On Mon, Jul 09, 2018 at 06:39:29PM -0400, Dan Ritter wrote:

You're both missing the main point, which is that a Brother
printer with BRscript/3 is essentially a Postscript printer, and
you can treat it as one. No drivers needed.


So you can use it as an all-in-one postscript printer/scanner?



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Dan Ritter
On Mon, Jul 09, 2018 at 06:16:59PM -0400, Stefan Monnier wrote:
> > If you meant hplip drivers, which are available from Debian
> > repository, then I wonder what actually makes them so much "from
> > Debian"?  IMHO, their  avalability from Debian repository does not
> > really make them particulary  "Debian".  They are still developed by HP
> > or their development is  sponsored by HP, aren't they?
> 
> The issue is not who writes the code.  The issue is whether the code is
> available under a Free license such that it can be integrated cleanly
> into the OS distribution I use, e.g.
> - It works on all the architectures supported by Debian
> - The Debian maintainers will take care of compatibility between
>   different versions of packages.  So I won't have to choose between
>   sticking to some old version of CUPS (for example), or having to buy
>   a new printer, because the printer manufacturer stopped updating their
>   driver for printers older than 5 years (say).
> - I don't have to check the manufacturer's web-site for bug-fixes and
>   security updates: `apt-get` does it for me.
> 
> > And BTW HP allegedly native to Debian support was always crappy in my
> > personal experience (as HP printers themselves).  Especialy if compared
> > with Brother propriatory drivers, which are flawless.
> 
> To each his own.  I find such software to be a maintenance hassle.
> 
> For that reason I do not have an opinion on HP-vs-Brother in terms of
> technical quality of their drivers or their hardware: I haven't had the
> opportunity to try Brother's drivers, and I won't as long as it's
> proprietary (and IIUC they don't provide drivers that work on my
> ARM-based CUPS server anyway).
> 
> > The interesting point is that Linux community is always and rightfully
> > upset by the fact that manufacturers do not care to provide Linux
> > support.  IMHO we should then appreciate and support the manufacturer
> > when it cares about Linux users, shouldn't we?
> 
> I think it's stupid for a printer manufacturer not to provide its
> drivers as Free Software and collaborate with the community.  It might
> make sense not to provide drivers for GNU/Linux at all, but if they have
> to go through the trouble of writing the driver, they might as well make
> it Free Software.  It just makes a lot of commercial sense.

You're both missing the main point, which is that a Brother
printer with BRscript/3 is essentially a Postscript printer, and
you can treat it as one. No drivers needed.

-dsr-



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Stefan Monnier
> If you meant hplip drivers, which are available from Debian
> repository, then I wonder what actually makes them so much "from
> Debian"?  IMHO, their  avalability from Debian repository does not
> really make them particulary  "Debian".  They are still developed by HP
> or their development is  sponsored by HP, aren't they?

The issue is not who writes the code.  The issue is whether the code is
available under a Free license such that it can be integrated cleanly
into the OS distribution I use, e.g.
- It works on all the architectures supported by Debian
- The Debian maintainers will take care of compatibility between
  different versions of packages.  So I won't have to choose between
  sticking to some old version of CUPS (for example), or having to buy
  a new printer, because the printer manufacturer stopped updating their
  driver for printers older than 5 years (say).
- I don't have to check the manufacturer's web-site for bug-fixes and
  security updates: `apt-get` does it for me.

> And BTW HP allegedly native to Debian support was always crappy in my
> personal experience (as HP printers themselves).  Especialy if compared
> with Brother propriatory drivers, which are flawless.

To each his own.  I find such software to be a maintenance hassle.

For that reason I do not have an opinion on HP-vs-Brother in terms of
technical quality of their drivers or their hardware: I haven't had the
opportunity to try Brother's drivers, and I won't as long as it's
proprietary (and IIUC they don't provide drivers that work on my
ARM-based CUPS server anyway).

> The interesting point is that Linux community is always and rightfully
> upset by the fact that manufacturers do not care to provide Linux
> support.  IMHO we should then appreciate and support the manufacturer
> when it cares about Linux users, shouldn't we?

I think it's stupid for a printer manufacturer not to provide its
drivers as Free Software and collaborate with the community.  It might
make sense not to provide drivers for GNU/Linux at all, but if they have
to go through the trouble of writing the driver, they might as well make
it Free Software.  It just makes a lot of commercial sense.


Stefan



Re: BTRFS and debian

2018-07-09 Thread Matthew Crews
On 7/9/18 12:58 PM, Ulf Volmer wrote:
> On 09.07.2018 21:32, Matthew Crews wrote:
>> On 7/9/18 11:17 AM, Ge wrote:
>>> Should i make a different partition for /home/ ?
>>
>> I would, especially if you intend on using BTRFS snapshot feature. Last
>> thing you want to do is accidentally roll back a critical document.
> 
> why not using a subvolume for /home? i see that concept in OpenSuse for
> example to exclude /var from snapper. And it will be easier to handle a
> single LUKS volume.

Good point, I forgot you can do subvolumes that way.




Re: BTRFS and debian

2018-07-09 Thread Ulf Volmer
On 09.07.2018 22:52, Pascal Hambourg wrote:
> Le 09/07/2018 à 21:58, Ulf Volmer a écrit :

>> why not using a subvolume for /home? i see that concept in OpenSuse for
>> example to exclude /var from snapper.
> 
> openSUSE uses XFS for /home, not a btrfs subvolume.

Yes. i assume that's caused by the decision of the commercial version
(sles) to not support btrfs for data volumes.

i can't see any technical reason against using a subvolume for /home.

>> And it will be easier to handle a single LUKS volume.
> 
> So what ? The encrypted volume is used as an LVM physical volume and can
> contain any number of logical volumes.

ok, ack.

best regards
Ulf



Re: BTRFS and debian

2018-07-09 Thread Pascal Hambourg

Le 09/07/2018 à 21:58, Ulf Volmer a écrit :

On 09.07.2018 21:32, Matthew Crews wrote:

On 7/9/18 11:17 AM, Ge wrote:

Should i make a different partition for /home/ ?


I would, especially if you intend on using BTRFS snapshot feature. Last
thing you want to do is accidentally roll back a critical document.


why not using a subvolume for /home? i see that concept in OpenSuse for
example to exclude /var from snapper.


openSUSE uses XFS for /home, not a btrfs subvolume.


And it will be easier to handle a single LUKS volume.


So what ? The encrypted volume is used as an LVM physical volume and can 
contain any number of logical volumes. No need for btrfs subvolumes.




Re: BTRFS and debian

2018-07-09 Thread Ulf Volmer
On 09.07.2018 21:32, Matthew Crews wrote:
> On 7/9/18 11:17 AM, Ge wrote:
>> Should i make a different partition for /home/ ?
> 
> I would, especially if you intend on using BTRFS snapshot feature. Last
> thing you want to do is accidentally roll back a critical document.

why not using a subvolume for /home? i see that concept in OpenSuse for
example to exclude /var from snapper. And it will be easier to handle a
single LUKS volume.

best regards
Ulf



Re: BTRFS and debian

2018-07-09 Thread Matthew Crews
On 7/9/18 11:17 AM, Ge wrote:
> Should i make a different partition for /home/ ?

I would, especially if you intend on using BTRFS snapshot feature. Last
thing you want to do is accidentally roll back a critical document.

> 
> 2.I will obviously make the / partition btrfs. Do i have to use btrfs
> also on my boot partition?

No, you do not, but you can. I personally use EXT2.

> 
> 3.Is there any btrfs GUI program to manage my system on debian stretch
> or on debian buster? or i can only do this from the command line?
> 

Look into using Snapper, available in the Debian Stretch repos. Also see:
https://en.opensuse.org/Portal:Snapper




Re: Nvidia drivers

2018-07-09 Thread Boyan Penkov
Thanks for being a good guy and following up; I was looking into this 
and this report was keeping me from apt-get dist-upgrade this evening, 
so I know I'm OK now...


Silent thanks to all that have faffed with getting this sorted in the 
last week -- cheers!


On 07/09/2018 02:17 PM, Matthew Crews wrote:

On 7/9/18 5:55 AM, Matthew Crews wrote:

On Fri, Jul 06, 2018 at 09:55:45AM +0100, Darac Marjal wrote:

On Thu, Jul 05, 2018 at 08:03:22PM -0500, Mark Allums wrote:
 This requires a workaround, a kernel parameter at boot.
 GRUB_CMDLINE_LINUX_DEFAULT="slab_common.usercopy_fallback=y"
 Edit the config file like this,
 $sudo gedit /etc/default/grub
 Then run $sudo update-grub.

Actually, as of version 390.67-2, that's no longer needed. Quoting [1]:

I just tested with 4.16 kernel and 390.67-2 nvidia-driver, and
unfortunately this work-around is still required on my system. I was
unable to boot my system properly without the kernel parameter in GRUB.


You know what? Thats actually not true. I didn't realize that I was
still using the old driver version when I tested.

臘‍♂️

You can disregard. The kernel parameter is not needed with 390.67-2






Re: Nvidia drivers

2018-07-09 Thread Matthew Crews
On 7/9/18 5:55 AM, Matthew Crews wrote:
> On Fri, Jul 06, 2018 at 09:55:45AM +0100, Darac Marjal wrote:
>>> On Thu, Jul 05, 2018 at 08:03:22PM -0500, Mark Allums wrote:
>>> This requires a workaround, a kernel parameter at boot.
>>> GRUB_CMDLINE_LINUX_DEFAULT="slab_common.usercopy_fallback=y"
>>> Edit the config file like this,
>>> $sudo gedit /etc/default/grub
>>> Then run $sudo update-grub.
>> Actually, as of version 390.67-2, that's no longer needed. Quoting [1]:
> 
> I just tested with 4.16 kernel and 390.67-2 nvidia-driver, and
> unfortunately this work-around is still required on my system. I was
> unable to boot my system properly without the kernel parameter in GRUB.
> 

You know what? Thats actually not true. I didn't realize that I was
still using the old driver version when I tested.

臘‍♂️

You can disregard. The kernel parameter is not needed with 390.67-2




BTRFS and debian

2018-07-09 Thread Ge
Hi there!
I am new here.

I am trying to install debian on a VM to test it before i install it on
my laptop. Since its a laptop i would like to encrypt the hard drive. I
would also like to be able to return my whole system to a previous state
or just my home directory.

I would like to ask

1. Whats the appropriate layout?
My current layout is:

LVM VG Laptop-vg LV root 16.9GB Linux device mapper (linear)
#1  16.9GB  f   btrfs   /


LVM VG Laptop-vg LV swap 4.3GB Linux device mapper (linear)
#1  4.3GB   f   swapswap

Encrypted volume (sda5_crypt)-21.2GB Linux device mapper (crypt)
#1  21.2GB  K   lvm

SCSI1 (0,0,0) (sda) 21.2GB ATA QEMU HARDDISK
#1  primary 254.8MB K   ext2/boot
#5  logical 21.2GB  K   crypto  (sda5_crypt)


Should i make a different partition for /home/ ?


2.I will obviously make the / partition btrfs. Do i have to use btrfs
also on my boot partition?


3.Is there any btrfs GUI program to manage my system on debian stretch
or on debian buster? or i can only do this from the command line?


Thanks in advance for your help



More on locale

2018-07-09 Thread John
A short time ago I sought your advice about messages  I am getting
about locales  I thought I did what was suggested but I still see

  CC   libclamav_internal_utils_nothreads_la-strlcat.lo
../libtool: line 1748: warning: setlocale: LC_CTYPE: cannot change
locale (en_US.UTF-8)
when compiling, and

(firefox-esr:11622): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.

from firefox.  There are other similar.   I have not got this problem
on any other machine.  How can I fix it, and ensure it does not happen
again?


==John ffitch



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Juan R. de Silva
On Mon, 09 Jul 2018 11:14:53 -0400, Stefan Monnier wrote:

>> I used to own MFC 7460DN. I own currently HL-L2389DW wireless -e
>> xcellent unit.  Any of them work under Ubuntu, Debian (my current
>> distro), Fedora,
>> OpenSuse, etc. without a problem.  Installation is a breeze.  The
>> drivers available on Brother website.
> 
> Wait, does that mean the printer is not supported directly by Debian
> (contrary to HP's for example)?  Why not?  Are the drivers proprietary?
> How do you make sure the drivers are kept up-to-date with Debian's
> infrastructure?
> 
> 
> Stefan
> 
> 
> PS: To me "works under Debian" should mean that I can make it work by
> installing packages from Debian and nowhere else.

If by "installing packages from Debian" you mean Debian printer drivers 
collection then one would have to always limit himself to rather narrow 
aray of old or very old moddels of printers and very often to accept the 
support provided as it is, which more then often is limited.

If you meant hplip drivers, which are available from Debian repository, 
then I wonder what actually makes them so much "from Debian"? IMHO, their 
avalability from Debian repository does not really make them particulary 
"Debian". They are still developed by HP or their development is 
sponsored by HP, aren't they?

And BTW HP allegedly native to Debian support was always crappy in my 
personal experience (as HP printers themselves). Especialy if compared 
with Brother propriatory drivers, which are flawless.

While I appreciate your stand, to me as long as a manufacturer provides 
easily installable drivers and keeps them up to date is just fine. And 
this is the case with Brother. Escpecially considering that Brother cares 
to provide drivers for different major distros like Debian, Ubuntu, 
OpenSUSE in both .deb and .rmp format.

Again, I personaly never regreted the switch. You see I am not a 
purist. :-)

The interesting point is that Linux community is always and rightfully 
upset by the fact that manufacturers do not care to provide Linux 
support. IMHO we should then appreciate and support the manufacturer when 
it cares about Linux users, shouldn't we?

Thanks



Re: Debian testing - release number

2018-07-09 Thread Curt
On 2018-07-09, Greg Wooledge  wrote:
> On Sat, Jul 07, 2018 at 07:55:26AM +, Curt wrote:
>> On 2018-07-07, davidson  wrote:
>> > Speculation: I suspect that the listserv software escapes "From" after
>> > a newline, and that its chosen escape is synonymous with the embedded
>> > quote character.[1]
>
>> The culprit is therefore Wooledge himself.
>
> The culprit is "mbox". 
>

I meant only that you were the author of the malicious comment.



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Stefan Monnier
> Note that these settings use PCL6 emulation. Models that lack PCL6 support
> may need proprietary Brother CUPS drivers. When I checked, these were only
> available for i386. When I switched to the foomatic PCL6 driver, I was able
> to ditch the i386 drivers and my entire i386 arch support. This was a few
> years ago and the situation may be better.

Oh, so those drivers won't work on an Cubietruck, ESPRESSObin or other
little ARM boxes?
If so, I don't think "works under Debian" is applicable.


Stefan



Re: Looking for ratings of all-in-one printers for Linux (Ubuntu in particular)

2018-07-09 Thread Stefan Monnier
> I used to own MFC 7460DN. I own currently HL-L2389DW wireless -e xcellent
> unit.  Any of them work under Ubuntu, Debian (my current distro), Fedora,
> OpenSuse, etc. without a problem.  Installation is a breeze.  The drivers
> available on Brother website.

Wait, does that mean the printer is not supported directly by Debian
(contrary to HP's for example)?  Why not?  Are the drivers proprietary?
How do you make sure the drivers are kept up-to-date with Debian's
infrastructure?


Stefan


PS: To me "works under Debian" should mean that I can make it work by
installing packages from Debian and nowhere else.



Re: VT2 for Xorg?

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 11:52:05PM +1000, Zenaan Harkness wrote:
> On Mon, Jul 09, 2018 at 09:41:32AM -0400, Dan Ritter wrote:
> > On Mon, Jul 09, 2018 at 09:08:17AM -0400, Greg Wooledge wrote:
> > > On Sun, Jul 08, 2018 at 01:08:59PM +1000, Zenaan Harkness wrote:
> > > > With a bash fn like:
> > > >   ttyGetNum () { return $(tty | grep -oE '[0-9]+$') ; }
> > > > 
> > > > Then something like this will id your current tty:
> > > >   ttyGetNum;  export Xorg_vt=vt$?
> > > 
> > > Ew!
> > > 
> > > The return status of a shell function is NOT intended to be used this way.
> > > It's analogous to the exit status of a shell command.  It's a single
> > > byte, unsigned, so you can only return 0 to 255.  It's intended to convey
> > > success or failure, not to carry an actual data payload.
> > > 
> > > I recommend that you switch to using a regular variable for this purpose.
> > > I happen to like "r".  With a regular variable, you're not restricted to
> > > integers from 0 to 255, and you retain the ability to convey 
> > > succss/failure
> > > through the return code.
> > > 
> > > As an aside, you can save the call to GNU grep by simply stripping the
> > > leading "/dev/tty" from the output of tty using a shell parameter
> > > expansion:
> > > 
> > >   ttyGetNum() {
> > > local t
> > > t=$(tty) || return 1
> > > [[ $t = /dev/tty+([0-9]) ]] || return 1
> > > r=${t#/dev/tty}
> > >   }
> > > 
> > >   if ttyGetNum; then export Xorg_vt=vt"$r"; fi
> > > 
> > 
> > fgconsole returns the current virtual terminal number.
> > chvt switches to a specified virtual terminal.
> 
> Sweet!
> 
> > These are from package kbd.
> 
> Was already installed by me :)
> 
> And this will satisfy Dan's objection to a perfectly good use of
> "return" values ;D

s/Dan/Greg/ # I need sleep alert



Re: VT2 for Xorg?

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:41:32AM -0400, Dan Ritter wrote:
> On Mon, Jul 09, 2018 at 09:08:17AM -0400, Greg Wooledge wrote:
> > On Sun, Jul 08, 2018 at 01:08:59PM +1000, Zenaan Harkness wrote:
> > > With a bash fn like:
> > >   ttyGetNum () { return $(tty | grep -oE '[0-9]+$') ; }
> > > 
> > > Then something like this will id your current tty:
> > >   ttyGetNum;  export Xorg_vt=vt$?
> > 
> > Ew!
> > 
> > The return status of a shell function is NOT intended to be used this way.
> > It's analogous to the exit status of a shell command.  It's a single
> > byte, unsigned, so you can only return 0 to 255.  It's intended to convey
> > success or failure, not to carry an actual data payload.
> > 
> > I recommend that you switch to using a regular variable for this purpose.
> > I happen to like "r".  With a regular variable, you're not restricted to
> > integers from 0 to 255, and you retain the ability to convey succss/failure
> > through the return code.
> > 
> > As an aside, you can save the call to GNU grep by simply stripping the
> > leading "/dev/tty" from the output of tty using a shell parameter
> > expansion:
> > 
> >   ttyGetNum() {
> > local t
> > t=$(tty) || return 1
> > [[ $t = /dev/tty+([0-9]) ]] || return 1
> > r=${t#/dev/tty}
> >   }
> > 
> >   if ttyGetNum; then export Xorg_vt=vt"$r"; fi
> > 
> 
> fgconsole returns the current virtual terminal number.
> chvt switches to a specified virtual terminal.

Sweet!

> These are from package kbd.

Was already installed by me :)

And this will satisfy Dan's objection to a perfectly good use of
"return" values ;D



Re: VT2 for Xorg?

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:08:17AM -0400, Greg Wooledge wrote:
> On Sun, Jul 08, 2018 at 01:08:59PM +1000, Zenaan Harkness wrote:
> > With a bash fn like:
> >   ttyGetNum () { return $(tty | grep -oE '[0-9]+$') ; }
> > 
> > Then something like this will id your current tty:
> >   ttyGetNum;  export Xorg_vt=vt$?
> 
> Ew!

:D


> The return status of a shell function is NOT intended to be used this way.
> It's analogous to the exit status of a shell command.  It's a single
> byte, unsigned, so you can only return 0 to 255.  It's intended to convey
> success or failure, not to carry an actual data payload.

It's a byte, and I have slightly less than 255 Linux VTs, so it's
adequate to this particular purpose ;)


> I recommend that you switch to using a regular variable for this purpose.
> I happen to like "r".  With a regular variable, you're not restricted to
> integers from 0 to 255, and you retain the ability to convey succss/failure
> through the return code.
> 
> As an aside, you can save the call to GNU grep by simply stripping the
> leading "/dev/tty" from the output of tty using a shell parameter
> expansion:
> 
>   ttyGetNum() {
> local t
> t=$(tty) || return 1
> [[ $t = /dev/tty+([0-9]) ]] || return 1
> r=${t#/dev/tty}
>   }
> 
>   if ttyGetNum; then export Xorg_vt=vt"$r"; fi

I have been on a bit of a "support dash/ posix shell" and therefore
removed various Bash-isms. There was at least one bash-ism (that I
was using) that I was not able to remove. At least not easily.

I don't remember what that was at the moment - haven't been hacking
on this for some months.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:32:31AM -0400, Greg Wooledge wrote:
> On Mon, Jul 09, 2018 at 11:20:20PM +1000, Zenaan Harkness wrote:
> > configured to say office, I want to be able to run my reset bash
> > script as follows:
> > 
> >  reset eth0=internet
> 
> I suggest you choose a different name, as reset(1) is already taken.

Ack.


> If your script is supposed to take two pieces of information, I would
> suggest that you pass them as two separate arguments, rather than one
> argument with '=' in the middle of it.  That said, parsing foo=bar is
> not terribly hard, so you *could* do it this way... but it's not the
> way I would choose.

In general yes I agree, but in this case, I allow for multiple eth
devices to be reset with a single call of the script, so parse each
pair if needed (since not all device types have the mappings, in my
setup, only some).

Thanks again,



Re: VT2 for Xorg?

2018-07-09 Thread Dan Ritter
On Mon, Jul 09, 2018 at 09:08:17AM -0400, Greg Wooledge wrote:
> On Sun, Jul 08, 2018 at 01:08:59PM +1000, Zenaan Harkness wrote:
> > With a bash fn like:
> >   ttyGetNum () { return $(tty | grep -oE '[0-9]+$') ; }
> > 
> > Then something like this will id your current tty:
> >   ttyGetNum;  export Xorg_vt=vt$?
> 
> Ew!
> 
> The return status of a shell function is NOT intended to be used this way.
> It's analogous to the exit status of a shell command.  It's a single
> byte, unsigned, so you can only return 0 to 255.  It's intended to convey
> success or failure, not to carry an actual data payload.
> 
> I recommend that you switch to using a regular variable for this purpose.
> I happen to like "r".  With a regular variable, you're not restricted to
> integers from 0 to 255, and you retain the ability to convey succss/failure
> through the return code.
> 
> As an aside, you can save the call to GNU grep by simply stripping the
> leading "/dev/tty" from the output of tty using a shell parameter
> expansion:
> 
>   ttyGetNum() {
> local t
> t=$(tty) || return 1
> [[ $t = /dev/tty+([0-9]) ]] || return 1
> r=${t#/dev/tty}
>   }
> 
>   if ttyGetNum; then export Xorg_vt=vt"$r"; fi
> 

fgconsole returns the current virtual terminal number.
chvt switches to a specified virtual terminal.

These are from package kbd.

-dsr-



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Greg Wooledge
On Mon, Jul 09, 2018 at 11:20:20PM +1000, Zenaan Harkness wrote:
> configured to say office, I want to be able to run my reset bash
> script as follows:
> 
>  reset eth0=internet

I suggest you choose a different name, as reset(1) is already taken.

If your script is supposed to take two pieces of information, I would
suggest that you pass them as two separate arguments, rather than one
argument with '=' in the middle of it.  That said, parsing foo=bar is
not terribly hard, so you *could* do it this way... but it's not the
way I would choose.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:16:51PM +1000, Zenaan Harkness wrote:
> On Mon, Jul 09, 2018 at 11:01:22AM +0100, Darac Marjal wrote:
> > On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > > So I change between two internet connections from time to time.
> > > 
> > > I use /etc/network/interfaces ("/e/n/i")
> > > 
> > > When I modify /e/n/i , I then run a little "reset" script, like so:
> > > 
> > > dev=eth0
> > > ifdown $dev
> > > ifconfig $dev down
> > > ifup $dev
> > > 
> > > Here and there I've had problems.
> > > 
> > > Recently I discovered the ip command.
> > > 
> > > Apparently, after reconfiguring as above, two IP addresses end up
> > > attached to eth0 - one for each (staticly configured in /e/n/i)
> > > ISP network connection.
> > > 
> > > So now I am manually running something like:
> > > 
> > > ifconfig eth0 down
> > > ip address del 10.1.1.30/24 dev eth0
> > > ip address del 192.168.1.30/24 dev eth0
> > > ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
> > > ifup eth0
> > > 
> > > But this (atm) is a very manual process, and it seems to me that I am
> > > not taking down eth0 properly, and that I should not have to
> > > introduce IP address awareness into my eth reset script, just to
> > > properly reset my eth0 static configuration.
> > > 
> > > Any pointers of what I need to read/ what I am missing, would be
> > > really appreciated.
> > > 
> > 
> > ifup and ifdown read the contents of /e/n/i to determine what tasks to 
> > perform. So, in particular, ifdown reads that
> > file to determine what addresses to remove from the interface.
> > 
> > That being said, you might find it more suitable to change your script to:
> >  1. ifdown the interface
> >  2. Change the network parameters (either by using sed etc to edit the 
> > file or to move 'canned' files in/out of
> > /etc/network/interfaces.d)
> >  3. ifup the interface
> > 
> > What I would do, in your situation is to have a set of files in 
> > /etc/network/interfaces.d called, for example "!home",
> > "!work", "!travel" or whatever makes sense for your locations. The leading 
> > "!" character makes the configuration
> > invalid to ifupdown, so will be ignored. Your script can then rename any 
> > files that DON'T have a "!" in front to do
> > so, then rename the requested file to NOT have a "!" in front e.g.
> > 
> >  #!/bin/bash
> >  ifdown eth0
> >  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
> >  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
> >  ifup eth0
> 
> Perfect! Thanks.
> Also perhaps interface map[ping] could work... I used that once years
> ago... need to re-read man interfaces again.

OK, so I learnt a bit more about interfaces mapping stanzas, and bash
parameter suffix removal:

Since I have two mappings ("office" and "internet"), when eth0 is
configured to say office, I want to be able to run my reset bash
script as follows:

 reset eth0=internet

Now "ifdown eth0=internet" when it's configured for office, might not
work, even though "ifup eth0=internet" would be fine.

We don't need to guess the previous state though, we just need to
remove the virtual interfaces specifier ("=internet") like so inside
the reset script:

 neweth="$1" # e.g. "eth0=internet"
 ifdown ${neweth%=*} # remove "=..." suffix
 ifup $neweth # include suffix

Voi la :)

Thanks everyone, really appreciated!



Re: how to remove a file and change dns server

2018-07-09 Thread Greg Wooledge
On Mon, Jul 09, 2018 at 12:55:21AM +, Long Wind wrote:
> -rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
> 
> i can't remove file above, the story behind it:

You don't WANT to remove that file!  If you do, you won't be able to
use DNS.

> dns servers are usually provided by isp
> but they can't be used with vpn
> so vpn provider told me to make a special resolv.conf
> which contains dns servers not provided isp

You probably want to look into the resolvconf package:

https://packages.debian.org/stretch/resolvconf
http://manpages.debian.org/resolvconf

Essentially, you have two things that both want to manage your resolv.conf
file for you: your DHCP client, and your VPN client.  You'll have to work
out how to make them coexist.  The resolvconf package in Debian is one
such way.



Re: Nvidia drivers

2018-07-09 Thread Matthew Crews
On Fri, Jul 06, 2018 at 09:55:45AM +0100, Darac Marjal wrote:
>> On Thu, Jul 05, 2018 at 08:03:22PM -0500, Mark Allums wrote:
>> This requires a workaround, a kernel parameter at boot.
>> GRUB_CMDLINE_LINUX_DEFAULT="slab_common.usercopy_fallback=y"
>> Edit the config file like this,
>> $sudo gedit /etc/default/grub
>> Then run $sudo update-grub.
> Actually, as of version 390.67-2, that's no longer needed. Quoting [1]:

I just tested with 4.16 kernel and 390.67-2 nvidia-driver, and
unfortunately this work-around is still required on my system. I was
unable to boot my system properly without the kernel parameter in GRUB.



pEpkey.asc
Description: application/pgp-keys


Re: VT2 for Xorg?

2018-07-09 Thread Greg Wooledge
On Sun, Jul 08, 2018 at 01:08:59PM +1000, Zenaan Harkness wrote:
> With a bash fn like:
>   ttyGetNum () { return $(tty | grep -oE '[0-9]+$') ; }
> 
> Then something like this will id your current tty:
>   ttyGetNum;  export Xorg_vt=vt$?

Ew!

The return status of a shell function is NOT intended to be used this way.
It's analogous to the exit status of a shell command.  It's a single
byte, unsigned, so you can only return 0 to 255.  It's intended to convey
success or failure, not to carry an actual data payload.

I recommend that you switch to using a regular variable for this purpose.
I happen to like "r".  With a regular variable, you're not restricted to
integers from 0 to 255, and you retain the ability to convey succss/failure
through the return code.

As an aside, you can save the call to GNU grep by simply stripping the
leading "/dev/tty" from the output of tty using a shell parameter
expansion:

  ttyGetNum() {
local t
t=$(tty) || return 1
[[ $t = /dev/tty+([0-9]) ]] || return 1
r=${t#/dev/tty}
  }

  if ttyGetNum; then export Xorg_vt=vt"$r"; fi



Re: Debian testing - release number

2018-07-09 Thread Greg Wooledge
On Sat, Jul 07, 2018 at 07:55:26AM +, Curt wrote:
> On 2018-07-07, davidson  wrote:
> > Speculation: I suspect that the listserv software escapes "From" after
> > a newline, and that its chosen escape is synonymous with the embedded
> > quote character.[1]

> The culprit is therefore Wooledge himself.

The culprit is "mbox". 

Because the 5-byte string "From " at the start of a line delimits new
messages in "mbox" formats, many mail systems will alter the body of a
message, placing ">" in front of leading "From " strings.  This happens
quite frequently.

As JDEBP writes on the web page cited above:

  The "mboxo" mailbox format uses irreversible "From quoting" that
  corrupts messages. Before a message is appended to a "mboxo" mailbox
  file, it is transformed. Any line of the message, in either the
  header or the body, that begins with the five characters 'F', 'r',
  'o', 'm', and ' ' has a single '>' character prepended to it. This
  transformation is irreversible because it is impossible to distinguish,
  when reading a message, a line that began '>From ' in the original
  message from a line that began 'From ' in the original message and
  that was subsequently transformed.



Re: Editing a piped in stream?

2018-07-09 Thread Greg Wooledge
On Sun, Jul 08, 2018 at 07:39:07AM +0200, john doe wrote:
> The issue here is that we don't know what the OP wants (original and desired
> output)!!! :)

Indeed.  That's nearly always the problem (not just with this individual).

https://mywiki.wooledge.org/XyProblem
https://mywiki.wooledge.org/ParsingLs



Re: Separate /home directories etc?

2018-07-09 Thread Greg Wooledge
On Sat, Jul 07, 2018 at 08:35:51PM -0500, David Wright wrote:
> On Sat 07 Jul 2018 at 08:04:16 (-0400), cyaiplexys wrote:
> > I used to have a separate /home directory back in the day. But I
> > realized that anytime I wanted to reinstall or redo my system
> > (upgrade major version seems to work better on a fresh install on my
> > systems), I would have problems with some apps due to old and
> > outdated configurations in my /home directory. So every time I went
> > to do a (re)install, I ended up wiping the /home directory anyway
> > (after backing up my data which I never had much of).
> 
> I can't see any of my files under /home that are affected by the
> Debian version except dotfiles and directories (and some of the
> dotty stuff is only cache files anyway). So I can't see a reason to
> wipe /home entirely.

Based on my time in IRC, the people who use Desktop Environments
sometimes run into this incomatibility between old version dot files
and new version software.

Meanwhile, users of traditional command-line and terminal programs, like
me, have been running with basically the same dot files for two decades.

It seems the DE developers don't place a high priority on backward
compatibility, or in-place upgrades, or making things Just Work.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 11:01:22AM +0100, Darac Marjal wrote:
> On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > So I change between two internet connections from time to time.
> > 
> > I use /etc/network/interfaces ("/e/n/i")
> > 
> > When I modify /e/n/i , I then run a little "reset" script, like so:
> > 
> > dev=eth0
> > ifdown $dev
> > ifconfig $dev down
> > ifup $dev
> > 
> > Here and there I've had problems.
> > 
> > Recently I discovered the ip command.
> > 
> > Apparently, after reconfiguring as above, two IP addresses end up
> > attached to eth0 - one for each (staticly configured in /e/n/i)
> > ISP network connection.
> > 
> > So now I am manually running something like:
> > 
> > ifconfig eth0 down
> > ip address del 10.1.1.30/24 dev eth0
> > ip address del 192.168.1.30/24 dev eth0
> > ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
> > ifup eth0
> > 
> > But this (atm) is a very manual process, and it seems to me that I am
> > not taking down eth0 properly, and that I should not have to
> > introduce IP address awareness into my eth reset script, just to
> > properly reset my eth0 static configuration.
> > 
> > Any pointers of what I need to read/ what I am missing, would be
> > really appreciated.
> > 
> 
> ifup and ifdown read the contents of /e/n/i to determine what tasks to 
> perform. So, in particular, ifdown reads that
> file to determine what addresses to remove from the interface.
> 
> That being said, you might find it more suitable to change your script to:
>  1. ifdown the interface
>  2. Change the network parameters (either by using sed etc to edit the 
> file or to move 'canned' files in/out of
> /etc/network/interfaces.d)
>  3. ifup the interface
> 
> What I would do, in your situation is to have a set of files in 
> /etc/network/interfaces.d called, for example "!home",
> "!work", "!travel" or whatever makes sense for your locations. The leading 
> "!" character makes the configuration
> invalid to ifupdown, so will be ignored. Your script can then rename any 
> files that DON'T have a "!" in front to do
> so, then rename the requested file to NOT have a "!" in front e.g.
> 
>  #!/bin/bash
>  ifdown eth0
>  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
>  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
>  ifup eth0

Perfect! Thanks.
Also perhaps interface map[ping] could work... I used that once years
ago... need to re-read man interfaces again.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread john doe

On 7/9/2018 12:01 PM, Darac Marjal wrote:

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:

So I change between two internet connections from time to time.

I use /etc/network/interfaces ("/e/n/i")

When I modify /e/n/i , I then run a little "reset" script, like so:

dev=eth0
ifdown $dev
ifconfig $dev down
ifup $dev

Here and there I've had problems.

Recently I discovered the ip command.

Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.

So now I am manually running something like:

ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
ifup eth0

But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.

Any pointers of what I need to read/ what I am missing, would be
really appreciated.



ifup and ifdown read the contents of /e/n/i to determine what tasks to 
perform. So, in particular, ifdown reads that file to determine what 
addresses to remove from the interface.


That being said, you might find it more suitable to change your script to:
  1. ifdown the interface
  2. Change the network parameters (either by using sed etc to edit the 
     file or to move 'canned' files in/out of /etc/network/interfaces.d)

  3. ifup the interface

What I would do, in your situation is to have a set of files in 
/etc/network/interfaces.d called, for example "!home", "!work", 
"!travel" or whatever makes sense for your locations. The leading "!" 
character makes the configuration invalid to ifupdown, so will be 
ignored. Your script can then rename any files that DON'T have a "!" in 
front to do so, then rename the requested file to NOT have a "!" in 
front e.g.


  #!/bin/bash
  ifdown eth0
  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
  ifup eth0



I would use mapping stanza instead:

http://manpages.ubuntu.com/manpages/trusty/man5/interfaces.5.html

--
John Doe



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Darac Marjal

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:

So I change between two internet connections from time to time.

I use /etc/network/interfaces ("/e/n/i")

When I modify /e/n/i , I then run a little "reset" script, like so:

dev=eth0
ifdown $dev
ifconfig $dev down
ifup $dev

Here and there I've had problems.

Recently I discovered the ip command.

Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.

So now I am manually running something like:

ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
ifup eth0

But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.

Any pointers of what I need to read/ what I am missing, would be
really appreciated.



ifup and ifdown read the contents of /e/n/i to determine what tasks to 
perform. So, in particular, ifdown reads that file to determine what 
addresses to remove from the interface.


That being said, you might find it more suitable to change your script 
to:

 1. ifdown the interface
 2. Change the network parameters (either by using sed etc to edit the 
file or to move 'canned' files in/out of /etc/network/interfaces.d)

 3. ifup the interface

What I would do, in your situation is to have a set of files in 
/etc/network/interfaces.d called, for example "!home", "!work", 
"!travel" or whatever makes sense for your locations. The leading "!" 
character makes the configuration invalid to ifupdown, so will be 
ignored. Your script can then rename any files that DON'T have a "!" in 
front to do so, then rename the requested file to NOT have a "!" in 
front e.g.


 #!/bin/bash
 ifdown eth0
 prename 's/^/!' /etc/network/interfaces.d/[^\!]*
 mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
 ifup eth0

--
For more information, please reread.


signature.asc
Description: PGP signature


Re: how to remove a file and change dns server

2018-07-09 Thread Max Harmathy


Am 09.07.2018 um 09:12 schrieb Long Wind:
> Thank Ben! i just return home
> 
> my old resolv.conf has that line too
> but i use twm and don't have easy gui app for Network Manager
> 
> but i don't miss them
> and could you help me delete that resolv.conf?
> Thanks!
> 
> On Monday, July 9, 2018, 9:24:37 AM GMT+8, Ben Caradoc-Davies
>  wrote:
> 
> 
> On 09/07/18 12:55, Long Wind wrote:
> 
>> -rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
>> i can't remove file above, the story behind it:
>> dns servers are usually provided by isp
>> but they can't be used with vpn
>> so vpn provider told me to make a special resolv.conf
>> which contains dns servers not provided isp
>> dns server by vpn provider is useful when i visit blocked sites
>> but they are not as fast as those by isp
>> my question is  how to change dns server as needed?
>> it seem that resolv.conf is automatically managed
>> and how to remove the special resolv.conf
> 
> 
> What application do you use to manage your network connections? I use
> NetworkManager, which manages resolve.conf. I find this more convenient
> than manually editing resolv.conf. My resolv.conf starts with:
> 
> # Generated by NetworkManager
> 
> If I use the NetworkManager desktop applet to access the connection
> editor (nm-connection-editor), I can edit the connection; under IPv4
> Settings, I set Method Manual and list the DNS servers for this
> connection. I can also see the DNS servers listed under the Connection
> Information. The default behaviour is to use the DNS server supplied via
> DHCP, for example, from your router (likely the router itself). You will
> likely need two connections: one for your main connection and one for
> your VPN. I suggest adding custom DNS servers under your VPN connection
> settings.
> 
> Kind regards,
> 
> -- 
> Ben Caradoc-Davies mailto:b...@transient.nz>>
> Director
> Transient Software Limited 
> New Zealand
> 
> 

Try using dnsmasq with NetworkManager.


Hint:
https://askubuntu.com/q/519946



signature.asc
Description: OpenPGP digital signature


Bad recoding with ffmpeg

2018-07-09 Thread Michelle Konzack
Hello*,

I recode from a PHP webinterface with the help of ffmpeg.

My mobil Videoplayer does not support OGM files

The commandline is simply

ffmpeg -i input.ogm output.mp4

but I get this  output:

[ c 'ffmpeg -i input.ogm output.mp4' ]--
ffmpeg version 3.2.10-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg
developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516



[libx264 @ 0x562803732a80] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4
AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
aq=1:1.00
Output #0, mp4, to 'output.mp4':



Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (vorbis (native) -> aac (native))
Press [q] to stop, [?] for help
Past duration 0.92 too large
Last message repeated 9 times
Past duration 0.92 too large 195kB time=00:00:07.22 bitrate=
221.2kbits/s dup=40 drop=0 speed=3.45x
Last message repeated 1 times
Past duration 0.92 too large 876kB time=00:00:19.02 bitrate=
377.4kbits/s dup=133 drop=0 speed=2.27x
Past duration 0.92 too large 930kB time=00:00:19.92 bitrate=
382.1kbits/s dup=136 drop=0 speed=2.24x
Past duration 0.92 too large1164kB time=00:00:24.48 bitrate=
389.3kbits/s dup=163 drop=0 speed=2.23x
Past duration 0.92 too large1331kB time=00:00:27.77 bitrate=
392.4kbits/s dup=181 drop=0 speed=2.22x
Past duration 0.92 too large1444kB time=00:00:30.02 bitrate=
393.9kbits/s dup=190 drop=0 speed=2.22x
Last message repeated 1 times
Past duration 0.92 too large1561kB time=00:00:32.12 bitrate=
397.9kbits/s dup=202 drop=0 speed=2.21x
Last message repeated 1 times


So to convert this OGM files I need an extra option, but which?

Thanks in advance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 08:08:46AM +0200, to...@tuxteam.de wrote:
> On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > So I change between two internet connections from time to time.
> > 
> > I use /etc/network/interfaces ("/e/n/i")
> > 
> > When I modify /e/n/i , I then run a little "reset" script, like so:
> > 
> > dev=eth0
> > ifdown $dev
> > ifconfig $dev down
> > ifup $dev
> 
> Perhaps, just perhaps you should be doing "ifdown $dev" *before*
> editing your e/n/i: ifdown may get confused finding parameters
> there corresponding to the future, not to the current connections.
> 
> I use ifupdown myself and have hit few problems so far by doing
> changes after doing the ifdown (and before the ifup, of course :)

Ah yes, that could be possible. I shall investigate.

Re wicd - I want to maintain control by static configuration (in
/e/n/i), and absolutely minimise auto-configuration.

For example, when I need to test (or use as a one-shot) DHCP, I
ifdown $eth then:

dhclient -d $eth

(-d keeps it in the foreground, and logs are splendiforously
displayed in real time, in the tty I start it from).



Re: how to remove a file and change dns server

2018-07-09 Thread john doe

Bottom posting.

On 7/9/2018 10:05 AM, Long Wind wrote:

  Thank John!


i have a look at the thread suggested by Roberto
it's long and my energy is limited

but i have 2 PCs and i can let one use dns by isp, the other by vpn
so i want to delete that file

 On Monday, July 9, 2018, 3:22:36 PM GMT+8, john doe 
 wrote:
  
  Bottom posting.


On 7/9/2018 9:12 AM, Long Wind wrote:

   Thank Ben! i just return home

my old resolv.conf has that line too
but i use twm and don't have easy gui app for Network Manager

but i don't miss them
and could you help me delete that resolv.conf?
Thanks!

       On Monday, July 9, 2018, 9:24:37 AM GMT+8, Ben Caradoc-Davies 
 wrote:
   
   On 09/07/18 12:55, Long Wind wrote:

-rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
i can't remove file above, the story behind it:
dns servers are usually provided by isp
but they can't be used with vpn
so vpn provider told me to make a special resolv.conf
which contains dns servers not provided isp
dns server by vpn provider is useful when i visit blocked sites
but they are not as fast as those by isp
my question is  how to change dns server as needed?
it seem that resolv.conf is automatically managed
and how to remove the special resolv.conf


What application do you use to manage your network connections? I use
NetworkManager, which manages resolve.conf. I find this more convenient
than manually editing resolv.conf. My resolv.conf starts with:

# Generated by NetworkManager

If I use the NetworkManager desktop applet to access the connection
editor (nm-connection-editor), I can edit the connection; under IPv4
Settings, I set Method Manual and list the DNS servers for this
connection. I can also see the DNS servers listed under the Connection
Information. The default behaviour is to use the DNS server supplied via
DHCP, for example, from your router (likely the router itself). You will
likely need two connections: one for your main connection and one for
your VPN. I suggest adding custom DNS servers under your VPN connection
settings.

Kind regards,



The issue is not to "remove" resolv.conf(5) but to understand which
process is olding that file then you would use that utility to append
your proper lines.



Deleting '/etc/resolv.conf' is a red-herring.
The resolv.conf file is most likely to b overwritten.

--
John Doe



Re: how to remove a file and change dns server

2018-07-09 Thread Long Wind
 Thank John!


i have a look at the thread suggested by Roberto
it's long and my energy is limited

but i have 2 PCs and i can let one use dns by isp, the other by vpn
so i want to delete that file

On Monday, July 9, 2018, 3:22:36 PM GMT+8, john doe  
wrote:  
 
 Bottom posting.

On 7/9/2018 9:12 AM, Long Wind wrote:
>  Thank Ben! i just return home
> 
> my old resolv.conf has that line too
> but i use twm and don't have easy gui app for Network Manager
> 
> but i don't miss them
> and could you help me delete that resolv.conf?
> Thanks!
> 
>      On Monday, July 9, 2018, 9:24:37 AM GMT+8, Ben Caradoc-Davies 
> wrote:
>  
>  On 09/07/18 12:55, Long Wind wrote:
>> -rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
>> i can't remove file above, the story behind it:
>> dns servers are usually provided by isp
>> but they can't be used with vpn
>> so vpn provider told me to make a special resolv.conf
>> which contains dns servers not provided isp
>> dns server by vpn provider is useful when i visit blocked sites
>> but they are not as fast as those by isp
>> my question is  how to change dns server as needed?
>> it seem that resolv.conf is automatically managed
>> and how to remove the special resolv.conf
> 
> What application do you use to manage your network connections? I use
> NetworkManager, which manages resolve.conf. I find this more convenient
> than manually editing resolv.conf. My resolv.conf starts with:
> 
> # Generated by NetworkManager
> 
> If I use the NetworkManager desktop applet to access the connection
> editor (nm-connection-editor), I can edit the connection; under IPv4
> Settings, I set Method Manual and list the DNS servers for this
> connection. I can also see the DNS servers listed under the Connection
> Information. The default behaviour is to use the DNS server supplied via
> DHCP, for example, from your router (likely the router itself). You will
> likely need two connections: one for your main connection and one for
> your VPN. I suggest adding custom DNS servers under your VPN connection
> settings.
> 
> Kind regards,
> 

The issue is not to "remove" resolv.conf(5) but to understand which 
process is olding that file then you would use that utility to append 
your proper lines.

-- 
John Doe

  

Re: how to remove a file and change dns server

2018-07-09 Thread john doe

Bottom posting.

On 7/9/2018 9:12 AM, Long Wind wrote:

  Thank Ben! i just return home

my old resolv.conf has that line too
but i use twm and don't have easy gui app for Network Manager

but i don't miss them
and could you help me delete that resolv.conf?
Thanks!

 On Monday, July 9, 2018, 9:24:37 AM GMT+8, Ben Caradoc-Davies 
 wrote:
  
  On 09/07/18 12:55, Long Wind wrote:

-rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
i can't remove file above, the story behind it:
dns servers are usually provided by isp
but they can't be used with vpn
so vpn provider told me to make a special resolv.conf
which contains dns servers not provided isp
dns server by vpn provider is useful when i visit blocked sites
but they are not as fast as those by isp
my question is  how to change dns server as needed?
it seem that resolv.conf is automatically managed
and how to remove the special resolv.conf


What application do you use to manage your network connections? I use
NetworkManager, which manages resolve.conf. I find this more convenient
than manually editing resolv.conf. My resolv.conf starts with:

# Generated by NetworkManager

If I use the NetworkManager desktop applet to access the connection
editor (nm-connection-editor), I can edit the connection; under IPv4
Settings, I set Method Manual and list the DNS servers for this
connection. I can also see the DNS servers listed under the Connection
Information. The default behaviour is to use the DNS server supplied via
DHCP, for example, from your router (likely the router itself). You will
likely need two connections: one for your main connection and one for
your VPN. I suggest adding custom DNS servers under your VPN connection
settings.

Kind regards,



The issue is not to "remove" resolv.conf(5) but to understand which 
process is olding that file then you would use that utility to append 
your proper lines.


--
John Doe



Re: how to remove a file and change dns server

2018-07-09 Thread Long Wind
 Thank Ben! i just return home

my old resolv.conf has that line too
but i use twm and don't have easy gui app for Network Manager

but i don't miss them
and could you help me delete that resolv.conf?
Thanks!

On Monday, July 9, 2018, 9:24:37 AM GMT+8, Ben Caradoc-Davies 
 wrote:  
 
 On 09/07/18 12:55, Long Wind wrote:
> -rw-r--r-- 1 root root 51 May 15 20:52 /etc/resolv.conf
> i can't remove file above, the story behind it:
> dns servers are usually provided by isp
> but they can't be used with vpn
> so vpn provider told me to make a special resolv.conf
> which contains dns servers not provided isp
> dns server by vpn provider is useful when i visit blocked sites
> but they are not as fast as those by isp
> my question is  how to change dns server as needed?
> it seem that resolv.conf is automatically managed
> and how to remove the special resolv.conf

What application do you use to manage your network connections? I use 
NetworkManager, which manages resolve.conf. I find this more convenient 
than manually editing resolv.conf. My resolv.conf starts with:

# Generated by NetworkManager

If I use the NetworkManager desktop applet to access the connection 
editor (nm-connection-editor), I can edit the connection; under IPv4 
Settings, I set Method Manual and list the DNS servers for this 
connection. I can also see the DNS servers listed under the Connection 
Information. The default behaviour is to use the DNS server supplied via 
DHCP, for example, from your router (likely the router itself). You will 
likely need two connections: one for your main connection and one for 
your VPN. I suggest adding custom DNS servers under your VPN connection 
settings.

Kind regards,

-- 
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand

  

Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> So I change between two internet connections from time to time.
> 
> I use /etc/network/interfaces ("/e/n/i")
> 
> When I modify /e/n/i , I then run a little "reset" script, like so:
> 
> dev=eth0
> ifdown $dev
> ifconfig $dev down
> ifup $dev

Perhaps, just perhaps you should be doing "ifdown $dev" *before*
editing your e/n/i: ifdown may get confused finding parameters
there corresponding to the future, not to the current connections.

I use ifupdown myself and have hit few problems so far by doing
changes after doing the ifdown (and before the ifup, of course :)

Cheers
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAltC++4ACgkQBcgs9XrR2kaEQgCeNMEkRIt/9usnzxGSYkbYPWwc
pEAAni3U19ZV730SXNwDFyFzPFjdGHd6
=VTdy
-END PGP SIGNATURE-