Gentoo Linux Post Installation Notes

0. This post is continuation from https://smekkley.wordpress.com/category/linux/gentoo-linux/
Run “emerge -uDNv world” before beginning.

1. Network Setup.
From command line (non-persistent)

ip addr add 10.0.0.15/24 broadcast 10.0.0.255 dev enp0s3
ip route add default via 10.0.0.1
ip link set dev enp0s3 up

From systemd unit file (persistent)

nano /etc/conf.d/network@enp0s3
address=10.0.0.15
netmask=24
broadcast=10.0.0.255
gateway=10.0.0.1

nano /etc/systemd/system/network@.service
[Unit]
Description=Network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network@%i

ExecStart=/bin/ip link set dev %i up
ExecStart=/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/bin/ip route add default via ${gateway}

ExecStop=/bin/ip addr flush dev %i
ExecStop=/bin/ip link set dev %i down

[Install]
WantedBy=multi-user.target

Using dhcpcd

systemctl start dhcpcd@enp0s3
systemctl enable dhcpcd@enp0s3

2. Install X

To check necessary USE changes, run...
emerge -pv xorg-drivers

echo "x11-base/xorg-server udev" >> /etc/portage/package.use
echo "x11-base/xorg-drivers virtualbox" >> /etc/portage/package.use

add below to /etc/portage/make.conf
INPUT_DEVICE="evdev"
VIDEO_CARDS="virtualbox"

Then, run...
emerge xorg-server

To set USE automatically, do...
emerge --autounmask-write "pkgname"
etc-update

startx

if it fails, check /var/log/Xorg.0.log
I needed these packages..
emerge xf86-video-virtualbox
emerge xf86-input-evdev
emerge xterm

3. Installing Xfce4

emerge xfce4-meta
USE="udisks" emerge thuner

4. Installing display manager (lxdm)

emerge lxdm

Edit /etc/lxdm/lxdm.conf
autologin=username
session=/usr/bin/startxfce4

systemctl enable lxdm

OR, if you hate DM


vim ~/.xinitrc
exec startxfce4

vim /etc/systemd/system/getty@tty1.service.d/autologin.conf
[Service]
ExecStart=
ExecStart=/sbin/agetty --autologin username --noclear %I 38400 linux

vim ~/.bash_profile
[[ -z $DISPLAY && $tty = /dev/tty1 ]] && exec startx

That’s all.

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: