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
exec $WINDOWMANAGER
#This did not work and had to be commented out.
/usr/bin/java -jar /home/pbhat/MilkTally-1.1/Milk.jar &
# call failsafe
exit 0
Did you ever consider to go to yast2 and open the /etc/sysconfig editor. Yes I know I hate it because it reminds me of a windows registration key, but your system will probably call those parameters
change those fields and it work
Desktop->Display Manager->DISPLAYMANAGER_AUTOLOGIN -specify the user
Desktop->Window Manager->DEFAULT_WM - put the correct window manager
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.
No, I am running in runlevel 3. Following the suggestions on the How -To above, I made the mingetty in /etc/inittab autologin me after booting to runlevel 3 and in .bashrc I placed the below code .
while true do WINDOWMANAGER=/home/tux/bin/start.sh startx done
. I also tried calling startx plainly from .bashrc as
/usr/bin/startx
on a line in .bashrc. But the result is same.
Now,what I want to do is, replace one of the lines,
1:2345:respawn:/sbin/mingetty --noclear tty1
as
1:2345:respawn:su - pbhat -c /usr/bin/startx tty1
. Here I am not sure if using mingetty process is mandatory in that line.
Update:
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.
Any response is an honour rather than ignore the question. Using the yast sysconfig editor was my first attempt. As it did not work, I started exploring. Thanks.