LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Autologin and Autostart in TWM (https://www.linuxquestions.org/questions/linux-general-1/autologin-and-autostart-in-twm-526090/)

g4j31a5 02-06-2007 10:55 AM

Autologin and Autostart in TWM
 
Hi, I usually use KDE for the windows manager. But recently I needed to use TWM because I needed to save some resources. I only wanted to use it for one SDL based application which requires lots of resources. I know how to use autologin and autostart in KDE, but how do I use them in TWM? Can anybody help me? Thanks alot in advance.

exvor 02-06-2007 12:21 PM

If it does not use any of the TWM interface things for anything you can just start it before you start the windows manager in xinitrd

Code:


#begin xinitrd
neededapp &
twm

Might need a exec but i doubt it

g4j31a5 02-06-2007 07:57 PM

Well, there's no xinitrd anywhere. Did you mean xinitrc? BTW, I still needed to autologin. In KDE I can do it by enabling the "AutoLogin" in kdmrc. But I don't know how in TWM.

SciYro 02-06-2007 08:03 PM

What is autologin?

You can modify the ./.bashrc to start X, so when people log in the GUI starts, this requires a text based login tho. To automatically "login" as a user, keep in mind the system starts up in root mode essentially, so the init scripts of the system are run as root, you can essentially just place as the last command a "su" to a normal user, which should trigger the bashrc, which starts X with triggers ./.xinitrc. sorry if this sounds hard, but thats what you get for using something like TWM, altho, i could be wrong. I do know that the GUI login for TWM is XDM, so check its man page for autologin. But, then again, cant KDE's GUI login manager start different sessions, like a TWM session?

g4j31a5 02-07-2007 02:23 AM

^^

Thanks, but that's not what I really wanted.

Okay, I've solved the autostart by adding my application in .xinitrc. So everytime X is started, it will automatically called. But I have no idea for auto login. What I wanted was:
1. Auto login from the first time system was booted. I guess this means auto login in the terminal itself.
2. Start X without logging in again.
3. Automatically calls the application. Has been done (I think).

In KDE, the autologin is easy. I just changed the "AutoLoginEnable" to true and "AutoLoginUser" to the user name in kdmrc. But I don't how to do it with TWM.

johnnyblade 02-08-2007 11:37 AM

The solution is so simple, it hurts. First off, if you haven't already, disable auto login. Then when you get to the KDM login screen, log into TWM like normal, if it asks, "Do you want to make TWM the default for future sessions?" or something similar, answer YES. Once you're logged in, launch kcontrol from a terminal or a "Run Command" dialog. Once the KDE Control Center is running from within TWM, simply enable auto-login for that user. You're done. KDM's auto login automatically starts the default window manager of the user in question, whether it's KDE, GNOME, or in your case, TWM. As long as TWM is the default window manager for that user, KDM's auto login will use it. Changing your default window manager varies by distribution, but I hope I've helped you. Please note that auto login will not work if you logout within X. You will have to restart the X Window System in order to automatically login. I used to do this with Window Maker back when I used my Linux box as my primary TV.

g4j31a5 02-11-2007 10:03 PM

Well, I don't want to install KDE at all. So, is there any other way? Thanks though.

johnnyblade 02-15-2007 11:49 AM

Hmm, not that I know of. I'm not really familiar with TWM to be honest. If I knew more about the application you were running, and the distro you're using, I might be able to think of something. Why don't you want to install KDE? Is it a disk space issue?

weibullguy 02-15-2007 01:02 PM

If you don't install KDE or GNOME or XFCE or Fluxbox or etc., then twm will be your window manager. It is installed when you install X Windows. Just startx will give you twm.

Xeratul 02-15-2007 03:19 PM

Quote:

Originally Posted by g4j31a5
Hi, I usually use KDE for the windows manager. But recently I needed to use TWM because I needed to save some resources. I only wanted to use it for one SDL based application which requires lots of resources. I know how to use autologin and autostart in KDE, but how do I use them in TWM? Can anybody help me? Thanks alot in advance.

i use the nuts & bolt autologin http://linuxgazette.net/issue72/chung.html

and tinywm or openbox

enjoy this hint

thank you xeratul

Xeratul 02-15-2007 03:22 PM

Quote:

Originally Posted by Arow
If you don't install KDE or GNOME or XFCE or Fluxbox or etc., then twm will be your window manager. It is installed when you install X Windows. Just startx will give you twm.

luxbox or etc., then twm will be your window manager. It is installed when you install X Windows. Just startx will give you twm.

g4j31a5 02-19-2007 10:25 PM

Thansk guys. I've successfully done the autologin and autostart issues. Here's what I've done:

1. Updated the newest mingetty
2. Changed the mingetty in tty1 with -autologin user
3. Added startx in the .bash_profile
4. Added the application execution in the xinitrc

Thanks a lot.

@johnnyblade
Well, my application runs very slow and the boot up takes ages because my computer is very low spec (Pentium II 400Mhz with 512 mb memory and an onboard graphics with shared memory).

Xeratul 02-21-2007 12:17 PM

Quote:

Originally Posted by g4j31a5
@johnnyblade
Well, my application runs very slow and the boot up takes ages because my computer is very low spec (Pentium II 400Mhz with 512 mb memory and an onboard graphics with shared memory).

this config interest me.
I use the nuts and bolt on similar machine (or sh***).

Did you try a kernel 2.4 ? it can significantly be faster than the 2.6.
Beside I hear that the slack(ware) distro takes less ressources... but I never check it myself on current distro now

what s ur distro & kernel ?

Recompiling the kernel should improve performances ? to just our needs:jawa:

g4j31a5 02-21-2007 11:58 PM

Well, I used open SuSE 10.0 with the standart version of kernel from the distro (forgot the version though :D). I can't change to another distro because there's a specific hardware driver that I need. It runs perfectly in SuSE but not in other distro.


All times are GMT -5. The time now is 12:30 AM.