Difference between pages "GNOME First Steps" and "Funtoo Linux First Steps"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
 
Line 1: Line 1:
== What is GNOME? ==
+
If you are brand new to Gentoo Linux or Funtoo Linux, this page will help you to get familiar with your new system, and how it works.
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]
+
  
== Prerequisites ==
+
== Intro to Emerge: Installing an Editor ==
  
Before installing GNOME, ensure that the [[X Window System]] has been installed.
+
By default, Funtoo Linux has the <tt>nano</tt> and <tt>vi</tt> editors installed. <tt>nano</tt> is the default editor.
  
== Preparing to emerge ==
+
If you are new to Funtoo Linux, you have probably heard about <tt>[[emerge]]</tt>, the Funtoo and Gentoo Linux command for installing packages from the Portage tree. Funtoo Linux has a git-based Portage tree, which is located at <tt>/usr/portage</tt> by default. It contains scripts called ''ebuilds'' that describe how to build and install packages from source. <tt>emerge</tt> is used to run these scripts and install packages, as follows:
  
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:
 
 
<console>
 
<console>
##r### ##b## eselect profile list
+
# ##i##emerge vim
##g##Currently available mix-ins profiles: 
+
  [11]  funtoo/1.0/linux-gnu/mix-ins/audio 
+
  [12]  funtoo/1.0/linux-gnu/mix-ins/console-extras 
+
  [13]  funtoo/1.0/linux-gnu/mix-ins/dvd 
+
  [14]  funtoo/1.0/linux-gnu/mix-ins/gnome 
+
  [15]  funtoo/1.0/linux-gnu/mix-ins/kde 
+
  [16]  funtoo/1.0/linux-gnu/mix-ins/mate 
+
  [17]  funtoo/1.0/linux-gnu/mix-ins/media 
+
  [18]  funtoo/1.0/linux-gnu/mix-ins/print 
+
  [19]  funtoo/1.0/linux-gnu/mix-ins/python3-only
+
  [20]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
+
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-db 
+
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-mail
+
  [23]  funtoo/1.0/linux-gnu/mix-ins/server-web
+
  [24]  funtoo/1.0/linux-gnu/mix-ins/X
+
  [25]  funtoo/1.0/linux-gnu/mix-ins/xfce
+
  [26]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest
+
  [27]  funtoo/1.0/linux-gnu/mix-ins/hardened
+
 
</console>
 
</console>
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:
+
 
 +
You can also see what packages ''would'' be installed, but not actually install them, by using the <tt>-p</tt>, or <tt>--pretend</tt> option:
 +
 
 
<console>
 
<console>
##r### ##b##eselect profile add 14
+
# ##i##emerge -p vim
 
</console>
 
</console>
  
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.
+
Another equally handy option is the <tt>-a</tt>, or <tt>--ask</tt> option, which will display the packages to be merged, and then ask for confirmation from you before continuing:
  
== Emerging ==
+
<console>
You are provided with two packages that will pull in this desktop environment:  
+
# ##i##emerge -a emacs
* ''gnome'' -- This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.
+
 
* ''gnome-light''
+
These are the packages that would be merged, in order:
 +
 
 +
Calculating dependencies... done!
 +
[ebuild  N    ] app-admin/eselect-emacs-1.13
 +
[ebuild  N    ] net-libs/liblockfile-1.09
 +
[ebuild  N    ] app-emacs/emacs-common-gentoo-1.3-r1  USE="-X -emacs22icons"  
 +
[ebuild  N    ] app-editors/emacs-23.4-r1  USE="alsa gif gpm jpeg png tiff xpm -X -Xaw3d (-aqua) -athena -dbus -gconf -gtk -gzip-el -hesiod -kerberos -livecd -m17n-lib -motif -sound -source -svg -toolkit-scroll-bars -xft"
 +
[ebuild  N    ] virtual/emacs-23
 +
 
 +
Would you like to merge these packages? [Yes/No]  ##i##y
 +
</console>
 +
 
 +
In the above <tt>emerge</tt> output, you can see some text beginning with <tt>USE=</tt> on the <tt>app-editors/emacs</tt> line. This means that this package has a number of optional build-time features which can be controlled using Portage USE variables. These USE variables can be set globally by adding a line such as this to <tt>/etc/make.conf</tt>:
 +
 
 +
<pre>
 +
USE="gif jpeg png tiff xpm"
 +
</pre>
 +
 
 +
If you go ahead and make these changes, and then run <tt>emerge -a emacs</tt> again, you will notice that several more dependencies will be pulled into the list of packages to be merged. You can control the footprint of your Funtoo Linux system (and avoid bloat) by enabling only the USE variables you need.
 +
 
 +
Above, we enabled several USE variables globally in <tt>/etc/make.conf</tt>. It is also possible to enable USE variables on a per-package basis, and often times this is the best approach. If you wanted to enable <tt>gtk</tt> for emacs only, you would create the <tt>/etc/portage/package.use</tt> directory, and create an <tt>emacs</tt> file in it that contained the following:
 +
 
 +
<pre>
 +
app-editors/emacs gtk
 +
</pre>
 +
 
 +
Note that <tt>package.use</tt> can also be a file if you prefer. However, using an <tt>/etc/portage/package.use</tt> directory is recommended as it keeps things better organized. The filenames you use inside the <tt>package.use</tt> directory do not impact Portage behavior and can be named whatever is convenient for you. You might want to put the settings above in a file called <tt>/etc/portage/package.use/editors</tt> if you have several USE settings that you use for editors.
 +
 
 +
See the [[emerge]] page for more information on various emerge command-line options and best practices.
 +
 
 +
==== Default editor ====
 +
 
 +
Funtoo Linux also has a special meta-command called <tt>eselect</tt>, which can be used to set many default system settings. One of the things it is used for is to set the default editor used by things like <tt>crontab -e</tt>, etc that will automatically start an editor when run. Here is how to use <tt>eselect</tt> to change the default system editor:
  
To emerge ''gnome-light'' run the following command
 
 
<console>
 
<console>
# ##i## emerge --ask gnome-light
+
# ##i##eselect editor list
 +
Available targets for the EDITOR variable:
 +
  [1]  /bin/nano
 +
  [2]  /bin/ed
 +
  [3]  /usr/bin/ex
 +
  [4]  /usr/bin/vi
 +
  [ ]  (free form)
 +
# ##i##eselect editor set 4
 +
Setting EDITOR to /usr/bin/vi ...
 +
Run ". /etc/profile" to update the variable in your shell.
 
</console>
 
</console>
  
To emerge ''gnome'' run the following command
+
After logging in again, or typing <tt>source /etc/profile</tt> in the current shell, the new system editor will be active.
 +
 
 +
Note that if you want to use vim instead of a vi through busybox you also need to run:
 +
 
 
<console>
 
<console>
# ##i## emerge --ask gnome
+
# ##i##eselect vi set vim
 
</console>
 
</console>
  
== Initial Startup ==
+
=== Changing profile ===
  
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.
+
The [[Funtoo_1.0_Profile]] uses a new multi profile approach which allows way more flexibility and customization. Instead of having to remove what you don't want, now you'll be able to add in just the parts that you do want and leave out the rest.
  
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:
+
=== Updating your system ===
 +
 
 +
Sometimes, you may want to update the packages on your system. Often, this is done after you run <tt>emerge --sync</tt>, which will grab Portage tree updates from the main Funtoo Linux Portage tree:
  
 
<console>
 
<console>
# ##i##rc-update add xdm default
+
# ##i##emerge --sync
# ##i##rc
+
 
 +
>>> Starting git pull...
 +
remote: Counting objects: 1791, done.       
 +
remote: Compressing objects: 100% (206/206), done.       
 +
remote: Total 980 (delta 811), reused 931 (delta 764)       
 +
Receiving objects: 100% (980/980), 185.04 KiB, done.
 +
Resolving deltas: 100% (811/811), completed with 754 local objects.
 +
From git://github.com/funtoo/experimental-mini-2011
 +
  7a17140..b836bc8  funtoo.org -> origin/funtoo.org
 +
Updating 7a17140..b836bc8
 +
Fast-forward
 +
>>> Git pull in /usr/portage successful
 +
 
 +
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
 +
* Use eselect news to read news items.
 +
 
 +
#  
 
</console>
 
</console>
  
[[Category:Desktop Environments]]
+
You may also want to update your system after you have changed USE flag settings. To take advantage of the USE flags you have just enabled, it's necessary to recompile everything that includes them.
 +
 
 +
Below, you'll find a recommended <tt>emerge</tt> command for updating your entire system. The <tt>-a</tt> option will cause <tt>emerge</tt> to prompt you for confirmation before starting the merge:
 +
 
 +
<console>
 +
# ##i##emerge -auDN world
 +
</console>
 +
 
 +
<tt>-u</tt> tells <tt>emerge</tt> to update any already-installed but out-of-date packages that we specify on the command-line. The <tt>-D</tt> option tells <tt>emerge</tt> to perform a ''deep'' dependency tree graph, so it will include sub-dependencies of packages that we have specified on the command line as well. This allows <tt>emerge</tt> to perform as thorough an update of your system as possible.
 +
 
 +
The <tt>-N</tt> (<tt>--newuse</tt>) option tells Portage to check for any new USE flags that have been enabled or disabled, and rebuild packages so that all USE flags are set as currently defined in <tt>/etc/make.conf</tt> and <tt>/etc/portage/package.use</tt>.
 +
 
 +
<tt>world</tt> is a "meta-package" or "package set" which includes every package that you have manually installed plus all packages in the system set. It's important to note that whenever you ask <tt>emerge</tt> to install anything, such as <tt>metalog</tt> or <tt>vim</tt>, those packages will be automatically added to the world package set. In this way, <tt>emerge</tt> learns what packages you care about and want to keep updated. If you want to see what's in your world package set, take a look at <tt>/var/lib/portage/world</tt>:
 +
 
 +
<console>
 +
# ##i##cat /var/lib/portage/world
 +
app-editors/vim
 +
app-portage/eix
 +
app-portage/gentoolkit
 +
dev-vcs/git
 +
net-misc/bridge-utils
 +
net-misc/dhcpcd
 +
net-misc/keychain
 +
sys-apps/gptfdisk
 +
sys-apps/pciutils
 +
sys-devel/bc
 +
sys-fs/reiserfsprogs
 +
sys-kernel/vanilla-sources
 +
</console>
 +
 
 +
Also note that some packages may have been added to the world set by Metro when your stage3 tarball was built.
 +
 
 +
==== Updating a few packages ====
 +
 
 +
If we simply wanted to rebuild a few packages to reflect updated USE flag settings, we could specify it instead of <tt>world</tt>. Be sure to include the <tt>-N</tt> option:
 +
 
 +
<console>
 +
# ##i##emerge -auDN vim emacs
 +
</console>
 +
 
 +
== Useful applications for daily usage ==
 +
 
 +
Here are some other packages you may want to consider installing via <tt>emerge</tt>:
 +
 
 +
;<tt>app-misc/screen</tt>: Allows you to have persistent login sessions.
 +
;<tt>app-misc/tmux</tt>: Similar to <tt>screen</tt> -- some people prefer it.
 +
;<tt>app-admin/sudo</tt>: Grant root privileges to selected users and command combinations.
 +
;<tt>sys-process/htop</tt>: Colorful and informative text-based process list.
 +
;<tt>sys-process/glances</tt>: Similar to htop, includes disc I/O and network I/O in display.
 +
;<tt>app-portage/eix</tt>: Quick portage package search
 +
;<tt>app-portage/gentoolkit</tt>: Portage utils
 +
;<tt>app-misc/mc</tt>: GNU Midnight Commander is a text based file manager --- some will recall <tt>MS-DOS XtreeGold</tt>
 +
;<tt>app-text/wgetpaste</tt>: Command-line interface to various pastebins; very useful in providing info along with bugs reports
 +
;<tt>net-irc/irssi</tt>: A modular textUI IRC client with IPv6 support; a powerful tool to get help from Funtoo Community on IRC channel. Nice companion to <tt>app-text/wgetpaste</tt>
 +
 
 +
<console>
 +
# ##i##emerge --jobs app-misc/screen sudo htop eix gentoolkit app-misc/mc wgetpaste net-irc/irssi
 +
</console>
 +
 
 +
=== Creating a user account ===
 +
 
 +
It's a good idea to create a normal user account that you can use for general Linux tasks. Before rebooting, create a user account for everyday use. Adjust the groups in the example below to match your needs. Some of them may not exist yet on your system. Replace "<tt><user_name></tt>" with the name you're going to use for your everyday user. The "<tt>-m</tt>" option instructs <tt>useradd</tt> to create a home directory for your user. See <tt>man useradd</tt> for more info.
 +
 
 +
<console>
 +
# ##i##useradd -m -g users -G audio,video,cdrom,wheel <user_name>
 +
</console>
 +
Don't forget to set a password for your new user:
 +
<console>
 +
# ##i##passwd <user_name>
 +
</console>
 +
 
 +
== Installing a graphical environment ==
 +
 
 +
If you intend on using your Funtoo Linux installation for more than system administration, chances are you're going to want to have a GUI (graphical user interface). In the past, setting one up involved wading through text files and man pages. Thanks to modern tools like udev this is no longer the case.
 +
 
 +
Unlike most operating systems, Funtoo does not ship with a GUI pre-installed. If you've used Windows or Mac OS, you'd also know that their interfaces cannot be replaced easily. With Linux, the opposite is true -- you are free to choose from a huge selection of GUIs. From window managers such as Blackbox, IceWM, and xmonad, to fully-featured desktop environments like GNOME and KDE, the possibilities are vast in number.
 +
 
 +
The first step in setting up a graphical environment is to set up the [[X Window System]]. Then, you will be able to install the graphical environment of your choice. [[GNOME First Steps|GNOME]] is a popular option for new users.
 +
 
 +
[[Category:HOWTO]]
 +
[[Category:Install]]
 +
[[Category:Featured]]

Revision as of 05:34, 22 November 2013

If you are brand new to Gentoo Linux or Funtoo Linux, this page will help you to get familiar with your new system, and how it works.

Contents

Intro to Emerge: Installing an Editor

By default, Funtoo Linux has the nano and vi editors installed. nano is the default editor.

If you are new to Funtoo Linux, you have probably heard about emerge, the Funtoo and Gentoo Linux command for installing packages from the Portage tree. Funtoo Linux has a git-based Portage tree, which is located at /usr/portage by default. It contains scripts called ebuilds that describe how to build and install packages from source. emerge is used to run these scripts and install packages, as follows:

# emerge vim

You can also see what packages would be installed, but not actually install them, by using the -p, or --pretend option:

# emerge -p vim

Another equally handy option is the -a, or --ask option, which will display the packages to be merged, and then ask for confirmation from you before continuing:

# emerge -a emacs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-admin/eselect-emacs-1.13 
[ebuild  N     ] net-libs/liblockfile-1.09 
[ebuild  N     ] app-emacs/emacs-common-gentoo-1.3-r1  USE="-X -emacs22icons" 
[ebuild  N     ] app-editors/emacs-23.4-r1  USE="alsa gif gpm jpeg png tiff xpm -X -Xaw3d (-aqua) -athena -dbus -gconf -gtk -gzip-el -hesiod -kerberos -livecd -m17n-lib -motif -sound -source -svg -toolkit-scroll-bars -xft" 
[ebuild  N     ] virtual/emacs-23 

Would you like to merge these packages? [Yes/No]  y

In the above emerge output, you can see some text beginning with USE= on the app-editors/emacs line. This means that this package has a number of optional build-time features which can be controlled using Portage USE variables. These USE variables can be set globally by adding a line such as this to /etc/make.conf:

USE="gif jpeg png tiff xpm"

If you go ahead and make these changes, and then run emerge -a emacs again, you will notice that several more dependencies will be pulled into the list of packages to be merged. You can control the footprint of your Funtoo Linux system (and avoid bloat) by enabling only the USE variables you need.

Above, we enabled several USE variables globally in /etc/make.conf. It is also possible to enable USE variables on a per-package basis, and often times this is the best approach. If you wanted to enable gtk for emacs only, you would create the /etc/portage/package.use directory, and create an emacs file in it that contained the following:

app-editors/emacs gtk

Note that package.use can also be a file if you prefer. However, using an /etc/portage/package.use directory is recommended as it keeps things better organized. The filenames you use inside the package.use directory do not impact Portage behavior and can be named whatever is convenient for you. You might want to put the settings above in a file called /etc/portage/package.use/editors if you have several USE settings that you use for editors.

See the emerge page for more information on various emerge command-line options and best practices.

Default editor

Funtoo Linux also has a special meta-command called eselect, which can be used to set many default system settings. One of the things it is used for is to set the default editor used by things like crontab -e, etc that will automatically start an editor when run. Here is how to use eselect to change the default system editor:

# eselect editor list
Available targets for the EDITOR variable:
  [1]   /bin/nano
  [2]   /bin/ed
  [3]   /usr/bin/ex
  [4]   /usr/bin/vi
  [ ]   (free form)
# eselect editor set 4
Setting EDITOR to /usr/bin/vi ...
Run ". /etc/profile" to update the variable in your shell.

After logging in again, or typing source /etc/profile in the current shell, the new system editor will be active.

Note that if you want to use vim instead of a vi through busybox you also need to run:

# eselect vi set vim

Changing profile

The Funtoo_1.0_Profile uses a new multi profile approach which allows way more flexibility and customization. Instead of having to remove what you don't want, now you'll be able to add in just the parts that you do want and leave out the rest.

Updating your system

Sometimes, you may want to update the packages on your system. Often, this is done after you run emerge --sync, which will grab Portage tree updates from the main Funtoo Linux Portage tree:

# emerge --sync

>>> Starting git pull...
remote: Counting objects: 1791, done.        
remote: Compressing objects: 100% (206/206), done.        
remote: Total 980 (delta 811), reused 931 (delta 764)        
Receiving objects: 100% (980/980), 185.04 KiB, done.
Resolving deltas: 100% (811/811), completed with 754 local objects.
From git://github.com/funtoo/experimental-mini-2011
   7a17140..b836bc8  funtoo.org -> origin/funtoo.org
Updating 7a17140..b836bc8
Fast-forward
>>> Git pull in /usr/portage successful

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

# 

You may also want to update your system after you have changed USE flag settings. To take advantage of the USE flags you have just enabled, it's necessary to recompile everything that includes them.

Below, you'll find a recommended emerge command for updating your entire system. The -a option will cause emerge to prompt you for confirmation before starting the merge:

# emerge -auDN world

-u tells emerge to update any already-installed but out-of-date packages that we specify on the command-line. The -D option tells emerge to perform a deep dependency tree graph, so it will include sub-dependencies of packages that we have specified on the command line as well. This allows emerge to perform as thorough an update of your system as possible.

The -N (--newuse) option tells Portage to check for any new USE flags that have been enabled or disabled, and rebuild packages so that all USE flags are set as currently defined in /etc/make.conf and /etc/portage/package.use.

world is a "meta-package" or "package set" which includes every package that you have manually installed plus all packages in the system set. It's important to note that whenever you ask emerge to install anything, such as metalog or vim, those packages will be automatically added to the world package set. In this way, emerge learns what packages you care about and want to keep updated. If you want to see what's in your world package set, take a look at /var/lib/portage/world:

# cat /var/lib/portage/world
app-editors/vim
app-portage/eix
app-portage/gentoolkit
dev-vcs/git
net-misc/bridge-utils
net-misc/dhcpcd
net-misc/keychain
sys-apps/gptfdisk
sys-apps/pciutils
sys-devel/bc
sys-fs/reiserfsprogs
sys-kernel/vanilla-sources

Also note that some packages may have been added to the world set by Metro when your stage3 tarball was built.

Updating a few packages

If we simply wanted to rebuild a few packages to reflect updated USE flag settings, we could specify it instead of world. Be sure to include the -N option:

# emerge -auDN vim emacs

Useful applications for daily usage

Here are some other packages you may want to consider installing via emerge:

app-misc/screen
Allows you to have persistent login sessions.
app-misc/tmux
Similar to screen -- some people prefer it.
app-admin/sudo
Grant root privileges to selected users and command combinations.
sys-process/htop
Colorful and informative text-based process list.
sys-process/glances
Similar to htop, includes disc I/O and network I/O in display.
app-portage/eix
Quick portage package search
app-portage/gentoolkit
Portage utils
app-misc/mc
GNU Midnight Commander is a text based file manager --- some will recall MS-DOS XtreeGold
app-text/wgetpaste
Command-line interface to various pastebins; very useful in providing info along with bugs reports
net-irc/irssi
A modular textUI IRC client with IPv6 support; a powerful tool to get help from Funtoo Community on IRC channel. Nice companion to app-text/wgetpaste
# emerge --jobs app-misc/screen sudo htop eix gentoolkit app-misc/mc wgetpaste net-irc/irssi

Creating a user account

It's a good idea to create a normal user account that you can use for general Linux tasks. Before rebooting, create a user account for everyday use. Adjust the groups in the example below to match your needs. Some of them may not exist yet on your system. Replace "<user_name>" with the name you're going to use for your everyday user. The "-m" option instructs useradd to create a home directory for your user. See man useradd for more info.

# useradd -m -g users -G audio,video,cdrom,wheel <user_name>

Don't forget to set a password for your new user:

# passwd <user_name>

Installing a graphical environment

If you intend on using your Funtoo Linux installation for more than system administration, chances are you're going to want to have a GUI (graphical user interface). In the past, setting one up involved wading through text files and man pages. Thanks to modern tools like udev this is no longer the case.

Unlike most operating systems, Funtoo does not ship with a GUI pre-installed. If you've used Windows or Mac OS, you'd also know that their interfaces cannot be replaced easily. With Linux, the opposite is true -- you are free to choose from a huge selection of GUIs. From window managers such as Blackbox, IceWM, and xmonad, to fully-featured desktop environments like GNOME and KDE, the possibilities are vast in number.

The first step in setting up a graphical environment is to set up the X Window System. Then, you will be able to install the graphical environment of your choice. GNOME is a popular option for new users.