Difference between pages "GNOME First Steps" and "Portage Git Mirror"

(Difference between pages)
(gnome)
 
(Git-daemon configuration)
 
Line 1: Line 1:
== What is GNOME? ==
+
=Setting up local git mirror =
"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 ==
+
This tutorial explains how to save bandwidth when several local computers need to pull updates from a single remote git repository.
  
Before installing GNOME, ensure that the [[X Window System]] has been installed.
+
== Use case ==
  
{{fancywarning|1=
+
This tutorial will be about hosting a local mirror of funtoo git based portage tree.
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}
+
  
== Preparing to emerge ==
+
Following terms should be adapted
  
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:
+
<table border="1">
<console>
+
<tr class="header">
##r### ##b## eselect profile list
+
<th align="left">Terms</th>
##g##Currently available mix-ins profiles: 
+
<th align="left">Definition</th>
  [11]  funtoo/1.0/linux-gnu/mix-ins/audio 
+
</tr>
  [12]  funtoo/1.0/linux-gnu/mix-ins/console-extras 
+
<tr class="odd">
  [13]  funtoo/1.0/linux-gnu/mix-ins/dvd 
+
<td align="left">git.lan</td>
  [14]  funtoo/1.0/linux-gnu/mix-ins/gnome 
+
<td align="left">The git-daemon local mirror host</td>
  [15]  funtoo/1.0/linux-gnu/mix-ins/kde 
+
</tr>
  [16]  funtoo/1.0/linux-gnu/mix-ins/mate 
+
<tr class="even">
  [17]  funtoo/1.0/linux-gnu/mix-ins/media 
+
<td align="left">localhost</td>
  [18]  funtoo/1.0/linux-gnu/mix-ins/print 
+
<td align="left">Any local host</td>
  [19]  funtoo/1.0/linux-gnu/mix-ins/python3-only
+
</tr>
  [20]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
+
<tr class="odd">
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-db 
+
<td align="left">nobody</td>
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-mail
+
<td align="left">Owner user of .git files</td>
  [23]  funtoo/1.0/linux-gnu/mix-ins/server-web
+
</tr>
  [24]  funtoo/1.0/linux-gnu/mix-ins/X
+
<tr class="even">
  [25]  funtoo/1.0/linux-gnu/mix-ins/xfce
+
<td align="left">/home/git-mirrors</td>
  [26]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest
+
<td align="left">Base path of git-daemon</td>
  [27]  funtoo/1.0/linux-gnu/mix-ins/hardened
+
</tr>
</console>
+
</table>
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:
+
<console>
+
##r### ##b##eselect profile add 14
+
</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.
+
 
+
== Emerging ==
+
 
+
You are provided with two packages that will pull in this desktop environment:
+
 
+
* ''gnome''
+
 
+
{{fancynote|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''
+
 
+
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}
+
 
+
=== GNOME 3.12 from a clean install ===
+
 
+
==== gnome ====
+
  
To emerge ''gnome'' run the following command
+
== Local mirror ==
  
 +
=== Git-daemon configuration ===
 +
==== Prepare directories and get portage tree====
 
<console>
 
<console>
# ##i## emerge gnome
+
###i## mkdir /home/git-mirrors
 +
###i## chown nobody /home/git-mirrors
 +
###i## su -s /bin/sh nobody
 +
$##bl## cd /home/git-mirrors
 +
$##bl## git clone --mirror --bare git://github.com/funtoo/ports-2012.git portage.git
 
</console>
 
</console>
 +
For a security reason we use a nobody user .
 +
==== git-daemon configuration====
 +
{{file|name=/etc/conf.d/git-daemon|desc=|body=
 +
GITDAEMON_OPTS=--syslog --verbose --enable=receive-pack --export-all
 +
GITDAEMON_OPTS=${GITDAEMON_OPTS} --base-path=/home/git-mirrors /home/git-mirrors
 +
GIT_USER=nobody
 +
GIT_GROUP=nobody
 +
}}
  
==== gnome-light ====
+
====Service configuration====
 
+
To start daemon with a mirror machine boot add <code>git-daemon</code> to OpenRC's default runlevel
To emerge ''gnome-light'' run the following command
+
 
+
 
<console>
 
<console>
# ##i## emerge gnome-light
+
###i## rc-update add git-daemon default
 
</console>
 
</console>
 
+
To make changes start immediately just run <code>rc</code>
=== Upgrading from GNOME 3.6 ===
+
 
+
==== gnome ====
+
 
+
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal
+
 
+
 
<console>
 
<console>
# ##i## emerge -C nautilus-open-terminal
+
###i## rc
 
</console>
 
</console>
  
Then, run the following command
+
=== Pull from remote ===
  
<console>
+
Add the following to <code>/etc/cron.daily/funtoo-sync.sh</code>:
# ##i## emerge -vauDN world
+
</console>
+
 
+
==== gnome-light ====
+
 
+
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).
+
 
+
<console>
+
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal
+
</console>
+
 
+
Then, run the following command
+
 
+
<console>
+
# ##i## emerge -vauDN world
+
</console>
+
 
+
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)
+
 
+
<console>
+
# ##i## emerge -va gnome-calculator
+
</console>
+
 
+
== Subsystems ==
+
 
+
=== Bluetooth ===
+
 
+
For bluetooth support, ensure that:
+
 
+
# Bluetooth support is enabled in your kernel (using modules is fine).
+
# Your bluetooth hardware is turned on.
+
# Add the <code>bluetooth</code> startup script to the default runlevel, and start it.
+
 
+
This can be done as follows:
+
 
+
<console>
+
# ##i##rc-update add bluetooth default
+
# ##i##rc
+
</console>
+
 
+
Once this is done, you should now be able to navigate to ''Settings'' -> ''Bluetooth'' and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.
+
 
+
=== Printing ===
+
 
+
To enable printing support, add <code>cupsd</code> to the default runlevel:
+
 
+
<console>
+
# ##i##rc-update add cupsd default
+
# ##i##rc
+
</console>
+
 
+
You should now be able to navigate to ''Settings'' -> ''Printers'' and add printers to your system, and print.
+
 
+
=== Scanning ===
+
 
+
To enable scanning support, add your user account to the <code>lp</code> group. This will allow your user to access the USB scanner.
+
 
+
Then, <code>emerge xsane</code>, and run it. It should be able to access your scanner.
+
 
+
== Finishing Touches ==
+
 
+
=== X ===
+
 
+
==== Setting up xdm (GUI log-in) ====
+
 
+
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.
+
 
+
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:
+
 
+
<console>
+
# ##i##rc-update add xdm default
+
</console>
+
 
+
Then, if you want to start it now do
+
 
+
<console>
+
# ##i##rc
+
</console>
+
 
+
But you should reboot to avoid having an open login terminal
+
 
+
==== Setting up xinitrc (text log-in) ====
+
 
+
Adding the following to your <tt>~/.xinitrc</tt> file is sufficient:
+
  
 
<pre>
 
<pre>
# Fix Missing Applications in Gnome
+
#!/bin/sh
export XDG_MENU_PREFIX=gnome-
+
cd /home/git-mirrors/portage.git
 
+
su nobody -s "/bin/sh" -c "git fetch --all"
# Properly Launch the Desired X Session
+
exec ck-launch-session gnome-session
+
 
</pre>
 
</pre>
  
Additionaly, if you need support for different input sources, there is no longer a need to configure ibus or scrim in your <tt>.xinitrc</tt> file as GNOME uses ibus natively. Simply configure it in the Control Center under Region & Langauge.
+
== Cloning from local git-daemon ==
 
+
=== Disable Adwaita Dark Theme ===
+
 
+
If you do not like the Adwaita Dark Theme it can be disabled by copying then modifying it like so:
+
  
 +
Local clone from <code>git.lan</code>:
 
<console>
 
<console>
mkdir -p ~/.themes/Adwaita-NoDark
+
###i## mv /usr/portage /usr/portage.old
cp -r /usr/share/themes/Adwaita/gtk-* ~/.themes/Adwaita-NoDarkhttp://www.funtoo.org/Category:Ebuild_Category
+
###i## git clone git://git.lan/portage.git /usr/portage
rm ~/.themes/Adwaita-NoDark/gtk-3.0/gtk-dark.css
+
###i## cd /usr/portage
ln -s gtk.css ~/.themes/Adwaita-NoDark/gtk-3.0/gtk-dark.css
+
###i## git checkout funtoo.org
 
</console>
 
</console>
  
Then, run gnome-tweak-tool and select select Theme -> GTK+ Theme -> Adwaita-NoDark.
+
[[Category:HOWTO]]
 
+
{{fancynote|If you run GUI programs with the sudo command, then the above steps (excluding running gnome-tweak-tool) must be repeated for the root account.}}
+
 
+
[https://ask.fedoraproject.org/en/question/10304/how-do-i-ban-apps-from-using-gnome-3-adwaita-dark-theme/ Reference]
+
 
+
=== Verify the inode/directory MimeType Handler ===
+
 
+
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:
+
 
+
<pre>
+
[Added Associations]
+
inode/directory=nautilus.desktop;baobab.desktop;
+
</pre>
+
 
+
=== Automatically Starting Applications at Login ===
+
 
+
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:
+
 
+
<pre>
+
xflux -z 87107
+
</pre>
+
 
+
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.
+
 
+
[[Category:Desktop]]
+
[[Category:First Steps]]
+
[[Category:Official Documentation]]
+

Revision as of 11:28, December 13, 2014

Setting up local git mirror

This tutorial explains how to save bandwidth when several local computers need to pull updates from a single remote git repository.

Use case

This tutorial will be about hosting a local mirror of funtoo git based portage tree.

Following terms should be adapted

Terms Definition
git.lan The git-daemon local mirror host
localhost Any local host
nobody Owner user of .git files
/home/git-mirrors Base path of git-daemon

Local mirror

Git-daemon configuration

Prepare directories and get portage tree

# mkdir /home/git-mirrors
# chown nobody /home/git-mirrors
# su -s /bin/sh nobody
$ cd /home/git-mirrors
$ git clone --mirror --bare git://github.com/funtoo/ports-2012.git portage.git

For a security reason we use a nobody user .

git-daemon configuration

/etc/conf.d/git-daemon
GITDAEMON_OPTS=--syslog --verbose --enable=receive-pack --export-all
GITDAEMON_OPTS=${GITDAEMON_OPTS} --base-path=/home/git-mirrors /home/git-mirrors
GIT_USER=nobody
GIT_GROUP=nobody

Service configuration

To start daemon with a mirror machine boot add git-daemon to OpenRC's default runlevel

# rc-update add git-daemon default

To make changes start immediately just run rc

# rc

Pull from remote

Add the following to /etc/cron.daily/funtoo-sync.sh:

#!/bin/sh
cd /home/git-mirrors/portage.git
su nobody -s "/bin/sh" -c "git fetch --all"

Cloning from local git-daemon

Local clone from git.lan:

# mv /usr/portage /usr/portage.old
# git clone git://git.lan/portage.git /usr/portage
# cd /usr/portage
# git checkout funtoo.org