1

I'm Using Arch Linux + Xfce4 (Edit: running as VBox OS guest) and I wanted to change a username and it's home directory accordingly. I followed these steps as root:

1.Renamed the home directory

# mv /home/oldusername /home/newusername

2.Changed user's login name and home directory:

# usermod -l newusername oldusername
# usermod -d /home/newusername newusername

3.Changed user's default group name

# groupmod -n newgroupname oldgroupname

All that went fine, I could log in as newusername and check that the env variables $USER, $HOME are ok.

But when I run "startx", the X session does not start. Then I shutdown the system and as root again I rename the home directory back to /home/oldusername. Then I login as newusername and this time startx succeeds. Why is that? only the dirname is changing, all other files (.xinitrc, etc.) are the same..

  • 1
    does grep oldusername .xinitrc holds any results? – Rui F Ribeiro Jan 10 '16 at 13:01
  • no, there should be no username harcoded in any files/scripts. I forgot to mention that I'm running the Arch Linux as a guest OS in virtualbox, I will edit my question to add that. – rodrunner Jan 10 '16 at 13:07
2

It seems that there is a configuration somewhere pointing to that user. I have a few suggestions you can try.

First, make sure your new $HOME has the right ownership.

Secondly, read and post the error message given by Xorg.

Thirdly, search your $HOME directory for any configuration files that hold the old $HOME path.

cd $HOME
grep -r "olduser" .

It would be a good idea to pipe the search to less or redirect to file.

If you can't find anything in your $HOME the next step is to try /etc/. That is generally where all configurations should be.

If that holds nothing, do the same on /.

  • I've deleted the $HOME/.config/xfce4/ directory just in case but it didn't help. Since it was a test system I think I will delete that user and create a new one. – rodrunner Jan 10 '16 at 13:33
  • @rodrunner I edited my answer – Digisec Jan 10 '16 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.