Discussion:
Circumventing keyboard problem on Lenovo R64
(too old to reply)
Richard Owlett
2024-09-12 11:50:02 UTC
Permalink
I have a Lenovo R61 running 64 bit Buster.
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/

I have no problem logging in as root.

Two primary questions:
1. is there someway that I can use a USB connected keyboard
as workaround while root?
2. is there some way to switch from "root" to "Richard" without
having to type to the pop-up that shows when using
System->Logout... ?

TIA
Hans
2024-09-12 12:00:01 UTC
Permalink
Hi Richard,
Post by Richard Owlett
I have a Lenovo R61 running 64 bit Buster.
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
I have no problem logging in as root.
1. is there someway that I can use a USB connected keyboard
as workaround while root?
I am not sure, what you mean. If you connect an USB-keyboard into a notebook,
then both should work.
Post by Richard Owlett
2. is there some way to switch from "root" to "Richard" without
having to type to the pop-up that shows when using
System->Logout... ?
You can login as Richard, then do "su -" and become root. After this, type
"CTRL + d" and you are Richard again.

In X (i.e. in konsole or term or any other terminal), started as normal user
Richard, you can type "su -p", then start any graphical programm you nee fro
this console. It will run with root rights.

After it just close the terminal or type in "CTRL + d" and you arte back to
Richard again.

This is handy, when you need only few applications as root. For eample, when
you need to edit a *.conf file as root and you might want edit with "kwrite"
for eample. So you need not to logoff and logon as root, just do as described
above: start terminal, su -p, start kwrite, CTL + d = finished.

Does this help?
Post by Richard Owlett
TIA
Best

Hans
Hans
2024-09-12 12:10:01 UTC
Permalink
I have a Lenovo T520. From time to time (but very seldom), the whole keyboard
is no more working (just hangs). It is a problem with X, maybe related to the
NVidia driver. In these rare cases I connect a wireless keyboard to the
notebook (put the dongle into an usb port) and can go on on typing.

Restarting X initilalises the inbuild keyboard again and then BOTH keyboards
are working. The do not interfere. Same behaviour with a cabled usb-keyboard.

Best

Hans
Richard Owlett
2024-09-12 12:50:01 UTC
Permalink
Post by Hans
Hi Richard,
Post by Richard Owlett
I have a Lenovo R61 running 64 bit Buster.
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
I have no problem logging in as root.
1. is there someway that I can use a USB connected keyboard
as workaround while root?
I am not sure, what you mean. If you connect an USB-keyboard into a notebook,
then both should work.
Having >60 years of being forms of "tech support" experience, I'm a firm
believer in "If in doubt, *DON'T*" <GRIN>.
But you and Simon suggested it.
It worked. Thanks!
Post by Hans
Post by Richard Owlett
2. is there some way to switch from "root" to "Richard" without
having to type to the pop-up that shows when using
System->Logout... ?
You can login as Richard, then do "su -" and become root. After this, type
"CTRL + d" and you are Richard again.
In X (i.e. in konsole or term or any other terminal), started as normal user
Richard, you can type "su -p", then start any graphical programm you nee fro
this console. It will run with root rights.
After it just close the terminal or type in "CTRL + d" and you arte back to
Richard again.
This is handy, when you need only few applications as root. For eample, when
you need to edit a *.conf file as root and you might want edit with "kwrite"
for eample. So you need not to logoff and logon as root, just do as described
above: start terminal, su -p, start kwrite, CTL + d = finished.
Does this help?
Solves wrong problem ;}
I couldn't log in as "Richard" at power-up.
But Stefan hints at solution to that problem.
Post by Hans
Post by Richard Owlett
TIA
Best
Hans
Hans
2024-09-12 13:10:01 UTC
Permalink
Post by Richard Owlett
Solves wrong problem ;}
I couldn't log in as "Richard" at power-up.
But Stefan hints at solution to that problem.
Ah, ok, you are in X. Do you now, you can start a second windowmanager as root
without logoff as the other user?

If doing so, you can switch between both with "CTL + ALT + F7" (standard
graphical terminalport in debian for first user) and "CTL + ALT + F8" (next
graphical port for secon user).

This might becoming handy, when often switch between root and normal user.

Just an idea.

Nice, that your problem is solved!

Have a nice day!

Hans
Max Nikulin
2024-09-12 16:40:02 UTC
Permalink
If someone might also confirm of this little bug I mentioned here and
knows better than me, he may just file a little bugreport to the
developers of KDE. Maybe he also nows a little workaround???
[Ctrl+Alt+F8], [Ctrl+Alt+F7] work fine for me to switch between user
sessions (minimal KDE, LightDM, amdgpu). I usually start new sessions
using "dm-tool switch-to-user USER", sometimes I do it from KDE screen
locker. I have not noticed any issue with unlocking user session from
kscreenlocker password prompt or from lightlocker for fluxbox.

However what is broken in bookworm is unlocking user session from DM
login prompt. Sometimes existing session is terminated and I have to
login again. I have seen it with LightDM and SDDM, in qemu and without
virtualization. A workaround is to leave DM greeter running after logout
and to switch to another session using [Ctrl+Alt+F<n>].

On my old laptop LightDM greeter reliably switches to the plasma session
started for the selected user and unlocks that session. Currently
Kubuntu-20.04 is installed and I do not remember any problem with 18.04
or 16.04.
Hans
2024-09-12 15:00:01 UTC
Permalink
Didn't seem to work on 2 machines using different flavors of Debian.
Where is that documented so I can run a verifiable test?
--------------------

You are right. I rechecked this and it does not work correctly, because of a bug in KDE. The
problem is, when starting another session, your former session is locking. But you can not
unlock your session again, even with the correct password. I know about this for more than 3
years and reported the bug long time ago. It is still not fied, but this is not the point here.

--------------------

Apart from this, check it. I am running KDE (plasma) and you get the option "change user"
from the K-menu.

Do this, and you start with the windowmanager you preset in your favourite login manager (I
am using lightdm, but sddm or gdm might work as well, too).

When both windowmanagers are started, you can click every time to "change user" and then
get the option, to chose, to which you want to switch.

--------------------

But as I said before: The former one has a locked screen and can not be unlocked. I suppose,
this is a rights problem and the locking mechanism is set by root and rooit must unloc it. But as
you want to unlock the screen as normal user, it will not work. Maybe sometimes this will be
fixed. However, it does not harm the function of starting a second window managers for another
user.

--------------------

If someone might also confirm of this little bug I mentioned here and knows better than me, he
may just file a little bugreport to the developers of KDE. Maybe he also nows a little
workaround???

--------------------
Hope this helps and makes things clearer.

Best regards

Hans
Richard Owlett
2024-09-12 15:30:01 UTC
Permalink
Post by Hans
Didn't seem to work on 2 machines using different flavors of Debian.
Where is that documented so I can run a verifiable test?
--------------------
You are right. I rechecked this and it does not work correctly, because of a bug in KDE. The
problem is, when starting another session, your former session is locking. But you can not
unlock your session again, even with the correct password. I know about this for more than 3
years and reported the bug long time ago. It is still not fied, but this is not the point here.
--------------------
Apart from this, check it. I am running KDE (plasma) and you get the option "change user"
from the K-menu.
Do this, and you start with the windowmanager you preset in your favourite login manager (I
am using lightdm, but sddm or gdm might work as well, too).
When both windowmanagers are started, you can click every time to "change user" and then
get the option, to chose, to which you want to switch.
--------------------
But as I said before: The former one has a locked screen and can not be unlocked. I suppose,
this is a rights problem and the locking mechanism is set by root and rooit must unloc it. But as
you want to unlock the screen as normal user, it will not work. Maybe sometimes this will be
fixed. However, it does not harm the function of starting a second window managers for another
user.
--------------------
If someone might also confirm of this little bug I mentioned here and knows better than me, he
may just file a little bugreport to the developers of KDE. Maybe he also nows a little
workaround???
--------------------
Hope this helps and makes things clearer.
But I use MATE.
I'm still interested in documentation of what is intended to happen.
Post by Hans
Best regards
Hans
Richard Owlett
2024-09-12 14:10:01 UTC
Permalink
Post by Hans
Post by Richard Owlett
Solves wrong problem ;}
I couldn't log in as "Richard" at power-up.
But Stefan hints at solution to that problem.
Ah, ok, you are in X. Do you now, you can start a second windowmanager as root
without logoff as the other user?
If doing so, you can switch between both with "CTL + ALT + F7" (standard
graphical terminalport in debian for first user) and "CTL + ALT + F8" (next
graphical port for secon user).
Didn't seem to work on 2 machines using different flavors of Debian.
Where is that documented so I can run a verifiable test?
Post by Hans
This might becoming handy, when often switch between root and normal user.
Just an idea.
Nice, that your problem is solved!
Have a nice day!
Hans
Felix Miata
2024-09-12 12:20:02 UTC
Permalink
Post by Richard Owlett
I have a Lenovo R61 running 64 bit Buster.
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
Instead of a band aid, attack the keyboard with high PSI compressed air and/or
vacuum cleaner while banging on h. If these fail to restore reliability to h,
consider trying some aerosol electronic contact cleaner.
--
Evolution as taught in public schools is, like religion,
based on faith, not based on science.

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata
Richard Owlett
2024-09-12 13:50:01 UTC
Permalink
Post by Felix Miata
Post by Richard Owlett
I have a Lenovo R61 running 64 bit Buster.
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
Instead of a band aid, attack the keyboard with high PSI compressed air and/or
vacuum cleaner while banging on h. If these fail to restore reliability to h,
consider trying some aerosol electronic contact cleaner.
Don't have tools nor dexterity ;/
However the local community college has a computer repair service as
training aid for one of their degree programs.
Having been a tech, there's things I want done that could be valuable
background for a new graduate.
Stefan Monnier
2024-09-12 12:20:02 UTC
Permalink
i Ricard,
Post by Richard Owlett
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
[ I presume you know tat tis kind of failure can often (sadly not
always) be fixed by cleaning. ]
Post by Richard Owlett
I have no problem logging in as root.
1. is there someway that I can use a USB connected keyboard
as workaround while root?
I can't tink of any reason wy tat wouldn't "just work".
ave you tried?
Post by Richard Owlett
2. is there some way to switch from "root" to "Richard" without
having to type to the pop-up that shows when using
System->Logout... ?
Probably, and tat probably depends on wat you mean by "switc" and on te
kind of "display manager" you're using (many of tem give you a list of
users from wic you can select by clicking).
You can also (as root) cange your user's name to remove tat pesky
`` letter.


Stefan
Joe
2024-09-12 16:10:01 UTC
Permalink
On Thu, 12 Sep 2024 09:52:03 -0500
On Thu, 12 Sep 2024 08:35:25 -0500
Relevant man page to have 'root' edit a user's login name?
TIA
debian change user name
https://www.cyberciti.biz/faq/howto-change-rename-user-name-id/
That page demonstrates why I'm cautious about blindly following
You asked for a man page reference. I quoted you 'usermod' and also
the source where I found it. You do know how to see man pages?
--
Joe
Richard Owlett
2024-09-12 13:40:01 UTC
Permalink
Post by Stefan Monnier
i Ricard,
Post by Richard Owlett
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
[ I presume you know tat tis kind of failure can often (sadly not
always) be fixed by cleaning. ]
I have other symptoms that hint that there's a temperature problem with
key decoding.
Post by Stefan Monnier
Post by Richard Owlett
I have no problem logging in as root.
1. is there someway that I can use a USB connected keyboard
as workaround while root?
I can't tink of any reason wy tat wouldn't "just work".
ave you tried?
Now I have. It works ;}
Post by Stefan Monnier
Post by Richard Owlett
2. is there some way to switch from "root" to "Richard" without
having to type to the pop-up that shows when using
System->Logout... ?
Probably, and tat probably depends on wat you mean by "switc" and on te
kind of "display manager" you're using (many of tem give you a list of
users from wic you can select by clicking).
You can also (as root) cange your user's name to remove tat pesky
`` letter.
Relevant man page to have 'root' edit a user's login name?

TIA
Post by Stefan Monnier
Stefan
Richard Owlett
2024-09-13 08:20:01 UTC
Permalink
Post by Richard Owlett
Post by Stefan Monnier
i Ricard,
Post by Richard Owlett
It has a keyboard failure - the "h" key is intermittent and my primary
account is "Richard" ;/
[ I presume you know tat tis kind of failure can often (sadly not
   always) be fixed by cleaning.  ]
I have other symptoms that hint that there's a temperature problem with
key decoding.
It's evidently a hard failure.
Left it off overnight and its there.
The local community college has a computer repair service as training
aid for one of their degree programs.
Will see if they can handle.
Post by Richard Owlett
Post by Stefan Monnier
Post by Richard Owlett
I have no problem logging in as root.
1. is there someway that I can use a USB connected keyboard
    as workaround while root?
I can't tink of any reason wy tat wouldn't "just work".
ave you tried?
Now I have. It works ;}
Post by Stefan Monnier
Post by Richard Owlett
2. is there some way to switch from "root" to "Richard" without
    having to type to the pop-up that shows when using
    System->Logout... ?
Probably, and tat probably depends on wat you mean by "switc" and on te
kind of "display manager" you're using (many of tem give you a list of
users from wic you can select by clicking).
You can also (as root) cange your user's name to remove tat pesky
`` letter.
Relevant man page to have 'root' edit a user's login name?
TIA
Post by Stefan Monnier
         Stefan
Hans
2024-09-13 09:00:01 UTC
Permalink
Hi Richard,

exchanging the keyboard yourself might be not a great thing. If it is not an
apple computer, where you have to strip the whole computer, most keyboards are
very simple to echange.

There are often some videos on youtube, which show, how to do it.

On most, there are 1 - 3 screws to loosen, then (but not always), some clamps
to press aside, and you can lift up the whole keyboard.

On my Lenovo T520 (and I suppose most Lenovos are made like mine), you have to
loosen 2 screws on the bottom, then push the whole keyboard into the mousepad
direction, and then lift it up. Easy to do.

If done, you can loosen the flat cable as usual and exchage the keyboard.

It is just a hint, if you want to save money. The keyboards are all about 30 -
50 € (about 40 $) and the exchange by a commercial should not cost much. It is
done within 10 minutes (maybe a few dollars more)

Hope this helps!

Best

Hans
Richard Owlett
2024-09-13 10:20:01 UTC
Permalink
Post by Hans
Hi Richard,
exchanging the keyboard yourself might be not a great thing. If it is not an
apple computer, where you have to strip the whole computer, most keyboards are
very simple to echange.[snip]
ROFL
The keyboard is not the only problem.
I was an electronics tech back in the 60's and have serviced early color
TVs (CTC2 anyone?), isotope ratio mass spectrometers, control room
equipment for nuclear power plant, etc etc ;}
You learn things in over a half century ;}!
Post by Hans
Don't have tools nor dexterity ;/
However the local community college has a computer repair service as
training aid for one of their degree programs.
Having been a tech, there's things I want done that could be valuable
background for a new graduate.
Also they have convenient access to parts.
George at Clug
2024-09-13 12:10:01 UTC
Permalink
Post by Richard Owlett
Post by Hans
Hi Richard,
exchanging the keyboard yourself might be not a great thing. If it is not an
apple computer, where you have to strip the whole computer, most keyboards are
very simple to echange.[snip]
ROFL
The keyboard is not the only problem.
I was an electronics tech back in the 60's and have serviced early color
TVs (CTC2 anyone?), isotope ratio mass spectrometers, control room
equipment for nuclear power plant, etc etc ;}
You learn things in over a half century ;}!
Post by Hans
Don't have tools nor dexterity ;/
However the local community college has a computer repair service as
training aid for one of their degree programs.
Having been a tech, there's things I want done that could be valuable
background for a new graduate.
Also they have convenient access to parts.
Richard, please let us know how you go with your laptop.

My son's first laptop's keyboard has a number of keys that seem worn out, making logging in problematic without an external USB keyboard.

Tried cleaning but that did not help, cannot guarantee I did a great job, though.

Works great if we plug in a USB keyboard and mouse. Just not as convenient.

Speaking about Keyboard issues, I have some desktops that I cannot get to bios unless I use a PS/2 keyboard (i.e. they bios does not recognise USB), so I keep a few PS/2 keyboards in the cupboard for when I want to do bios changes. (I hope this makes someone smile)

You may have already reported the answer to my question, but "does a USB keyboard allow you to log in as yourself and as root?"

Like you I once worked with Colour TVs as it was being introduced, much later than you did...
For historical amusement, in Australia:
https://www.nfsa.gov.au/collection/curated/colour-tv-australia
The colour TV revolution hit Australia 40 years ago, on 1 March 1975

Australia was a bit slow at jumping into Colour TV technology. Hopefully we are a bit faster these days on getting into new technology.

George.
Richard Owlett
2024-09-13 13:00:01 UTC
Permalink
Post by George at Clug
Post by Richard Owlett
Post by Hans
Hi Richard,
exchanging the keyboard yourself might be not a great thing. If it is not an
apple computer, where you have to strip the whole computer, most keyboards are
very simple to echange.[snip]
ROFL
The keyboard is not the only problem.
I was an electronics tech back in the 60's and have serviced early color
TVs (CTC2 anyone?), isotope ratio mass spectrometers, control room
equipment for nuclear power plant, etc etc ;}
You learn things in over a half century ;}!
Post by Hans
Don't have tools nor dexterity ;/
However the local community college has a computer repair service as
training aid for one of their degree programs.
Having been a tech, there's things I want done that could be valuable
background for a new graduate.
Also they have convenient access to parts.
Richard, please let us know how you go with your laptop.
May be a while. "Round TUIT" is MIA.
Post by George at Clug
My son's first laptop's keyboard has a number of keys that seem worn out, making logging in problematic without an external USB keyboard.
Tried cleaning but that did not help, cannot guarantee I did a great job, though.
Works great if we plug in a USB keyboard and mouse. Just not as convenient.
In my case it may be more convenient. The USB is long enough to have
better keyboard placement.
Post by George at Clug
Speaking about Keyboard issues, I have some desktops that I cannot get to bios unless I use a PS/2 keyboard (i.e. they bios does not recognise USB), so I keep a few PS/2 keyboards in the cupboard for when I want to do bios changes. (I hope this makes someone smile)
You may have already reported the answer to my question, but "does a USB keyboard allow you to log in as yourself and as root?"
Yes.
Post by George at Clug
Like you I once worked with Colour TVs as it was being introduced, much later than you did...
https://www.nfsa.gov.au/collection/curated/colour-tv-australia
The colour TV revolution hit Australia 40 years ago, on 1 March 1975
The CTC2 has a special place in memories. I was a young tech for RCA
Service in mid-60's. Our shop tech quit doing in-home calls. I got most
of his customers. One was worried about a wet-behind-ears kid working on
his set (2nd or 3rd year production). Relaxed when he found out my set
was older than his ;}
Post by George at Clug
Australia was a bit slow at jumping into Colour TV technology. Hopefully we are a bit faster these days on getting into new technology.
George.
Richard Owlett
2024-09-12 14:50:01 UTC
Permalink
On Thu, 12 Sep 2024 08:35:25 -0500
Relevant man page to have 'root' edit a user's login name?
debian change user name
I prefer vipw(8). But that's just me.
I don't think a "newbie" should be referred to vipw(8) as
[ https://manpages.debian.org/bookworm/passwd/vipw.8.en.html ]
does *NOT* contain caveats/warnings equivalent to those in
[ https://manpages.debian.org/bookworm/passwd/usermod.8.en.html ]
You'll also want to read passwd(5) and shadow(5).
I would highly recommend *not* being logged in as the user whose name
is being changed at the time. Do a direct root console or ssh login.
Unless you have a second unprivileged account that can su/sudo to root
to make the changes to the first account.
You'll probably want to rename the home directory, so mv(1) applies.
If the user has a crontab file, you may want to find that and rename
it as well.
If you're using /var/mail for user mailboxes, you may want to rename
the user's mailbox file too.
There may be other things I can't think of right now.
Joe
2024-09-12 14:00:01 UTC
Permalink
On Thu, 12 Sep 2024 08:35:25 -0500
Relevant man page to have 'root' edit a user's login name?
TIA
Looks like usermod, according to the first page Google shows for:
debian change user name

https://www.cyberciti.biz/faq/howto-change-rename-user-name-id/
--
Joe
Richard Owlett
2024-09-12 15:00:01 UTC
Permalink
On Thu, 12 Sep 2024 08:35:25 -0500
Relevant man page to have 'root' edit a user's login name?
TIA
debian change user name
https://www.cyberciti.biz/faq/howto-change-rename-user-name-id/
That page demonstrates why I'm cautious about blindly following Google
hits. See post by ***@tuxteam.de .
Greg Wooledge
2024-09-12 14:20:01 UTC
Permalink
On Thu, 12 Sep 2024 08:35:25 -0500
Relevant man page to have 'root' edit a user's login name?
debian change user name
I prefer vipw(8). But that's just me.

You'll also want to read passwd(5) and shadow(5).

I would highly recommend *not* being logged in as the user whose name
is being changed at the time. Do a direct root console or ssh login.
Unless you have a second unprivileged account that can su/sudo to root
to make the changes to the first account.

You'll probably want to rename the home directory, so mv(1) applies.

If the user has a crontab file, you may want to find that and rename
it as well.

If you're using /var/mail for user mailboxes, you may want to rename
the user's mailbox file too.

There may be other things I can't think of right now.
t***@tuxteam.de
2024-09-12 13:50:01 UTC
Permalink
On Thu, Sep 12, 2024 at 08:35:25AM -0500, Richard Owlett wrote:

[...]
Relevant man page to have 'root' edit a user's login name?
See usermod, option -l.

Heed the caveats in the man page (and all other places where the user
name might be hidden).

Sounds like some fun.

(Of course you could just edit /etc/passwd, but then you wouldn't get
to see the caveats in the man page: those do matter)

Cheers
--
t
Richard Owlett
2024-09-12 15:20:01 UTC
Permalink
Post by t***@tuxteam.de
[...]
Relevant man page to have 'root' edit a user's login name?
See usermod, option -l.
The wording of the text under that option does not give a "warm fuzzy"
feeling that I understand what's happening.

[ https://html.duckduckgo.com/html?q=%22tutorial%22%20%22usermod%22 ]
gives many hits. Is there a listed/unlisted tutorial you would recommend.
Post by t***@tuxteam.de
I'm a firm believer in "If in doubt, *DON'T*" <GRIN>.
TIA
Post by t***@tuxteam.de
Heed the caveats in the man page (and all other places where the user
name might be hidden).
Sounds like some fun.
(Of course you could just edit /etc/passwd, but then you wouldn't get
to see the caveats in the man page: those do matter)
Cheers
Loading...