Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: how to autologin, autostart in xdm / twm

  1. #1
    Join Date
    Nov 2009
    Location
    Bangalore,India
    Posts
    74

    Default how to autologin, autostart in xdm / twm

    Hello All,

    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:
    Code:
    ........................................................................
    # 
    # 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
    Thanks in advance.

  2. #2

    Default Re: how to autologin, autostart in xdm / twm

    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

  3. #3

    Default Re: how to autologin, autostart in xdm / twm

    sorry for double posting, the 10 minute rule arggg


    how about /etc/init.d/ for boot scripts?
    Howto: Write A Suse Boot Script

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: how to autologin, autostart in xdm / twm

    Did you understand that when you exec something in a shell script, nothing below that line will get run?

    Also if you had read the startx man page you would have seen their suggested example. You start the apps you want and then the window manager last.

    Code:
    xrdb -load $HOME/.Xresources
    xsetroot -solid gray &
    xbiff -geometry -430+5 &
    oclock -geometry 75x75-0-0 &
    xload -geometry -80-0 &
    xterm -geometry +0+60 -ls &
    xterm -geometry +0-100 &
    xconsole -geometry -0+0 -fn 5x7 &
    exec twm
    The twm replaces the startx process.

  5. #5
    Join Date
    Nov 2009
    Location
    Bangalore,India
    Posts
    74

    Default Re: how to autologin, autostart in xdm / twm

    Quote Originally Posted by ken_yap View Post
    Did you understand that when you exec something in a shell script, nothing below that line will get run?

    Also if you had read the startx man page you would have seen their suggested example. You start the apps you want and then the window manager last.
    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.

    From Susestudio How-Tos, openSUSE:SUSE Studio General howtos - openSUSE it is suggested to autologin the user with mingetty and then in .bashrc,
    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 !]

  6. #6
    Join Date
    Nov 2009
    Location
    Bangalore,India
    Posts
    74

    Default Re: how to autologin, autostart in xdm / twm

    @idoitprone :

    You may want to see if your suggestion works. XDM does not support auto login, wherever you set that.

    You may blame me of ignorance, but not laziness!

    Kind Regards,

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: how to autologin, autostart in xdm / twm

    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.

  8. #8
    Join Date
    Nov 2009
    Location
    Bangalore,India
    Posts
    74

    Default Re: how to autologin, autostart in xdm / twm

    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.

    Thanks so much.

  9. #9
    Join Date
    Nov 2009
    Location
    Bangalore,India
    Posts
    74

    Default Re: how to autologin, autostart in xdm / twm

    may be I can use
    mingetty --login 'use su as the login program'
    ?

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: how to autologin, autostart in xdm / twm

    You shouldn't need mingetty in between. Also you might need to specify a free console for the X, usually vt7 is allocated to X.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •