background preloader

Gentoo

Facebook Twitter

Portage. From Gentoo Linux Wiki Portage is the package manager used in Gentoo. Unlike most package managers, it is primarily used to handle source packages: Portage can automatically build source packages as you need them, while binary package managers primarily install pre-built tarballs. The purpose of this article is to teach the "best-known practices" for working with Portage on a daily basis. This is not a primer or introduction to using Portage or emerge. If you are new to Gentoo, the best way to learn how to use these tools are by reading the Working with Gentoo chapter of the Gentoo Handbook. In this article we will take an in-depth look at how Portage works and how we can make it work better.

Emerging Packages The emerge command is the primary way one interacts with Portage. Emerge --ask or emerge -a Display a message stating exactly what actions emerge will be performing and prompts you to confirm them. root ~ # emerge -a patch These are the packages that would be merged, in order: b f r Color. Manage Linux Hardware with udev (Part 2) - www.enterprisenetworkingplanet.com. Last week we learned the basics of the udev filesystem, and how to dig up device names. Today we dive into writing custom udev rules. Why would you want to acquire this strange knowledge? Because, believe it or not, computers are not yet perfect, so sometimes we must fix them. USB scanners are notorious examples of needing human intervention to be usable by non-root users. Managing device permissions is something you're bound to bump into sooner or later – the traditional Unix method of user and group permissions no longer works on udev-managed devices.

Getting Scanners To Work Right Scanners and multi-function printer/copier/scanner/faxes are notorious for not being automatically usable on Linux. First of all, is your scanner/multi-function thingy even supported in Linux? Take a peek in your /etc/udev/rules.d/*-libsane-rules file. SUBSYSTEM! Make sure you have SANE installed, including the documentation, backends and utilities. Now try scanimage -L as an ordinary user: $ scanimage -L. Gentoo udev Guide. Not to be confused with eudev. udev (user /dev) is systemd's device manager for the Linux kernel. It manages device nodes in /dev and handles all user space actions when adding or removing devices.

The sys-fs/udev package is used as the default device manager for Gentoo systems using the OpenRC init system, independently of systemd. What is udev? The /dev directory Most Linux users understand that /dev/sda1 is just a fast way of referring to the first partition on the first disk that the kernel found. That's pretty easy, right? But consider hotpluggable devices like USB, IEEE 1394, hot-swappable PCI, etc. Enter the device manager. Run in userspace.Dynamically create and remove device files.Provide consistent device naming.Provide a userspace application program interface (API).

Every time a change happens within the device structure, the kernel emits a uevent which gets picked up by the device manager. Installation Kernel udev requires the following kernel options: USE flags Emerge Configuration. Power Management. Handling of hardware events Power state switching Letting disks idle (buffering disk writes, aka laptop-mode) Though power management will deal with these, the objectives of the tasks do not solely lie in power management. It may be adviseable to rely on tools specialized for their tasks, instead of implementing an incomplete power management utility.

Launchpad Entry: desktop-lucid-powermanagement-tweaks Created: Contributors: Packages affected: Related: Handling hardware events The acpi-support package should be deprecated; however, new homes need to be found for its current contents. power-related things to clean up: /etc/acpi/start.d: these are currently launched by the init script, which has no equivalent in other packages currently 10-save-dmidecode: superseded by /sys interfaces 60-asus-wireless-led: should be moved to the kernel (cf. 90-hdparm.sh: init script in pm-utils?

DeviceKit-power quirks Disk idling (dot source) Pm-utils - openSUSE. From openSUSE pm-utils is the new suspend and powerstate setting framework. It is usually used by HAL to execute the various hacks needed to work around bugs in drivers and subsystems that are not yet aware of suspend. It is easily extensible by putting custom hooks into a directory, which can either be done by the system administrator or those hooks can be part of a package, especially if this package needs special attention during a system suspend or power state transition. Although pm-utils is a framework that will be common between all Linux distributions in the future, there are still some SUSE-specific features and patches that are not yet upstream. I will mark the configuration variables that are SUSE specific as such. Both pm-suspend and pm-hibernate are usually called from HAL, initiated by desktop applets as gnome-power-manager or kpowersave.

The hooks for suspend are placed in The hooks for the power state are placed in The main configuration file is /usr/lib/pm-utils/defaults. . #! Gentoo Wiki Archives - Pm-utils. Note: This page was copied from the TuxOnIce page. The information should probably be externalized to here to reduce the length and size there. For desktop environments that utilize the Hal framework, like Gnome and KDE, usage of hibernate-script has become depreciated in favor of pm-utils.

Short for Power Management Utilities, pm-utils does most of the needed legwork outside of the kernel. This package gives you three commands to play with once installed: pm-hibernate, pm-suspend and pm-suspend-hybrid. One of the strengths of pm-utils is Hal intermediates the hibernation commands, allowing user usage without unnecessary fuss with permissions.

A prerequisite to this page is setting up a form of suspend support in the kernel, such as TuxOnIce. Advanced configuration of pm-utils can be much more pain in the butt than hibernate-script. Basically, all executable scripts in the /etc/pm/sleep.d directory are run in alphabetical order when hibernate/suspend is called. . #! Restarting Services #! #! Hibernate + Ubuntu. Manage Linux Hardware with udev - www.enterprisenetworkingplanet.com. In the olden days Linux administrators had a static /dev directory. It was inflexible and obese, containing 99% irrelevant entries, and we liked it that way. We didn't mind hassling with makedev and struggling with major and minor numbers to enter the devices we actually wanted, or manually deleting the 1,000 useless /dev entries, because Real System Administrators love doing things the hard way.

It makes us feel close to our hardware. The best part of the job is spending years acquiring and hoarding arcane bits of knowledge, which are then passed on to eager, fresh-faced noobs with the magical incantation, "RTFM, luser. " Then came devfs, which attempted to replace this increasingly arthritic system with something that was less complex, more efficient, and which was a bit more based in reality. Then descended the unbearded prophet Greg Kroah-Hartman from his mountaintop lair with yet another dev filesystem, called thereforth udev.

I'm Sorry, Dave, I Can't Allow You to Do That. Gentoo Linux Use Variable Descriptions. Gentoo Install. The perennially late Gentoo gnome-light ebuilds | All My Brain. If you run Gentoo Linux for your desktop, and you happen to favor the Gnome desktop environment, you may have noticed the incredible number of packages that need to be installed in order to install the gnome ebuild. The ability to pick and choose just those components you need for a system is one of the reasons I personally haven't switched away from Gentoo to another Linux distribution. This ebuild however, seems to me to go somewhat against the original intent of the OS. Well, for the rest of the crowd like me, there is the gnome-light ebuild. If you don't like the monolithic Gnome installation, you can simply choose gnome-light instead. The gnome-light ebuild has dependencies for only the minimum required packages to get a Gnome desktop up and running. I found information from the Gentoo Gnome Project Policy that explains why they've separated the packages this way: There are many subsets of Gnome that can be installed and usable.

I can dig that. Gentoo Linux Tidbits « Helpful Linux Tidbits. I’ve been using Gentoo for about two years now and I took notes on managing my system. These are those notes. I’ve since created a bash script that does many of the functions and I’ll just post it here because it is pretty self-explanatory. For more details read below. If you’re interested in installing Gentoo take a look at Gentoo Quick Install. #! About Portage Gentoo Linux uses a package management system called Portage. System Update Update all packages on the computer. Sync the portage tree: emerge –sync # or eix-sync # preferrable for faster searches (eix search) Examine update before install: emerge -pv –update –newuse –deep world | less If unexpected dependencies are being pull in, use the –tree variable to track it down.

Complete update: emerge –update –newuse –deep world etc-update revdep-rebuild glsa-check -f affected eclean distfiles In the first command, portage wiil update all packages on the systemetc-update is Portages configuration replacement tool. Remove Abandoned Dependencies: Gentoo Linux Tidbits « Helpful Linux Tidbits. Additional options for the radeon driver. Options for the radeon driver are documented on the radeon(4x) man page. External Monitors First of all, suppose you want to plug in your laptop into a projector occasionally, but you don't want to restart X when you do so. The easiest thing is to not use any of the CRT2 options and use Option "MonitorLayout" "LVDS,NONE" The vga port will carry the same signal as the laptop display (at least on my T42p).

Using Xinerama You can use MergedFB to provide dualhead Xinerama-like setups. The following (partial) Xorg config will make the Radeon card use 1024x768 on the internal lcd display and 1280x1024 on the external (Note: only one screen/monitor section is needed (it controls the setup of the internal monitor) even though we have two displays): N.B.: Modes used in the MetaModes also have to be present in the screen modes section. Note: The CRT2 directives always applies for the external monitor regardless of type (LCD, CRT...). External Monitors and Docking Stations/Port Replicators AGP speed. Metacity …for the adult in you. Trees January 18, 2011 – 8:10 pm I know what you’re thinking: you thought this blog was dead.

Well, I have to apologise for the lack of attention to Metacity recently. I’ve been trying to rectify this, and I’ll try to keep it up. There have been things sucking up my time, but they are mostly over now. Posting to the Metacity blog was taking more of my time than actually working on Metacity, so I will try to cut back on the posts. Some actual news: As well as the standard git tree at gnome.org, I have pushed Metacity to github and gitorious, so you can easily clone it if you need to. Photo © Federico, cc-by-nd. Moving to GSettings September 24, 2010 – 2:53 pm In the beginning, Metacity stored keybindings in GConf. In 2005 , GNOME bug 164831 raised the point that other platforms used several keybindings for some of the actions. This posed a further problem. Now, in GNOME bug 621204, there is a laudable move to switch Metacity to using the new GSettings API. Photo © Matthew Boyle, cc-by-nc.

Gentoo maintenance. From Gentoo Linux Wiki The focus of this tutorial is installing new software and updating existing software, in the most common and basic style. Rough understanding of portage is expected. For complicated tinkering, see other pages in this wiki. Installing new software eix To search packages, the utility "eix" in app-portage/eix is recommended.

After you emerged eix, build the eix cache by running eix-update . "eix" replaces emerge --search functionality (which is slow) and also emerge --sync. Emerge To actually emerge a package, emerge -av <whatever> can be used. -a, --ask portage will list all packages that it is going to emerge and then asks for confirmation -v, --verbose mainly has the effect, that you'll see USE flags for all packages t, --tree shows the dependency tree for the given target by indenting dependencies. Per-package USE flag can be set in the file /etc/portage/package.use and add a line like this: File: /etc/portage/package.use app-editors/vim cscope app-editors/vim emerge autounmask. Make Linux faster and lighter. With just a few tweaks, your Linux box can be lighter, sprightlier and quicker than ever before. Read on for the best ways to speed up your boot sequence, optimise KDE and Gnome, and get better performance from your favourite apps. We've also got some top tips from our favourite free software gurus...

Gone are the days when you could make a cup of tea and drink it in the time it takes your computer's operating system to boot (with one notable exception). On that basis, you might think that your Linux machines are already performing at the fastest possible speed, right? Sadly, this is not always the case. With just a few tweaks and some experimentation, your Linux system can realise your machine's untapped potential. The great strength of everyone's favourite free OS is that it can be customised from the ground up, so Linux is the ideal tool to tailor to your needs.

Make Linux boot faster Remove the timeout timeout=3 Once you've found it, change the value to zero. Improve disk performance.