|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Xorg run from rc.local no keyboard response
Hello,
Currently for one of my machines, I have it automatically starting X using rc.local. E.g by putting in the following line. Code:
su -l myusername -c "xinit twm &" Can anyone suggest a reason for this? Best Regards, |
|
|||
If you want X to start during boot, it makes more sense to use a display manager.. xdm(1) is in base and can be started by adding a single line to /etc/rc.conf.local.
You could also start it by adding something to your shell initialization script, see your home directory. |
|
|||
The issue with XDM is that the user would need to log in.
Ideally this machine is to be used as a permanently logged in terminal with a GUI and interactive application running. (twm was just a simple example) I used to use FreeBSD for this (put a similar script in '/etc/rc.d' and it worked well), unfortunately OpenBSD better supports the hardware than FreeBSD, thus the change. Is there a way to forcefully attach a tty/pty before I call xinit (or startx)? On another note I am also concerned that my clone of CDE's dtlogin is going to have problems with OpenBSD because it uses a similar method of starting up. |
|
|||
There are other display managers in the ports tree, gdm/kdm/slim, the idea of logging in automatically seems very inadvisable though.. but probably supported by one of them.
http://en.wikipedia.org/wiki/X_displ...mplementations You may be able to workaround your problem and start X in the way you wish, but isn't a traditional way of doing things. Note that using your method X will not recover if it crashes or is terminated by the user.. so you may wish to make your rc.local a bit more intelligent. Indeed the keyboard input will probably be intercepted by the other wscons terminal, the following before or after executing xinit might help.. or even better try turning off ttyC0 in /etc/ttys. wsconsctl display.focus=4 Good luck. |
|
|||
Hello,
I tried the wsconsctl trick you suggested but unfortunately it seems to just flick back to ttyC0 and when I try to go to x11 (ctrl-alt-F5) it doesn't seem to exist. Oh well, I will probably just make do with my 10 seconds wait since I don't really want to disable ttyC0 in /etc/ttys. Thanks for the suggestion and If I come up with a great workaround, I will update this post. |
|
|||
Hello again everyone. I hope all is well since the last post around 6 years ago
I finally found a solution to this that I thought I might share: The trick is to keep checking until getty is running. This is because if getty starts after X11, it seems to grab the input devices leaving the machine locked. A script like this called from rc.local should be enough to automatically startx from a user. Code:
while true; do pkill -0 getty RESULT=$? if [ $RESULT = 0 ]; then break fi sleep 1 done su -l kpedersen -c startx |
|
|||
Quote:
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMD Fusion APU benchmarks, the AMD's 'Response to Atom CPU' | vermaden | News | 1 | 6th January 2011 12:56 AM |
Can't Response Ping Request | widhi | OpenBSD General | 5 | 24th March 2010 10:40 PM |
Tor Project infrastructure updates in response to security breach | J65nko | News | 1 | 22nd January 2010 06:57 PM |
log from rc.conf.local and rc.local | sdesilet | OpenBSD General | 1 | 21st January 2010 02:37 AM |