Installing X11
Xorg is the default X11 implementation for FreeBSD and can be installed using the following command as the root user
After installing add the lines to /etc/rc.conf as follows
Check the installation using the following command as an unprivileged user
If the setup is working, there should be a minimal X session
running. Press CTRL+ALT+F1 to move to the first terminal in which the
command was executed. Press CTRL+C to stop it.
To create a xorg.conf.new file run the following command as the root
user. Reboot the server after installing Xorg if the following command
doesn’t work.
A file named xorg.conf.new will be created in /root. To check the file created run the following command as root
1 | # Xorg -config /root/xorg.conf.new -retro |
If the configuration is working properly, a background with mouse
cursor is seen. Press CTRL+ALT+F1 to move to the first terminal in which
the command was executed. Press CTRL+C to stop it.
Copy the file to /etc/X11/ as xorg.conf as the root user using the following command
1 | # cp /root/xorg.conf.new /etc/X11/xorg.conf |
Installing URW fonts
URW fonts can be installed by using the command
Add the following line to the file /etc/X11/xorg.conf under ‘Section “Files”‘
1 | FontPath "/usr/local/lib/X11/fonts/URW/" |
Installing TTF fonts
TTF fonts can be installed by using the following command
Check whether the following line is present under ‘Section “Files”‘ in /etc/X11/xorg.conf
Add the following line to the ‘Section “Modules”‘
Enter the following commands now
1 | # cd /usr/local/lib/X11/fonts/TTF/ |
Installing Xfce4
For installing Xfce4 run the following command as root
The Xfce4 installation can be checked using the following command as an unprivileged user
1 | $ /usr/local/bin/startxfce4 |
Install XDM using the following command
Run the following command as the unprivileged user to make xfce the default for the particular user
1 | $ echo "/usr/local/bin/gnome-session" >> ~/.xsession |
2 | $ echo "/usr/local/bin/gnome-session" >> ~/.xinitrc |
Add the following line to /etc/rc.conf
Edit the file /etc/ttys and edit the line as follows
1 | ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure |
Now reboot the machine to boot into XDM and try logging in. It will login to Xfce.
In this case after login you can take the "startx" command in console and Xfce will start.
==============================================
If you wish to login xfce after boot with a specific user you can use the folowing procedure:
There are 3 files you need to edit:
1. /etc/gettytab
2. /etc/ttys
3. Your shells' rc file, e.g: ~/.bashrc
Edit /etc/gettytab and search for autologin. Add these after the last entries:
Code:
logmein:\
:al=your_username:sp#115200:
Replace 'your_username' with your user login.
Next edit /etc/ttys. I set mine to autologin on ttyv5. So my entry looks like this:
Code:
#ttyv5 "/usr/libexec/getty Pc" cons25 on secure
ttyv5 "/usr/libexec/getty logmein" cons25 on secure
Lastly, I'm using bash shell so this is what I have in my ~/.bashrc:
Code:
if [ `/usr/bin/tty` = '/dev/ttyv5' ]; then
/usr/bin/ssh-agent /usr/local/bin/startx -- -nolisten tcp
fi
Hope this helps.
source
source