FreeBSD: Gléasadh mar Fhreastalaí is mar Dheasc i dTímpeallachtaí ga_IE.UTF-8

Údar: Mícheál Ó Lochlainn, Áras Shorcha Ní Ghuairim, Acadamh na hOllscolaíochta Gaeilge, Ollscoil na hÉireann, Gaillimh.

Arna fhoíllsiú: 24ú Mí Deire’ Fómhair 2018.

Eochairfhocail

FreeBSD, Gaelainn, logánú, logcaighdeán, freastalaí, deasc, ga_IE, UTF‑8, Linux.

Achoimire

Leanann an obair seo an t‑iniúchadh ’ dheineas ar riúnaíocht FreeBSD mar rogha inoibrithe ar fhreastalaí Linux i dtímpeallachtaí ga_IE.UTF‑8 (Ó Lochlainn, 2018a) agus an obair athá ’gam déanta chun méarchlár agus logcaideán d’fhorbairt do FreeBSD (Ó Lochlainn, 2018b). Do chuireas romham úsáid phraiticiúil do bhaint as a bhfuil agam curtha i gcrí go dtí seo chun próiseas suitála ⁊ gléasta d’fhorbairt, don bhfreastalaí ⁊ don deasc ar aon, agus chun cúntas ar na próisis sin a chur síos i gcáipéis struchtúrtha.

‘Nótaí dhom féinig’ ’tá ann fé láthair, i ndáiríribh, agus cáipéis bheo is ea í seo dá réir. Táid na próisis suitála ⁊ gléasta á bhforbairt i gcónaí agus tá roinnt deocrachtaí le sárú i gcónaí. Táid na scripteanna plaoisce ábhar garbh in áitibh agus ní foláir iad a shnasadh — cé gur deallraitheach go gcuirid siad a ngnó i gcrí go sáisiúil. Ina fhochair sin, tá treo na hoibire reatha ag brath go muar ar pé glacadh a bheidh le paistí ’ thairiscíos do chuallacht FreeBSD age deire an iniúchta thuasluaite (228587 agus 228588 ar Bhugzilla). Dá réir seo go léir, dírítar aird an léitheóra ar an staid reatha, thíos.

Séanadh

D’fhonn faisnéis a scaipeadh a cuireadh an fhaisnéis athá ar an leathanach so ar fáil go poiblí, le dóchas go mbeadh sí úsáideach do dhuine éigint, nú go gcuirfeadh duine éigint suím inti. Ní bhronntar cearta d'aon tsaghas ina taobh, ní thugtar barrántas d’aon tsaghas ina taobh agus ní ghlactar le freagarthacht in aon dochair ná in aon díobháil a bheadh ann de dhroím aon úsáid a bhainfeadh éinne aisti, ná de dhroím aon bhaint a bheadh ag éinne léi.

An staid reatha

20181030
Suitáil an bhunchórais.
  • Gléasadh líonraithe gan sreang.
  • Suitáil clónna TTF ⁊ OTF.
Suitáil bhogearra.
  • Córacha laethúla.
20181024
Suitáil an bhunchórais.
  • Suitáil bhunúsach (le láimh).
  • Tíos agus gléasadh ’n chórais (script plaoisce).
  • Suitáil agus cur air fheidhm ga_IE.UTF‑8 (script plaoisce).
  • Suitáil na deisce.
Suitáil bhogearra.
  • Vim agus Bash (script plaoisce).

Réamhrá

Fo fo! Ríomhaire glúine Dell Latitude E5530 a úsáideas le línn na hoibire seo. In oiriúint don mheaisín sin athá socaruithe agus athróg áirithe ins na scripteanna plaoisce ’tá tabhartha sdan alth so. Gan dabht, níor mhuar iad a chur in oiriúint do peocu meaisín go mbeadh na scripteanna dá rith uirthi. Táid na coda soin agam márcáltha go feiceálach.

Suitáil an bhunchórais

1: Suitáil bhunúsach FreeBSD

Don bhfreastalaí ⁊ don deasc ar aon a déantar é seo gan dabht. Le láimh a chuirtar an chéim seo i gcrí, do réir an tseicliosta seo ’ leanas.


# ==============================================================================
# Réamhréachtanais (suitáil ⁊ gléasadh le láimh) -------------------------------
# ==============================================================================

# Suitáil bhunúsach ------------------------------------------------------------

# Glactar le gach réamhshocarú ach nuair a luaitar a mhalairt:

	# Keymap Selection:			uk.kbd
	# Hostname:				<do réir mar is cuí>
	# Distribution Select:			<na réamhshocaruithe go léir>
	# Partitioning:				Auto (ZFS)
	# ZFS Configuration:			<do réir mar is cuí>
						# Encrypt disks?	YES
						# Encrypt Swap?		YES
	# Network Configuration:		<do réir mar is cuí>
	# Select local or UTC clock:		YES (⁊ an clog córais ag UTC)
	# Time Zone (Region):			8 Europe
	# Countries in Europe:			20 Ireland
	# Confirmation (IST reasonable?):	YES
	# System Configuration (svcs at boot):	<do réir mar is cuí>
						# ✗ local_unbound
						# ✗ sshd
						# ✔ moused
						# ✔ ntpd
						# ✔ powerd
						# ✔ dumpdev
						
	# System hardening:			<do réir mar is cuí>
	# Add User Accounts:			YES
						# grúpaí eile:		operator
						# plaosc:		sh
	# Final Configuration:			Apply config ⁊ exit
	# Manual Configuration (final mods):	No
	# Complete:				Reboot

# Tabhair an CO chun dáta ⁊ athosnaigh -----------------------------------------

	# freebsd-update fetch && freebsd-update install;

# Tabhair pacáistí chun dáta ---------------------------------------------------

	# pkg update && pkg upgrade;

# Athosnaigh -------------------------------------------------------------------

	# shutdown -r +0;

# ==============================================================================
# Deire’ -----------------------------------------------------------------------
# ==============================================================================

2: Tíos

Don bhfreastalaí ⁊ don deasc ar aon a déantar é seo. Gléasadh bunúsach an chórais.

An script plaoisce


#!/bin/sh

# ==============================================================================
# Athróga ----------------------------------------------------------------------
# ==============================================================================

usaideoir_laethuil="<do réir mar is cuí>";

# ==============================================================================
# Falla dóiteáin ---------------------------------------------------------------
# ==============================================================================

## LE DÉANAMH ##

# ==============================================================================
# Pearanai ---------------------------------------------------------------------
# ==============================================================================

chmod 700 "/root";
printf "/usr/bin/clear">>"/root/.logout";
chown root:wheel "/root/.logout";
chmod 644 "/root/.logout";

chmod 700 "/usr/home/$usaideoir_laethuil";
## LE DÉANAMH: Teastaíonn 'clear' de shaghas éigint i gcomhair sh. ##

# ==============================================================================
# Cuir suas poíntí gléasta do mheáinibh sheachtaracha --------------------------
# ==============================================================================

mkdir "/mnt/root";
chown root:wheel "/mnt/root";
chmod 700 "/mnt/root";
mkdir "/mnt/$usaideoir_laethuil";
chown "$usaideoir_laethuil":"$usaideoir_laethuil" "/mnt/$usaideoir_laethuil";
chmod 700 "/mnt/$usaideoir_laethuil";

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach
	# mount -t ext2fs xx_IE.UTF-8 /dev/da0s1 /mnt/<comhadlann chuí>;
	# mount -t msdosfs xx_IE.UTF-8 /dev/da0s1 /mnt/<comhadlann chuí>;
	# umount /mnt/<comhadlann chuí>;
# ------------------------------------------------------------------------------

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

3: Suitáil agus cur air fheidhm ga_IE.UTF‑8

Don bhfreastalaí ⁊ don deasc ar aon a déantar é seo. Ritar an script plaoisce seo ’ leanas, i gcáillíocht préimhe.

Réamhréachtanais

Ní foláir na hacfuinní seo ’ bheith lonnaithe i bhfochair na scripte plaoisce:

a) Comhadlann cló darb ainm unifont
Agus an leagan reatha de chló GNU Unifont istigh inti seo, i riocht .bdf.
Íoschóipeáil GNU Unifont.
b) Comhadlann eochairmhapaí darb ainm keymaps
Agus mo chuid comhad sainscríofa ie.basic.acc.kbd, ie.full.acc.kbd agus ie.nascanna-version-1.acc.kbd istigh inti.
Faigh cóip den gcomhadlann eochairmhapaí.
c) Comhadlann logcaighdeáin darb ainm ga_IE.UTF-8
Agus mo chomhad sainscríofa LC_TIME istigh inti.
Faigh cóip den gcomhadlann logcaighdeáin.

An script plaoisce


#!/bin/sh

# ==============================================================================
# Réamhréachtanais -------------------------------------------------------------
# ==============================================================================

# Comhadlanna i bhfochair na scripte seo ---------------------------------------
	# unifont
	# ga_IE.UTF-8
	# keymaps

# ==============================================================================
# Athróga ----------------------------------------------------------------------
# ==============================================================================

taifeach_scaileain="<leithead>x<airde>";
unifont_leagan_reatha="XX.Y.ZZ";

# ==============================================================================
# Logcaighdeán (uilíoch) -------------------------------------------------------
# ==============================================================================

# /etc/login.conf --------------------------------------------------------------
cp -a "/usr/share/locale/en_IE.UTF-8" "/usr/share/locale/ga_IE.UTF-8";
if [ -f "ga_IE.UTF-8/LC_TIME" ]; then
	cp "ga_IE.UTF-8/LC_TIME" "/usr/share/locale/ga_IE.UTF-8/";
	chown root:wheel "/usr/share/locale/ga_IE.UTF-8/LC_TIME";
	chmod 444 "/usr/share/locale/ga_IE.UTF-8/LC_TIME";
fi
# https://unix.stackexchange.com/questions/264926/is-it-a-sane-approach-to-back-up-the-ifs-variable
# https://unix.stackexchange.com/questions/26784/understanding-ifs#26787
comhad_gleasta_logala_isteach="/etc/login.conf";
comhad_sealadach_logala_isteach="/etc/login.conf.sealadach";
cead_asca_cd_gl_lg_is="neamhaimsithe";
while IFS="" read -r line_cd_gl_lg_is;
do
	if [ "$line_cd_gl_lg_is" = "	:umask=022:" ] && [ "$cead_asca_cd_gl_lg_is" = "neamhaimsithe" ]; then
		printf "$line_cd_gl_lg_is\\">>"$comhad_sealadach_logala_isteach";
		printf "\n">>"$comhad_sealadach_logala_isteach";
		printf "\t">>"$comhad_sealadach_logala_isteach";
		printf ":charset=UTF-8:\\">>"$comhad_sealadach_logala_isteach";
		printf "\n\t">>"$comhad_sealadach_logala_isteach";
		printf ":lang=ga_IE.UTF-8:">>"$comhad_sealadach_logala_isteach";
		printf "\n">>"$comhad_sealadach_logala_isteach";
		cead_asca_cd_gl_lg_is="aimsithe";
	else
		printf "$line_cd_gl_lg_is">>"$comhad_sealadach_logala_isteach";
		printf "\n">>"$comhad_sealadach_logala_isteach";
	fi
done < "$comhad_gleasta_logala_isteach";
mv "$comhad_gleasta_logala_isteach" "$comhad_gleasta_logala_isteach.bak";
mv "$comhad_sealadach_logala_isteach" "$comhad_gleasta_logala_isteach";
cap_mkdb /etc/login.conf;
# /etc/profile -----------------------------------------------------------------
printf "# Micil --------------------------------">>"/etc/profile";
printf "\n">>"/etc/profile";
printf "LANG=ga_IE.UTF-8;">>"/etc/profile";
printf "\t">>"/etc/profile";
printf "export LANG">>"/etc/profile";
printf "\n">>"/etc/profile";
printf "CHARSET=UTF-8;">>"/etc/profile";
printf "\t">>"/etc/profile";
printf "\t">>"/etc/profile";
printf "export CHARSET">>"/etc/profile";

# ==============================================================================
# Consól vt; gníomhú, gléasadh ⁊ Gaelú -----------------------------------------
# ==============================================================================

# Socaraigh vt mar chónsól réamhshocaraithe ⁊ socaraigh an taifeach scáileáin --
printf "# Micil ================================">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "# Consól vt ----------------------------">>/boot/loader.conf;
printf "\n">>"/boot/loader.conf";
printf "kern.vty=vt">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "# Taifeach scáileáin -------------------">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "hw.vga.textmode=1">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "i915kms_load=\"YES\"">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "kern.vt.fb.default_mode=\"$taifeach_scaileain\"">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
# Suitáil eochairmhapaí Gaelacha do vt -----------------------------------------
suiomh_eochairmhapai_vt="/usr/share/vt/keymaps";
if [ -d "keymaps" ]; then
	for clo_gaelach_vt in keymaps/*;
	do
		# Cóipeáil eochairmhapaí
		cp "$clo_gaelach_vt" "$suiomh_eochairmhapai_vt"/;
		# Socaraigh a gcuid ceadaithe
		chown root:wheel "$suiomh_eochairmhapai_vt"/"${clo_gaelach_vt##*/}";
		chmod 444 "$suiomh_eochairmhapai_vt"/"${clo_gaelach_vt##*/}";
	done
fi
# Cuir le hinnéacs na n-eochairmhapaí iad --------------------------------------
comhad_inneacsa_na_n_eocharmhapai="/usr/share/vt/keymaps/INDEX.keymaps";
comhad_sealadach_inneacsa_na_n_eocharmhapai="/usr/share/vt/keymaps/INDEX.keymaps.sealadach";
cead_asca_inn_eoch="neamhaimsithe";
while IFS="" read -r line_inn_eoch;
do
	printf "$line_inn_eoch">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
	printf "\n">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
	if [ "$line_inn_eoch" = "is.acc.kbd:es:Islandés (con acentos)" ] && [ "$cead_asca_inn_eoch" = "neamhaimsithe" ]; then
		printf "\n">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "ie.basic.acc.kbd:en:Ireland (accent keys)">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "\n">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "ie.full.acc.kbd:en:Ireland (accent keys)">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "\n">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "ie.nascanna-version-1.acc.kbd:en:Ireland (accent keys)">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		printf "\n">>"$comhad_sealadach_inneacsa_na_n_eocharmhapai";
		cead_asca_inn_eoch="aimsithe";
	fi
done < "$comhad_inneacsa_na_n_eocharmhapai";
mv "$comhad_inneacsa_na_n_eocharmhapai" "$comhad_inneacsa_na_n_eocharmhapai.bak";
mv "$comhad_sealadach_inneacsa_na_n_eocharmhapai" "$comhad_inneacsa_na_n_eocharmhapai";
# Socaraigh eochairmhapa réamhshocaraithe do vt --------------------------------
# https://stackoverflow.com/questions/2172352/in-bash-how-can-i-check-if-a-string-begins-with-some-value#18558871
comhad_ghleasadh_an_chorais="/etc/rc.conf";
comhad_sealadach_ghleasadh_an_chorais="/etc/rc.conf.sealadach";
while IFS="" read -r line_cd_gl_an_ch;
do
	if case "$line_cd_gl_an_ch" in keymap=*) true;; *) false;; esac; then
		printf "keymap=\"ie.basic.acc.kbd\"">>"$comhad_sealadach_ghleasadh_an_chorais";
		printf "\n">>"$comhad_sealadach_ghleasadh_an_chorais";
	else
		printf "$line_cd_gl_an_ch">>"$comhad_sealadach_ghleasadh_an_chorais";
		printf "\n">>"$comhad_sealadach_ghleasadh_an_chorais";
	fi
done < "$comhad_ghleasadh_an_chorais";
mv "$comhad_ghleasadh_an_chorais" "$comhad_ghleasadh_an_chorais.bak";
mv "$comhad_sealadach_ghleasadh_an_chorais" "$comhad_ghleasadh_an_chorais";

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach
	# kbdcontrol -l /usr/share/vt/keymaps/ie-<PEOCU>-acc.kbd
	# D’fhonn an eochairmhapa d’athrú le láimh, don siosón reatha
# ------------------------------------------------------------------------------

# ##############################################################################
# Unifont vt ###################################################################
# ##############################################################################

# Ócáid, chun na bearnan do líonadh:
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228588

# Bain clóchomhad .fnt as a' gcomhad .bdf --------------------------------------
if [ -f "unifont/unifont-$unifont_leagan_reatha.bdf" ]; then
	vtfontcvt -w 8 -h 16 "unifont/unifont-$unifont_leagan_reatha.bdf" "unifont/uni-u16.fnt";
	mv "unifont/uni-u16.fnt" "/usr/share/vt/fonts/";
	chown root:wheel "/usr/share/vt/fonts/uni-u16.fnt";
	chmod 444 "/usr/share/vt/fonts/uni-u16.fnt";
fi
# Socaraigh an cló réamhshocaraithe -----------------------------------
# (Le láimh: vidcontrol -f uni-u16.fnt)
printf "# Cló téirminéil (vt) ------------------">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
printf "allscreens_flags=\"-f uni-u16\"">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";

# ##############################################################################
# Unifont vt ###################################################################
# ##############################################################################

# ==============================================================================
# Béastsplais ------------------------------------------------------------------
# ==============================================================================

# Dá n-oirfeadh do dhuine Beastie ’ chur i bhfollàch le línn na bútála ---------

# https://www.freebsd.org/doc/handbook/boot-splash.html
printf "# Béastsplais --------------------------">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "beastie_disable=\"YES\"">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";
printf "loader_logo=\"beastie\"">>"/boot/loader.conf";
printf "\n">>"/boot/loader.conf";

# ==============================================================================
# Athosnaigh -------------------------------------------------------------------
# ==============================================================================

shutdown -r +0;

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

4: Suitáil na deisce

Don deasc amháinn a déantar é seo gan dabht. Ritar an script plaoisce seo ’ leanas, i gcáillíocht préimhe.

Deasc Lumina a roghnaíos mar dheasc don gclár oibire seo. I ngort FreeBSD is ea a cruthnaíodh í (lucht forbartha TrueOS / Project Trident do chúm) — cé gur síneadh amach í le bheith neodarach ó thaobh an chórais oibriúcháin de. Dá réir sin, is dócha gurb í an rod is gaire do dheasc dhúchais FreeBSD dá bhfuil ann. Níl sí chomh niafa céanna le deascaibh áirithe eile ach, mara bhfuil, is deas éadtrom athá si: ní thugann sí léi carn giúrléidí nách n‑úsáidfar choíche agus níl sí eataithe le deochánaibh ná fuil a’ teastáil. Níl feidhm aici, ach an oiread, athá claonta i dtreo Linux.

An script plaoisce


#!/bin/sh

# ==============================================================================
# Comhbhaíll deisce ------------------------------------------------------------
# ==============================================================================

# Suitáil X.Org ⁊ lumina -------------------------------------------------------
pkg install -y xorg lumina;

# ==============================================================================
# Socaruithe um Lumina ---------------------------------------------------------
# ==============================================================================

printf "# Micil ================================">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
printf "# Do Lumina ----------------------------">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
printf "mixer_enable=\"YES\"">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";

# ==============================================================================
# Eochairmhapa X.Org -----------------------------------------------------------
# ==============================================================================

# Socaraigh an eochairmhapa réamhshocaraithe (mapa dúchais X.Org féinig) -------
comhad_reamhshocaraithe_eochairmhapa_xorg="/usr/local/etc/X11/xorg.conf.d/keyboard-ie-clo-gaelach.conf"
printf "Section	\"InputClass\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "Identifier">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\"KeyboardDefaults\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "Driver">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\"keyboard\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "MatchIsKeyboard">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\"on\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "Option">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\"XkbLayout\" \"ie\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "Option">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\t">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\"XkbVariant\" \"CloGaelach\"">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "EndSection">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
printf "\n">>"$comhad_reamhshocaraithe_eochairmhapa_xorg";
# Din deimhin go bhfuil aige na ceadanna cuí -----------------------------------
chown root:wheel "$comhad_reamhshocaraithe_eochairmhapa_xorg";
chmod 644 "$comhad_reamhshocaraithe_eochairmhapa_xorg";

# ==============================================================================
# Ceist chráiteach um D-Bus ----------------------------------------------------
# ==============================================================================

# https://forums.freebsd.org/threads/install-lumina-desktop-on-freebsd.59304/
dbus-uuidgen --ensure;

# ==============================================================================
# Athosnaigh -------------------------------------------------------------------
# ==============================================================================

shutdown -r +0;

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

5: Gléasadh líonraithe gan sreang

Más amhlaidh go bhfuil cuibhneoir(í) líonra gan sreang ins an mheaisín.

An script plaoisce


#!/bin/sh

# ==============================================================================
# Athróga ----------------------------------------------------------------------
# ==============================================================================

cuibhneoir_gan_sreang="wlan0";
ssid_gan_sreang_0="UUUUUU";
ff_gan_sreang_0="VVVVVV";
ssid_gan_sreang_1="WWWWWW";
ff_gan_sreang_1="XXXXXX";
ssid_gan_sreang_2="YYYYYY";
ff_gan_sreang_2="ZZZZZZ";
# ⁊ɼl…

# ==============================================================================
# Socaruithe um líonraíocht gan sreang -----------------------------------------
# ==============================================================================

# Gléas an cuibhneoir ----------------------------------------------------------
printf "# Gan sreang ---------------------------">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
printf "wlans_run0=\"$cuibhneoir_gan_sreang\"">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
printf "ifconfig_$cuibhneoir_gan_sreang=\"WPA SYNCDHCP\"">>"/etc/rc.conf";
printf "\n">>"/etc/rc.conf";
# Sampala: Din ceangal le WPA-PSK ----------------------------------------------
printf "network=\{">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "ssid=\"$ssid_gan_sreang_0\"">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "key_mgmt=WPA-PSK">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "proto=RSN">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "psk=\"$ff_gan_sreang_0\"">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\}">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
# Sampala: Din ceangal gan eochair ---------------------------------------------
printf "network=\{">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "ssid=\"$ssid_gan_sreang_1\"">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\t">>"/etc/wpa_supplicant.conf";
printf "key_mgmt=NONE">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
printf "\}">>"/etc/wpa_supplicant.conf";
printf "\n">>"/etc/wpa_supplicant.conf";
# ⁊ɼl…
# Athosnaigh líonrú ------------------------------------------------------------
service netif restart;

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach
	# sysctl net.wlan.devices
	# ifconfig wlanX up
	# ifconfig wlanX list scan
	# ifconfig wlanX down
# ------------------------------------------------------------------------------

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

6: Suitáil clónna

Réamhréachtanais

Le bheith lonnaithe i bhfochair na scripte plaoisce:

Comhadlann darb ainm truetype
Agus do rogha cnósach clónna Truetype istigh inti (iarna rangú, do réir mar is cuí, i bhfo-chomhadlannaibh).
Comhadlann darb ainm opentype
Agus do rogha cnósach clónna Opentype istigh inti (iarna rangú, do réir mar is cuí, i bhfo-chomhadlannaibh).

Tugtar fé ndeara

Is féidir clónna TTF agus OTF a shuitáil go logánta — a gcuid clóchomhad a chóipeáil go dtí an suíomh cuí sa chomhadchóras — nú le pkg. Cé gur furast iad a shuitáil go loganta, níor mhuar deimhin a dhéanamh gur bhfuarthas ceadúnais ina gcomhair, do réir mar is cuí.

An t‑é nú an t‑í gur mian leo leagan(acha) den gcló Ghaelach a shuitáil, do b’fhiú go muar dóibh am do chaitheamh a’ dearcadh láithreán Ghaelchló, áit go bhfaighfar clónna áille dúchasacha Vincent Morley.

An script plaoisce


#!/bin/sh

# ==============================================================================
# ==============================================================================
# Réamhréachtanais -------------------------------------------------------------
# ==============================================================================
# ==============================================================================

# Comhaid / comhadlanna i bhfochair na scripte seo -----------------------------
	# truetype
	# opentype

# Suitáil mkfontdir ------------------------------------------------------------
pkg install -y mkfontdir;

# ==============================================================================
# Suitáil Clónna go logánta ----------------------------------------------------
# ==============================================================================

# https://forums.freebsd.org/threads/xset-fp-and-mkfontdir-and-ttf-trouble.59134/
# TTF --------------------------------------------------------------------------
suiomh_clonna_uiliocha="/usr/local/share/fonts";
if [ -d "truetype" ]; then
	for clo_ttf in morley ttf-éigint-eile ttf-éigint-eile-arís ⁊ɼl…;
	do
		# Cóipeáil clónna
		cp -R "truetype/$clo_ttf" "$suiomh_clonna_uiliocha/";
		# Socaraigh a gcuid ceadaithe
		chown -R root:wheel "$suiomh_clonna_uiliocha/$clo_ttf";
		chmod 755 "$suiomh_clonna_uiliocha/$clo_ttf";
		find "$suiomh_clonna_uiliocha/$clo_ttf" -type f exec chmod 644 {} \;
		mkfontscale "$suiomh_clonna_uiliocha/$clo_ttf";
		mkfontdir "$suiomh_clonna_uiliocha/$clo_ttf";
	done
fi
# OTF --------------------------------------------------------------------------
if [ -d "opentype" ]; then
	for clo_otf in  otf-éigint otf-éigint-eile ⁊ɼl…;
	do
		# Cóipeáil clónna
		cp -R "opentype/$clo_otf" "$suiomh_clonna_uiliocha/";
		# Socaraigh a gcuid ceadaithe
		chown -R root:wheel "$suiomh_clonna_uiliocha/$clo_otf";
		chmod 755 "$suiomh_clonna_uiliocha/$clo_otf";
		find "$suiomh_clonna_uiliocha/$clo_otf" -type f exec chmod 644 {} \;
		mkfontscale "$suiomh_clonna_uiliocha/$clo_otf";
		mkfontdir "$suiomh_clonna_uiliocha/$clo_otf";
	done
fi

# ------------------------------------------------------------------------------
# NB:
#     Beidh tuilleadh gléasta le déanamh i siosón X.
#     Féach ar Gléasadh clónna TTF ⁊ OTF in X.Org
# ------------------------------------------------------------------------------

# ==============================================================================
# Suitáil Clónna le pkg --------------------------------------------------------
# ==============================================================================

# https://www.freshports.org/x11-fonts/
# Mar shampala -----------------------------------------------------------------
pkg install -y google-fonts junicode;
# Croí-chlónna gréasáin MS -----------------------------------------------------
pkg install -y webfonts;

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

Gléasadh clónna TTF ⁊ OTF in X.Org

Ní foláir na clónna nó so ’ ghléasadh in X.Org anois.

Fo fo! I siosón X de chuid an úsáideora laethúil a ritar an script seo ’ leanas.

An script plaoisce

#!/bin/sh

# ==============================================================================
# I SIOSÓN X DE CHUID AN ÚSÁIDEÓRA LAETHÚIL A RITAR Í SEO
# ==============================================================================

# https://www.freebsd.org/doc/handbook/x-fonts.html

# Cuir na comhaid TrueType a suitáladh leis an gcosán clónna -------------------
for clo_ttf in morley ttf-éigint-eile ttf-éigint-eile-arís ⁊ɼl…;
do
	xset fp+ /usr/local/share/fonts/"$clo_ttf_x";
	xset fp rehash;
done

# Cuir na comhaid OpenType a suitáladh leis an gcosán clónna -------------------
for clo_otf in  otf-éigint otf-éigint-eile ⁊ɼl…;
do
	xset fp+ /usr/local/share/fonts/"$clo_otf_x";
	xset fp rehash;
done

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

Suitáil bhogearra

Ní hionann *BSD agus GNU/Linux agus ní oireann dom meon Linux a thabhairt liom isteach i ngort na hoibire seo. Dá réir sin, do chuireas romham tús áite ’ thabhairt d’uirlisí agus do chóracha dúchais FreeBSD. Mar sin féin, ní foláir ’ bheith réadúil. I ngort Linux, nú láimh leis, a forbraíodh cuid nách bheag des na pacáistí bogearra is mó úsáid — ar an deasc go háirithe. Ina fhochair sin, sprioc muar na hoibire seo is ea tástáil chuímsitheach thímpeallacht ga_IE.UTF‑8. Tá aistriúcháin Gaelainne age roinnt mhaith des na pacáistí seo. Ní bheadh ciall ar bith len iad a sheachaint.

1. Vim agus Bash

Do shocaraíos ar Vim agus ar GNU Bash a shuitáil, ar a’ bhfreastalaí is ar an ndeasc ar aon, de bharr aistriúcháin Gaelainne ’ bheith ar fáil dóibh (féach ar leathanach íoschóipeála VIM is ar leathanach Bhash ar translationproject.org). D’oir dom a n‑iúmpar i dtímpeallacht ga_IE.UTF‑8 d’fhiscint agus níorbh cúis díomá iad. Do chloígh an dá cheann acu leis an logcaighdeán agus do chuir a gcomhéadain logánaithe Gaelainne air dá réir.


#!/bin/sh

# ==============================================================================
# Suitáil Vim ⁊ Bash -----------------------------------------------------------
# ==============================================================================

# Má mheastar go dteastaíd siad ------------------------------------------------
# Is áiseach iad chun feidhm logánaithe ga_IE do mheas -------------------------

pkg install -y vim bash;

# Cur chuige malartach: úsáid do bhaint à portaibh
# portsnap fetch && portsnap extract && portsnap fetch update;
# whereis [bash | vim];
# cd /COSÁN/GO/[bash | vim];
# make -DBATCH install clean;
# shutdown -r +0;

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach (plaosc réamhshocaraithe)
	# https://www.freebsd.org/doc/handbook/shells.html
	# chsh -s /bin/sh "$usaideoir_laethuil";
	# chsh -s /usr/local/bin/bash "$usaideoir_laethuil";
	# ⁊ɼl…
# ------------------------------------------------------------------------------

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

2. Córacha laethúla

Tá réimse fairseag, saibhir pacáistí bogearra tairgiúlachta ar fáil i dtaisce FreeBSD. Mám des na cinn is mó úsáid a roghnaíos i gcomhair tastála.


#!/bin/sh
# ==============================================================================
# ==============================================================================
#                      OBAIR LEANÚNACH IS EA AN SCRIPT SEO.
#       NÍL DÉANTA UIRTHI UM AN dTACA SO ACH AN TÁSTÁIL IS BUNÚSAÍ ATHÁ.
# ==============================================================================
# ==============================================================================

# ==============================================================================
# Suitáil feidhmchláir ---------------------------------------------------------
# ==============================================================================

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach
# pkg search peocu-rod;
# Am istigh:
	# https://forums.freebsd.org/threads/operation-timed-out.51501/
# ------------------------------------------------------------------------------

# Idirlíon ⁊ ríomh-phost -------------------------------------------------------
pkg install -y filezilla firefox thunderbird;
# Oifig ------------------------------------------------------------------------
pkg install -y libreoffice br-libreoffice cy-libreoffice en_GB-libreoffice ga-libreoffice gd-libreoffice;
# Ílmheáin ---------------------------------------------------------------------
pkg install -y ffmpeg graphicsmagick exiv2 krita inkscape ufraw vlc handbrake audacity openshot gimp gimp-beautify-plugin gimp-data-extras gimp-ez-perspective-plugin gimp-focusblur-plugin gimp-gmic-plugin gimp-jagged-border-scripts gimp-lensfun-plugin gimp-lqr-plugin gimp-refocus-plugin gimp-resynthesizer gimp-save-for-web gimp-wavelet-decompose-plugin gimp-wavelet-denoise-plugin gimp-wavelet-sharpen-plugin gimpfx-foundry;
# Scannadh ----------------------------------------------------------------------
pkg install -y sane-backends sane-frontends xsane;
# Comhadchórais úsáideora -------------------------------------------------------
pkg install -y fusefs-sshfs fusefs-ifuse;

# ------------------------------------------------------------------------------
# Faisnéis thánaisteach
# Suitálthar libimobiledevice nuair a shuitálthar fusefs-ifuse
# sshfs:
	# sshfs -o idmap=user úsáideoir@óstach: /cosán/go/poínte-gléasta
# ifuse:
	# usbmuxd --help
	# ifuse -o allow_other /mnt/ipod
# ------------------------------------------------------------------------------

# ==============================================================================
# Deire ------------------------------------------------------------------------
# ==============================================================================

Athbhreithniú ar fheidhm ga_IE

Ar a’ bhfreastalaí

Le teacht

Ar a’ deasc

Le teacht

Tagairtí