I want to achieve a kiosk like functionality with minimal X. Purposely chose twm as that offers no icons, menus and if I manage to run my intended program under twm, that will give a better kiosk feel. I do not want KDE, GNOME, XFCE to claim memory and resources as they have no role in my application.
Now I have referred to various posts on net and know XDM cannot give me autologin. I plan to autologin via inittab / mingetty and startx from .bashrc and expect to launch application from within twm.
I have been unable to get my application to run in twm on start. I have put the command in .xinitrc (after executing twm, like below), but it does not launch at all. But if I start a xterm and run that command, application runs without any problem.
I have tried putting that in .profile and .bashrc too without success. Any ideas ?
My .xinitrc section:
# finally start the window manager
unset WINDOW_MANAGER STARTUP
#This did not work and had to be commented out.
/usr/bin/java -jar /home/pbhat/MilkTally-1.1/Milk.jar &
# call failsafe
Shame to me, I had read man pages for both exec and startx, but your point escaped me. Reading the man page for exec now again, I realise the meaning of the statement ‘exec replaces the shell’. Thank you. That worked.
Knowing you from before as my Guru on other occassions too, I have made my mind to pick your head again. Look, if I call the startx from .bashrc, X produces errors. Basically it is,‘There is already another X on Display 0’, I see two X processes which even if I kill get spawned again. I find no way of calling startx from inittab. I don’t know if I can replace mingetty with startx command in inittab. But the so many advises on Net all suggest that and they all seem to be Debian based systems. I find no rc.local in OS which they refer to.
while true do WINDOWMANAGER=/home/tux/bin/start.sh startx done
. But calling startx from .bashrc any which way produces X errors as I said above. I am not getting if I am missing something here. P.S: I have not missed to replace tux with my username !]
Are you running the system at runlevel 5? If so there is already an X server running. To make sure no X server is active you should choose to boot to runlevel 3.
Running xstart from .bashrc implies you require the user to login. If you want to avoid this, you can put the xstart in /etc/inittab but you should su to the user in question as you do not want to run xstart as root.
Now I have achieved what I needed with this
1.set window manager in .profile ( so that whatever is set by OS is overridden)
2.set application to run in .xinitrc
3.call startx from inittab 'su’ing to the user.
4.As the application will run single, my runlevel is actually 2.
Thanks ken_yap and others who helped me understand better, think more.