Subsections of Overview
What makes GoboLinux unique
Details
You are reading version 017 of this page. The current version can be found here.
GoboLinux has a directory structure different from most other Linux distributions. In GoboLinux, all files for a program, including executables, headers and libraries, are installed below a single directory that belongs to that program.
So the ping
utility might reside in
/Programs/Netkit-Base/0.17/bin/ping
and libpng.so.3
in
/Programs/LibPNG/1.2.5/lib/libpng.so.3
To be visible to other software, these files are symlinked into standard
locations in the new directory hierarchy under /System/Index
:
/System/Index/bin/ping
/System/Index/lib/libpng.so.3
Traditional Unix paths are also symlinks to the /System/Index
directory
structure:
/bin -> /System/Index/bin
/usr/bin -> /System/Index/bin
/usr/lib -> /System/Index/lib
/etc -> /System/Settings
As a result, most things just work. For example, GoboLinux will correctly
dispatch scripts with shebang lines such as #!/usr/bin/env perl
or
#!/usr/bin/python
to the proper interpreter.
This architecture —installing each program under its own directory, and making executables, headers other resources available via symlinks— has significant advantages:
- different versions of libraries can coexist
- it’s trivial to uninstall software
- there’s no need for a database of installed files
The system is administered through a limited set of utility programs. Tracking dependency relations among software is accomplished through the GoboLinux build system and its library of “compile recipes”.
The GoboLinux Way
Details
You are reading version 017 of this page. The current version can be found here.
Welcome to GoboLinux
The main task of a Linux distribution is to keep track of and organize the programs in your computer, so that they work properly. GoboLinux is no different from the others in this goal, but it adopts a fundamentally different approach in solving this problem. Instead of scattering the files of programs around, following the decades-old conventions of ancient UNIX systems, and then adding a layer of control (a “package manager”) to try to give order to chaos, in GoboLinux we organize the files that comprise the programs in an ordered way in the first place.
In GoboLinux, every program lives in its own subdirectory. Under the top level
directory /Programs
; e.g you’ll find Xorg 7.0 at /Programs/Xorg/7.0
, and
ping at /Programs/Netkit-Base/0.17/bin/ping
. To see what programs are
installed in the system, all you need to do is look in the /Programs
directory:
ls /Programs
For each category of files, there is a directory under /System/Index
grouping
files from each application as symbolic links: bin
, lib
, libexec
,
include
, share
, and man
. For compatibility, each “legacy” UNIX directory
is a link to a corresponding category. Therefore, /bin
, /sbin
, /usr/bin
,
/usr/local/bin
(and so on) are all symlinks to entries under /System/Index
.
In short, what we have is a database-less package management system: the
directory structure itself organizes the system. Wasn’t that its original
purpose, after all? Each program directory (for example, /Programs/KDE
) holds
version directories (/Programs/KDE/3.4
, /Programs/KDE/3.4.2
), and a
version-neutral directory for settings (/Programs/KDE/Settings
), to keep files
that would normally be in /etc
. Keeping two or more versions of a library is
trivial: upgrading LibPNG to 1.2.8 means adding /Programs/LibPNG/1.2.8
, but
does not automatically imply that LibPNG 1.2.7 is removed. This way, if a
program depends on the previous version, it won’t break. As you can see,
GoboLinux gives you a finer control of what is and isn’t in the system.
Historical tidbit: When most distributions switched to GCC 3 they released a new major version, mostly incompatible with previous ones. In contrast, when the 006 series of GoboLinux adopted GCC 3, compatibility was preserved by simply keeping old versions of libraries alongside the new ones, while they were gradually phased out. No “compat” packages were needed.
The “legacy” tree
Unfortunately, not all programs have the flexibility to be installed anywhere. Occasionally, hardcoded paths creep in even in programs that belong to userland, and should, at least theoretically, allow themselves to be installed inside, say, a user’s home directory.
As much as we’d like to see this done in the long term, patching all
applications is not an option. For this reason, GoboLinux keeps, as stated
earlier, a legacy tree where all usual Unix paths are mapped to GoboLinux
equivalents. That way, if a Makefile looks for
/usr/X11R6/include/X11/Xaw3d/XawInit.h
, it will find it, although it is really
at /Programs/Xaw3d/1.5/include/X11/Xaw3d/XawInit.h
, where it belongs. When two
applications have a directory entry with the same name, the GoboLinux scripts
recursively expand them. Both Xorg and Xaw3d have X11 under include
. A
directory /System/Index/include/X11
is created automatically, holding links
from both X11 directories.
Another interesting feature is that the GoboLinux scripts execute make install
using a special user id that only has write permissions inside the program’s
source directories and the program’s entry under /Programs
. This way, files
can’t “escape” from the GoboLinux hierarchy and slip a directory into the legacy
tree.
A detail that might surprise you at first is that when you look at the root
directory (with ls
or graphical tools), you don’t see the legacy directories,
even though you can cd
into them. They are certainly there — they are just
kept hidden using GoboHide, a kernel modification
designed to conceal the legacy tree from the usual system view. (GoboHide is of
course optional — GoboLinux works just as well using standard Linux kernels.)
Influences and roots
As you read this, you have probably found many familiar concepts (not to mention directory names). GoboLinux has clearly found inspiration in other operating systems, like NeXT, BeOS and AtheOS, but it was the notion that they build “something different” using an existing Unix base (be it using a BSD foundation as in macOS, or using GNU tools as in AtheOS) was the most important influence of all. There are several other projects, in various stages of development, that use the Linux kernel as a foundation and feature alternative directory trees. Interestingly, most of them are clones or heavily inspired by a specific proprietary operating system. (At different points in time, we’ve seen clones of RiscOS, NeXT, BeOS.)
GoboLinux, on the other hand, is not a clone of anything else. It uses standard
Linux desktop software. We believe that the well-organized directory structure
makes it a good testbed for new ideas — possibilities are wide open (see the
forum and moreso the mailing list for discussions, and to a lesser extent the
IRC channel #gobolinux
on libera.chat).
Differences between GoboLinux and a traditional Linux system
What follows is not a thorough description of GoboLinux, but a quick cheat-sheet of facts that are good to know when you are getting acquainted to the system.
In the GoboLinux hierarchy, files are grouped by their functional category (executables, libraries, and so on). There are links at the classic directories you are used to (
/bin
,/usr/bin
, and so on), but remember that they all point to the same place. This is a huge advantage, as it means, for example, that you’ll never have to search for a library throughout your filesystem again – it will always be in/lib
(and in/usr/lib
, because they point to the same place! – no worries about compatibility).There are symbolic links relating most of the usual UNIX directories to the GoboLinux tree. Therefore, you will find directories such as
/etc
,/var/log
and/usr/bin
in the expected places. However, some directories, such as the users’ directories, didn’t need to be linked to their “legacy” locations. This way, for a given user called “joe”, you’ll have, instead of/home/joe
,/Users/joe
. Notice also that the superuser’s directory is no different than the ones from the other users, so, root’s directory is at/Users/root
. Mount points are under/Mount
, not/mnt
.Another major difference between GoboLinux and most Linux distributions is that it does not use a BSD nor a System V initialization procedure. Instead, it has its own. At
/System/Settings/BootScripts
you will find a few files that command the entire boot procedure: BootUp and Shutdown run at system boot and shutdown, respectively; you can define custom “runlevel” scripts to define different ways you want your system to be initialized (say, Single and Multi for single and multi-user, Graphical for boot into graphic mode, etc.) and control that from the boot loader menu. The/System/Settings/BootOptions
file separate site-specific settings from the rest of the scripts. You can also find a library of application specific tasks at/System/Tasks
that can be used during boot (those are installed by the apps).
For a better overview of how it looks and feels right, nothing beats giving the Live CD a spin. You’ll be running a full GoboLinux system without having to install anything. Just burn a CD-ROM and give it a go!
System Index
Details
You are reading version 017 of this page. The current version can be found here.
Compiled programs in C and C++ typically have a lib/
directory and often also
a bin/
directory.
On GoboLinux, these will be symlinked into /System/Index
such as for ping:
/System/Index/bin/ping
/System/Index/lib/libpng.so.3
Traditional Unix paths are also symlinks to the /System/Index
directory
structure:
/bin -> /System/Index/bin
/usr/bin -> /System/Index/bin
/usr/lib -> /System/Index/lib
/etc -> /System/Settings
GoboLinux Filesystem Hierarchy
Details
You are reading version 017 of this page. The current version can be found here.
Here is an overview of the GoboLinux filesystem tree. The legacy folders (on the “:” part of the tree) are links to the corresponding GoboLinux folders. The legacy folders are excluded from default directory view by GoboHide.
/
|-- Data - for resources belonging to the system and to individual programs
| |-- Compile - sources, recipes and other files used by the Compile tool
| | |-- Archives
| | |-- LocalRecipes
| | |-- PackedRecipes
| | |-- Recipes
| | `-- Sources
| `-- Variable - for spool files, log files, temporary files, etc.
| |-- cache
| |-- empty
| |-- lib
| |-- lock
| |-- log
| |-- run
| |-- spool
| `-- tmp
|-- Mount - mountpoints for filesystems
|-- Programs - where programs (with all their files) are installed
|-- System
| |-- Aliens - files managed by programming language package managers
| |-- Environment - links to program files declaring environment variables
| |-- Index - links to files in each program's
| | |-- bin + bin/ and sbin/ directories
| | |-- include + include/ directory
| | |-- lib + lib/ directory
| | |-- libexec + libexec/ directory
| | `-- share + share/ directory
| | |-- consolefonts
| | |-- fonts
| | `-- man
| | |-- info + info/ directory
| | `-- man{1-9} + man{1-9}/ directories
| |-- Kernel
| | |-- Boot - kernel images, config files and programs needed to boot
| | |-- Devices - device files (managed by Udev).
| | |-- Modules - loadable kernel modules (device drivers)
| | |-- Objects - a view of the kernel's device tree
| | `-- Status - kernel status files (belonging to the /proc filesystem)
| |-- Settings - system config files and links to files in program's Settings/ directories.
| | `-- BootScripts - scripts used for boot, symlink to /Programs/BootScripts/Settings/BootScripts/
| `-- Tasks - links to programs' boot tasks (from their Resources/Tasks/ directory)
|-- Users - contains users' home directories
:
:
:-- etc -> System/Settings
:-- dev -> System/Kernel/Devices
:-- sys -> System/Kernel/Objects
:-- proc -> System/Kernel/Status
:-- var -> System/Variable
:-- tmp -> System/Variable/tmp
:-- sbin -> System/Index/bin
:-- bin -> System/Index/bin
:-- lib -> System/Index/lib
:-- lib64 -> System/Index/lib
`-- usr
|-- X11R6 -> .
|-- local -> .
|-- bin -> ../System/Index/bin
|-- sbin -> ../System/Index/bin
|-- include -> ../System/Index/include
|-- lib -> ../System/Index/lib
|-- lib64 -> ../System/Index/lib
|-- libexec -> ../System/Index/libexec
`-- share -> ../System/Index/share
Installing GoboLinux
Details
You are reading version 017 of this page. The current version can be found here.
Installer
is a program included on the GoboLinux Live-ISO that installs
GoboLinux to your hard drive.
It takes care of basic configuration, package selection, and boot loader setup. It can be run from the command line or via the window manager menu.
Graphical Install
The GoboLinux Live-ISO supports a complete graphical display environment.
In most cases, the X server automatically detects the keyboard and display hardware, so you can start the graphical mode by typing:
startx
Clicking on the top-left icon brings up a menu. Look under System Tools, select “Install GoboLinux”, follow the instructions.
Console install
Type Installer
in the console. Note the capital “i”. (GoboLinux utility
scripts are generally named with an initial capital and follow the CamelCase
convention.)
Subsections of Installing GoboLinux
GoboLinux 017 Known Issues and Fixes
Details
You are reading version 017 of this page. The current version can be found here.
Live environment
Running Compile
Install UnionFS-Fuse
to workaround limitations with the sandbox in the Live
environment:
InstallPackage --no-check-certificate https://gobolinux.org/packages/017/Fuse--2.9.7--x86_64.tar.bz2
InstallPackage --no-check-certificate https://gobolinux.org/packages/017/UnionFS-Fuse--2.1--x86_64.tar.bz2
Installed system
Git-related errors when invoking Compile for the first time
Loopback network interface needs to be brought up. As root, run:
ifconfig lo up
echo ifconfig lo up >> /System/Settings/BootScripts/BootUp
InstallPackage searches for packages from GoboLinux 016 rather than 017
Update the search URL used by the Scripts
package:
GrepReplace -B "016" "017" /System/Settings/Scripts/GetAvailable.conf
Update of Compile and Scripts tools
Compile
and Scripts
are always evolving. Make sure to update your copies by
running the following commands after you boot into your installed system for the
first time:
cd /Programs/Scripts/Current
git pull && UpdateSettings --auto Scripts && make
cd /Programs/Compile/Current
git pull && UpdateSettings --auto Compile
Dependencies files with reference to Ncurses
Ncurses
has been replaced by NcursesW
, but some packages’ metadata still
hold references to the former. The following command fixes that:
GrepReplace -B "^Ncurses " "NcursesW " /Programs/*/*/Resources/Dependencies
Update expired SSL certificates!
The recent
Let’s Encrypt fiasko
requires our users to update their certificate database on the system. Otherwise
tools like git
, wget
, Compile
etc might not work correctly.
The appropriate way to resolve this, is by running:
sudo Compile --no-check-certificate Automake
sudo Compile --no-check-certificate CA-Certificates
and
sudo sh /System/Index/bin/update-ca-certificates
afterwards.
Wrong version of SQLite
The version under /Programs/SQLite/3310100
is actually 3.8.2
. Please run the
following commands to update to its most recent version:
Compile SQLite
RemoveProgram SQLite 3310100
Outstanding issues
Some problems have been reported by our users and are currently being fixed by our team. They are:
ContributePackage
is not working – use ContributeRecipe instead.- Copy-and-paste does not work out of the box from a VM. Compiling
spice-vdagent
and loading its daemon should fix that. - Sometimes when trying to
Compile
an already-installed Program, the build process will fail (see Compile bug 51). Sometimes this can be worked around by first manually doing aRemoveProgram <failing program>
before re-attempting toCompile
it. Note that it is generally a Bad Idea™ to try toRemoveProgram
, say,Python3
like this as it will breakCompile
.
Compile fails stating that some headers or libraries could not be found, when they are there
The installation process used by Compile had a problem in that certain extended
attributes used by overlayfs
were carried over from the sandbox to the
installation directory. Some of those extended attributes tell overlayfs
to
consider the corresponding files or directories as deleted objects. Since we use
overlayfs
to sandbox the compilation process, this bug may impact Compile in
the sense that existing files may be considered as non-existent.
If you face this problem, please run the following commands on your installed system to remove those attributes:
fname=
xattr_pattern="trusted.overlay."
getfattr -P -R -d -m "$xattr_pattern" --absolute-names /Programs 2> /dev/null | while read i
do
if echo "$i" | grep -q "^# file:"
then
fname="$(echo "$i" | awk {'print $3'})"
elif echo "$i" | grep -q "^${xattr_pattern}"
then
xattr="$(echo "$i" | cut -d= -f1)"
setfattr --remove "$xattr" "$fname"
fi
done
Platforms
Details
You are reading version 017 of this page. The current version can be found here.
Subsections of Platforms
Running under GNOME Boxes
Details
You are reading version 017 of this page. The current version can be found here.
GNOME Boxes is a new virtual machine manager and remote desktop manager powered by QEMU, KVM, and libvirt virtualisation technologies. Running Gobolinux under GNOME Boxes is quite easy, even more so than under Virtualbox.
Setup Instructions
- Create a new Virtual Machine by clicking “New” in the top left corner.
- Click “Select a file”.
- Select the Gobolinux LiveCD ISO file.
- Boxes will be ready to create a virtual machine with 2GB of RAM and 21.5GB of storage. If that is sufficient, click “Create”.
- Otherwise you can click “Customize” and adjust the sliders for RAM and storage respectively, then click the back arrow.
- The LiveCD session will then start. Continue normal installation procedures. Remember to eject the LiveCD prior to reboot by going to the top right menu and clicking “Properties” -> “Devices & Shares” and then clicking “Remove” beside the CD/DVD section.
Installing SPICE
Spice allows for integration with the host system including setting native resolutions, file transfers, clipboard support etc.
- Compile
SPICE-VDAgent
- Run
StartTask Spice-VDAgent
after login - Run
spice-vdagent
- Run
xrandr --output Virtual-0 --preferred
to update the resolution
Running under VirtualBox
Details
You are reading version 017 of this page. The current version can be found here.
Setting up VirtualBox guest additions
VirtualBox requires its own graphics drivers in order to perform advanced features such as smart mouse sharing and running at a window-dependent full resolution.
These drivers can be built using the “Guest Additions” ISO image included with VirtualBox.
The catch is that we are already using the virtual CD drive from VirtualBox to
run the ISO, so we need to add a second one. With the virtual machine shut down,
right-click the image, then at the Storage pane, add a second optical drive, and
insert the VBoxGuestAdditions.iso
file that should be somewhere in your
VirtualBox installation:
Then, boot GoboLinux normally in VirtalBox, and do the following:
mount /dev/sr1 /Mount/CD-ROM
cd /Mount/CD-ROM
./VBoxLinuxAdditions.run
udevadm trigger
When you run udevadm trigger
the drivers should be loaded, and the console
will change resolution immediately. (It will also lose the nice-looking
GoboLinux font: to reload it, type setfont lode-2.0-lat1u-16
.)
Now, you can start Xorg normally with:
startx
If you want to resize your VirtualBox window, make sure “Auto-resize guest display” is turned on in the VirtualBox “Machine” menu, then, after resizing the VirtualBox window, type in the GoboLinux terminal the following
xrandr --output VGA-0 --preferred
This will resize the desktop to match your window size.
Note that this installation of the VirtualBox guest additions will only last for the current Live-CD session. If you install GoboLinux into a VirtualBox virtual hard drive, you will have to do the same again.
Running under VMWare Workstation Player
Details
You are reading version 017 of this page. The current version can be found here.
When you install GoboLinux 016 on VMWare and boot it for the first time, you will get a black screen after the GRUB boot selection menu. The underlying problem is that the VMWare SCSI hard disk controller driver has been built as a module on the kernel. Because of that, the virtual disk image is not recognized and booting the installed system fails.
Workaround
VMWare saves the virtual machine settings on a file with the .vmx
extension.
If you have named your virtual machine “GoboLinux 016”, then you will have a
file called GoboLinux 016.vmx
. Shut down VMWare, open that file with a text
editor and replace the lines:
scsi0:1.present = "TRUE"
scsi0:1.fileName = "GoboLinux 016.vmdk"
scsi0:1.redo = ""
with the following:
sata0:1.present = "TRUE"
sata0:1.fileName = "GoboLinux 016.vmdk"
sata0:1.deviceType = "disk"
The fileName
may look different on your machine. You will want to keep
whatever name your config file presents. Also, make sure that the following
lines do exist in the vmx file (again, pciSlotNumber
may look different on
your vmx file):
sata0.present = "TRUE"
sata0.pciSlotNumber = "37"
Once you are done, save the file and launch VMWare. The system should boot up nicely this time.
Running under HyperV
Details
You are reading version 017 of this page. The current version can be found here.
When running the GoboLinux 016.01 live ISO through Hyper-V, you will notice that
startx
does not start correctly by default. You can fix this by adding a
kernel boot parameter and creating an Xorg configuration file.
Edit /System/Kernel/Boot/grub/grub.cfg
and find the kernel boot line. Change
video=vesafb:off
to video=hyperv_fb:1024x768
and save it. You may wish to
try this part in advance first, without saving it; in that case, press e
at
the Grub menu, make this same edit, and press Ctrl
-X
to boot once only with
the new command line.
Run X -configure
. It will generate a file xorg.conf.new
. Edit this file, and
change vesa
to fbdev
. Move the file to /etc/X11/xorg.conf
.
Reboot. startx
will now work normally.
Running GoboLinux under QEMU
Details
You are reading version 017 of this page. The current version can be found here.
We’ll illustrate how to:
- create a disk image
- boot an ISO image of Gobo under QEMU
- install Gobo to a disk image on the host filesystem
- reboot the newly installed guest
- initialize networking
- launch QEMU from a helper script
Create a disk image
This is where we will install our Linux system.
qemu-img create gobo.img 10G
Boot the installer
Here is the full command you can edit and paste into the terminal:
sudo qemu-system-x86_64 \
-cdrom GoboLinux-016.01-alpha-x86_64.iso \
-hda gobo.img \
-boot d \
-m 768 -enable-kvm -show-cursor -cpu host -daemonize \
-vga std -soundhw ac97 -rtc base=utc \
-usb -usbdevice tablet -device usb-mouse -vga std -clock unix
To test boot only the ISO, omit the -hda option.
Boot the disk image
After you’ve finished the installation, shutdown the guest OS and terminate QEMU. Start QEMU again, this time booting from the disk image:
sudo qemu-system-x86_64 \
-hda gobo.img \
-boot c \
-m 768 -enable-kvm -show-cursor -cpu host -daemonize \
-vga std -soundhw ac97 -rtc base=utc \
-usb -usbdevice tablet -device usb-mouse -vga std -clock unix
Networking under QEMU
QEMU provides a networking stack so that the guest OS running on this virtual machine can access the internet, or ssh to the host.
The only extra setup needed is to run Gobo’s DHCP client inside the guest.
dhcpcd
By default QEMU acts as a firewall and does not permit any incoming traffic. It also doesn’t support protocols other than TCP and UDP. This means that ping and other ICMP utilities won’t work.
Details can be found here.
Helper script
Qemust
is a perl5 script you can use to start your QEMU processes. With most
options defined in the script, the command line becomes much simpler.
To boot from an ISO and install to a disk image:
qemust --iso=GoboLinux-016.01-alpha-x86_64.iso --image=gobo.img
To boot from the disk image
qemust --image=gobo.img
To test an ISO:
qemust --iso=GoboLinux-016.01-alpha-x86_64.iso
The script has some library dependencies. The most convenient way to install
them (and any CPAN modules) is to use cpanminus
(cpanm). So install
cpanminus
, then the dependencies:
cpan App::cpanminus
cpanm Getopt::Long::Descriptive
The script follows below. Edit the QEMU options to your liking, put the script
in somewhere in your $PATH
, and make it executable with something like
chmod a+x ~/bin/qemust
.
#!/usr/bin/env perl
use strict;
use warnings;
# qemust - start QEMU
use 5.012;
use Getopt::Long::Descriptive;
my ($opt, $usage) = describe_options(
'%c %o',
[ 'iso=s', "ISO file to boot" ],
[ 'image=s',"OS disk image file" ],
[ 'help', "print usage message and exit" ],
[ 'n', "print QEMU startup command and exit" ],
);
print($usage->text), exit if $opt->{help} or ! keys %$opt;
my $boot_drive = $opt->{iso} ? 'd' : 'c';
my @cmd = grep{! /^\s*$/} map{s/\s*#.*$//; $_} split "\n",<<"CMD";
sudo # run as root
qemu-system-x86_64 # for 64-bit CPUs
-enable-kvm # faster virtualization
-show-cursor #
-boot $boot_drive # boot from DVD/CDROM if present
-m 768 # use memory 768MB
-cpu host # same CPU model as host
-daemonize # avoid race conditions when QEMU started by external program
-vga std # probably -vga vmware would work, too
-soundhw ac97 # typical soundcard, -soundhw hda should also work
-rtc base=utc # timer related
-usb # enable USB driver
-usbdevice tablet # so QEMU can report mouse position without grabbing mouse
-device usb-mouse #
-clock unix #
CMD
push @cmd, "-cdrom $opt->{iso}" if $opt->{iso};
push @cmd, "-hda $opt->{image}" if $opt->{image};
my $cmd = join " \\\n",@cmd;
say $cmd;
system($cmd) unless $opt->{n};
__END__
Installing to external storage devices
Details
You are reading version 017 of this page. The current version can be found here.
GoboLinux 016 comes with two installation modes: UEFI and BIOS-compatibility mode. Depending on how your computer firmware is configured you may need to follow one or another recipe below.
BIOS-compatibility mode
Ensure that your external disk has been configured with a MSDOS partition table. You need to have at least one Linux partition (e.g., ext4), with the BOOT flag set.
You can then proceed with the installation of GoboLinux by selecting that Linux partition as install target and by enabling the installation of the bootloader on the master boot record (MBR) of that disk.
UEFI mode
Ensure that your external disk has been configured with a GPT partition
table. You need to have at least one Linux partition (e.g., ext4) and a FAT
(32/16/12) partition which is where the UEFI application embedding the GRUB
bootloader will be stored. The FAT partition needs to have both the ESP and
BOOT flags set. If you are using GParted, that FAT partition will be
automatically formatted by the tool. If you are not, then make sure to invoke
mkfs.msdos
to format it yourself.
Once the partitioning is arranged, you can proceed with the installation of Gobo by selecting the Linux partition as system install target and by selecting the FAT partition (also called EFI System Partition) as bootloader install target.
Troubleshooting
Unable to mount root fs
Both USB-Storage and UAS (USB-Attached-SCSI) drivers are built into the kernel.
However, at times the kernel may not have time to discover the partitions on
your external disk and may fail to mount the root filesystem. This particular
problem can be fixed by adding the rootwait
parameter to the kernel command
line.
For BIOS-compatibility mode:
- Mount your system partition using the LiveCD under
/Mount/GoboLinux
- Edit the file at
/Mount/GoboLinux/System/Kernel/Boot/grub/grub.cfg
. Look for the lines starting withlinux /System/Kernel/Boot/kernel-4.8.2-Gobo
and append the wordrootwait
to the very end of those lines - Unmount the partition under
/Mount/GoboLinux
and reboot.
For UEFI mode:
- Mount your boot partition (the one with a FAT filesystem) using the LiveCD
under
/Mount/GoboLinux
- Edit the file at
/Mount/GoboLinux/EFI/BOOT/grub-efi.cfg
. Look for the lines starting withlinux /System/Kernel/Boot/kernel-4.8.2-Gobo
and append the wordrootwait
to the very end of those lines - Regenerate the UEFI application. This is a large command, so it’s better to just copy+paste it.
cd /Mount/GoboLinux/EFI/BOOT
grub-mkstandalone-efi -d /lib/grub/x86_64-efi -O x86_64-efi --modules="part_gpt part_msdos iso9660 all_video efi_gop efi_uga video_cirrus gfxterm gettext font" --fonts="unicode" --themes="" -o BOOTx64.EFI --compress=gz "boot/grub/grub.cfg=grub-efi.cfg"
Afterwards, unmount the partition under /Mount/GoboLinux
and reboot.
Configuring the Boot Process
This page describes the boot process and how to configure your GoboLinux system by editing the configuration files used for startup.
General architecture
The BootDriver script
(/Programs/BootScript/<version>/bin/BootDriver
) manages boot-related tasks.
The init
program (from the Sysvinit package) running as PID 1
calls
BootDriver as specified in /System/Settings/inittab
.
BootDriver first loads the boot theme
file specified in /System/Settings/BootOptions
.
Then BootDriver runs the appropriate boot script for the task at hand (startup,
shutdown, etc.)
Boot Scripts
GoboLinux boot scripts initialize and configure the system, manage daemons, and
perform shutdown. They are located at /System/Settings/BootScripts
.
BootUp
, the primary startup script, is invoked when you turn on the power and the system boots. It contains generic initializations common to most Linux systems. Additional scripts are provided to support particular boot scenarios.Console
runs BootUp and performs initializations required for a console session.Graphic
runs BootUp and starts X to provide a login window.
Shutdown
is the primary shutdown script, analogous to BootUp. It is used by the following termination scripts:Reboot
runs Shutdown to terminate system services then reboots the machine.Halt
runs Shutdown and turns off the power, if possible. Otherwise it halts the processor.
Each of these scripts contains lines of the form:
Exec "Message..." SomeCommand [ parameters ]
For example, to adjust the keyboard delay and repeat rate in the console, you
can add this line to /System/Settings/BootScripts/Console
:
Exec "Making keyboard speedy..." kbdrate -r 30 -d 250
GoboLinux also provides “boot tasks” as a more sophisticated way of managing services.
Configuration options
When GoboLinux boots, the boot scripts launch programs to configure the keyboard, set the system clock, initialize the network, etc.
The parameters for calling these programs are placed in
/System/Settings/BootOptions
and /System/Settings/NetworkOptions
. Both files
contain entries of the form:
Option=value
Note that no space is allowed before or after the =
character. This is shell
syntax, allowing the options to be imported into the boot scripts using the
source
command.
The following sections document options available in
/System/Settings/BootOptions
and /System/Settings/NetworkOptions
.
Clock mode
GoboLinux needs to know if your hardware clock is set to GMT or local time.
Specify this by editing the ClockMode option. Set ClockMode=GMT
if your
hardware clock is set to GMT. Set ClockMode=LocalTime
if your hardware clock
is set to local time.
For obtaining time zone information, Linux applications rely on information
provided by Glibc, the C library. Glibc, on its turn, uses the localtime
symlink in its Settings directory (/Programs/Glibc/Settings/localtime
) to
indicate the active time zone. This symlink is created by the installer
according to the time zone you selected. You can set this setting manually, by
pointing the localtime
symlink to a different file under
/Programs/Glibc/Current/Shared/zoneinfo
.
The ClockMode information is used for the hwclock utility, which is launched at boot time through the SetClock task.
Console setup
Fonts
Fonts in GoboLinux are stored under /System/Index/share/consolefonts
and
/System/Index/share/fonts
. They provide character typefaces for the Linux
console, the X Window System, and ghostscript
, the Linux postscript
interpreter.
Font path configuration for X can be found in /System/Settings/X11/xorg.conf
and /System/Settings/fonts/fonts.conf
.
To change the default console font used by GoboLinux, use the ConsoleFont option
in /System/Settings/BootOptions
.
You can also change the console font using the setfont
utility. See
man setfont
for details.
Remember that this setting changes only the console font. On X, applications have their own font settings.
Keymap
Use the KeymapLayout option in /System/Settings/BootOptions
to select an
appropriate console keyboard layout.
The available keymaps are in the KBD package; they are the .map files. You can set the console keyboard layout at any time by running loadkeys. For example, to set the Dvorak keymap, just type in:
loadkeys dvorak.map
Mouse
The MouseType and MouseDevice options in /System/Settings/BootScripts/BootUp
configure mouse support on the console. They are disabled by default.
Graphical display setup (X server)
Keymap
The keyboard layout for programs running under the window manager is mapped
according the InputDevice
section in /System/Settings/xorg.conf
when the
graphic display (X server) starts. With the window manager running, you can
change keyboard mappings and display settings using setxkbmap
, xmodmap
, and
xset
tools. To select a Dvorak keyboard layout, type setxkbmap dvorak
in a
terminal. These commands can also be placed in $HOME/.xinitrc
.
Some desktop environments also offer graphical tools for setting the keyboard layout. For example, in KDE you can configure this at the KDE Control Center.
Mouse
The mouse pointer for the graphical display is defined in an InputDevice
section in /System/Settings/xorg.conf
. The Installer
should correctly detect your hardware and set suitable defaults for your system.
If not, you can always try a failsafe setup such as:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
There is nothing GoboLinux-specific about mouse setup on X. You can find HOWTOs and tutorials around the net that can give you more detailed instructions about this. (But feel free to drop by at the mailing list if you’re still stuck!)
Kernel modules
Through the use of Udev, GoboLinux is capable of loading kernel modules (e.g. device drivers) automatically at boot. In cases Udev doesn’t load some wanted drivers, the user can explicitly request them.
One way is to edit /System/Settings/modprobe.conf
(similar to other Linux
distributions), however a simpler way in GoboLinux is to list desired modules in
/System/Settings/BootOptions
. This is how to load the i810_audio audio driver
and sk98lin ethernet driver:
UserDefinedModules=(
"i810_audio"
"sk98lin"
)
The startup scripts read this array and run modprobe each line. The entries may include additional parameters.
Network configuration
Wi-Fi
If you are using Wi-Fi, just select your network using the GoboNet widget in the AwesomeWM system tray:
Wired network
If you have a wired network, initialize it on boot using standard Linux commands in your bootscripts sequence.
First, check which are your network interfaces typing
ifconfig
You should have a network interface named something like eth0
or enp0s3
.
Edit the /System/Settings/BootScripts/BootUp
script. If you are using DHCP,
just add this:
dhcpcd eth0 &
If you have a static network configuration, place commands similar to the following in BootUp.
ifconfig eth0 192.168.1.5 netmask 255.255.255.0
route add default gateway 192.168.1.1 metric 1 dev eth0
The nameserver can be specified in /etc/resolv.conf
(/System/Settings/resolv.conf
). To use Google’s nameservers, you can edit
resolv.conf to:
nameserver 8.8.8.8
nameserver 8.8.4.4
Automated login
If you wish to use an automated login, there are several ways to achieve this goal.
For KDE (or KDM, it also has a configuration which allows you to tweak it a lot) you can use this:
- Open Control Center in administrative mode.
- Select Login Manager.
- Under the Convenience tab check “Enable auto-login” and select which user you should log in as.
- Click “Apply”.
If you do not use KDE or want a non-GUI based solution, one way is to use rungetty.
- In your inittab file (for example,
nano /etc/inittab
) find the line which includestty1
(it’s your first terminal, the default showing up on login). - Now, you will see
agetty
in there - change thisagetty
line torungetty tty1 --autologin your_username
.
Of course, replace your_username with the user you want to login as.
Using another tty than 1 may be useful too.
Printers
GoboLinux comes with CUPS installed by default.
Audio
Note that ALSA is muted by default, to automatically save and restore changes done in e.g. alsamixer, add these lines to your boot scripts.
Done: Exec "Storing ALSA settings..."
alsactl store
Installing Software
Details
You are reading version 017 of this page. The current version can be found here.
Subsections of Installing Software
Using binary packages
Details
You are reading version 017 of this page. The current version can be found here.
Binary packages in GoboLinux are precompiled software packages built for the GoboLinux directory tree and made available through the GoboLinux software repository (recipe store). Since these packages are already compiled, you can save the many hours needed to build larger applications. On the other hand, with binary packages you don’t have the ability to set compile flags for optimization or specific architectures.
Installing packages
InstallPackage is the GoboLinux script for installing binary packages. If you want InstallPackage to look for the most recent Gimp package available, you can run
InstallPackage Gimp
The script will check if the package is available in the GoboLinux repositories.
(See /System/Settings/GetAvailable.conf
for the specific URLs scanned. You may
add your own repositories if you desire.)
If you want to select a specific version, you can pass it as the second parameter:
InstallPackage Gimp 2.8.18
If you downloaded the package and want to install it, run:
InstallPackage Gimp--2.8.18--i686.tar.bz2
The script normally runs interactively, asking about each dependency of the
requested package before installing it. You can avoid these queries by adding
the --batch
or -b
flag. This is particularly useful with large packages such
as Gimp or Xorg, which have many dependencies.
InstallPackage -b Gimp
Dependencies
InstallPackage will warn you if dependencies of a package you are trying to install are unavailable and ask if you want to continue. This is valuable, because some software may still work satisfactorily even if a particular plug-in or other dependency is missing.
Installing packages from the LiveCD
See Installing Packages from the LiveCD.
Removing packages
Creating packages
Structure
In GoboLinux, all binary packages (as well as all user-compiled software) is
installed under /Programs
in a “program directory” provided for each version
of each application, for example:
/Programs/Gimp/2.8.18
When compiling software under GoboLinux the installation target directories such
as bin/
, lib/
, and etc/
that are required for a typical program are placed
inside the program directory.
With this self-contained directory structure, all that is needed to generate a
binary package is to make a tarball of the program directory, copy over the
Resources/
directory from the Compile recipe, and generate a few additional
files, which are also placed under Resources/
.
This is accomplished by the CreatePackage command.
Preparation
Before creating a package, be careful to vet the contents of the program’s
Settings/
directory to ensure that it does not include personal information.
A package submitted for inclusion in the GoboLinux packages repository must have sensible default settings, honoring the application defaults if possible.
The CreatePackage command
In order to create a package, run the CreatePackage utility with the package name as a parameter. For example,
CreatePackage rxvt
will create a binary package in the current working directory.
Compiling from source
Details
You are reading version 017 of this page. The current version can be found here.
Introduction
With Compile, GoboLinux build utility, software sources can be downloaded, compiled and installed in a single step. An example will follow next.
In order to install irssi, a text-based IRC client from the command line, you would type the following instruction:
Compile irssi
Depending on the speed of your computer, internet connection and what packages you have installed, Irssi should download and install in a few minutes.
Compile manages the build process using GoboLinux recipes. Each recipe contains a list of build directives and supplemental control files for compiling a particular software library.
Finding recipes
Typically, you can just try the name of the recipe you want from the command line. There is also an online recipe viewer, listing the most recently uploaded recipes first.
Command-line options
Compile has a number of command-line options, which are listed here. The following are especially useful.
When using the --batch
or -b
automatically attempts to process all
dependencies of the requested program.
Separating download and compile phases
The next two options are useful when working with intermittent internet access, or if you’d like to run your compiling jobs at night when you’re asleep.
Calling Compile with the --no-build
flag downloads sources only.
Later, in the event that you wish to use the --no-web
flag, this will direct
Compile to search to your system’s own download cache and build the sources
found there instead. This commandline switch is obviously very useful if you do
not have a working internet connection for the time being.
Writing recipes
Main article: Writing recipes
Getting the latest Compile
- To use the development version of Compile, run
Compile Compile git
- To use the latest stable version, run
InstallPackage Compile
In general it is recommended to always use the latest stable version of
Compile. Compile
is very important to GoboLinux so if
there is any problem in it, it is normally fixed very quickly.
Steps of the compile process
Details
You are reading version 017 of this page. The current version can be found here.
Normally, you shouldn’t need to compile “manually”, i.e., without using the
Compile
tool. However, it is possible to manually run
the same commands that Compile
uses.
Overview
Compiling programs in Linux is typically a three-part process: prepare the
sources with ./configure
, compile them with make
, and install the compiled
program with make install
.
To this process, Gobo adds a source configuration step to target the GoboLinux
directory structure, and after the install phase, a step that symlinks the files
from the application directory under /Programs
to /System/Index
. It is this
last step that makes programs “visible” to the GoboLinux system.
These are the relevant commands:
PrepareProgram
is a wrapper to the first step
described above. SandboxInstall
is a wrapper to
the third step, ensuring safe execution of make install
.
SymlinkProgram
performs the final operations
that integrate the new program into the system.
Setting up the sources: PrepareProgram
The PrepareProgram
script does two things. It
creates a directory hierarchy for the program under /Programs
, and it attempts
to prepare the sources for compilation.
The syntax for the PrepareProgram
is:.
PrepareProgram <program-name> <version-number> [ -- <additional-options> ]
Passing a program name and version number is mandatory. These names are the ones used in the directories under programs. For example,
PrepareProgram --tree Foo 1.0
(the --tree
switch) creates the directories /Programs/Foo/Settings
,
/Programs/Foo/1.0
, /Programs/Foo/1.0/bin
and so on.
The second task performed by PrepareProgram
is
to prepare the sources. Since there isn’t a standardized format for distribution
of source-code tarballs in the free software world, there is no way to implement
completely automated preparation. Fortunately, the popularization of the GNU
AutoTools brings us much closer.
PrepareProgram
, in this second step, will
detect availability of preparation tools and perform one of the following:
- If the program includes a
configure
script generated by GNU autoconf,PrepareProgram
will run it, passing the necessary options (mainly--prefix
,--sysconfdir
) as well as any additional options requested by the user in the command line (as<additional-options>
). - Some authors develop their own
configure
scripts, but due to the popularity of GNU autoconf, design a command line interface similar to that used by autoconf.PrepareProgram
tries to detect if a non-autoconfconfigure
script accepts at least the--prefix
option, and uses it.
In short, PrepareProgram
can be considered a
wrapper to configure
. Instead of running, for example,
cd foo-1.0
./configure --with-shared=yes
you’ll run
cd foo-1.0
PrepareProgram Foo 1.0 -- --with-shared=yes
SandboxInstall
Strictly speaking, if everything were configured correctly you could simply run
make
and make install
, and all files would be installed under the
appropriate subdirectory under Programs/
.
To ensure this happens is to guarantee the modularity of the software installation.
To prevent any possibility of files being copied elsewhere in the directory tree
than the target under /Programs
, GoboLinux conducts the install step in a
“sandbox” that is isolated from the rest of the filesystem.
SandboxInstall
constructs a container for
make install
. It uses a sandbox provided by the
FiboSandbox
script, which configures custom
permissions for an allowed set of paths to a special user,
fibo
. On systems with a UnionFS backend (such as
FunionFS, UnionFS-FUSE or OverlayFS), the sandbox is provided by the alternative
script UnionSandbox
. Installation then runs
confined to a sandbox, with no permission to write anywhere but the few places
SandboxInstall
allows it to, such as
/Programs/Foo/Current
and /Programs/Foo/Settings
. Therefore, no files can be
installed in “random places”. A typical call to
SandboxInstall
looks like this:
SandboxInstall Foo 1.0
If necessary, additional options can be passed. Refer to the SandboxInstall
reference page for details.
Linking the sources: SymlinkProgram
The final step in the compilation of a program is performed by the
SymlinkProgram
. This is the script responsible
for creating the symbolic links under /System/Index
.
The syntax for SymlinkProgram
is:
SymlinkProgram program-name [ version-number ]
The second argument is optional. If no version number is specified, the one
linked as Current
will be used. A commonly used command-line parameter is -c
overwrite
, which tells it to overwrite any existing symlinks in case of
conflicts (the default action is to preserve the existing links in order to not
affect previously existing applications). To integrate a program Foo
into the
/System
structure, overwriting any links, you would type:
SymlinkProgram -c overwrite Foo
SymlinkProgram
features many command-line
switches, to cover more advanced needs. You can refer to the SymlinkProgram
reference page for details if necessary.
Package Management
Details
You are reading version 017 of this page. The current version can be found here.
Subsections of Package Management
Removing programs
Details
You are reading version 017 of this page. The current version can be found here.
In GoboLinux, all programs, whether binary packages or user-compiled software,
are installed into a single directory under the /Programs
hierarchy, such as,
for instance, gimp:
/Programs/Gimp/2.8.18
Removing this program can be, in theory, as simple as:
rm -rf Gimp/2.8.18
But since this leaves behind dangling symlinks, GoboLinux offers the
RemoveProgram
utility, which removes the program
and all links pointing to its files in /System/Index
.
RemoveProgram Gimp 2.8.18
Sometimes you may want to “turn off” a program temporarily, without erasing it from your hard disk. In other words, you want to remove program’s executables from the execution path, and remove libraries and headers from the lookup path.
In GoboLinux, this can be accomplished by removing the associated symlinks for
/System/Index
. The DisableProgram script facilitates this:
DisableProgram gimp 2.1.18
The version parameter given here, in this case 2.1.18
, is optional. If it is
not provided, the Current
link is used to determine the program version to
disable. Also note that the program name is case insensitive, but it appears to
be simpler to use a downcased variant - easier to type at the least.
To re-enable the program, all you need to do is recreate the symbolic links:
SymlinkProgram gimp 2.1.18
Maintaining symlinks
GoboLinux has a script called RemoveBroken
. that
removes dangling symlinks from /System/Index
tree. It can be useful to run
after manipulating directories under /Programs
.
RemoveBroken
takes a list of files, and removes
those that are dangling symlinks. If no arguments are provided, the script takes
filenames from standard input (typically through a pipe).
The usual procedure to clean up dangling links, is
cd /System/Index
find | RemoveBroken
Understanding and Maintaining system indices
Details
You are reading version 017 of this page. The current version can be found here.
The two main parts of GoboLinux are /Programs
and /System
. If you stick to
using InstallPackage
and
Compile
, these two parts will be implicitly kept in
sync by SymlinkProgram
. But a lot of power lies
in the fact that you can tune how these two worlds interact.
Program entries under /Programs
feature a Current
symlink pointing to a
specific version that is “active” in the system. This Current
version is taken
as the default version when you don’t specify a version in scripts, and the link
is updated when you install a new version with
InstallPackage
or
Compile
.
That doesn’t mean that you can only have one version linked into the system: you
can have files of multiple versions show up in /Programs
. In fact, when you
install a new version with InstallPackage
but
keep the old version in /Programs
, files for which there’s no version with the
same name in the new package are still linked – this is especially useful for
libraries.
For example, say program Foo 1.0
looks like this:
/Programs/Foo/1.0/bin/foo
/Programs/Foo/1.0/include/foo.h
/Programs/Foo/1.0/lib/libfoo.so.1
/Programs/Foo/1.0/lib/libfoo.so -> libfoo.so.1
Now, say, you install a new version, 2.0, which looks like this:
/Programs/Foo/2.0/bin/foo
/Programs/Foo/2.0/include/foo.h
/Programs/Foo/2.0/lib/libfoo.so.2
/Programs/Foo/2.0/lib/libfoo.so -> libfoo.so.2
The default behavior of SymlinkProgram
is to
replace symlinks under /Programs
that belong to a different version of the
same program. So, now, we’ll have the following links related to Foo under
system:
/System/Index/bin/foo -> /Programs/Foo/2.0/bin/foo
/System/Index/include/foo.h -> /Programs/Foo/2.0/include/foo.h
/System/Index/lib/libfoo.so.2 -> /Programs/Foo/2.0/lib/libfoo.so.2
/System/Index/lib/libfoo.so -> /Programs/Foo/2.0/lib/libfoo.so.2
/System/Index/lib/libfoo.so.1 -> /Programs/Foo/1.0/lib/libfoo.so.1
So, now, when you run foo
, it will fetch version 2.0
of the program through
your system $PATH
(which looks at /System/Index/bin
). But, as you can see,
libfoo.so.1
is still there. This way, if you have other programs installed in
the system that are linked specifically to version 1 of the libfoo library will
continue working.
This means you won’t have the old problem “I upgraded package Foo and now my
other apps are broken”. Of course, you can still break things when you remove
a version which other programs depend in (or if buggy programs link to a version
independent name of a library (libfoo.so
) but depend on features of a specific
version).
Besides SymlinkProgram
(see section “Compiling
manually” and its reference
entry for details on it), there are other scripts
that give you more control over what is linked in the system and what is not.
With DisableProgram
, you can remove from
/System
all links that refer to a specific version of a program, effectively
“turning it off” – it is as if it were not present in the system.
With RemoveProgram
, you can remove a program
from /Programs
and its references from /System
in a single step.
See Removing programs for more details.
Updating packages
Details
You are reading version 017 of this page. The current version can be found here.
Overview
Use the UpdateRecipes
command to refresh your
local cache of the GoboLinux recipe store.
You can query available updates using the utilities
SuggestUpdates
and
SuggestDuplicates
. The output of each of
these commands is suitable for piping into commands.
The FindPackage
and
GetAvailable
commands may also be useful.
Example Update Process
Keep in mind that most operations that change the file-system state in Gobo require super user privileges:
Ensure that Scripts are up to date
cd /Programs/Scripts/Current
sudo git pull && sudo UpdateSettings --auto Scripts && sudo make
Ensure that Compile is up to date
cd /Programs/Compile/Current
sudo git pull && sudo UpdateSettings --auto Compile
UpdateRecipes - Update local copy of recipe store
cd /Data/Compile/Recipes
sudo UpdateRecipes
SuggestUpdates - List packages with an update available
cd /Data/Compile/Recipes
SuggestUpdates
Install updates
Currently, there is no way to update packages automatically. This used to be
done with the Freshen
script, which is currently not
in working order.
Updates thus need to be installed manually via
InstallPackage
or
Compile
as appropriate.
Dependencies blacklist
Details
You are reading version 017 of this page. The current version can be found here.
Configuring Dependencies
Today there are many programs implementing a given feature in different ways.
One such example is the OpenGL API, with implementations floating in packages
such as Xorg, MesaLib and Nvidia. However, not every user owns a Nvidia card,
and here comes a problem: how should one mask Nvidia from the automated
Dependencies list generated after creating a recipe? This problem is now fixed
with a configurable file called
/Programs/Scripts/Settings/Scripts/Dependencies.blacklist
.
Dependencies.blacklist
This file allows one to specify packages that should not appear in the Dependencies file after creating a new recipe. Its format is pretty simple: one package per line, without the need to specify its version.
A Dependencies.blacklist
example
The following example blacklists the packages Glibc
and Nvidia
. Comments and
blank lines are ignored by the parser, so it’s ok to include them.
# Dependencies.blacklist is documented in detail at
# http://wiki.gobolinux.org/Dependencies
Glibc
Nvidia
Note: presently blacklisting specific versions is not supported, but the same
behaviour can be achieved by creating an empty directory in the /Programs
directory. For example, to blacklist GCC
version 4.1.2
you may:
mkdir /Programs/GCC/4.1.2
GoboLinux Scripts
Notes on command-line switches
Many scripts accept command-line options. All options feature a short,
one-letter form, and a long form. Following the GNU conventions, short form
options are preceded by a single hyphen (as in -a
, -b
) and long form options
are preceded by two hyphend (as in --foo
, --bar
).
- All command-line options have to be passed first, before other types of arguments (file names, package names, etc). In other words,
FooScript -m Foo
works, but
FooScript Foo -m # WRONG! Switches must come first.
does not.
- Some command-line options accept arguments. These arguments must be passed as the word following the argument, both in short and long forms. For example, say that -s and –long are options that take a parameter. This is the correct way to use them:
FooScript -s value --long another
These are not recognized:
FooScript -s=value --long another # WRONG! Use distinct tokens.
- Each option should be passed in a separate token, even when in short mode.
If -a, -b and -c are options for an immaginary
FooScript
, then
FooScript -a -b -c blah.txt
is correct, but
FooScript -abc blah.txt # WRONG! Options must be separated.
is not.
- All scripts have a
--help
option (or, in short form,-h
). When a program that needs arguments is run without arguments, the help text will be displayed. (Note: Actually, not all scripts conform to this yet, but this is being worked on).
Note
Note: Many of the restrictions above are actually
implementation limitations. “Fixing” them is not a high-priority in the project,
but patches to lift this restrictions are welcome. See
/Programs/Scripts/Current/Functions/OptionParser
if you’re curious.
Subsections of GoboLinux Scripts
Guidlines for script authors
This section documents the coding style used in GoboLinux shell scripts.
It’s important to note that not all scripts follow these guidelines, because of historical baggage (some of the scripts are older than GoboLinux itself). Patches to correct the non-conformities are welcome.
Indentation and block organization
A few rules of thumb:
- Three spaces for indentation. Avoid joining
do
andthen
in the same line with;
, instead put it on a line by itself, aligned withfor
,while
orif
. - Prefer using
if
rather than idioms like&& { }
, but apply your common sense. - Be generous in you use of quotes whenever referring or defining variables,
and the
${x}
syntax when merging variables inside strings. - Bear in mind that
esac
is ridiculous. - When doing weird stuff such as functional-like programming with eval, hide
it in a pretty function to pretend it is a bit more readable. Eventually we
might make a
Functional
module. By now,Map()
is defined in theArray
module.
It’s hard to believe, but the only shell module containing GoboLinux-specific
stuff is the one aptly called GoboLinux
. Keep that in mind when submitting
functions for inclusion in one of the modules.
Names
The idea in the naming convention is to orthogonally describe scope and purpose
of each name. We define “local scope” as names that are specific to a given
script, and “library scope” as names defined in Scripts
modules such as
GoboPath
, ScriptFunctions
or one of the imported
function modules.
These are the guidelines:
- Function names have underscores between words
Example: local_function
, Library_Function
- Variable names do not, they’re just connected
Example: localvariable
, LibraryVariable
- Library names (for functions and variables) have capital letters
Example: Library_Function
, LibraryVariable
- Local names (for functions and variables) are in all-lowercase
Example: local_function
, localvariable
- All-uppercase variables are reserved for standard Unix usage
Example: PATH
, LD_LIBRARY_PATH
- Configuration variables used in .conf files start with the script name in lowercase, resulting in a case style similar to that used in Java variables
Example: compileRecipeDirs
, editKeymapLayout
Linux Kernel Topics
Details
You are reading version 017 of this page. The current version can be found here.
Linux kernel under GoboLinux
The Linux kernel differs from standard packages. It has nothing to be linked against the legacy tree: no libraries, no binaries, no headers, no manuals or info pages. Moreover, there are many things on a regular system which are very tied to the kernel itself, such as the proc and sys filesystems, the device nodes and the boot loader files.
These characteristics led to the creation of a special directory for the kernel,
called /System/Kernel
. This tree is organized in the following way:
/System/Kernel/Boot
- Bootloader files, including the kernel image/System/Kernel/Devices
- Device nodes, populated by Udev + Hotplug/System/Kernel/Modules
- Kernel modules/System/Kernel/Objects
- Sysfs, providing information gathered from Linux 2.6/System/Kernel/Status
- The mounted proc filesystem
Installing a kernel
Thanks to Compile, installing a new kernel is pretty straightforward on
GoboLinux. The Linux recipe takes into account the existence of a file called
config.gz inside /System/Kernel/Status
. This file contains the current
configuration for the running kernel, and is used thereby to feed the new kernel
options.
In short, running Compile Linux will fetch the latest available recipe (which already contains GoboLinux optional patches). After doing that, the kernel itself is automatically downloaded, patched and filled with the current configuration, taken from config.gz.
The menuconfig entry then appears, and allows for the user to modify their
kernel options. Just selecting “Exit” and telling the script to save the changes
will finish the user’s interaction with the Linux kernel compilation. After
completed, a new entry will appear under
/System/Kernel/Modules/$KERNEL_RELEASE
, and the new bzImage and System.map
files will get installed under /System/Kernel/Boot.
The old bzImage and System.map files aren’t overwritten, though. They’re just symlinks to the current kernel image, and this guarantees that if something goes wrong, a rollback can be done by simply modifying the kernel image at the GRUB’s bootloader prompt, and later by reverting the symlink’s target to the previous release.
To install a kernel which is newer than the available recipe, or one other than vanilla, you may use NewVersion.
- Download a kernel from kernel.org
If you already have a kernel downloaded, or have a special source package, you may place it in /Data/Compile/Archives.
- Use
NewVersion Linux <Version> http://kernel.org/pub/linux/kernel/v2.6/<your-archive-name>
to create a recipe. Using a fake URL is all right if you don’t intend to distribute the recipe. - Place any custom patches you need to apply into the
/Data/Compile/LocalRecipes/Linux/<Version>
directory. - Then Compile as usual.
Kernel patches
The Linux recipe comes with a few patches in order to improve the user’s experience with the system. The patchset includes, but is not restricted to, the following modifications:
- GoboHide: allows the legacy tree to be hidden from userspace applications
- SquashFS: a compressed filesystem which gets uncompressed on demand. This filesystem is currently used on the GoboLinux ISO, and so it’s interesting to have it in order to get the CD contents easily accessible through the mount command
GoboLinux Dark Corners
GoboLinux has some design features to assist adapting software builds to the GoboLinux directory structure.
Desktop Environments
Subsections of Desktop Environments
Awesome
Overview
Awesome is the current desktop manager for Gobolinux.
Several modules have been created for Awesome for use by Gobolinux:
Links
- Homepage: https://awesomewm.org/
Enlightenment
Details
You are reading version 017 of this page. The current version can be found here.
Overview
Enlightenment was the previous default DE used by Gobolinux. Its current compile status is unknown
Links
- Homepage - https://www.enlightenment.org/
LXDE
Overview
LXDE is a lightweight desktop environment.
Installation
- Compile lxde by typing
Compile LXDE
in a commandline. Download all dependencies when prompted. - Add
Exec lxsession
to.xinitrc
. - LXDE can then be run by calling
startx
after logging in.
TODO
- Add LXDM to LXDE recipes
- Add option to set LXDM as default display manager