# startx command



## lonesoac0 (Feb 15, 2012)

Hello all,

   I recently installed freeBSD FreeBSD 9.0 and I can run the *startx* but it comes with a caveat.  When my GUI session is started I can exit all of the terminals but one.  I MUST keep that terminal open or else my GUI session will exit and I go back to my terminal session.  I have tried *startx &*, *startx &* and then launching *icewm*.  Is there something that I am missing?


----------



## Beastie (Feb 15, 2012)

In .xinitrc or similar file, try adding the ampersand after every application you're running.


----------



## LateNiteTV (Feb 15, 2012)

Install a different WM or DE. Sounds like you're using TWM.


----------



## lonesoac0 (Feb 15, 2012)

Ok, I will try both sugestions tonight.


----------



## lonesoac0 (Feb 16, 2012)

First I tried Beastie*'s* sug*g*estion and I could not find the .xinitrc file.  Second I tried LateNiteTV*'s* sug*g*estion and I think that he is right in that I am running TWM.  I bel*ie*ve that the abbreviation is Terminal Window Manager and I am pretty sure that I did install it.  What is an alternative to TWM?


----------



## Beastie (Feb 16, 2012)

lonesoac0 said:
			
		

> I could not find the .xinitrc file.


That's because it's using the system default one. But you can create a custom one for yourself. Try
`% ee ~/.xinitrc`

```
xterm &
xclock &
twm
```



			
				lonesoac0 said:
			
		

> I beleive that the abbreviation is Terminal Window Manager


Actually it has been renamed many times over the years.



			
				lonesoac0 said:
			
		

> I am pretty sure that I did install it.


It comes automatically with Xorg.



			
				lonesoac0 said:
			
		

> What is an alternative to TWM???


It may be 25 years old but it still works fine. If you insist though, there are a few others. 
Or if you're new to this, you may prefer a complete desktop environment.


----------



## LateNiteTV (Feb 16, 2012)

TWM definintely does what it needs to do and there are a lot of config files and how-to articles out there that will show you how to make it pretty damn functional as well as aesthetically pleasing.


----------



## lonesoac0 (Feb 17, 2012)

Not sure if this helps with my issue but I really want you to know what I see. I clicked on the link of http://en.wikipedia.org/wiki/Twm  Directly under the Using twm section there is an image of a terminal running and using TWM.  When I start my GUI I see something very similar but I do not see the teal title bar on the terminal.  I just see the white background terminal with the Bash prompt.

I will definately make my own ~/.xinitrc tonight.


----------



## lonesoac0 (Feb 18, 2012)

So, I tried Beastie's code.  It ran with errors.  I then simply tried the first line of Beastie's code. Still no go.  I then tried a "what-the-heck" kind of idea.  I simply put icewm in the .xinitrc file.  It worked like a CHARM!!  I cannot tell you how many times my "what-the-heck" moments have helped me solve some real issues with Linux/Unix.


----------



## UNIXgod (Feb 18, 2012)

lonesoac0 said:
			
		

> So, I tried Beastie's code.  It ran with errors.  I then simply tried the first line of Beastie's code. Still no go.  I then tried a "what-the-heck" kind of idea.  I simply put icewm in the .xinitrc file.  It worked like a CHARM!!  I cannot tell you how many times my "what-the-heck" moments have helped me solve some real issues with Linux/Unix.



I use full paths in mine. To see where icewm is installed simply type `% which icewm >> $HOME/.xinitrc`
This will append your rc file.

Also I consider TWM to be Tom's Window Manager. You can backronym it but this is the proper name for twm.


----------



## asnextage (Feb 18, 2012)

Hi

*S*orry about this post in here but: to install nvidia graphic I need to go back to text mode but I first set up xorg to run gnome and get access to my USB flash and copy my driver to HDD. *H*ow can I stop xorg and go back to text mode? I used the Ctrl+Alt+Fn but it say still xorg running.


----------



## DutchDaemon (Feb 19, 2012)

With Ctl+ALt+Fn you can 'drop' to the console while leaving X running. You typically switch back to X with Ctl+Alt+F9. An easier option is to simply use a terminal client under X to get to the console. Most window managers have one, or else use xterm or roxterm from ports.


----------

