Re: USB Examiner Package? Special USB Kernel Modules?

2019-11-25 Thread Joe Pfeiffer
Kenneth Parker  writes:

> Here's an interesting one:  A Windows friend handed me a USB Dongle, knowing 
> that I'm a Linux user.  He says he got it 3rd hand, with
> info that it might be "Very Dangerous".  He would be interested, if I find 
> out something about it.  (And, indeed, Google has many hits
> on "USB Malware").

Keep in mind "very dangerous" can mean anything up to and including
delivering a voltage that will fry some part of your motherboard.  Make
sure anything you plug it into is cheap enough you won't be upset to
lose it.



Re: how to change wifi setting

2019-11-25 Thread David Wright
On Tue 26 Nov 2019 at 03:51:24 (+), Long Wind wrote:
>  haven't i made it  clear enough?

No, not really. You're not specific about what software you're using
to run your networking interface.

> i rewrite below:
> 
> i often change wifi setting this way: 
> i open /etc/network/interfaces and change ssid and passwordthen save and  
> reboot to make /etc/network/interfaces to take effect
> any command that i can use so that i needn't reboot?

As you mention /etc/network/interfaces, perhaps you're using ifupdown
to manage it. In which case, the sequence of commands to change settings is:

# ifdown eth0
# edit /etc/network/interfaces
# ifup eth0

(Substitute the name of your interface for eth0.)

The mistake many people make is to edit /etc/network/interfaces *before*
they down the network, which causes the ifdown command to fail.
ifdown needs the old configuration in /etc/network/interfaces to down
the network just as much as ifup needs the new configuration to
restart it.

> i've tried your command:
> 
> 
>  service network-manager restart service network-manager restartFailed to 
> restart network-manager.service: Unit network-manager.service failed to load: 
> No such file or directory
> 
> On Tuesday, November 26, 2019, 11:12:21 AM GMT+8, Jonas Smedegaard 
>  wrote:  
>  
>  Quoting Long Wind (2019-11-26 04:00:13)
> > i often change wifi setting: ssid and passwordi edit 
> > /etc/network/interfaces and reboot to make it take effectany command 
> > that i can use so that i needn't reboot?Thanks!
> 
> You don't tell what is the reason you need to reboot.
> 
> If your wifi device driver crashes then possibly there is no other way 
> (with that device) than rebooting.  But if it is Network Manager getting 
> confused then maybe try restart it:
> 
>   sudo service network-manager restart
> 
> Or maybe install a newer linux kernel.
> 
> But it really is shooting in the dark - please provide more info about 
> what fails.
> 
> 
>  - Jonas
> 
> -- 
>  * Jonas Smedegaard - idealist & Internet-arkitekt
>  * Tlf.: +45 40843136  Website: http://dr.jones.dk/
> 
>  [x] quote me freely  [ ] ask before reusing  [ ] keep private  

Cheers,
David.



Re: USB Examiner Package? Special USB Kernel Modules?

2019-11-25 Thread Ben Caradoc-Davies

On 26/11/2019 16:37, Kenneth Parker wrote:

Here's an interesting one:  A Windows friend handed me a USB Dongle,
knowing that I'm a Linux user.  He says he got it 3rd hand, with info that
it might be "Very Dangerous".  He would be interested, if I find out
something about it.  (And, indeed, Google has many hits on "USB Malware").
So, what I want, is a USB Debugging Package, that will  *NOT*  attempt to,
actually open this device, but will give me information about it.
Obviously, this has to be handled carefully because, for one, it's not
always obvious which USB goes where.
For example, before I plug it in, "lsusb" should not show anything plugged
in. 
End of preliminaries.  When I plug in something, (i.e. Serial Mouse in Text

Only environment, or a USB Thumb Drive), a Flurry of Activity ensues, with
lots of Kernel Messages (and before I get to examine it).   Does that mean
I have to make a Custom Kernel for this, or limit the Kernel Modules used?
Any insights so far?


I take it that you are aware that there are malicious USB devices that 
look like thumb drives and can:


(1) impersonate an HID (e.g. keyboard), fingerprint the host, open a 
terminal, and start typing at maximum rate to download malicious 
software (hence your interest in disabling kernel USB support), or


(2) deliver a high voltage to the USB bus to inflict physical damage.

At the least, I hope you have watched all USB-related DEFCON videos on 
YouTube, especially those on BadUSB. One or two were enough for me to 
never want to use a USB thumb drive of unknown provenance. That is all I 
know.


Kind regards,

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



Re: USB Examiner Package? Special USB Kernel Modules?

2019-11-25 Thread Kenneth Parker
On Mon, Nov 25, 2019 at 10:37 PM Kenneth Parker  wrote:


End of preliminaries.  When I plug in something, (i.e. Serial Mouse in Text
> Only environment, or a USB Thumb Drive), a Flurry of Activity ensues, with
> lots of Kernel Messages (and before I get to examine it).   Does that mean
> I have to make a Custom Kernel for this, or limit the Kernel Modules used?
>

I just found libusb-dev (and related packages).   I think I am on my way.

Kenneth Parker


USB Examiner Package? Special USB Kernel Modules?

2019-11-25 Thread Kenneth Parker
Here's an interesting one:  A Windows friend handed me a USB Dongle,
knowing that I'm a Linux user.  He says he got it 3rd hand, with info that
it might be "Very Dangerous".  He would be interested, if I find out
something about it.  (And, indeed, Google has many hits on "USB Malware").

So, what I want, is a USB Debugging Package, that will  *NOT*  attempt to,
actually open this device, but will give me information about it.

Obviously, this has to be handled carefully because, for one, it's not
always obvious which USB goes where.

For example, before I plug it in, "lsusb" should not show anything plugged
in.

-

End of preliminaries.  When I plug in something, (i.e. Serial Mouse in Text
Only environment, or a USB Thumb Drive), a Flurry of Activity ensues, with
lots of Kernel Messages (and before I get to examine it).   Does that mean
I have to make a Custom Kernel for this, or limit the Kernel Modules used?

Any insights so far?

Thank you and best regards,

Kenneth Parker


Re: how to change wifi setting

2019-11-25 Thread Jonas Smedegaard
Quoting Long Wind (2019-11-26 04:00:13)
> i often change wifi setting: ssid and passwordi edit 
> /etc/network/interfaces and reboot to make it take effectany command 
> that i can use so that i needn't reboot?Thanks!

You don't tell what is the reason you need to reboot.

If your wifi device driver crashes then possibly there is no other way 
(with that device) than rebooting.  But if it is Network Manager getting 
confused then maybe try restart it:

  sudo service network-manager restart

Or maybe install a newer linux kernel.

But it really is shooting in the dark - please provide more info about 
what fails.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: How to report bug

2019-11-25 Thread Hans
Am Montag, 25. November 2019, 20:07:56 CET schrieb Goran Delcev:
Hi Goran,

this bug is known since almost 2 years. I reported it in the list, sent a 
bugreport tzo 
powerdevil (and askeds the list, which package might be responsible for it), 
but got 
no solution. People told me, the kernel itself is the one, that controls all 
hibernation 
things. However, afaik there are other tools responsible, too (like 
laptop-mode, 
uswsuspm, tuxonice and others).
Hope, someone might helpö you.

Good luck and all the best

Hans
I have a bug to report. I have used reportbug tool, and the tool suggested to 
use 
this mailing list.
The bug is in that system is not waking up from "suspend to RAM". I get black 
screen and I have to do hardware reset. In log files there is nothing that 
could 
suggest what is wrong. Because I don't know in which package the bug is 
occurring 
I am writing to this list.
Thanks.
Goran Delcev






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


Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Greg Wooledge (12019-11-25):
> > Next time, read the
> > question, assume that whoever asks knows what they are asking,

> ... no.  This is NOT a rational assumption, not on this mailing list.
> 
> Most of the time, people are not asking the right questions, because
> they have a flawed understanding of what's happening.

I was speaking of my questions specifically.

But in my experience, for somebody, recognizing a question from another
competent person is usually quite obvious.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Unnecessary packages?

2019-11-25 Thread Andrei POPESCU
On Sb, 26 oct 19, 17:01:19, Joe wrote:
> 
> Removing things, as others have said, is a bit risky. You need to spend
> some time with the apt tools, finding what depends on the item you wish
> to remove, so you know what will break when you remove it. It's a very
> slow process, when there are hundreds or even thousands of packages you
> don't (currently) need. 

# mark gnome-core as manually installed to prevent it and all it's 
# dependencies to be considered for autoremoval

apt-mark manual gnome-core

# remove the gnome metapackage
# this will result in many packages being suggested for autoremoval
# do NOT use aptitude for this step as it will attempt to immediately 
# remove packages depended on by gnome, but not by gnome-core

apt remove gnome

# examine the list of packages suggested for autoremoval

apt --simulate autoremove

# or with aptitude

aptitude search '?garbage'

# remove those you are sure you don't need
# do NOT use aptitude for this as it will attempt to remove all other 
# packages depended on by gnome, but not by gnome-core

apt remove cheese
apt remove some-other-package
...

# mark all other packages as manually installed

apt-mark manual package1 package2 etc.

# or in one command with aptitude (untested)

aptitude unmarkauto '?installed?garbage'


Hope this helps,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Greg Wooledge
On Mon, Nov 25, 2019 at 05:14:03PM +0100, Nicolas George wrote:
> Next time, read the
> question, assume that whoever asks knows what they are asking,

... no.  This is NOT a rational assumption, not on this mailing list.

Most of the time, people are not asking the right questions, because
they have a flawed understanding of what's happening.

The more pompous and aggressive someone is, the more likely this is
to be true.



Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Jonas Smedegaard (12019-11-25):
> ...and that's when I stopped caring.

Good, since you had nothing to contribute here. It would have saved your
time and mine if you had noticed this earlier. Next time, read the
question, assume that whoever asks knows what they are asking, and do
not propose to edit files in /etc when a user solution is explicitly
asked.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Jonas Smedegaard (12019-11-25):
> I don't think you can apply high-level XKB mapping to a specific 
> keyboard device

But you can:

   -i deviceid
   If  source or destination is a valid X display, load the keymap
   from/into the device with the specified ID (not name).

(xkbcomp(1))

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Jonas Smedegaard
Quoting Nicolas George (2019-11-25 16:42:40)
> I hope you can grasp the difference.

...and that's when I stopped caring.  Enjoy your life,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Jonas Smedegaard
Quoting David Wright (2019-11-25 16:29:07)
> My problem is knowing what to put in the script to make a keyboard 
> layout apply only to a specific keyboard. I connect two keyboards; one 
> is an old IBM M with British layout (PS/2), the other is a Logitech 
> K520 with US layout (wireless).
> 
> Currently the machine boots in GB mode with the PS/2, and I have kbdgb 
> and kbdus functions to switch back and forth when I use either 
> keyboard. (For just the odd character I use memory of the easier 
> transpositions (like @"), or the composition key.)
> 
> How do you make layout scripts so specific?

Keyboard keys are mapped in multiple layers.

I don't think you can apply high-level XKB mapping to a specific 
keyboard device (within same "seat" at least), but if usable to you to 
remap specific keys at a lower level so that they both fit into same 
high-level composition, then read /lib/udev/hwdb.d/60-keyboard.hwdb 
(there are instructive comments at the top) for how to do that.

Concretely I recently ran this command on my Teres-I laptop, as root:

  evtest --grab /dev/input/event3

I then hit the key attached at keyboard at input device "event3", 
noticing its MSC_SCAN value.

When done I pressed CTRL+c at another keyboard that the "event3" one.

Then I added file "/etc/hwdb.d/70-keyboard.hwdb" with this content:

###
# Olimex
###

# Teres-I
evdev:input:b0003v15BAp003C*
 KEYBOARD_KEY_70066=sleep   # Fn+F1
 KEYBOARD_KEY_700f6=wlan# Fn+F2
 KEYBOARD_KEY_700c7=f21 # Fn+F3 touchpad toggle
 KEYBOARD_KEY_7006f=brightnessdown  # Fn+F7
 KEYBOARD_KEY_70070=brightnessup# Fn+F8
 KEYBOARD_KEY_7006e=switchvideomode # Fn+F9

Finally I ran these commands, also as root:

  systemd-hwdb update
  udevadm trigger /dev/input/event3

Since then I can hit Fn+F1 to trigger sleep on my laptop.

...I still haven't solved how to wake it up again, though ;-)


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Jonas Smedegaard (12019-11-25):
> udev is the standard - it is an infrastructure where you can then hook 
> tools onto.

Unicode is the standard, but not the standard about what I am asking.
Speaking about Unicode here is irrelevant.

Same goes for udev.

> Somewhere you need root access - to install whatever tool you want to 
> expose to your users of the system.

No, I do not need root access, I can install the tool in my home
directory. Anyway, I would be ok with using root privileges to install
the tool, but not to use the tool to configure the device; I hope you
can grasp the difference.

> None of those _tools_ are "standard" in Debian, but if you care less 
> about that part of your question and more about the user interface part, 
> then I suggest taking a look at Debian packages esekeyd and 
> triggerhappy.

triggerhappy: "Unlike other hotkey daemons, it runs as a persistent,
systemwide service"

esekeyd: "It is a userspace program that pools /dev/input/event?
interfaces"

Not what I am asking at all.

Regards,

-- 
  Nicolas George



signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
David Wright (12019-11-25):
> My problem is knowing what to put in the script to make a keyboard
> layout apply only to a specific keyboard. I connect two keyboards;
> one is an old IBM M with British layout (PS/2), the other is a
> Logitech K520 with US layout (wireless).
> 
> Currently the machine boots in GB mode with the PS/2, and I have
> kbdgb and kbdus functions to switch back and forth when I use
> either keyboard. (For just the odd character I use memory of the
> easier transpositions (like @"), or the composition key.)
> 
> How do you make layout scripts so specific?

Is it for the console or for X11?

For the console I do not know. For X11, use this:

xkbcomp -i $id mapping.xkb

where $id is found with the xinput command.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread David Wright
On Mon 25 Nov 2019 at 09:32:43 (-0500), Henning Follmann wrote:
> On Mon, Nov 25, 2019 at 03:01:03PM +0100, Nicolas George wrote:
> > What is the standard for a user to automatically configure hotplugged
> > input devices under X11, to set the keyboard layout, repeat speed,
> > pointer acceleration, etc.?
> > 
> > I know how to do it manually using xinput and xkbcomp.
> > 
> > I would like a generic solution, whatever desktop environment may
> > propose its own solution, I do not use it.
> > 
> > I want a solution for simple users, without root permissions to edit
> > xorg.conf.
> > 
> > If there is no standard solution, would you like one? I have a small
> > program that can serve as the basis for one, I can publish it if that
> > would be useful.
> > 
> > Extra question:
> > 
> > Is there a standard way to bind a key on a specific keyboard? Basically
> > an XInput-aware version of xbindkeys?
> 
> That's what udev is for
> create a file like
> /etc/udev/rules.d/99-usb-keyboard.rules
> 
> with contents like:
> ACTION=="add", ATTRS{name}=="USB Keyboard", RUN=""
> 
> The ATTRS{} part is a selector. If you know the idVendor and idProduct
> you can be very selective.
> example:
> ACTION=="add", ATTR{idVendor}=="1234", ATTR{idProduct}=="5678", 
> RUN="your_script for this keyboard"
> 
> After that you have to reload the udev stack
> 
> udevadm control --reload-rules;
> 
> A reboot would work too.

My problem is knowing what to put in the script to make a keyboard
layout apply only to a specific keyboard. I connect two keyboards;
one is an old IBM M with British layout (PS/2), the other is a
Logitech K520 with US layout (wireless).

Currently the machine boots in GB mode with the PS/2, and I have
kbdgb and kbdus functions to switch back and forth when I use
either keyboard. (For just the odd character I use memory of the
easier transpositions (like @"), or the composition key.)

How do you make layout scripts so specific?

Cheers,
David.



Re: Configuring hotplugged input devices

2019-11-25 Thread Jonas Smedegaard
Quoting Nicolas George (2019-11-25 15:40:12)
> Henning Follmann (12019-11-25):
> > > I want a solution for simple users, without root permissions to edit
> > > xorg.conf.
> 
> > That's what udev is for
> 
> Thanks, but no, not at all: I specifically requested a solution for
> simple users, while udev requires root privileges to write in /etc/udev.
> Furthermore, udev scripts will not be able to connect to the X11 server,
> except with fragile hacks.

udev is the standard - it is an infrastructure where you can then hook 
tools onto.

Somewhere you need root access - to install whatever tool you want to 
expose to your users of the system.

None of those _tools_ are "standard" in Debian, but if you care less 
about that part of your question and more about the user interface part, 
then I suggest taking a look at Debian packages esekeyd and 
triggerhappy.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Henning Follmann (12019-11-25):
> > I want a solution for simple users, without root permissions to edit
> > xorg.conf.

> That's what udev is for

Thanks, but no, not at all: I specifically requested a solution for
simple users, while udev requires root privileges to write in /etc/udev.
Furthermore, udev scripts will not be able to connect to the X11 server,
except with fragile hacks.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Configuring hotplugged input devices

2019-11-25 Thread Henning Follmann
On Mon, Nov 25, 2019 at 03:01:03PM +0100, Nicolas George wrote:
> Hi.
> 
> What is the standard for a user to automatically configure hotplugged
> input devices under X11, to set the keyboard layout, repeat speed,
> pointer acceleration, etc.?
> 
> I know how to do it manually using xinput and xkbcomp.
> 
> I would like a generic solution, whatever desktop environment may
> propose its own solution, I do not use it.
> 
> I want a solution for simple users, without root permissions to edit
> xorg.conf.
> 
> If there is no standard solution, would you like one? I have a small
> program that can serve as the basis for one, I can publish it if that
> would be useful.
> 
> Extra question:
> 
> Is there a standard way to bind a key on a specific keyboard? Basically
> an XInput-aware version of xbindkeys?
> 


That's what udev is for
create a file like
/etc/udev/rules.d/99-usb-keyboard.rules

with contents like:
ACTION=="add", ATTRS{name}=="USB Keyboard", RUN=""


The ATTRS{} part is a selector. If you know the idVendor and idProduct
you can be very selective.
example:
ACTION=="add", ATTR{idVendor}=="1234", ATTR{idProduct}=="5678", 
RUN="your_script for this keyboard"


After that you have to reload the udev stack

udevadm control --reload-rules;

A reboot would work too.


HTH
-H




-- 
Henning Follmann   | hfollm...@itcfollmann.com



Configuring hotplugged input devices

2019-11-25 Thread Nicolas George
Hi.

What is the standard for a user to automatically configure hotplugged
input devices under X11, to set the keyboard layout, repeat speed,
pointer acceleration, etc.?

I know how to do it manually using xinput and xkbcomp.

I would like a generic solution, whatever desktop environment may
propose its own solution, I do not use it.

I want a solution for simple users, without root permissions to edit
xorg.conf.

If there is no standard solution, would you like one? I have a small
program that can serve as the basis for one, I can publish it if that
would be useful.

Extra question:

Is there a standard way to bind a key on a specific keyboard? Basically
an XInput-aware version of xbindkeys?

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature


Re: Finding the program that keeps overwriting resolv.conf

2019-11-25 Thread Greg Wooledge
On Mon, Nov 25, 2019 at 12:33:16AM -0500, Roberto C. Sánchez wrote:
> On Mon, Nov 25, 2019 at 12:03:19AM -0500, aliasarmor wrote:
> >Hello, a program keeps overwriting my resolv.conf.
> 
> These previous discussions on the list should provide the information
> you need:
> 
> https://lists.debian.org/debian-user/2019/07/msg01448.html
> https://lists.debian.org/debian-user/2019/08/msg00055.html
> https://lists.debian.org/debian-user/2017/10/msg00779.html

Also  offers many different
options.



Re: enigmail

2019-11-25 Thread Reco
Hi.

On Fri, Nov 22, 2019 at 10:49:29AM -0800, didier.gau...@gmail.com wrote:
> Le vendredi 22 novembre 2019 19:00:05 UTC+1, Alessandro Vesely a écrit :
> > On Mon 18/Nov/2019 21:15:41 +0100 Reco wrote:
> > > On Mon, Nov 18, 2019 at 12:57:16PM -0700, D. R. Evans wrote:
> > >> I see that the update to debian stable that I was going to do today
> > >> wants to update thunderbird but remove enigmail.
> > 
> > 
> > That seems to affect oldstable too, but kept back.  I have:
> > ~# apt list --upgradable
> > Listing... Done
> > icedove/oldstable,oldstable 1:68.2.2-1~deb9u1 all [upgradable from: 
> > 1:60.9.0-1~deb9u1]
> > iceowl-extension/oldstable,oldstable 1:68.2.2-1~deb9u1 all [upgradable 
> > from: 1:60.9.0-1~deb9u1]
> > lightning/oldstable,oldstable 1:68.2.2-1~deb9u1 all [upgradable from: 
> > 1:60.9.0-1~deb9u1]
> > thunderbird/oldstable 1:68.2.2-1~deb9u1 amd64 [upgradable from: 
> > 1:60.9.0-1~deb9u1]
> > thunderbird-dbg/oldstable 1:68.2.2-1~deb9u1 amd64 [upgradable from: 
> > 1:60.9.0-1~deb9u1]
> > 
> > 
> > If I understand, I should keep TB back until next summer.  Correct?
> 
> Debian packages of Firefox/Thunderbird modules are often outdated: You
> could simply uninstall the enigmail Debian package and install
> enigmail as a Thunderbird module from within Thunderbird.

A "security update" just came in today:

Package: enigmail

DSA 4571-1 updated Thunderbird to the 68.x series, which is incompatible
with the Enigmail release shipped in Debian Buster.

For the stable distribution (buster), this problem has been fixed in
version 2:2.1.3+ds1-4~deb10u2.

We recommend that you upgrade your enigmail packages.

Reco