Difference between revisions of "Gnome Pre-Installation Configuration"

From CBLFS
Jump to navigationJump to search
(Installing Gnome into /opt)
m (Reverted edits by 71.224.57.6 (Talk); changed back to last version by Jciccone)
 
(4 intermediate revisions by 2 users not shown)
Line 22: Line 22:
 
== Installing Gnome into /opt ==
 
== Installing Gnome into /opt ==
  
Create a link from gnome-2.16 to gnome to make upgrades and changes in the future easier:
+
Create the '''/opt/gnome''' directory:
  
  install -dv -m755 /opt/gnome-2.16 &&
+
  install -dv -m755 /opt/gnome
ln -sf gnome-2.16 /opt/gnome
 
  
Even though the env variables are refering to '''/opt/gnome''', '''''GNOME_PREFIX''''' should still be set to '''/opt/gnome-2.16''' as that's where Gnome is going to be installed to.
+
Gnome heavily relies on [[D-BUS]]. [[GNOME Virtual File System]], [[Control Center]], and a large number of other packages install a [[D-BUS]] service file that will end up outside of where [[D-BUS]] will look for the services. Use the following sed to make [[D-BUS]] look in /opt/gnome.
  
Gnome heavily relies on [[DBUS]]. [[GNOME Virtual File System]] and [[Control Center]] (These are not all of the packages that do) both install a dbus service file that will end up outside of where [[DBUS]] will look for the services. Use the following sed to make [[DBUS]] look in /opt/gnome.
+
  sed -i "/<standard_session_servicedirs \/>/a\  <servicedir>/opt/gnome/share/dbus-1/services</servicedir>" /etc/dbus-1/session.conf
 
 
  sed -i "/<servicedir>\/usr\/share/a\  <servicedir>/opt/gnome/share/dbus-1/services</servicedir>" /etc/dbus-1/session.conf
 
  
 
=== Non-Multilib ===
 
=== Non-Multilib ===
Line 40: Line 37:
 
  # Begin /etc/profile.d/30-gnome.sh
 
  # Begin /etc/profile.d/30-gnome.sh
 
   
 
   
  export GNOME_PREFIX=/opt/gnome-2.16
+
  export GNOME_PREFIX=/opt/gnome
  export LIBGLADE_EXE_PREFIX=/opt/gnome
+
  export LIBGLADE_EXE_PREFIX=${GNOME_PREFIX}
 
   
 
   
 
  if [ $EUID -eq 0 ]; then
 
  if [ $EUID -eq 0 ]; then
   export PATH="${PATH}:/opt/gnome/sbin"
+
   export PATH="${PATH}:${GNOME_PREFIX}/sbin"
 
  fi
 
  fi
  export PATH="${PATH}:/opt/gnome/bin"
+
  export PATH="${PATH}:${GNOME_PREFIX}/bin"
 
   
 
   
  export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+:}/opt/gnome/lib/pkgconfig"
+
  export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+:}${GNOME_PREFIX}/lib/pkgconfig"
 
   
 
   
  export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}/opt/gnome/share"
+
  export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}${GNOME_PREFIX}/share"
 
  export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"
 
  export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"
 
   
 
   
Line 74: Line 71:
 
  # Begin /etc/profile.d/30-gnome.sh
 
  # Begin /etc/profile.d/30-gnome.sh
 
   
 
   
  export GNOME_PREFIX=/opt/gnome-2.16
+
  export GNOME_PREFIX=/opt/gnome
  export LIBGLADE_EXE_PREFIX=/opt/gnome
+
  export LIBGLADE_EXE_PREFIX=${GNOME_PREFIX}
 
   
 
   
 
  if [ $EUID -eq 0 ]; then
 
  if [ $EUID -eq 0 ]; then
   export PATH="${PATH}:/opt/gnome/sbin"
+
   export PATH="${PATH}:${GNOME_PREFIX}/sbin"
 
  fi
 
  fi
  export PATH="${PATH}:/opt/gnome/bin"
+
  export PATH="${PATH}:${GNOME_PREFIX}/bin"
 
   
 
   
  export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}/opt/gnome/lib/pkgconfig"
+
  export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}${GNOME_PREFIX}/lib/pkgconfig"
  export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}/opt/gnome/lib32/pkgconfig"
+
  export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}${GNOME_PREFIX}/lib32/pkgconfig"
  export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}/opt/gnome/lib64/pkgconfig"
+
  export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}${GNOME_PREFIX}/lib64/pkgconfig"
 
   
 
   
  export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}/opt/gnome/share"
+
  export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}${GNOME_PREFIX}/share"
 
  export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"
 
  export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"
 
   
 
   

Latest revision as of 11:49, 30 May 2007

If you're using the Bash Startup Files then run the commands below. Otherwise make sure that the values you want are properly set.

Installation Strategies

If you're committed to Gnome as your desktop, you will likely install it in the /usr hierarchy. If less committed, or you prefer to install Gnome in an easy to remove location, the /opt hierarchy may be more suitable.

Installing Gnome into /usr

Create and addition to the Bash Startup Files:

cat > /etc/profile.d/30-gnome.sh << "EOF"
# Begin /etc/profile.d/30-gnome.sh

export GNOME_PREFIX=/usr

export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"

# End /etc/profile.d/30-gnome.sh
EOF
source /etc/profile

Installing Gnome into /opt

Create the /opt/gnome directory:

install -dv -m755 /opt/gnome

Gnome heavily relies on D-BUS. GNOME Virtual File System, Control Center, and a large number of other packages install a D-BUS service file that will end up outside of where D-BUS will look for the services. Use the following sed to make D-BUS look in /opt/gnome.

sed -i "/<standard_session_servicedirs \/>/a\  <servicedir>/opt/gnome/share/dbus-1/services</servicedir>" /etc/dbus-1/session.conf

Non-Multilib

Create an addition to the Bash Startup Files:

cat > /etc/profile.d/30-gnome.sh << "EOF"
# Begin /etc/profile.d/30-gnome.sh

export GNOME_PREFIX=/opt/gnome
export LIBGLADE_EXE_PREFIX=${GNOME_PREFIX}

if [ $EUID -eq 0 ]; then
  export PATH="${PATH}:${GNOME_PREFIX}/sbin"
fi
export PATH="${PATH}:${GNOME_PREFIX}/bin"

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH+:}${GNOME_PREFIX}/lib/pkgconfig"

export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}${GNOME_PREFIX}/share"
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"

# End /etc/profile.d/30-gnome.sh
EOF
source /etc/profile

Add a new entry to /etc/ld.so.conf for the libraries that Gnome is going to install:

cat >> /etc/ld.so.conf << "EOF"
# Begin Gnome addition to /etc/ld.so.conf

/opt/gnome/lib

# End Gnome addition
EOF

Multilib

Create an addition to the Bash Startup Files:

cat > /etc/profile.d/30-gnome.sh << "EOF"
# Begin /etc/profile.d/30-gnome.sh

export GNOME_PREFIX=/opt/gnome
export LIBGLADE_EXE_PREFIX=${GNOME_PREFIX}

if [ $EUID -eq 0 ]; then
  export PATH="${PATH}:${GNOME_PREFIX}/sbin"
fi
export PATH="${PATH}:${GNOME_PREFIX}/bin"

export PKG_CONFIG_PATH32="${PKG_CONFIG_PATH32}${PKG_CONFIG_PATH32+:}${GNOME_PREFIX}/lib/pkgconfig"
export PKG_CONFIG_PATHN32="${PKG_CONFIG_PATHN32}${PKG_CONFIG_PATHN32+:}${GNOME_PREFIX}/lib32/pkgconfig"
export PKG_CONFIG_PATH64="${PKG_CONFIG_PATH64}${PKG_CONFIG_PATH64+:}${GNOME_PREFIX}/lib64/pkgconfig"

export XDG_DATA_DIRS="${XDG_DATA_DIRS}${XDG_DATA_DIRS+:}${GNOME_PREFIX}/share"
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${XDG_CONFIG_DIRS+:}/etc/gnome/xdg"

# End /etc/profile.d/30-gnome.sh
EOF
source /etc/profile

Add a new entry to /etc/ld.so.conf for the libraries that Gnome is going to install:

cat >> /etc/ld.so.conf << "EOF"
# Begin Gnome addition to /etc/ld.so.conf

/opt/gnome/lib
/opt/gnome/lib32
/opt/gnome/lib64

# End Gnome addition
EOF