Home » Questions » Computers [ Ask a new question ]

Linux: KDM, startx & the X session

Linux: KDM, startx & the X session

I'm using startx in my .bashrc file to start X when I login at tty1 instead of using a display manager like KDM (I'm using KDE 4.3.4). The actual code in my .bashrc:

Asked by: Guest | Views: 29
Total answers/comments: 1
Guest [Entry]

"It is not really clear what you want to achieve, but like Ignacio wrote putting startx into your .bashrc is a really bad idea. If your problem were only that you cannot call shutdown -h from within that session, CTRLALTdel is usually mapped to shutdown -r now in /etc/inittab. You can change it to shutdown -h now in there as well.

If your problem is only that you really, really badly want to have X running on tty1, you can of course start kdm on tty1. Then you would also only have to give your login once (was that the issue?). To do that you need to modify a few files.


Remove/comment the line that spawns the getty on tty1. It looks something like

## c1:12345:respawn:/sbin/agetty 38400 tty1 linux


Tell the xdm scripts that they are working on tty1; change the entry in there to


To have X start automatically you of course need it in your default runlevel (added via rc-update add xdm)."