2015年12月13日星期日

Notes for building BLFS 7.x

1. Default icons for GTK+ 3.x applications

In order to show all general icons for GTK+ 3.x applications, we have to install adwaita-icon-theme.
That's because the default icon theme for GTK+ 3 is "Adwaita". That means GTK+ 3 will try to search all missing icons from "adwaita" icon theme. On the other hand, that means we do not need to setup something likes "gtk-icon-theme-name = "Adwaita"" in the configuration file (e.g. /etc/gtk-3.0/settings.ini).

Reference:
https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-icon-theme-name

2. "hicolor" icon theme

According to the "Icon Theme specification", the "hicolor" icon theme should be available (Refer to the Directory Layout section of the specification):
In order to have a place for third party applications to install their icons there should always exist a theme called "hicolor". The data for the hicolor theme is available for download at: http://www.freedesktop.org/software/icon-theme/. Implementations are required to look in the "hicolor" theme if an icon was not found in the current theme.

Reference:
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

3. VirtualBox Guest Addition

After VirtualBox 5.0.10, we do not need to create the link or file "/etc/rc.d/init.d/function" for VirtualBox Guest Addition because it is not needed anymore.

Reference:
https://www.virtualbox.org/ticket/14733

4. FHS media mount point for UDisk

If you want to set the mount point of media from "/run/media" to "/media", you have to add the option "--enable-fhs-media" when you build the UDisk package.

5. X Window Desktop file of UXterm (For LXQT)

5.1 extract the xterm source package
5.2 cp -v *.desktop /usr/share/applications/

6. Handle missing icons in the "Choose an Application" dialog box for LXQT

We have to create the related symbolic links of icon images for those application that the icon image file is missing in the /usr/share/icons directory.
For example,
ln -s /usr/share/pixmaps/assistant-qt5.png /usr/share/icons/hicolor/128x128/apps/assistant-qt5.png

Reference:
Some icon are missing in the "Choose an Application" dialog box

2015年8月30日星期日

Porg - Management of software packages installed for BLFS 7.7

Porg is a software to manage the software packages that are installed from source codes.
Here is the build process for it:

Download the software from here and extract it

./configure --prefix=/usr --sysconfigdir=/etc
make
make install

Example of use:
porg -lp foo-1.2.3 -- 'make install'
porg -tsf foo-1.2.3
porg -lD -- "make install"

2015年8月23日星期日

X Window Desktop file for Qt Creator (BLFS 7.7)

[Desktop Entry]
Name=Qt Creator (Community)
Comment=Creator for Qt applications
Exec=/usr/bin/qtcreator
Icon=QtProject-qtcreator.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt:Development;

2015年6月27日星期六

Network Manager Configuration for BLFS 7.7

Update: 2015.12.13: fix some errors for icon theme

After we install the Network Manager (Networking Utilities), we have to modify the system configuration in order to allow the Network Manager fully control the network setting.

1. Remove the LFS network setup files
In the “7.5 General Network Configuration” section of LFS, we have created some “ifconfig.*” files for different network interfaces. Those files conflict with Network Manager so we have to remove them. Network Manager will create the configuration files in the “/etc/NetworkManager/system-connections” directory.

2. Install icons files for Network Manager Applet
Network Manager Applet (GNOME Applications) can be used with XFACE and LXDE. This software requires Adwaita Icon theme (GNOME Libraries and Utilities) to display all icons.

3. Update icons files for Network Manager Applet
run the following command:
gtk-update-icon-cache -qt /usr/share/icons/hicolor

4. Fix Polkit-gnome autostart problem for LXDE
If you use LXDE and the polkit daemon ("/usr/lib/polkit-1/polkitd --no-debug") is not started automatically, we have to modify the automatic startup file for polkit-gnome agent (/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop):
The line "OnlyShowIn=GNOME;XFCE;Unity;" is changed to "OnlyShowIn=GNOME;XFCE;Unity;LXDE;"

5. Setup Polkit-gnome
In order to gain the permission for other users to setup and modify the network setting, we have to setup PolicyKit permission. Here are some references for the setup:
NetworkManager – ArchWiki
Polkit Reference Manual

For example, create a new group NNNNN and then add the users to this group:
usermod –a –G NNNNN user_xxxxx

And create a file in “/etc/polkit-1/rules.d/” directory that the content is:
polkit.addRule(function(action, subject) {
  if(action.id.indexOf(“org.freedesktop.NetworkManager”) == 0 && subject.IsInGroup(“NNNNN”)) {
    return polkit.Result.YES;
  }
});

Then the members of the group NNNNN will gain the permission to modify and setup the network setting by Network Manager Applet.

Display background image for Grub2 under LFS system

1. Install Unicode Font file (PF2 format)

Download the Unicode font file (BDF format) from GNU Unifont Glyphs and then run the following command to generate a Unicode Font file (PF2 format, the output font size is set to 16, output file name is “unicode.pf2” and the input file name is “unifont.bdf”)

grub-mkfont –s 16 –o unicode.pf2 unifont.bdf

Then copy the output file (unicode.pf2) to “/boot/grub/fonts” directory.

(If grub-mkfont is not found, add the option "--enable-grub-mkfont" when you re-build the grub tool.)

2. Setup grub.cfg

In the grub.cfg, add the following codes to display the background image (in this example, the image file is “/boot/grub/bg.png”):

if loadfont unicode; then
  set gfxmode=auto
  insmod vbe
  insmod vga
  insmod gfxterm
  set locale_dir=/boot/grub/locale
  set lang=en_US
  insmod gettext
  terminal_output gfxterm

  insmod png
  background_image /boot/grub/bg.png
fi

Then the grub2 should display the image file.

If your system uses Plymouth after grub2, you can add the line "set gfxpayload=keep" in the grub.cfg so the image file will be kept until plymouth is running.
(Warning: Do not add this line if plymouth or X window system is not ran automatically because you will not get the terminal in text mode)

2015年6月22日星期一

Setup Bootsplash for BLFS 7.7 with Plymouth

My note for bootsplash setup for BLFS 7.7

EverNote Version

2015年6月14日星期日

Setup Plymouth under BLFS 7.7 with VMware

My note for Plymouth setup for BLFS 7.7

EverNote Version