Home Linux Blog Memories Me About ?

Dear My


Live Gentoo installation

Recently created my social network instance https://gentoo.live, so I remembered that this post was pending.

Long time ago I did a live Debian SID installation on Twitter, on November 2019 was Gentoo turn, on the Fediverse Network (Mastodon, Gnusocial, Pleroma) I posted my Gentoo installation commands:

Warning! This is not a Gentoo install guide, also my errors were posted!

1. screen
#This command allows me to resume my shell session if I close the terminal

2. mkfs.ext4 /dev/sda7
# I'm formatting an existing partition of my hard disk.

3. mount /dev/sda7 /mnt/tmp/

4. cd /tmp && wget http://distfiles.gentoo.org/releases/amd64/autobuilds/20191110T214504Z/stage3-amd64-20191110T214504Z.tar.xz
#Downloading Gentoo, my network is slow, one hour remaining.

5. cd /mnt/tmp/ && tar xpvf /tmp/stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
# Extracts the Gentoo tarball into the partition.

6. mount --bind /run/ /mnt/tmp/run/ && mount --bind /proc /mnt/tmp/proc && mount --bind /dev /mnt/tmp/dev/ && mount --bind /sys/ /mnt/tmp/sys/ && chroot /mnt/tmp/
# Chroot into gentoo.

7. source /etc/profile

8. nano /etc/portage/make.conf

# There I added this line:
The number is the double of the cpu cores plus one.
And modified the COMMON FLAGS variable to this value:
-march=native -O2 -pipe

9. mkdir --parents /etc/portage/repos.conf && cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf && emerge --sync
#note: out of the chroot cp the /etc/resolv.conf to the chroot

# 10.  I had an unexpected error I had never had in life. I solved in this way:

rm -rf /usr/portage/app-crypt/openpgp-keys-gentoo-release && emerge --sync
# Thanks forums!

11. emerge -1 mirrorselect
# This is taking a while, meanwhile I can practice the Lotus pose and listen at sacred music.

#11.5  I remembered that is a good idea to mount a tmpfs into /var/tmp, I will do so when the mirrorselect compilation ends. 

12. mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
# I selected some mirrors here

13. mount -t tmpfs tmpfs /var/tmp/
# Mounted a tmpfs into /var/tmp

14. eselect profile list

15. eselect profile set 5
# Chose the desktop profile

16. emerge --ask app-portage/cpuid2cpuflags

Calculating dependencies... done!
[ebuild N ] app-portage/cpuid2cpuflags-6
Would you like to merge these packages? [Yes/No] Yes

17. echo "*/* $(cpuid2cpuflags)" >> /etc/portage/package.use/00cpuflags

18. emerge -NaDu @world
# Updating the system

18.5 emerge etc-update
# I cancel the system update, portage is not happy with the USEs, I'm going to install etc-update for helping me editing uses files:

18.9 # I made a mistake, etc-update is part of the base system.

19. etc-update
# Ask for user input, I merge the uses file (/etc/portage/package.use/00cpuflags) with -3:

20. emerge -NaDu @world

# I retry the world update, this will recompile the system # I said yes and the compilation started

20.5 # Killed the system update by accident, I resumed using:
emerge --resume

20.6 Still compiling...

20.7 I will take a nap

20.8 . # Your sleepy beauty is back, but a package failed to compile

20.9 # I realized that I selected the wrong profile, in my day, only the 13.0 profiles were available, from the 2017 seems that Gentoo uses 17s profiles. Probably the first apps I will  install will be Wine and steam to check the multi lib support. 
So, in the end I will have to perform an extra step to migrate from 17.0 to 17.1, ah, also it can be a good idea to remove some global uses.

20.99 The base system and the basic X libraries have been being compiled for 8 hours, I will sleep, nini !! This step (number 20) will be completed during my sleep time

21. emerge --ask app-portage/gentoolkit
# I need this tool to check the uses descriptions

22. emerge --info | grep ^USE
# I will disable global uses

23. # I added this line to /etc/portake/make.conf
USE="-kde -bluetooth -ipv6 -nls -gmp -qt5"

24. emerge -NDu @world
# I will rebuild the affected packages to maintain USEs coherency in the future, also added the consolekit, networkmanager and dbus global use

25. # I canceled the rebuild, disabling nls affects gcc (it will be recompiled)

emerge genlop
# genlop is need for measure the compiling time
# I enabled the timezone for reporting the correct time:
echo "America/Mexico_City" > /etc/timezone

genlop -t gcc
pinkstar / # genlop -t sys-devel/gcc-9.2.0-r2
!!! Error: no merge found for 'sys-devel/gcc-9.2.0-r2'

# It seems that I haven't recompiled the toolchain. Welp, I will resume the world rebuilding

emerge -aNDu --with-bdeps=y @world

25.5 # Also added dbus as global use

26. emerge -1v app-portage/unsymlink-lib
# Time to migrate from 17.0 profile to 17.1 (this is an extra step because I chose a wrong profile)

27. unsymlink-lib --migrate

28. eselect profile set default/linux/amd64/17.1/desktop
# Since this is a new Gentoo installation, the past two steps was not needed, instead it only was need to change the profile to the new one.

29. # I'm moving the Slackware kernel sources to /usr/src in Gentoo. I'm not sure, but this will save me 6 hours of compilation and the kernel configuration part which is the most exciting thing in Gentoo. 

30. cd /usr/linux/src && make install
# Since the grub is managed by slackware, I will modify the grub in Slackware

30.5 # Added to /etc/fstab:
/dev/sda7 / ext4 noatime 0 1

31. emerge -a xorg-server

31.5 I had modified the VIDEO_CARDS variable in /etc/portage/make.conf

31.6 Added libinput keyboard mouse to INPUT_DEVICES in make.conf

32. # I almost forgot in /usr/src/linux:
make modules_install

33. emerge awesome
# This will install the windows manager.

34. emerge -a networkmanager-openvpn openvpn dhcpcd lynx links dhcpcd networkmanager nm-applet screenfetch zsh sakura spacefm cryptsetup btrfs-progs squashfs-tools lvm2 gnuchess bsd-games xautolock slock

# I will install some apps, however I created an uses file in /etc/portage/package.use/apps with this content:
sys-fs/squashfs lz4 lzma lzo
net-wireless/wpa_supplicant ap eap-sim eapol_test fasteap macsec p2p privsep smartcard tdls uncommon-eap-types -wimax wps
media-video/ffmpeg x265 vpx wavpack webp theora twolame opus libass libcaca gmp fontconfig openh264 wavpack
net-misc/networkmanager connection-sharing
And modified some others with etc-update

35. Bad news and good news.
The bad news is that my computer had a kernel panic. Which made me to reboot my computer interrupting the Gentoo installation.
The good news is that I was able to boot into Gentoo with the awesome WM and my custom wallpaper.
However I had to reboot the computer using REISUB since I am not in the sudoers file nor root has a pass!!
And my keyboard is not working in xorg, but I think that is because is one of these old ps/2 keyboards. It's easy to solve.

35.5 However I just installed Gentoo, but we want perfection, don't we?

36. emerge -a sudo

37. visudo
# Uncomment the wheel group
38. gpasswd -a $myuser wheel

39. emerge --resume
# This will take a while

40 ln -s /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
# I will try to solve the keyboard issue with this command, I'm still compiling software.

41. Everything works perfect, I'm sending this post from Gentoo, I will use Gentoo forever! and remember, you never end to install Gentoo. It took me two days using a Celeron processor. 

World clock in awesome

awesome systray
Awesome systray

For displaying multiple clock in awesome with different timezones we need to create new clock widgets, this post is based on awesome 4.2, you will need to create a new widgets in ~./config/awesome with the following code: utc.lua

It has just two differences with the original textclock.lua widget, here the diff output from these two files:

<     format = format or " UTC:  %H:%M || "
>     format = format or " %d local: %H:%M "
<    timezone = timezone or TimeZone.new("Z")
>    timezone = timezone and TimeZone.new(timezone) or TimeZone.new_local()

I'm not a programmer, but I read the programmer Documentation and modified the code accordingly, I only was able to understand that the parameters after the OR operand was true and I don't know why, but my code works.

Its important to notice that you have to specify the timezone name in the format variable in order to show the clock's name, check the bold text in the diff output above.

The most important thing to do is to replace the Z in the TimeZone.new("Z") function, Z is the UTC timezone, in the case of Argentina the timezone would be: TimeZone.new("America/Buenos_Aires")

Then edit your ~/.config/rc.lua file and search for this string:

mytextclock = wibox.widget.textclock()

In order to use the widget we have to pass the function into a variable, so if we have the Argentina and UTC clocks besides the local one, it will look like this:

mytextclock2 = textclock2()
utc= utc()
mytextclock = wibox.widget.textclock()

Finally search for the widgets wibox session and add the declared variables there:

-- Add widgets to the wibox
    s.mywibox:setup {
        layout = wibox.layout.align.horizontal,
        { -- Left widgets
            layout = wibox.layout.fixed.horizontal,
        s.mytasklist, -- Middle widget
        { -- Right widgets
            layout = wibox.layout.fixed.horizontal,

Installing Conky in Qubes OS 4.0

Qubes Os Screenshot

This is a bad thing to do, but the easiest way to install Conky in Qubes OS is using the RPM packages of Fedora 24.

First you need to download the following packages:

  • giflib-4.1.6-15.fc24.x86_64
  • imlib2-1.4.9-1.fc25.x86_64
  • iw-4.1-2.fc24.x86_64
  • crda-3.18_2016.02.08-1.fc24.x86_64
  • wireless-tools-29-14.1.fc24.x86_64
  • tolua++-1.0.93-18.fc24.x86_64
  • conky-1.10.4-1.fc25.x86_64

Then install all them, they are in the installed order, the packages highlighted with bold letters are the main dependencies for installing conky

You can install all of them using

rpm -i *

Install Screenlets in Fedora

Screenlets is pretty easy to install in Ubuntu, however, in Fedora is not that easy if you don't know the right name of the libraries.

And to tell you the truth, the most obfuscated name is pyobject that sometimes is named as python-gir or just gir.

1. First download the Screenlets here https://launchpad.net/screenlets/+download

2. Install it with: sudo make install

3. Install the depedences

dnf install pygtk2 python-dbus python-Beautiful libwnck3 python3-pytz pygobject3 python2-numpy gnome-python2-gconf gnome-python2-rsvg gnome-python2-libwnck

4. Edit /usr/share/screenlets-manager/screenlets-manager.py and /usr/share/screenlets-manager/screenlets-daemon.py if screenlets complains about missing icons, there you will comment out the lines that source that icons.

Finally don't forget to use a windows compositor if you are running Openbox, LXDE or an standalone windows manager. In XFCE you have to enable in the Window options. I just run: xcompmgr

Rss feed of the category