# Cannot edit .xinitrc



## pwdr (Aug 25, 2016)

New FreeBSD user (10.3) here, running on MacBook Pro as a VirtualBox 5.1 machine.

I'm not hugely experienced at command line but I've messed with Linux VBoxes enough, OS X's Terminal and writing documents with LaTeX to have some idea of what I'm doing - but not extensively so.

Anyway, I did a straight install of FreeBSD 10.3, then decided to add the MATE desktop. I used these instructions and the reboot dumps me back at the SLiM login screen. However, when I try to log in I get the message "failed to execute login command".

I found this thead Thread here which has a the same problem. I rebooted (actually, I can't seem to reboot from the SLiM login screen so I had to hard shutdown the VM) and booted into Single User Mode, logged in as root to edit ~/.xinitrc. Now, the first thing I noticed is that the thread references ~/.xinitrc while the directions I followed during Desktop setup simply said to edit /.xinitrc.

The solution for the other user was to edit ~/.xinitrc so it is empty. I added the line of code to that file as suggested in the tutorial and as the other user had:

```
exec mate-session
```
The file is located at /root. I'm using ee to open the file .xinitrc at this location, remove the line (so it's empty) and save, but get the response:

```
unable to create file ".xinitrc"
```

When I navigate to ~/ to create the ./xinitrc, I get the same error (as it's a read-only location).

So, is my .xinitrc correctly located at ~/root ? And how do I edit the file so it is empty?

Thanks


----------



## pwdr (Aug 25, 2016)

Update: I found Thread 5860 which refers to a similar issue when editing: that single-user mode doesn't, by default, enable read-write mode.

I followed the directions, which enabled me to edit the file for root user. I have since tried logging in to the MATE desktop, opening a shell, and creating .xinitrc at ~/ for my other, non-root, user but it doesn't yet let me log in.


----------



## SirDice (Aug 25, 2016)

When you get this working again, create a regular user account and start using that. It's really bad form to use root, even if it's only used by you.


----------



## pwdr (Aug 25, 2016)

SirDice said:


> When you get this working again, create a regular user account and start using that. It's really bad form to use root, even if it's only used by you.



Thanks. I usually don't use root (coming from OS X where it's disabled by default) so only set it up here as it was required in the installation. 

I created a standard user (as a member of wheel) during installation as well, but wasn't able to log in to it via the GUI. It is only as root that I can log in. Standard user could log in prior to GUI install, though. 

I'll keep at it and post back when I get somewhere. Any other advice welcome. 

Incidentally, is it possible to log into a plain CLI multi-user  session now that I've installed a GUI? The only option I can see is to use single-user mode (option 2).


----------



## SirDice (Aug 26, 2016)

pwdr said:


> Incidentally, is it possible to log into a plain CLI multi-user  session now that I've installed a GUI? The only option I can see is to use single-user mode (option 2).


Sure, just disable the automatic loading of Slim. Login as a user and use `startx` to start the GUI. Work with that until things are working as they should. Then you can enable Slim again.


----------

