Monday, June 20, 2022

Post Slackware Install tips

 After Installing Slackware rather than reboot do these following instead.

0.Before starting the install run the command  network and it will automatically enable the network for you, so if you want to run network install you can do that too.

1. After the installation is finished it will ask you weather you want to shutdown,reboot or  shell and choose the shell option

2. You will be dropped into a shell. chroot in to your install by running 

chroot /mnt

3. Edit /etc/inittab file and change the default runlevel to 4 so that you can login to GUI desktop.

4. Create a local user by running command adduser  

5. The adduser command will take for of setting up your user account.

6. If you feel the need to add your user to extragroups run the command

usermod -aG $GROUP $USER

7a. Edit /etc/default/grub to add the following line

GRUB_DISABLE_OS_PROBER=false 

to allow os-prober to detect your  Windows OS. 

7b. Instead of Lilo you can install Grub as your boot manager in the same chroot run the command

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

then reboot you should now have logged into your GUI desktop. After you have logged in you should first create a local bashrc. Slackware doesn't ships with a bashrc. Here is a sample and a very simple bashrc

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# Bash version check

if ((BASH_VERSINFO[0] < 4)); then
    echo "This .bashrc file requires at least Bash 4.0"
    exit 1
fi

# Make sure if the history file is deleted...

if [[ ! -f "$HOME/.bash_history" ]]; then
    # Recreate an empty copy so history apps don't show errors
    touch "$HOME/.bash_history"
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).

if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# Make sure 256 color terminals are enabled

export TERM=xterm-256color
export use_color=true


PS1="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"
PS2="[\D{%d/%m/%Y}-\A] \u@\H-\W:-\$"         

REFERENCE:

https://docs.slackware.com/howtos:slackware_admin:grub_on_first_install 

https://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi#grub_2 

                    

Sunday, June 19, 2022

Adding Intel-microcode to your bootloader

 1. Install intel-microcode and its dependency from slackbuilds.org using the sbopkg package manager.

2.  Generate the initrd for the generic kernel by running the pkgtool command and select setup and select the mkinitrd script to generate initrd.

3.  Change into /boot directory

4.  Rename the initrd.gz as initrd-1.gz with mv -v /boot/initrd.gz /boot/initrd-1.gz

5.  now run the command 

 cat /boot/intel-ucode.cpio /boot/initrd-1.gz > /boot/initrd-intel.gz 

6. Remove the old initrd by rm -rvf /boot/initrd-1.gz

7.  Create a symlink ln -sv /boot/initrd-intel.gz /boot/initrd.gz

8. Update Lilo with lilo -v

9. The above steps are for the generic kernel in slackware. For the huge kernel

add the line intird=/boot/initrd-ucode.cpio in the  /etc/lilo.conf 

    image = /boot/vmlinuz
    initrd = /boot/intel-ucode.cpio
    root = /dev/sdaX                          #[X being the linux partition ]
    label = Linux
    read-only 

10. Run lilo -v 

11. To check if the intel-microcode has been applied download the 

spectre-meltdown-checkup script from 

https://github.com/speed47/spectre-meltdown-checker

Run this script as root it should  show STATUS: NOT VULNERABLE 

This how to is from 

https://forum.salixos.org/viewtopic.php?t=8171 


Tips to upgrade kernel in slackware

1. Never update your working kernel.

2. For upgrading the kernel download the patches.

3. Download your kernel with the command slackpkg download kernel*

4. The Downlaoded packages will be in /var/cache/packages/patches/linux-*

5. Change in to the directory as root.

6. In the terminal as root run the pkgtool command.

7. Choose the option to install packages in the current directory.

8. After installing run lilo -v

9. Reboot.

10. Uninstall the old kernel by running the pkgtool command and 

go to the uninstall section and uninstall the old kernel packages.

11. To create the generic kernel run the pkgtool command and goto setup 

and choose the first option "mkinitrd" it will create initrd and will place it in 

/boot.

12. Make a backup of /etc/lilo.conf and then edit the file to add the 

following section for generic kernel.

                    image=/boot/vmlinuz-generic-5.15.*

                    initrd=/boot/initrd.gz

                    root=/dev/sdaX    #[X being the partition no]

                    label=linux-generic

                    read-only

13. Run lilo -v 

14. Now you will have another kernel apart from the Kernel-huge that 

comes by default so if you botch one of them you will have another 

kernel to boot into.

                    


Saturday, June 18, 2022

Things to do after installing slackware

 

1.Install bash-completion from the Extra packages in the official repo. To install google-chrome download the
deb package and run the chrome slackbuild script to create the slackware package and then install with installpkg

2. Install slackpkg+ and use it to enable additional repos
Uncomment mirror you want to use in /etc/slackpkg/mirrors and run
  slackpkg update gpg
  slackpkg update
  slackpkg upgrade-all
  
3. To Install more software in slackware install sbopkg 
4. To optimize the usage of disk space automatically delete unwanted files in /tmp at shutdown. Create a 
file in /etc/rc.d called rc.local_shutdown and add the following line
  
    /usr/bin/find /tmp -mindepth 1 -maxdepth 1 -exec /bin/rm -rf {} +; 
save it and mark it as executable. 
4. Make sure your joystick does not control your mouse by creating a file in /etc/X11/xorg.conf.d called
51-joystick.conf with the following content
          
Section "InputClass"
        Identifier "joystick catchall"
        MatchIsJoystick "on"
        MatchDevicePath "/dev/input/event*"
        Driver "joystick"
        Option "StartKeysEnabled" "False"       #Disable mouse
        Option "StartMouseEnabled" "False"      #support
EndSection
5. Do not use the full Wayland display use X11 for Seamless working of software.

6. For IBus integration in KDE
 
 edit /etc/environment
 add the lines 
 GTK_IM_MODULE=ibus
 QT_IM_MODULE=ibus
 XMODIFIERS=@im=ibus

 edit ~/.bashrc and add the following lines
 
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

To Start IBus at use login create an autostart script with the following contents

      #!/usr/bin/bash
      
      sleep 5;
      /usr/bin/ibus-autostart 
7. If you want to use virtualbox you can use Cristiano urban's shell script to install, update and uninstall
virtual box. As root run the following command other wise it would crash on startup
 
    VBoxManage setextradata global GUI/UpdateDate never
    
Link to Virtual box auto install script
 
      https://github.com/crish4cks/Bash/blob/master/vbox-autoinstall
      
8. Install the Intel-Microcode or the Amd-microcode package from slackbuild to mitigate the spectre 
vulnerability. 
 
By default you would be using the huge kernel so add the following line in /etc/lilo.conf
 
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/intel-ucode.cpio
root = /dev/sda1
label = Linux
read-only

and run lilo -v

9. To manage Appimages  download and use the Application manager program from github. Here is the link 

    https://github.com/IVAN-HC/AM-APPLICATION-MANAGER
    
10. Install Xtreme Download Manager for better integration with Firefox and Chrome. the link below

    https://github.com/subhra74/xdm
11. To install more fonts in slackware install the program fnt. This is not in the repo we have to compile it ourselves but the upshot is 
    it will download and install fonts from google and debian repo. Link below 
    https://github.com/alexmyczko/fnt  

Sunday, December 13, 2020

Aksharamukha: An Open Source Transliteration Tool

 We probably might have used the google transliteration or many other transliteration services, There is a new open source transliteration tool in town, its called Aksharamukha. This tools main objective is to transliterate the languages primarily in the South Asia ,South East Asia to Romanized scripts. Currently it supports 85 Languages. We can use either online or you can install this tool as a python package. 

To use it as an online tool goto this website.   Select the source langue and its target language and you are good to go. If you want to use it in our  computer you can use it as an python package. Run the following command 

pip3 install aksharamukha
 
Now start python3 and type 

from aksharamukha import transliterate
transliterate.process('HK', 'Telugu', 'buddhaH')

Your transliterated word will now appear in the console. Thats it.

Typesetting in Tamil Brahmi in XeLaTeX

         Recently I found that Tamil Brahmi which is the precursor to the modern Tamil Language was included in the Unicode Standard. It is encoded in the range 11000-1107F. So I thought if its encoded in Unicode I wondered if I could typeset in Latex.This is my experiment. First we need the fonts for Brahmi and fortunately there is a font called Adinatha Tamil Brahmi and also its font manual.  and another font from Google Noto-Fonts called Noto Sans Brahmi.

         I Checked if I could type freely using IBus but unfortunately you can only enter characters one at a time this would be very time consuming, Luckily for us there is a transliteration tool from the authors of the font called Aksharamukha. To transliterate, set the base as Tamil and the output as Tamil Brahmi and you are good to go. Don't set the base as Tamil extended it doesn't work. Remember Aksharamukha is not a Translation tool.  Type your work and transliterate and copy the Tamil Brahmi letters. 

       Download and install the font. Run the following commands 
 
sudo fc-cache -v
sudo mkfontscale
sudo mkdir  
 
 IF you are using LuaLaTex run the following command to load the font 
 
luaotfload-tool --find "Adinatha Tamil Brahmi"
 
This  will load the font. Now you can typeset in either XeLaTex or LuaLaTex. Since both Polyglossia and  Babel don't support the Tamil Brahmi language natively we are turning to the fontspec package.  Here is the minimal working example. 

\RequirePackage[orthodox]{nag}
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{fontenc}
\usepackage{fontspec}
\usepackage{ClearSans}
\newfontfamily{\TACtam}{Lohit Tamil}
\newfontfamily{\bram}{Adinatha Tamil Brahmi}
\begin{document}
Hello.{\TACtam{வணக்கம்}}.{\bram{𑀯𑀡𑀓𑁆𑀓𑀫𑁆}}.
\end{document} 
 
Here is the screenshot.  

Image showing containg the word hello in three languages

Well my document compiled perfectly. Once again kudos to
Vindodh Rajan, Shriramana Sharma and Udhaya Sankar for the Font and Vindoh Rajan For maintaining the Aksharamuka transliteration tool. 




 

Saturday, December 12, 2020

Some Essential difference in Writing a letter in Tamil using XeLaTeX

 
Typesetting  a Tamil letter in XeLaTeX is essentially the same as typesetting a letter in  English.But it has some significant difference. I will list it out below. 

1. Load the Polyglossia or Babel Package

To typeset in Tamil  one has to load either the polyglossia or Babel package. 
Add the following to your preamble.

\usepackage[babelshorthands=true]{polyglossia}
\enablehyphenation
\setmainlanguage{tamil}
% if you need English
\setotherlanguage{english}
\setmainfont{TAU-Barathi}[Renderer=Harfbuzz,Ligatures=TeX,Script=Tamil]
% if you need English then set the font
\newfontfamily\englishfont{Times New Roman}[Scale=MatchLowercase,Renderer=Harfbuzz,Ligatures=TeX]  
 
OR if you are using the Babel Package then add the following to your preamble 

\usepackage{babel}
\babelprovide[main, import]{tamil}
% if you need English
 \babelprovide[import]{english}
\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TAU-Barathi}[Renderer=Harfbuzz,Ligatures=TeX,Script=Tamil]

% if you need English then set the font
\newfontfamily\englishfont{Georgia}[Scale=0.98,Renderer=Harfbuzz,Ligatures=TeX]

2. Date is Messed up. 

If you want the date to print automatically it follows Year-Month-date format Since  most people Follow either dd/mm/yyyy or month-date-year format. So you have to set manually the date, to do this load the datetime package
 
\usepackage{datetime}
\date{dd/mm/yyyy}   or
\date{month date, year} 

3. You Can't use \cc or \encl command  

Unless you create your own class and style it is impossible to use the native \cc and \encl command in the letter class. However we can do it manually in the letter class. Since CC and Enclosures are placed after the signature we manually  typeset them.
In Tamil cc is typed as நகல்  and enclosures as இணைப்புகள்.You can use the following commands after the signature in letter.

\par
நகல்:{\par\hspace{10mm}{1. அ \par\hspace{10mm} 2. ஆ}}
\par
இணைப்புகள்:{\par\hspace{10mm}
{2. அ \par\hspace{10mm} 2.ஆ}}
 

Popular Posts