2

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..

2
  • 1
    does grep oldusername .xinitrc holds any results? Commented Jan 10, 2016 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. Commented Jan 10, 2016 at 13:07

1 Answer 1

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 /.

2
  • 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. Commented Jan 10, 2016 at 13:33
  • @rodrunner I edited my answer Commented Jan 10, 2016 at 13:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.