# How to remove slim to start X directly?



## sw2wolf (Oct 14, 2012)

Now I'm using slim as DM

```
$cat /etc/ttys |grep slim
ttyv8   "/usr/local/bin/slim"          xterm       on secure
```

Now I want to start X directly without using DM.


Sincerely!


----------



## mamalos (Oct 14, 2012)

Why don't you just disable it from /etc/rc.conf or de-install it using pkg_delete(1)?


----------



## sw2wolf (Oct 15, 2012)

mamalos said:
			
		

> Why don't you just disable it from /etc/rc.conf or de-install it using pkg_delete(1)?


Of cource, I can remove slim. But I want to enter X automatically too.


----------



## UNIXgod (Oct 15, 2012)

The user file you want to set that up is xinitrc.


----------



## sw2wolf (Oct 15, 2012)

UNIXgod said:
			
		

> The user file you want to set that up is xinitrc.


~/.xinitrc is ok. Without slim or other DM, I run *startx* manually  after log in now.  

Regards!


----------



## jotawski (Oct 15, 2012)

sw2wolf said:
			
		

> Now i'm using slim as DM
> 
> ```
> $cat /etc/ttys |grep slim
> ...


Hi,

mine is 
	
	



```
~% grep ttyv8 /etc/ttys
ttyv8	"/usr/local/bin/xdm -nodaemon"	xterm	off secure
```
if you wanted to revert to the original setting, this may help.


----------



## sw2wolf (Oct 16, 2012)

jotawski said:
			
		

> Hi,
> 
> mine is
> 
> ...


In this way, it will enter console. However, when running *startx*, it will report there is no ~/.Xauthority and cannot start X.  Then I use *xinit* to start X.

How can I make *xinit* run automatically after the user login ?


----------



## SirDice (Oct 16, 2012)

You do know x11/slim has an autologin option?


----------



## sw2wolf (Oct 16, 2012)

SirDice said:
			
		

> You do know x11/slim has an autologin option?


What I really want to know is how to run *xinit* automatically after a normal user login. I don't want to use slim now.


----------



## SirDice (Oct 16, 2012)

Use startx(1) and add it to ~/.login for example.


----------



## mamalos (Oct 16, 2012)

SirDice,

does .login run also when connecting via ssh (if you run csh I mean)? If so, it would create a problem, wouldn't it?


----------



## SirDice (Oct 16, 2012)

Build in some kind of check before starting startx(1).


----------

