Modifying USE flags in Gentoo

To modify the global USE flags, set the USE variable in /etc/make.conf

You can set USE flags for individual packages by specifying the package name and USE flag, in /etc/portage/package.use (the file or directory may not exist).

Eg of /etc/portage/package.use

dev-db/mysql berkdb -java[/code]

The above example disables java use flag and enables berkdb for package dev-db/mysql.

If you want only a temporary USE flag during emerge of just the current package, you can specify the flag on the same command line where you specify the emerge:

USE="-java" emerge seamonkey[/code]

To view the current USE flags, run:

emerge --info

Once some USE flags have been set, one must make Portage see the new flags, with:

emerge --update --deep --newuse world[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Dependencies required by HPLIP on Gentoo

sudo emerge media-libs/libjpeg-turbo dev-libs/libpthread-stubs libtool libusb app-text/ghostscript-gpl
[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Setting up HP Laserjet P1007 on Gentoo

First install cups, start it, and add to default run level:

sudo emerge cups[/code]

If USE changes are necessary:

sudo emerge cups --autounmask-write
etc-update
sudo emerge cups[/code]

sudo /etc/init.d/cupsd start
sudo rc-update add cups default[/code]

Then install the HP Drivers:

sudo emerge foo2zjs[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Adding KDE after a basic Gentoo install

First install Xorg. You should have compiled your kernel and the nvidia module keeping in mind the need to run Xorg.

http://www.gentoo.org/doc/en/xorg-config.xml

emacs /etc/make.conf

Changes to make.conf:
VIDEO_CARDS="nvidia"
[/code]

emerge -pv xorg-drivers
emerge xorg-server
env-update
source /etc/profile

Finally try a startx
If you momentarily get a blank screen, X may be setup correctly. Can test with emerge twm (but remeber to unmerge them)

emerge -av kde-meta

If there are use changed you need to write:

emerge -av kde-meta --autounmask-write

(Watch for another command which writes merges the changes to config files)

After installing and compiling packages of KDE, we can try to start kdm

kdm[/code]

If all went well, KDE should start. I got a few errors with dbus and consolekit, which caused KDM to show windows without the resize/min/max buttons, and a few error message popups.

Consolekit session failed to connect to socket.

Solved by:
First see if dbus starts fine:
/etc/init.d/dbus restart

If it does, then:
rc-update add dbus default
rc-update add consolekit default

To make KDM start automatically at boot:
sudo emacs /etc/rc.conf

Add the line:
DISPLAYMANAGER="kdm"

Then add xdm to default runlevel:

rc-update add xdm default


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Gentoo installation

Step 1 – Setup network

Gentoo-2012 gentoo # ifconfig
eth0: flags=4099 mtu 1500
ether 00:11:95:fc:cd:93 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 base 0x4000

eth1: flags=4163 mtu 1500
inet6 fe80::21c:c0ff:fee5:5f06 prefixlen 64 scopeid 0x20
ether 00:1c:c0:e5:5f:06 txqueuelen 1000 (Ethernet)
RX packets 1156 bytes 72735 (71.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1458 (1.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40 base 0x2000

lo: flags=73 mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 848 bytes 74584 (72.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 848 bytes 74584 (72.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ifconfig shows that network was not auto setup.
Confirmed by a ping:

Gentoo-2012 gentoo # ping -c 3 www.gentoo.org
ping: unknown host www.gentoo.org

Gentoo-2012 gentoo # net-setup eth1

Gentoo-2012 gentoo # ifconfig
eth0: flags=4099 mtu 1500
ether 00:11:95:fc:cd:93 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 base 0x4000

eth1: flags=4163 mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::21c:c0ff:fee5:5f06 prefixlen 64 scopeid 0x20
ether 00:1c:c0:e5:5f:06 txqueuelen 1000 (Ethernet)
RX packets 1234 bytes 78021 (76.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 3148 (3.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40 base 0x2000

lo: flags=73 mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 856 bytes 75176 (73.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 856 bytes 75176 (73.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Gentoo-2012 gentoo # ping -c 3 www.gentoo.org
PING www-bytemark-v4v6.gentoo.org (89.16.167.134) 56(84) bytes of data.
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=1 ttl=53 time=257 ms
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=2 ttl=53 time=256 ms
64 bytes from www.gentoo.org (89.16.167.134): icmp_req=3 ttl=53 time=257 ms

— www-bytemark-v4v6.gentoo.org ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 256.315/257.110/257.850/0.858 ms

Yes! Now it’s been setup


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.