Date: Sun, 29 Mar 2020 10:17:41 +0200 From: Polytropon <freebsd@edvax.de> To: "Vlad D. Markov" <dvoich@aim.com> Cc: "Vlad D. Markov via freebsd-questions" <freebsd-questions@freebsd.org> Subject: Re: sane crashes Message-ID: <20200329101741.8d20b5aa.freebsd@edvax.de> In-Reply-To: <20200328205755.d55855545c0f9a4656a0ce64@aim.com> References: <20200321183703.9566f2b45dd4193a51381291.ref@aim.com> <20200321183703.9566f2b45dd4193a51381291@aim.com> <20200321184307.8fb232b54dd802ae8c0a11bb@aim.com> <20200322093038.1f6933c3e68d6622c7d39427@aim.com> <20200322152424.6fd38112.freebsd@edvax.de> <1270065762.180915.1584894974045@mail.yahoo.com> <20200322175247.fc82ac9b590f745d35ab47da@aim.com> <20200323034250.be7371f1.freebsd@edvax.de> <20200328205755.d55855545c0f9a4656a0ce64@aim.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 28 Mar 2020 20:57:55 -0400, Vlad D. Markov wrote: > In /etc/rc.local I had this line: > > cd /home/vlad;/usr/bin/su - vlad /usr/local/bin/startx vt6 > > Removing it fixed my problem. I did the same thing under Debian > and skipped logging on going directly into my X session. Oh, your auto-login to X is the problem? In this case, FreeBSD offers a convenient solution: 1. Create an entry in /etc/gettytab for your username that should be automatically logged in, "vlad": autologin:\ :al=vlad:tc=Pc: You can add this infront of the other entries. 2. Use that profile for the 1st console in /etc/ttys: ttyv0 "/usr/libexec/getty autologin" xterm on secure This will now automatically login "vlad" after system startup (as the profile "autologin" will be used). In order to run X for that user, use his local configuration files. I assume you're using FreeBSD's default shell configuration; changes might be needed if you're using Bash, Zsh, or something else. 3. In you ~/.login file, #!/bin/sh mesg y [ ! -f /tmp/.X0-lock ] && startx This makes sure there will be no attempt to start further X sessions in case there's an additional console login. Add the command logout as last line in case you wish the uer to be logged off (instead of dropped back to the console) if the X session is terminated. For proper shell configuration in X, and compatibility with use of xdm (or any other display manager that honors user setting, explicitely excludes GDM which doesn't care about what users want) the following additions are quite convenient: 4. Make your ~/.xsession file a "pointer to" your regular X startup file: #!/bin/csh source ~/.cshrc exec ~/.xinitrc Now you don't need two configuration files, one for if you use xdm, and one for "startx". This file is ignored in case you only use "startx", but if you later on introduce a display manager such as xdm, no surprise about "empty desktop" will occur. 5. Keep your settings in ~/.xinitrc as you probably already have, for example: #!/bin/sh [ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc numlockx xbindkeys xsetroot -solid rgb:3b/4c/7a xset b 100 1000 15 & xset r rate 250 30 & xset s off & xset -dpms & exec wmaker This approach should provide maximum flexibility, while needing to have configuration elements only in _one_ file for each distinct aspect. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200329101741.8d20b5aa.freebsd>