Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gnome-shell take 100% cpu because of wrong usermod operation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
double_crane
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2011
Posts: 114
Location: JiangSu,China

PostPosted: Tue Jul 03, 2018 12:25 pm    Post subject: gnome-shell take 100% cpu because of wrong usermod operation Reply with quote

last year, I want to rename my username from A to B, so I do
Code:

root#~  userdel nameA
root#~  useradd nameB
root#~  mv /home/nameA /home/nameB
root#~  usermod -u 1000 nameB                     ---- uid change to 1000


it seems OK, until March/April this year, that gnome-desktop is update to new version,
since that time, a process named "gnome-shell" takes 100% cpu (no matter I use i3 i5 or i7), and the computer becomes very slow.
also I notice that, when I login as root, gnome-shell seems OK, but when login as user B, or even newuser C,D,E..... it takes 100% cpu.
and I tried to emerge mate, kde, they don't take 100% cpu.

now, I know renaming name from user A to user B shouldn't be like this, instead, it should be as easy as

Code:

root#~  usermod -l nameB nameA

and I tested, gnome-shell works ok when rename in this way.

but what's the diffrerence between the two ways? what's wrong by userdel, useradd, usermod ? ( it works before gnome-shell update )

is there any way to recover from the wrong rename operation?

thanks
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6229
Location: Room 101

PostPosted: Tue Jul 03, 2018 4:06 pm    Post subject: Reply with quote

double_crane ...

I suspect that it's not ownership/permissions that is the issue, but that you have stored absolute paths and/or other references to 'nameA' in some config file(s).

Code:
% find /home/nameB/.config -type f -exec grep -l nameA "{}" \;

... or, if you're feeling lucky punk :)

Code:
% sed -i.bak 's/nameA/nameB/g' $(find /home/nameB/.config -type f -exec grep -l nameA "{}" \;)


EDIT: corrected 'exex' ... and feeding the output of find to sed

HTH & best ... khay
Back to top
View user's profile Send private message
double_crane
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2011
Posts: 114
Location: JiangSu,China

PostPosted: Wed Jul 04, 2018 3:22 am    Post subject: Reply with quote

khayyam wrote:
double_crane ...

I suspect that it's not ownership/permissions that is the issue, but that you have stored absolute paths and/or other references to 'nameA' in some config file(s).

Code:
% find /home/nameB/.config -type f -exec grep -l nameA "{}" \;

... or, if you're feeling lucky punk :)

Code:
% sed -i.bak 's/nameA/nameB/g' $(find /home/nameB/.config -type f -exec grep -l nameA "{}" \;)


EDIT: corrected 'exex' ... and feeding the output of find to sed

HTH & best ... khay


thank you, but I tried that it doesn't work.

I think it doesn't result from wrong configs in my own home directory, because I add new users and login, gnome-shell uses 100% cpu too, only root login works well.

I think there's some global settings wrong.

thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum