# Open textfile in xterm on launch



## perleo (Apr 4, 2011)

Hi,

How can I configure Xorg to show a textfile (in more or vi) in an xterm on launching the xwindow?

thanks


----------



## SirDice (Apr 4, 2011)

Just add it to ~/.xinitrc (if you use startx) or ~/.xsession if started with XDM/KDM/GDM.


----------



## Beastie (Apr 4, 2011)

```
xterm -e more /path/to/file &
exec windowmanager
```


----------



## DutchDaemon (Apr 4, 2011)

If you want to be slightly more upmarket, you can throw up a notification box using x11/zenity.


```
$ zenity --info --text "Wash your hands after a visit to the bathroom!"
```


----------



## jrm@ (Apr 5, 2011)

DutchDaemon said:
			
		

> If you want to be slightly more upmarket, you can throw up a notification box using x11/zenity.
> 
> 
> ```
> ...



FWIW, if you are using shells/bash or shells/zsh you need to escape the '!' I believe.


----------



## SirDice (Apr 5, 2011)

mingrone said:
			
		

> FWIW, if you are using shells/bash or shells/zsh you need to escape the '!' I believe.



Not when it's quoted.


----------



## bes (Apr 5, 2011)




----------



## jrm@ (May 8, 2011)

SirDice, I missed your reply until now.



			
				SirDice said:
			
		

> Not when it's quoted.



My shell is zsh.  I start xterm and run
`% zenity --info --text "Wash your hands after a visit to the bathroom!"`
and see dquote> and I'm returned to the shell prompt.
Running
`% zenity --info --text "Wash your hands after a visit to the bathroom\!"`
displays the window.


----------

