https://wiki.archlinux.org/api.php?action=feedcontributions&user=TheCloudt&feedformat=atomArchWiki - User contributions [en]2024-03-28T22:16:59ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Archiso&diff=556584Talk:Archiso2018-11-22T14:52:00Z<p>TheCloudt: /* How to grow the disk image to accomodate more packages? */ Answered question.</p>
<hr />
<div>==How to grow the disk image to accomodate more packages?==<br />
There are instructions which explain how to add more packages to the images, but if you actually too many of them there will be no enough space in the image to accomodate them. How to grow it?<br />
<br />
<br />
For me the image grow larger then my USB stick, so I removed the 32 bit packages (which were still supported at that time). So I was in the impression that growing is done automatically? Can you provide more details?<br />
[[User:TheCloudt|TheCloudt]] ([[User talk:TheCloudt|talk]]) 14:52, 22 November 2018 (UTC)<br />
<br />
==Sourceforce error for edk2 files==<br />
<br />
build.sh contains the following two lines:<br />
<br />
<code>curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi<br />
<br/>curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi</code><br />
<br />
These lines failed with the error: ''curl: (7) Failed to connect to svn.code.sf.net port 443: Connection refused''<br/><br />
As a workaround, I used those same files from the GitHub page of the TianoCore Project:<br />
<br />
<code>curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://github.com/tianocore/edk2/blob/master/EdkShellBinPkg/MinimumShell/X64/Shell.efi?raw=true<br/><br />
curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://github.com/tianocore/edk2/blob/master/EdkShellBinPkg/FullShell/Arm/Shell_Full.efi?raw=true</code><br />
<br />
Not sure if this is a temporary problem or those URLs need to be replaced permanently.<br />
--[[User:TcShadowWalker|TcShadowWalker]] ([[User talk:TcShadowWalker|talk]]) 19:48, 16 July 2015 (UTC)<br />
<br />
==Archiso doesn't work on non stock kernel==<br />
<br />
I've been having on and off issues when building ISOs with archiso and the other day when I was working on one I did a pacman -Syu before working but didn't reboot. I was running on the stock kernel at that point because the linux-ck kernel had not updated yet. My ISO built fine. Later that day I rebooted and was now running on the updated linux-ck kernel and suddenly the build process would simply die without any errors, even with the -v option. Right after installing all the custom packages, a dd output appears and then a mkfs.vfat version message appears and that's where it dies. Rebooting back to the stock arch kernel fixed the issue. I'm guessing it has something to do with hardcoded names or something like that in the build scripts.<br />
<br />
Is this normal behaviour? I don't mind using the stock kernel on the ISOs I build but I figured I'd at least be able to build them on a different one.<br />
<br />
On that note, is it possible to use a kernel other than the stock one within the ISOs we build? <br />
[[User:Biltong|Biltong]] ([[User talk:Biltong|talk]]) Sun May 6 2012, 21:47 SAST<br />
<br />
== Sidenote: ==<br />
<br />
Re-initializing pacman can be important, though I'm not sure. [[Pacman-key#Initializing_the_keyring]]<br />
<br />
Consider trying out -Archboot- GUI for installation: [[FAQ#Q.29_Arch_needs_an_installer._Maybe_a_GUI_installer]]<br />
<br />
{{Unsigned|01:40, 28 March 2013|Ubunchu}}<br />
<br />
== Estimating size? Starting over? ==<br />
<br />
How do you best estimate the size?<br />
<br />
How do you start over? Suppose just take `etc/`, delete the `releng/` directory recopy, put stuff back. [[User:Jasper1984|Jasper1984]] ([[User talk:Jasper1984|talk]]) 13:46, 1 July 2013 (UTC)<br />
<br />
:Best way to start over is delete releng/{work,out} it keeps cached packages, and there is no need to do every step from the beginning. {{Unsigned|14:08, 5 October 2013|Jqvillanova}}<br />
<br />
== Encryption ==<br />
<br />
<br />
* with «cryptsetup», encrypt the file «airootfs.sfs» built with «mkarchiso» :<br />
<br />
# cd /path/to/buildir/<br />
# cd ./work/iso/arch/x86_64/<br />
# cryptsetup --verify-passphrase plainOpen ./airootfs.sfs encrypt<br />
# dd < ./airootfs.sfs > /dev/mapper/encrypt<br />
# sync<br />
# cryptsetup plainClose encrypt<br />
# md5sum ./airootfs.sfs > ./airootfs.md5<br />
# cd -<br />
<br />
''(note that you can't decrypt the encrypted file «airootfs.sfs» in the same «dd» way, instead use {{ic|1=dd of=./airootfs.sfs conv=nocreat,notrunc < /dev/mapper/encrypt}})''<br />
<br />
* add the hook «encrypt» in «mkinitcpio.conf» :<br />
<br />
# grep HOOKS ./work/airootfs/etc/mkinitcpio.conf<br />
HOOKS="... encrypt"<br />
<br />
<br />
* insert these lines in «archiso» hook :<br />
<br />
--- a/work/airootfs/usr/lib/initcpio/hooks/archiso<br />
+++ b/work/airootfs/usr/lib/initcpio/hooks/archiso<br />
@@ -65,6 +65,10 @@<br />
fi<br />
sfs_dev=$(losetup --find --show --read-only "${img}")<br />
echo ${sfs_dev} >> /run/archiso/used_block_devices<br />
+ msg ":: Mapping encrypted squashfs..."<br />
+ local map="${sfs_dev##*/}.map"<br />
+ cryptsetup plainOpen "${sfs_dev}" "${map}"<br />
+ sfs_dev="/dev/mapper/${map}"<br />
_mnt_dev "${sfs_dev}" "${mnt}" "-r" "defaults"<br />
}<br />
<br />
<br />
* rebuild initramfs and iso with «mkarchiso» and test :<br />
<br />
# mkarchiso -r "mkinitcpio -p linux" run<br />
# mkarchiso iso encrypted.iso<br />
# qemu ... ./out/encrypted.iso<br />
<br />
<br />
[[User:Lacsap|Lacsap]] ([[User talk:Lacsap|talk]]) 21:51, 20 Feb 2016 (UTC)<br />
<br />
== Rebuilding the iso after removing the lock files is not enough ==<br />
<br />
The wiki states that to rebuild the iso, you have to remove lock files in the work directory<br />
<br />
However, this is not enough, because the script stops after reaching "adduser" command with "user exists" error [[User:Hadiyazdi|Hadiyazdi]] ([[User talk:Hadiyazdi|talk]]) 13:50, 11 March 2015 (UTC)<br />
<br />
== Copying file tha neither go in /skel/ or /etc/ ==<br />
<br />
It is unclear whether it is possible and how to prepare folder in some other directory of the hierarchy. E.g. if one wanted to prepare a custom xinitrc file, should one run<br />
<br />
# mkdir /etc/X11/xinit/xinitrc<br />
# cp /path/to/customxinitrc/xinitrc /etc/X11/xinit/xinitrc<br />
<br />
or whether one should put instead a dedicated line in one of the building script.<br />
<br />
I am not yet qualified enough to do this, but it is not a request for personal help, but rather a issue concerning a relevant (imo) point in the page.<br />
<br />
[[User:Navi se|Navi se]] ([[User talk:Navi se|talk]]) 12:37, 6 January 2016 (UTC)<br />
<br />
== Style|typo tag discussion for id/useradd check/command ==<br />
<br />
The following was tagged with "{{[[Template:Style|Style]]|typo?}}":<br />
<br />
! id arch && useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh arch<br />
<br />
I tried the command and also variations. They work, so may I remove the template/tag? Or, did it refer to something else? Or, maybe explain why {{ic|!}} and {{ic|&&}} are used? [[User:Zeniff|Zeniff]] ([[User talk:Zeniff|talk]]) 02:39, 30 October 2016 (UTC)</div>TheCloudthttps://wiki.archlinux.org/index.php?title=List_of_applications/Science&diff=517955List of applications/Science2018-04-19T12:30:14Z<p>TheCloudt: /* Schematic capture editor */ Adding ngspice tool to the list.</p>
<hr />
<div><noinclude><br />
[[Category:Mathematics and science]]<br />
[[Category:Applications]]<br />
[[es:List of applications/Science]]<br />
[[it:List of applications/Science]]<br />
[[ja:アプリケーション一覧/サイエンス]]<br />
[[ru:List of applications/Science]]<br />
[[zh-hans:List of applications/Science]]<br />
[[zh-hant:List of applications/Science]]<br />
{{List of applications navigation}}<br />
</noinclude><br />
== Science ==<br />
<br />
{{Note|1=For possibly more up to date selection of scientific applications, try checking the [https://aur.archlinux.org/packages.php?O=0&do_Search=Go&detail=1&C=15&SeB=nd&SB=v&SO=d&PP=50 AUR 'science' category]}}<br />
<br />
=== Scientific documents ===<br />
<br />
See the main article: [[List of applications/Documents#Scientific documents]].<br />
<br />
=== Mathematics ===<br />
<br />
==== Calculator ====<br />
<br />
See also [[Wikipedia:Comparison of software calculators]].<br />
<br />
* {{App|[[Wikipedia:bc programming language|bc]]|Arbitrary precision calculator language.|https://www.gnu.org/software/bc/|{{Pkg|bc}}}}<br />
* {{App|calc|Arbitrary precision console calculator.|http://www.isthe.com/chongo/tech/comp/calc/|{{Pkg|calc}}}}<br />
* {{App|Extcalc|Qt-based scientific graphical calculator.|http://extcalc-linux.sourceforge.net/|{{AUR|extcalc}}}}<br />
* {{App|galculator|GTK+ based scientific calculator.|http://galculator.mnim.org/|GTK+ 3: {{Pkg|galculator}}, GTK+ 2: {{pkg|galculator-gtk2}}}}<br />
* {{App|[[Wikipedia:GNOME Calculator|GNOME Calculator]]|Scientific calculator included in the GNOME desktop.|https://wiki.gnome.org/Apps/Calculator|{{Pkg|gnome-calculator}}}}<br />
* {{App|KAlgebra|Calculator and 3D plotter included in KDE EDU.|https://www.kde.org/applications/education/kalgebra/|{{Pkg|kalgebra}}}}<br />
* {{App|[[Wikipedia:KCalc|KCalc]]|Scientific calculator included in the KDE desktop.|https://www.kde.org/applications/utilities/kcalc/|{{Pkg|kcalc}}}}<br />
* {{App|MATE Calc|Calculator for the MATE desktop environment.|https://mate-desktop.org/|{{Pkg|mate-calc}}}}<br />
* {{App|Qalculate|Calculator and equation solver with fault-tolerant parsing, constant recognition and units.|http://qalculate.github.io/|{{Pkg|qalculate-gtk}}}}<br />
* {{App|SpeedCrunch|Fast, high precision and powerful cross-platform calculator.|http://speedcrunch.org|{{Pkg|speedcrunch}}}}<br />
* {{App|[[Wikipedia:xcalc|xcalc]]|Scientific calculator for X with algebraic and reverse polish notation modes.|https://www.x.org/|{{Pkg|xorg-xcalc}}}}<br />
<br />
==== Computer algebra system ====<br />
<br />
See also [[Wikipedia:Comparison of computer algebra systems]].<br />
<br />
* {{App|[[Wikipedia:Axiom (computer algebra system)|AXIOM]]|FriCAS: derivative of the powerful AXIOM-CAS|http://fricas.sourceforge.net|{{AUR|fricas}}}}<br />
* {{App|[[Wikipedia:GAP (computer algebra system)|GAP]]|Computer algebra system for computational discrete algebra with particular emphasis on computational group theory.|http://www.gap-system.org|{{Pkg|gap}}}}<br />
* {{App|[[Maple]]|Famous commercial CAS. Often used in education.|https://www.maplesoft.com/products/maple/|}}<br />
* {{App|Mathics|A free CAS for symbolic mathematical computations which uses [[Python]] as its main language. It aims at achieving a Mathematica-compatible syntax and functions. It relies mostly on Sympy for most mathematical tasks and, optionally, Sage for more advanced functionality.|http://www.mathics.org/|{{AUR|mathics}}}} <br />
* {{App|[[Wikipedia:Mathomatic|Mathomatic]]|General purpose Computer Algebra System written in C.|http://www.mathomatic.org/|{{Pkg|mathomatic}}}}<br />
* {{App|[[Wikipedia:Maxima (software)|Maxima]]|[[Wikipedia:Maple (software)|Maple]]/[[Wikipedia:Wolfram Mathematica|Mathematica]]-like program with a wxWidgets based frontend.|http://maxima.sourceforge.net/|{{Pkg|maxima}} {{Pkg|wxmaxima}}}}<br />
* {{App|[[Wikipedia:PARI/GP|PARI/GP]]|Computer algebra system designed for fast computations in number theory.|http://pari.math.u-bordeaux.fr/|{{Pkg|pari}}}}<br />
* {{App|[[Wikipedia:Xcas|Xcas]]|User interface to Giac, a free, basic computer algebra system.|http://www-fourier.ujf-grenoble.fr/~parisse/giac.html|{{Pkg|xcas}}}}<br />
<br />
==== Scientific or technical computing ====<br />
<br />
See also [[Wikipedia:Comparison of numerical analysis software]].<br />
<br />
* {{App|EngLab|Cross-compile mathematical platform with a C like syntax.|http://englab.bugfest.net|{{AUR|englab}}}}<br />
* {{App|[[Wikipedia:FFTW|FFTW]]|A [[Wikipedia:Fast_Fourier_transform|Fast Fourier Transform]] library for computing discrete Fourier transforms. Used for a wide variety of numerical applications, which includes spectral methods.|https://www.fftw.org/ |{{Pkg|fftw}} {{AUR|fftw-mpi}} {{AUR|fftw-mpich}}}}<br />
* {{App|[[Wikipedia:FreeMat|FreeMat]]|Matlab-like program that supports many of its functions and features a codeless interface to external C, C++, and Fortran code, further parallel distributed algorithm development (via MPI), and 3D visualization capabilities.|http://freemat.sourceforge.net/|{{Pkg|freemat}}}}<br />
* {{App|GeoGebra|Dynamic mathematics software with interactive graphics, algebra and spreadsheet|https://www.geogebra.org/|{{Pkg|geogebra}}}}<br />
* {{App|[[Wikipedia:matplotlib|matplotlib (PyLab)]]|Collection of Python modules (pyplot, numpy, etc.) used for scientific calculations.|https://www.scipy.org/|{{Pkg|python-matplotlib}}}}<br />
* {{App|[[Octave]]|[[Matlab]]-like language and interface for numerical computations.|https://www.gnu.org/software/octave/ |{{Pkg|octave}}}}<br />
* {{App|[[Sage-mathematics]]|Mathematics software system, that combines many existing open-source packages into a common Python interface. Alternative to Magma, Maple, Mathematica and Matlab.|http://www.sagemath.org|{{Pkg|sagemath}}}}<br />
* {{App|[[Wikipedia:Scilab|Scilab]]|Matlab alternative used for numerical computations. Its syntax is not equivalent to that of Matlab, but it can be easily converted.|http://www.scilab.org/|{{AUR|scilab}}}}<br />
<br />
==== Statistics ====<br />
<br />
See also [[Wikipedia:Comparison of statistical packages]].<br />
<br />
* {{App|[[Wikipedia:Just another Gibbs sampler|JAGS]] (Just another Gibbs sampler)|Cross-platform program for analysis of Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation.|http://mcmc-jags.sourceforge.net/|{{AUR|jags}}}}<br />
* {{App|[[Wikipedia:Pandas_(software)|Python Data Analysis Library (pandas)]]| Providing high-performance, easy-to-use data structures and data analysis tools with Python programming language.|http://pandas.pydata.org/|{{Pkg|python2-pandas}} {{Pkg|python-pandas}}}}<br />
* {{App|[[Wikipedia:PSPP|PSPP]]|Free SPSS implementation.|https://www.gnu.org/software/pspp/|{{AUR|pspp}}}}<br />
* {{App|[[R]]|Software environment for statistical computing and graphics.|https://cran.r-project.org/|{{Pkg|r}}}}<br />
* {{App|[[Wikipedia:RKWard|RKWard]]|Frontend for the statistical language R.|https://rkward.kde.org/|{{AUR|rkward}}}}<br />
* {{App|[[Wikipedia:RStudio|RStudio]]|A powerful and productive IDE for R written in Qt.|https://www.rstudio.com/|{{AUR|rstudio-desktop-bin}}}}<br />
<br />
==== Data evaluation ====<br />
<br />
See also [[Wikipedia:List of information graphics software]].<br />
<br />
* {{App|[[Wikipedia:Fityk|Fityk]]|Curve fitting and data analysis application, predominantly used to fit analytical, bell-shaped functions to experimental data.|http://fityk.nieto.pl/|{{AUR|fityk}}}}<br />
* {{App|[[Wikipedia:gnuplot|Gnuplot]]|Command-line program that can generate 2D and 3D plots of functions, data, and data fits. |http://www.gnuplot.info/|{{Pkg|gnuplot}}}}<br />
* {{App|[[Wikipedia:Grace (plotting tool)|Grace]]|WYSIWYG 2D graph plotting tool.|http://plasma-gate.weizmann.ac.il/Grace/|{{AUR|grace}} {{AUR|qtgrace}} {{AUR|gracegtk}}}}<br />
* {{App|[[Wikipedia:LabPlot|LabPlot]]|Free software data analysis and visualization application, similar to SciDAVis.|https://labplot.kde.org/|{{AUR|labplot-kf5}}}}<br />
* {{App|[[Wikipedia:QtiPlot|QtiPlot]]|Platform-independent application used for interactive scientific graphing and data analysis, similar to the proprietary [[Wikipedia:Origin (software)|Origin]] or [[Wikipedia:SigmaPlot|SigmaPlot]].|http://www.qtiplot.com/|{{Pkg|qtiplot}}}}<br />
* {{App|[[Wikipedia:ROOT|ROOT]]|Data analysis program and library (originally for particle physics) developed by CERN.|https://root.cern.ch/|{{AUR|root}}}}<br />
* {{App|[[Wikipedia:SciDAVis|SciDAVis]]|Fork of QtiPlot with the goal of being better documented and more user friendly.|http://scidavis.sourceforge.net/|{{AUR|scidavis}}}}<br />
See also [[List of applications/Documents#Spreadsheets]]<br />
<br />
=== Chemistry and biology ===<br />
<br />
====Computational biology and bioinformatics====<br />
<br />
See also [[Wikipedia:List of open source bioinformatics software]].<br />
<br />
* {{App|[[Wikipedia:BALL|BALL]] (Biochemical Algorithms Library)|Application framework in C++ that provides an extensive set of data structures as well as classes for molecular mechanics, advanced solvation methods, comparison and analysis of protein structures, file import/export, and visualization.|http://www.ball-project.org/|{{AUR|ball}}}}<br />
* {{App|[[Wikipedia:BioJava|BioJava]]|Set of Java tools for computational biology, as well as bioinformatics.|http://biojava.org|{{AUR|biojava}}}}<br />
* {{App|[[Wikipedia:Biopython|Biopython]]|Python package with tools for computational biology, as well as bioinformatics.|http://biopython.org/wiki/Biopython|{{Pkg|python-biopython}} {{Pkg|python2-biopython}}}}<br />
* {{App|[[Wikipedia:EMBOSS|EMBOSS]] (European Molecular Biology Open Software Suite)|Open source software analysis package specially developed for the needs of the molecular biology and bioinformatics user community.|http://emboss.sourceforge.net/|{{AUR|emboss}}}}<br />
* {{App|[[Wikipedia:MEGA, Molecular Evolutionary Genetics Analysis|MEGA]] (Molecular Evolutionary Genetics Analysis)|Integrated tool for conducting automatic and manual sequence alignment, inferring phylogenetic trees, mining web-based databases, estimating rates of molecular evolution, inferring ancestral sequences, and testing evolutionary hypotheses.|http://www.megasoftware.net/}}<br />
* {{App|[[Wikipedia:MUMmer|MUMmer]]|Bioinformatics software system for sequence alignment based on suffix trees.|http://mummer.sourceforge.net/|{{AUR|mummer}}}}<br />
* {{App|[[Wikipedia:UGENE|UGENE]]|Application that integrates dozens of well-known biological tools and algorithms, providing both graphical user and command-line interfaces.|http://ugene.net/|{{AUR|ugene}}}}<br />
<br />
==== Molecules ====<br />
<br />
===== Viewers =====<br />
<br />
See also [[Wikipedia:List of molecular graphics systems]].<br />
<br />
* {{App|[[Wikipedia:Avogadro_(software)|Avogadro]]|Editor, viewer and simulator for 3D molecule structures (also supports downloading files from the [[Wikipedia:Protein Data Bank|Protein Data Bank]]).|http://avogadro.cc/|{{AUR|avogadro}}}}<br />
* {{App|BALLView|Standalone molecular modeling and visualization application, part of the [[Wikipedia:BALL|BALL]] framework.|http://www.ball-project.org/|{{AUR|ball}}}}<br />
* {{App|[[Wikipedia:Ghemical|Ghemical]]|Computational chemistry software package used to edit, view and simulate molecular structures.|http://bioinformatics.org/ghemical/ghemical/index.html|{{AUR|ghemical}}}}<br />
* {{App|[[Wikipedia:PyMOL|PyMOL]]|Open-source molecular visualization system that can produce high quality 3D images of small molecules and biological macromolecules, such as proteins.|https://pymol.org/|{{Pkg|pymol}}}}<br />
<br />
===== Drawing =====<br />
<br />
* {{App|[[Wikipedia:BKchem|BKChem]]|Practical and goodlooking skeletal formula molecule drawing program.|http://bkchem.zirael.org/|{{AUR|bkchem}}}}<br />
* {{App|[[Wikipedia:Chemtool|Chemtool]]|GTK+-based program for drawing chemical structural formulas.|http://ruby.chemie.uni-freiburg.de/~martin/chemtool/chemtool.html|{{Pkg|chemtool}}}}<br />
* {{App|EasyChem|Simple skeletal formula molecule drawing program with a focus on producing press-quality figures.|http://easychem.sourceforge.net/|{{AUR?|easychem}}}}<br />
* {{App|[[Wikipedia:Gabedit|Gabedit]]|Graphical user interface to computational chemistry packages like [[Wikipedia:GAMESS (US)|GAMESS]], [[Wikipedia:Gaussian (software)|Gaussian]], [[Wikipedia:MOLCAS|MOLCAS]], [[Wikipedia:MOLPRO|MOLPRO]], [[Wikipedia:MPQC|MPQC]], [[Wikipedia:MOPAC|OpenMopac]], [[Wikipedia:PC GAMESS|Firefly]] (previously PC GAMESS) and [[Wikipedia:Q-Chem|Q-Chem]].|http://gabedit.sourceforge.net/|{{AUR|gabedit}}}}<br />
<br />
===== Modeling =====<br />
<br />
* {{App|[[GROMACS]] (GROningen MAchine for Chemical Simulations)|Versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.|http://www.gromacs.org|{{AUR|gromacs}}}} <br />
* {{App|[[Wikipedia:Quantum ESPRESSO|Quantum ESPRESSO]]|Integrated suite of applications for electronic-structure calculations and materials modeling at nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft).|http://www.quantum-espresso.org/|{{AUR|quantum-espresso}}}}<br />
<br />
==== Periodic table ====<br />
<br />
* {{App|eperiodique|A simple Periodic Table Of Elements viewer using the EFL.|http://eperiodique.sourceforge.net/|{{AUR|eperiodique}}}}<br />
* {{App|gElemental|Periodic table of the elements with additional information.|http://freecode.com/projects/gelemental|{{AUR|gelemental}}}}<br />
* {{App|[[Wikipedia:Kalzium|Kalzium]]|Periodic table of the elements with molecule editor and equation solver from the [[KDE]] desktop.|https://edu.kde.org/kalzium/|{{Pkg|kalzium}}}}<br />
<br />
==== Biochemistry ====<br />
<br />
* {{App|[[Wikipedia:Bioclipse|Bioclipse]]|Java-based visual platform for biochemistry that uses the Eclipse Rich Client Platform (RCP).|http://www.bioclipse.net/|{{AUR?|bioclipse}}}}<br />
<br />
==== Image manipulation ====<br />
<br />
* {{App|[[Wikipedia:ImageJ|ImageJ]]|Java-based image processing and analysing program that provides extensibility via plugins and macros. It is widely used in microscopy (e.g. for cell counting).|https://imagej.nih.gov/ij/|{{AUR|imagej}}}}<br />
* {{App|[[Wikipedia:FIJI_(software)|Fiji]]|ImageJ distribution (and soon ImageJ2) with a lot of plugins organized into a coherent menu structure.|http://fiji.sc|{{AUR|fiji-binary}}}}<br />
<br />
=== Astronomy ===<br />
<br />
* {{App|[[Wikipedia:Celestia|Celestia]]|3D astronomy simulation program that allows users to travel through an extensive universe, modeled after reality, at any speed, in any direction and at any time in history.|https://celestiaproject.net/|{{Pkg|celestia}}}}<br />
* {{App|GIMP Astronomy Plugins|Set of GIMP plugins for astronomical image processing.|http://hennigbuam.de/georg/gimp.html|{{AUR|gimp-plugin-astronomy}}}}<br />
* {{App|GoQat|Camera acquisition software, especially for QSI cameras, that provides other features such as autoguiding, focusing help and others.|http://canburytech.net/GoQat/|{{AUR|goqat}}}}<br />
* {{App|[[Wikipedia:KStars|KStars]]|Planetarium application that provides an accurate graphical simulation of the night sky, from any location on Earth, at any date and time. It is included in KDE Edu.|https://edu.kde.org/kstars/|{{Pkg|kstars}}}}<br />
* {{App|Qastrocam-g2|Webcam acquisition software for planetary imaging.|https://sourceforge.net/projects/qastrocam-g2/|{{AUR|qastrocam-g2}}}}<br />
* {{App|[[Wikipedia:Cartes du Ciel|Skychart / Cartes du Ciel]]|Planetarium that maps out and labels most of the constellations, planets, and objects you can see with a telescope. It can also download Digitized Sky Survey Charts and superimpose images over these charts.|https://www.ap-i.net/skychart/|{{AUR|skychart}}}}<br />
* {{App|StarPlot|3-dimensional star chart viewer.|http://starplot.org/|{{AUR|starplot}}}}<br />
* {{App|[[Wikipedia:Stellarium (computer program)|Stellarium]]|Beautiful 3D planetarium that uses OpenGL to render a realistic sky in real time.|http://www.stellarium.org/|{{Pkg|stellarium}}}}<br />
* {{App|Where Is M13|Application to visualize the locations and physical properties of deep sky objects.|http://www.thinkastronomy.com/M13/|{{AUR|where-is-m13}}}}<br />
* {{App|[[Wikipedia:XEphem|XEphem]]|Motif-based ephemeris and planetarium program.|http://www.clearskyinstitute.com/xephem/xephem.html|{{AUR|xephem}}}}<br />
<br />
=== Physics ===<br />
<br />
==== Electronics ====<br />
<br />
See also [[Wikipedia:Comparison of EDA software]].<br />
<br />
===== Digital logic =====<br />
<br />
Digital logic software are mainly simple educational tools that intended for only designing and simulating logic circuits.<br />
<br />
* {{App|glogic|An educational graphical logic circuit simulator.|https://launchpad.net/glogic|{{AUR|glogic}}}}<br />
* {{App|Logisim|Educational digital logic design and simulation software, written in Java, officially its development has stopped.|https://sourceforge.net/projects/circuit/|{{AUR|logisim}}}}<br />
* {{App|Logisim Evolution|Project which continue the development of the original Logisim with new features, written in Java.|https://github.com/reds-heig/logisim-evolution|{{AUR|logisim-evolution-git}}}}<br />
* {{App|SmartSim|Simple and beautiful digital logic circuit design and simulation software, mainly target teachers and students, very lightweight and cross platform, GPL licensed, written in Vala.|http://smartsim.org.uk|{{AUR|smartsim-git}}}}<br />
<br />
===== HDL =====<br />
<br />
* {{App|[[Altera Design Software]]|A set of design tools for Altera's FPGA chips that includes Quartus II and ModelSim-Altera.|https://www.altera.com/products/design-software/overview.html|see [[Altera Design Software]]}}<br />
* {{App|[[Xilinx ISE WebPACK]]|FPGA programmable logic design suit.|http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.html|see [[Xilinx ISE WebPACK]]}}<br />
<br />
===== MCU IDE =====<br />
<br />
* {{App|[[Arduino]]|Arduino prototyping platform SDK.|https://www.arduino.cc/en/Main/Software|{{Pkg|arduino}}}}<br />
<br />
===== Schematic capture editor =====<br />
<br />
* {{App|[[gEDA]]|Full suite and toolkit of Electronic Design Automation tools that are used for electrical circuit design, schematic capture, simulation, prototyping, and production.|http://www.geda-project.org/|{{Pkg|geda-gaf}}}}<br />
* {{App|[[Wikipedia:KiCAD|KiCAD]]|Software suite for electronic design automation (EDA) that facilitates the design of schematics for electronic circuits and their conversion to PCB (printed circuit board).|http://kicad-pcb.org/|{{Pkg|kicad}}}}<br />
* {{App|[[Wikipedia:Oregano (software)|Oregano]]|Graphical software application for schematic capture and simulation of electrical circuits. The actual simulation is done by the [[Wikipedia:Ngspice|ngspice]] or [[Wikipedia:GNU Circuit Analysis Package|Gnucap]] engines.|https://github.com/drahnr/oregano|{{AUR|oregano}}}}<br />
* {{App|QElectroTech|Application used to draw advanced electrical circuits.|https://qelectrotech.org/|{{AUR|qelectrotech}}}}<br />
* {{App|[[Wikipedia:Quite Universal Circuit Simulator|Qucs]]|Electronics circuit simulator application that gives you the ability to set up a circuit with a graphical user interface and simulate its large-signal, small-signal and noise behaviour.|http://qucs.sourceforge.net/|{{AUR|qucs}}}}<br />
* {{App|[[Wikipedia:ngspice|ngspice]]|Application used to simulate circuits. Open source successor of [[Wikipedia:SPICE|spice3f5]]|http://ngspice.sourceforge.net/|{{Pkg|ngspice}}}}<br />
<br />
==== Physics simulation ====<br />
<br />
* {{App|[[Wikipedia:Code_Aster|Code_Aster]]|Software package for Civil and Structural Engineering finite element analysis and numeric simulation in structural mechanics.|https://www.code-aster.org/V2/spip.php?rubrique2|{{AUR|aster}}}}<br />
* {{App|[[Wikipedia:EPANET|EPANET]]|EPANET performs extended period simulation of the water movement and quality behavior within pressurized pipe networks.|https://www.epa.gov/|{{AUR|epanet2-git}}}}<br />
* {{App|[[Wikipedia:Step (software)|Step]]|Two-dimensional physics simulation engine that is included in the KDE desktop as part of KDE Edu.|https://edu.kde.org/step/|{{Pkg|step}}}}<br />
* {{App|[[Wikipedia:SWMM|SWMM]]|Storm Water Management Model is a dynamic rainfall-runoff-subsurface runoff simulation model used for simulation of the surface/subsurface hydrology quantity and quality.|https://www.epa.gov/|{{AUR|swmm5-git}}}}<br />
<br />
==== Unit conversion ====<br />
<br />
* {{App|ConvertAll|Unit conversion application that allows one to combine units in any way (e.g. inches per decade), even if it does not make sense.|http://convertall.bellz.org/|{{AUR|convertall}}}} <br />
* {{App|Gonvert|Conversion utility that allows conversion between many units like CGS, Ancient, Imperial with many categories like length, mass, numbers, etc.|http://www.unihedron.com/projects/gonvert/|{{AUR|gonvert}}}} <br />
* {{App|[[Wikipedia:GNU Units|Units]]|Command-line unit converter and calculator that can handle multiplicative scale changes, nonlinear conversions such as Fahrenheit to Celsius or wire gauge and others.|https://www.gnu.org/software/units/|{{Pkg|units}}}}<br />
<br />
=== Geography ===<br />
<br />
* {{App|BT747|The swiss army knife for MTK GPS dataloggers.|https://sourceforge.net/projects/bt747/|{{Pkg|bt747}}}}<br />
* {{App|FoxtrotGPS|Lightweight and fast mapping application.|https://www.foxtrotgps.org/|{{Pkg|foxtrotgps}}}}<br />
* {{App|Geotag|Match date/time information from photos with location information from a GPS unit or from a map.|http://geotag.sourceforge.net/|{{Pkg|geotag}}}}<br />
* {{App|GNOME Maps|A simple map client for GNOME. Part of {{Grp|gnome-extra}}.|https://wiki.gnome.org/Apps/Maps|{{Pkg|gnome-maps}}}}<br />
* {{App|GottenGeography|Easy to use photo geotagging application for the GNOME desktop.|https://launchpad.net/gottengeography|{{Pkg|gottengeography}}}}<br />
* {{App|GPSBabel|Reads, writes, and manipulates GPS waypoints in a variety of formats.|https://www.gpsbabel.org/|{{Pkg|gpsbabel}}}}<br />
* {{App|GPSCorrelate|Correlate (geotagging) digital camera photos with GPS data in GPX format.|https://github.com/freefoote/gpscorrelate|{{Pkg|gpscorrelate}}}}<br />
* {{App|GpsPrune|View, edit and convert coordinate data from GPS systems.|https://activityworkshop.net/software/gpsprune/|{{Pkg|gpsprune}}}}<br />
* {{App|GPXSee|GPS log file viewer and analyzer.|http://www.gpxsee.org/|{{Pkg|gpxsee}}}}<br />
* {{App|GPX Viewer|Simple tool to visualize tracks and waypoints stored in a gpx file.|https://blog.sarine.nl/tag/gpxviewer/|{{Pkg|gpx-viewer}}}}<br />
* {{App|[[Wikipedia:GRASS GIS|GRASS GIS]]|Geospatial data management and analysis, image processing, graphics/maps production, spatial modeling and visualization.|https://grass.osgeo.org/|{{AUR|grass}}}}<br />
* {{App|[[Wikipedia:gvSIG|gvSIG]]| vSIG is a geographic information system (GIS), that is, a desktop application designed for capturing, storing, handling, analyzing and deploying any kind of referenced geographic information in order to solve complex management and planning problems. |http://www.gvsig.com/en| {{AUR|gvsig-desktop-bin}}}}<br />
* {{App|JOSM|An editor for OpenStreetMap written in Java.|http://josm.openstreetmap.de/|{{Pkg|josm}}}}<br />
* {{App|[[Wikipedia:Marble_(software)|Marble]]|Virtual Globe and World Atlas that can be used to learn more about the Earth. Part of {{Grp|kdeedu}}.|https://marble.kde.org/|KDE: {{Pkg|marble}}, Qt: {{Pkg|marble-qt}}}}<br />
* {{App|Merkaartor|OpenStreetMap editor.|http://merkaartor.be/|{{Pkg|merkaartor}}}}<br />
* {{App|Navit|Modular turn-by-turn car navigation system.|http://www.navit-project.org/|{{Pkg|navit}}}}<br />
* {{App|QLandkarte GT|Use your GPS with Linux.|http://qlandkarte.org/|{{Pkg|qlandkartegt}}}}<br />
* {{App|QMapShack|Plan your next outdoor trip.|https://bitbucket.org/maproom/qmapshack|{{Pkg|qmapshack}}}}<br />
* {{App|QGIS|Geographic Information System (GIS) that supports vector, raster & database formats.|https://qgis.org/|{{Pkg|qgis}}}}<br />
* {{App|Viking|GTK+2 application to manage GPS data.|https://sourceforge.net/projects/viking/|{{Pkg|viking}}}}<br />
<br />
=== Communication systems ===<br />
<br />
* {{App|CupCarbon|A Smart City & IoT Wireless Sensor Network Simulator.|http://cupcarbon.com/}}<br />
* {{App|[[GNU Radio]]|Software development toolkit that provides signal processing blocks to implement software radios.|https://www.gnuradio.org/|{{Pkg|gnuradio}}}}<br />
* {{App|Pothos|The Pothos project is a complete data-flow framework for creating topologies of interconnected processing blocks. |https://github.com/pothosware/PothosCore/wiki|{{AUR|pothos}}, {{AUR|pothos-git}}}}<br />
<br />
=== Simulation modeling ===<br />
<br />
* {{App|[[Wikipedia:Gephi|gephi]]|Gephi is an open-source network analysis and visualization software package written in Java.|http://gephi.org/|{{Pkg|gephi}}}}<br />
* {{App|golly|Golly is an open source, cross-platform application for exploring Conway's Game of Life and many other types of cellular automata.|http://golly.sourceforge.net/|{{AUR|golly}}}}<br />
* {{App|Netlogo|NetLogo is a multi-agent programmable modeling environment.|http://ccl.northwestern.edu/netlogo/|{{AUR|netlogo}}}}</div>TheCloudthttps://wiki.archlinux.org/index.php?title=Archiso&diff=508244Archiso2018-01-22T14:03:37Z<p>TheCloudt: Added archiso-start.service to remove</p>
<hr />
<div>[[Category:Live Arch systems]]<br />
[[Category:Getting and installing Arch]]<br />
[[ar:Archiso]]<br />
[[el:Archiso]]<br />
[[es:Archiso]]<br />
[[fr:Archiso]]<br />
[[it:Archiso]]<br />
[[ja:Archiso]]<br />
[[nl:Archiso]]<br />
[[ru:Archiso]]<br />
[[sk:Archiso]]<br />
[[zh-hans:Archiso]]<br />
{{Related articles start}}<br />
{{Related|Remastering the Install ISO}}<br />
{{Related|Archiso as pxe server}}<br />
{{Related|Archboot}}<br />
{{Related articles end}}<br />
'''Archiso''' is a small set of bash scripts capable of building fully functional Arch Linux live CD/DVD/USB images. It is the same tool used to generate the official images, but since it is a very generic tool, it can be used to generate anything from rescue systems, install disks, to special interest live CD/DVD/USB systems, and who knows what else. Simply put, if it involves Arch on a shiny coaster, it can do it. The heart and soul of Archiso is ''mkarchiso''. All of its options are documented in its usage output, so its direct usage will not be covered here. Instead, this wiki article will act as a guide for rolling your own live media in no time!<br />
<br />
== Setup ==<br />
<br />
{{Note|<br />
* To use Archiso you must be running on a x86_64 platform. [https://projects.archlinux.org/archiso.git/tree/docs/README.build#n67]<br />
* It is recommended to act as root in all the following steps. If not, it is very likely to have problems with false permissions later.}}<br />
Before you begin, [[install]] the {{Pkg|archiso}} or {{AUR|archiso-git}} package.<br />
<br />
Archiso comes with two "profiles": ''releng'' and ''baseline''.<br />
<br />
* If you wish to create a fully customized live version of Arch Linux, pre-installed with all your favorite programs and configurations, use ''releng''.<br />
* If you just want to create the most basic live medium, with no pre-installed packages and a minimalistic configuration, use ''baseline''.<br />
<br />
Now, copy the profile of your choice to a directory (''archlive'' in the example below) where you can make adjustments and build it. Execute the following, replacing {{ic|'''profile'''}} with either {{ic|releng}} or {{ic|baseline}}.<br />
<br />
# cp -r /usr/share/archiso/configs/'''profile'''/* ''archlive''<br />
<br />
* If you are using the {{ic|releng}} profile to make a fully customized image, then you can proceed onto [[#Configure the live medium]].<br />
* If you are using the {{ic|baseline}} profile to create a bare image, then you will not be needing to do any customization and can proceed onto [[#Build the ISO]].<br />
<br />
== Configure the live medium ==<br />
<br />
This section details configuring the image you will be creating, allowing you to define the packages and configurations you want your live image to contain.<br />
<br />
Inside the {{ic|''archlive''}} directory created in [[#Setup]] there are a number of files and directories; we are only concerned with a few of these, mainly: <br />
* {{ic|packages.*}} - this is where you list, line by line, the packages you want to have installed, and<br />
* the {{ic|airootfs}} directory - this directory acts as an overlay and it is where you make all the customizations.<br />
<br />
Generally, every administrative task that you would normally do after a fresh install except for package installation can be scripted into {{ic|''archlive''/airootfs/root/customize_airootfs.sh}}. It has to be written from the perspective of the new environment, so {{ic|/}} in the script means the root of the live-iso which is to be created.<br />
<br />
=== Installing packages ===<br />
<br />
[[Edit]] the lists of packages in {{ic|packages.i686}}, {{ic|packages.x86_64}}, or {{ic|packages.both}} to indicate which packages are to be installed on the live medium. The suffix here indicates which architecture the packages are available.<br />
<br />
{{Note|If you want to use a [[window manager]] in the Live CD then you must add the necessary and correct [[video drivers]], or the WM may freeze on loading.}}<br />
<br />
==== Custom local repository ====<br />
<br />
{{Merge|Pacman tips#Custom local repository|Move the general information (e.g. repo tree) into the main article.}}<br />
<br />
For the purpose of preparing custom packages or packages from [[AUR]]/[[ABS]], you could also [[custom local repository|create a custom local repository]]. If you are looking to support multiple architectures then precautions should be taken to prevent errors from occurring. Each architecture should have its own directory tree:<br />
<br />
{{hc|$ tree ~/customrepo/ {{!}} sed "s/$(uname -m)/<arch>/g"|<br />
/home/archie/customrepo/<br />
└── <arch><br />
├── customrepo.db -> customrepo.db.tar.xz<br />
├── customrepo.db.tar.xz<br />
├── customrepo.files -> customrepo.files.tar.xz<br />
├── customrepo.files.tar.xz<br />
└── personal-website-git-b99cce0-1-<arch>.pkg.tar.xz<br />
<br />
1 directory, 5 files<br />
}}<br />
You can then add your repository by putting the following into {{ic|~/archlive/pacman.conf}}, above the other repository entries (for top priority):<br />
<br />
{{hc|~/archlive/pacman.conf|...<br />
# custom repository<br />
[customrepo]<br />
SigLevel <nowiki>=</nowiki> Optional TrustAlly<br />
Server <nowiki>=</nowiki> file:///home/'''user'''/customrepo/$arch<br />
...}}<br />
<br />
The ''repo-add'' executable checks if the package is appropriate. If this is not the case you will be running into error messages similar to this:<br />
<br />
==> ERROR: '/home/archie/customrepo/<arch>/foo-<arch>.pkg.tar.xz' does not have a valid database archive extension.<br />
<br />
==== Preventing installation of packages belonging to base group ====<br />
<br />
By default, {{ic|/usr/bin/mkarchiso}}, a script which is used by {{ic|~/archlive/build.sh}}, calls one of the {{Pkg|arch-install-scripts}} named {{ic|pacstrap}} without the {{ic|-i}} flag, which causes [[Pacman]] to not wait for user input during the installation process.<br />
<br />
When blacklisting base group packages by adding them to the {{ic|IgnorePkg}} line in {{ic|~/archlive/pacman.conf}}, [[Pacman]] asks if they still should be installed, which means they will when user input is bypassed. To get rid of these packages there are several options:<br />
<br />
* '''Dirty''': Add the {{ic|-i}} flag to each line calling {{ic|pacstrap}} in {{ic|/usr/bin/mkarchiso}}.<br />
<br />
* '''Clean''': Create a copy of {{ic|/usr/bin/mkarchiso}} in which you add the flag and adapt {{ic|~/archlive/build.sh}} so that it calls the modified version of the mkarchiso script.<br />
<br />
* '''Advanced''': Create a function for {{ic|~/archlive/build.sh}} which explicitly removes the packages after the base installation. This would leave you the comfort of not having to type enter so much during the installation process.<br />
<br />
==== Installing packages from multilib ====<br />
<br />
To install packages from the [[multilib]] repository you have to create two pacman configuration files: one for x86_64 and one for i686. Copy {{ic|pacman.conf}} to {{ic|pacmanx86_64.conf}} and {{ic|pacmani686.conf}}. Uncomment the following lines to enable ''multilib'' in {{ic|pacmanx86_64.conf}}:<br />
<br />
{{hc|pacmanx86_64.conf|2=<br />
[multilib]<br />
SigLevel = PackageRequired<br />
Include = /etc/pacman.d/mirrorlist<br />
}}<br />
<br />
Then edit {{ic|build.sh}} with an editor. Replace the following lines:<br />
<br />
{{hc|build.sh|<br />
run_once make_pacman_conf<br />
<br />
# Do all stuff for each airootfs<br />
for arch in i686 x86_64; do<br />
run_once make_basefs<br />
run_once make_packages<br />
done<br />
<br />
run_once make_packages_efi<br />
<br />
for arch in i686 x86_64; do<br />
run_once make_setup_mkinitcpio<br />
run_once make_customize_airootfs<br />
done<br />
}}<br />
<br />
with:<br />
<br />
{{hc|build.sh|<br />
cp -v releng/pacmanx86_64.conf releng/pacman.conf<br />
run_once make_pacman_conf<br />
<br />
# Do all stuff for each airootfs<br />
for arch in x86_64; do<br />
run_once make_basefs<br />
run_once make_packages<br />
run_once make_packages_efi<br />
run_once make_setup_mkinitcpio<br />
run_once make_customize_airootfs<br />
done<br />
<br />
echo make_pacman_conf i686<br />
cp -v releng/pacmani686.conf releng/pacman.conf<br />
cp -v releng/pacmani686.conf ${work_dir}/pacman.conf<br />
<br />
<br />
for arch in i686; do<br />
run_once make_basefs<br />
run_once make_packages<br />
run_once make_packages_efi<br />
run_once make_setup_mkinitcpio<br />
run_once make_customize_airootfs<br />
done<br />
}}<br />
<br />
In this way packages for x86_64 and i686 will be installed with their own pacman configuration file.<br />
<br />
=== Adding files to image ===<br />
<br />
{{Note|You must be root to do this, do not change the ownership of any of the files you copy over, '''everything''' within the airootfs directory must be root owned. Proper ownerships will be sorted out shortly.}}<br />
<br />
The airootfs directory acts as an overlay, think of it as root directory '/' on your current system, so any files you place within this directory will be copied over on boot-up.<br />
<br />
So if you have a set of iptables scripts on your current system you want to be used on you live image, copy them over as such:<br />
# cp -r /etc/iptables ~/archlive/airootfs/etc<br />
<br />
Placing files in the users home directory is a little different. Do not place them within {{ic|airootfs/home}}, but instead create a skel directory within {{ic|airootfs/}} and place them there. We will then add the relevant commands to the {{ic|customize_airootfs.sh}} which we are going to use to copy them over on boot and sort out the permissions.<br />
<br />
First, create the skel directory:<br />
# mkdir ~/archlive/airootfs/etc/skel<br />
<br />
Now copy the 'home' files to the skel directory, e.g for {{ic|.bashrc}}:<br />
# cp ~/.bashrc ~/archlive/airootfs/etc/skel/<br />
<br />
When {{ic|~/archlive/airootfs/root/customize_airootfs.sh}} is executed and a new user is created, the files from the skel directory will automatically be copied over to the new home folder, permissions set right.<br />
<br />
Similarly, some care is required for special configuration files that reside somewhere down the hierarchy. As an example the {{ic|/etc/X11/xinit/xinitrc}} configuration file resides on a path that might be overwritten by installing a package. To place the configuration file one should put the custom {{ic|xinitrc}} in {{ic|~/archlive/airootfs/etc/skel/}} and then modify {{ic|customize_airootfs.sh}} to move it appropriately.<br />
<br />
=== Boot Loader ===<br />
<br />
The default file should work fine, so you should not need to touch it.<br />
<br />
Due to the modular nature of isolinux, you are able to use lots of addons since all *.c32 files are copied and available to you. Take a look at the [http://syslinux.zytor.com/wiki/index.php/SYSLINUX official syslinux site] and the [https://projects.archlinux.org/archiso.git/tree/configs/syslinux-iso/boot-files archiso git repo]. Using said addons, it is possible to make visually attractive and complex menus. See [http://syslinux.zytor.com/wiki/index.php/Comboot/menu.c32 here].<br />
<br />
=== Login manager ===<br />
<br />
Starting X at boot is done by enabling your login manager's [[systemd]] service. If you know which .service file needs a softlink: Great. If not, you can easily find out in case you are using the same program on the system you build your iso on. Just use:<br />
<br />
$ ls -l /etc/systemd/system/display-manager.service<br />
<br />
Now create the same softlink in {{ic|~/archlive/airootfs/etc/systemd/system}}. For LXDM:<br />
<br />
# ln -s /usr/lib/systemd/system/lxdm.service ~/archlive/airootfs/etc/systemd/system/display-manager.service<br />
<br />
This will enable LXDM at system start on your live system.<br />
<br />
Alternatively you can just enable the service in {{ic|airootfs/root/customize_airootfs.sh}} along with other services that are enabled there.<br />
<br />
<br />
If you want the graphical environment to actually start automatically during boot make sure to edit {{ic|airootfs/root/customize_airootfs.sh}} and replace <br />
<br />
systemctl set-default multi-user.target<br />
with<br />
systemctl set-default graphical.target<br />
<br />
=== Changing Automatic Login ===<br />
<br />
The configuration for getty's automatic login is located under {{ic|airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf}}.<br />
<br />
You can modify this file to change the auto login user:<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=-/sbin/agetty --autologin '''isouser''' --noclear %I 38400 linux<br />
<br />
Or remove it altogether to disable auto login.<br />
<br />
== Build the ISO ==<br />
<br />
Now you are ready to turn your files into the .iso which you can then burn to CD or USB:<br />
<br />
First create the {{ic|out/}} directory,<br />
<br />
# mkdir ~/archlive/out/<br />
<br />
then inside {{ic|~/archlive}}, execute:<br />
<br />
# ./build.sh -v<br />
<br />
The script will now download and install the packages you specified to {{ic|work/*/airootfs}}, create the kernel and init images, apply your customizations and finally build the iso into {{ic|out/}}.<br />
<br />
=== Rebuild the ISO ===<br />
<br />
Rebuilding the iso after modifications is not officially supported. However, it is easily possible by applying two steps. First you have to remove lock files in the work directory:<br />
<br />
# rm -v work/build.make_*<br />
<br />
Furthermore it is required to edit the script {{ic|airootfs/root/customize_airootfs.sh}}, and add an {{ic|id}} command in the beginning of the {{ic|useradd}} line as shown here. Otherwise the rebuild stops at this point because the user that is to be added already exists [https://bugs.archlinux.org/task/41865].<br />
<br />
{{Style|typo?}}<br />
<br />
! id arch && useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh arch<br />
<br />
Also remove persistent data such as created users or symlinks such as {{ic|/etc/sudoers}}.<br />
<br />
{{Expansion|Report more data that needs to be removed or reset.}}<br />
<br />
Rebuilds can be sped up slightly by editing the pacstrap script (located at /bin/pacstrap) and changing the following at line 361:<br />
<br />
Before:<br />
<br />
if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then<br />
<br />
After:<br />
<br />
if ! pacman -r "$newroot" -Sy --needed "${pacman_args[@]}"; then<br />
<br />
This increases the speed of the initial bootstrap, since it doesn't have to download and install any of the base packages that are already installed.<br />
<br />
== Using the ISO ==<br />
<br />
See the [[:Category:Getting and installing Arch#Installation methods]] section for various options.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Installation without Internet access ===<br />
<br />
{{Move|Installation without Internet access|seems like this could stand alone}}<br />
<br />
If you wish to install the archiso (e.g. [https://www.archlinux.org/download/ the official monthly release]) as it is without an Internet connection, or, if you do not want to download the packages you want again:<br />
<br />
First, follow the [[Installation guide]], skipping the [[Installation guide#Connect to the Internet]] section, until the [[Installation guide#Install the base packages]] step.<br />
<br />
==== Install the archiso to the new root ====<br />
Instead of installing the packages with {{ic|pacstrap}} (which would try to download from the remote repositories), copy ''everything'' in the live environment to the new root:<br />
# time cp -ax / /mnt<br />
{{Note|The option ({{ic|-x}}) excludes some special directories, as they should not be copied to the new root.}}<br />
Then, copy the kernel image to the new root, in order to keep the integrity of the new system:<br />
# cp -vaT /run/archiso/bootmnt/arch/boot/$(uname -m)/vmlinuz /mnt/boot/vmlinuz-linux<br />
<br />
After that, generate a fstab as described in [[Installation guide#Fstab]].<br />
<br />
==== Chroot and configure the base system ====<br />
Next, chroot into your newly installed system:<br />
# arch-chroot /mnt /bin/bash<br />
<br />
{{Note|Before performing the other [[Installation guide#Configure the system]] steps (e.g. locale, keymap, etc.), it is necessary to get rid of the trace of the Live environment (in other words, the customization of archiso which does not fit a non-Live environment).}}<br />
<br />
===== Restore the configuration of journald =====<br />
[https://projects.archlinux.org/archiso.git/tree/configs/releng/airootfs/root/customize_airootfs.sh#n19 This customization of archiso] will lead to storing the system journal in RAM, it means that the journal will not be available after reboot:<br />
# sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf<br />
<br />
===== Remove special udev rule =====<br />
[https://projects.archlinux.org/archiso.git/tree/configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules This rule of udev] starts the dhcpcd automatically if there are any wired network interfaces.<br />
<br />
# rm /etc/udev/rules.d/81-dhcpcd.rules<br />
<br />
===== Disable and remove the services created by archiso =====<br />
Some service files are created for the Live environment, please disable the services and remove the file as they are unnecessary for the new system:<br />
# systemctl disable pacman-init.service choose-mirror.service<br />
# rm -r /etc/systemd/system/{choose-mirror.service,pacman-init.service,etc-pacman.d-gnupg.mount,getty@tty1.service.d}<br />
# rm /etc/systemd/scripts/choose-mirror<br />
# rm /etc/systemd/system/archiso-start.service<br />
# rm /etc/systemd/system/multi-user.target.wants/archiso-start.service<br />
<br />
===== Remove special scripts of the Live environment =====<br />
There are some scripts installed in the live system by archiso scripts, which are unnecessary for the new system:<br />
# rm /etc/systemd/system/getty@tty1.service.d/autologin.conf<br />
# rm /root/{.automated_script.sh,.zlogin}<br />
# rm /etc/mkinitcpio-archiso.conf<br />
# rm -r /etc/initcpio<br />
<br />
===== Importing archlinux keys =====<br />
<br />
In order to use the official repositories, we need to import the archlinux master keys ([[pacman/Package signing#Initializing the keyring]]). This step is usually done by pacstrap but can be achieved with<br />
<br />
# pacman-key --init<br />
# pacman-key --populate archlinux<br />
<br />
{{Note| Keyboard or mouse activity is needed to generate entropy and speed-up the first step.}}<br />
<br />
===== Configure the system =====<br />
<br />
Now you can follow the skipped steps of the [[Installation guide#Configure the system]] section (setting a locale, timezone, hostname, etc.) and finish the installation by creating an initial ramdisk as described in [[Installation guide#Initramfs]].<br />
<br />
===== Enable graphical login (optional) =====<br />
<br />
If using a display manager like GDM, you may want to change the systemd default target from multi-user.target to one that allows graphical login.<br />
# systemctl disable multi-user.target<br />
# systemctl enable graphical.target<br />
<br />
== See also ==<br />
=== Documentation and tutorials ===<br />
* [https://projects.archlinux.org/archiso.git Archiso project page]<br />
* [https://projects.archlinux.org/archiso.git/tree/docs Official documentation]<br />
<br />
=== Example customization template ===<br />
* [http://easy.open.and.free.fr/didjix/ A live DJ distribution powered by ArchLinux and built with Archiso]</div>TheCloudthttps://wiki.archlinux.org/index.php?title=Netctl&diff=508242Netctl2018-01-22T13:24:09Z<p>TheCloudt: Added possible solution to the problem of timeout during boot of sys-subsystem-net-devices-multi-user.device.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Network configuration]]<br />
[[cs:Netctl]]<br />
[[es:Netctl]]<br />
[[fr:Netctl]]<br />
[[it:Netcfg]]<br />
[[ja:Netctl]]<br />
[[ru:Netctl]]<br />
[[zh-hans:Netctl]]<br />
{{Related articles start}}<br />
{{Related|Bridge with netctl}}<br />
{{Related|Network configuration}}<br />
{{Related|Wireless network configuration}}<br />
{{Related|:Category:Network configuration}}<br />
{{Related articles end}}<br />
[https://projects.archlinux.org/netctl.git/ netctl] is a CLI-based tool used to configure and manage network connections via profiles.<br />
<br />
== Installation ==<br />
<br />
{{Pkg|netctl}} is part of the {{Grp|base}} group, so it should already be installed on your system. Otherwise [[install]] it as usual.<br />
<br />
''netctl's'' [[#Special systemd units]] used in automating connections require some additional dependencies; see that section for more information.<br />
<br />
Other optional dependencies are shown in the table below.<br />
<br />
{| class="wikitable"<br />
! Feature<br />
! Dependency<br />
|-<br />
| WPA || {{Pkg|wpa_supplicant}}<br />
|-<br />
| DHCP || {{Pkg|dhcpcd}} or {{Pkg|dhclient}}<br />
|-<br />
| ''wifi-menu'' || {{Pkg|dialog}}<br />
|-<br />
| PPPoE || {{Pkg|ppp}}<br />
|-<br />
|}<br />
<br />
{{Warning|Do not enable concurrent, conflicting network services. Use {{ic|1=systemctl --type=service}} to ensure that no other network service is running before enabling a ''netctl'' profile/service.}}<br />
<br />
== Configuration ==<br />
<br />
''netctl'' uses profiles to manage network connections and different modes of operation to start profiles automatically or manually on demand. <br />
<br />
The ''netctl'' profile files are stored in {{ic|/etc/netctl/}} and example configuration files are available in {{ic|/etc/netctl/examples/}}. <br />
<br />
To use an example profile, simply [[copy]] it from {{ic|/etc/netctl/examples/}} to {{ic|/etc/netctl/}} and configure it to your needs; see basic [[#Example profiles]] below. The first parameter you need to create a profile is the network {{ic|Interface}}, see [[Network configuration#Network interfaces]] for details.<br />
<br />
{{Tip|<br />
* For wireless settings, you can use {{ic|wifi-menu -o}} as root to generate the profile file in {{ic|/etc/netctl/}}. The {{pkg|dialog}} package is required to use ''wifi-menu''.<br />
* Use {{ic|1=SkipNoCarrier=yes}} in your profile to enable a static IP profile on a wired interface no matter if the cable is connected or not.<br />
}}<br />
<br />
See {{man|5|netctl.profile}} for a complete list of profile options.<br />
<br />
== Usage ==<br />
<br />
See {{man|1|netctl}} for a complete list of ''netctl'' commands.<br />
<br />
=== Starting a profile ===<br />
<br />
Once you have created your profile, attempt to establish a connection, where ''profile'' is only the profile name, not the full path:<br />
<br />
# netctl start ''profile''<br />
<br />
If the above command results in a failure, then use {{ic|journalctl -xn}} and {{ic|netctl status ''profile''}} to obtain a more in-depth explanation of the failure.<br />
<br />
=== Enabling a profile ===<br />
<br />
A profile can be enabled to start at boot by using:<br />
<br />
# netctl enable ''profile''<br />
<br />
This will create and enable a [[systemd]] service that will start when the computer boots. Changes to the profile file will not propagate to the service file automatically. After such changes, it is necessary to reenable the profile:<br />
<br />
# netctl reenable ''profile''<br />
<br />
After enabling a profile, it will be started at next boot. Obviously this can only be successful, if the network cable for a wired connection is plugged in, or the wireless access point used in a profile is in range respectively.<br />
<br />
If you need to switch multiple profiles frequently (i.e., traveling with a laptop), use [[#Special systemd units]] instead of enabling a profile.<br />
<br />
=== Special systemd units ===<br />
<br />
''netctl'' provides special [[systemd]] services for automatically switching of profiles for wired and wireless connections. See {{man|7|netctl.special}} for a complete list of special systemd units.<br />
<br />
==== Wired ====<br />
<br />
[[Install]] the {{Pkg|ifplugd}} package and [[start/enable]] the {{ic|netctl-ifplugd@''interface''.service}} systemd unit. DHCP profiles will be started/stopped when the network cable is plugged in/unplugged.<br />
* The {{ic|netctl-ifplugd@''interface''.service}} will prefer profiles that use [[Wikipedia:DHCP|DHCP]].<br />
* To automatically start a static IP profile the option {{ic|1=ExcludeAuto=no}} needs to be set in it.<br />
* To prioritize a profile with a static IP over DHCP profiles, you can set {{ic|1=Priority=2}}, which is higher than the default priority given to DHCP profiles of {{ic|1=Priority=1}}.<br />
<br />
==== Wireless ====<br />
<br />
[[Install]] the {{Pkg|wpa_actiond}} package and [[start/enable]] {{ic|netctl-auto@''interface''.service}} systemd unit. ''netctl'' profiles will be started/stopped automatically as you move from the range of one network into the range of another network (roaming).<br />
<br />
* Profiles must use {{ic|1=Security=wpa-configsection}} or {{ic|1=Security=wpa}} to work with ''netctl-auto'' rather than {{ic|1=Security=wpa-config}}.<br />
* If you want some wireless profile '''not''' to be started automatically by {{ic|netctl-auto@''interface''.service}}, you have to explicitly add {{ic|1=ExcludeAuto=yes}} to that profile. <br />
* You can use {{ic|1=priority=}} in the ''WPAConfigSection'' (see {{ic|/etc/netctl/examples/wireless-wpa-configsection}}) to set priority of a profile when multiple wireless access points are available. <br />
<br />
Note that ''interface'' is not literal, but to be substituted by the name of your device's interface, e.g. {{ic|netctl-auto@wlp4s0.service}}. See {{ic|netctl.profile(5)}} for details.<br />
<br />
{{Note|<br />
* If any of the profiles contain errors, such as an empty or misquoted {{ic|1=Key=}} variable, the unit will fail to load with the message {{ic|"Failed to read or parse configuration '/run/network/wpa_supplicant_wlan0.conf'}}, even when that profile is not being used.<br />
* If you have previously [[#Enabling a profile|enabled a profile]] through ''netctl'', run {{ic|netctl disable ''profile''}} to prevent the profile from starting twice at boot.<br />
}}<br />
<br />
It is possible to manually control an interface otherwise managed by ''netctl-auto'' without having to stop {{ic|netctl-auto.service}}. This is done using the ''netctl-auto'' command. For a complete list of available actions see {{man|1|netctl-auto}}.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Example profiles ===<br />
<br />
==== Wired ====<br />
<br />
For a DHCP connection, only the {{ic|Interface}} has to be configured after copying the {{ic|/etc/netctl/examples/ethernet-dhcp}} example profile to {{ic|/etc/netctl}}. <br />
<br />
For example:<br />
{{hc|/etc/netctl/''my_dhcp_profile''|<nowiki><br />
Interface=enp1s0<br />
Connection=ethernet<br />
IP=dhcp</nowiki><br />
}}<br />
<br />
For a static IP configuration copy the {{ic|/etc/netctl/examples/ethernet-static}} example profile to {{ic|/etc/netctl}} and modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}) as needed. <br />
<br />
For example:<br />
{{hc|/etc/netctl/''my_static_profile''|<nowiki><br />
Interface=enp1s0<br />
Connection=ethernet<br />
IP=static<br />
Address=('10.1.10.2/24')<br />
Gateway=('10.1.10.1')<br />
DNS=('10.1.10.1')</nowiki><br />
}}<br />
<br />
Take care to include the subnet notation of {{ic|/24}}. It equates to a netmask of {{ic|255.255.255.0}}) and without it the profile will fail to start. See also [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]]. To alias more than one IP address per a NIC set {{ic|Address&#61;('10.1.10.2/24' '192.168.1.2/24')}}.<br />
<br />
==== Wireless (WPA-PSK) ====<br />
<br />
The following applies for the standard wireless connections using a pre-shared key (WPA-PSK).<br />
<br />
{{hc|/etc/netctl/wireless-wpa|2=<br />
Description='A simple WPA encrypted wireless connection using 256-bit PSK'<br />
Interface=wlp2s2<br />
Connection=wireless<br />
Security=wpa<br />
IP=dhcp<br />
ESSID=''your_essid''<br />
Key=\"64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}}<br />
<br />
{{Note|<br />
* Make sure to use the '''special quoting rules''' for the {{ic|Key}} variable as explained at the end of [https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile(5)].<br />
* If the passphrase fails, try removing the {{ic|\"}} in the {{ic|Key}} variable.<br />
* Although "encrypted", the key that you put in the profile configuration is enough to connect to a WPA-PSK network. Therefore this process is only useful for hiding the human-readable version of the passphrase. This will not prevent anyone with read access to this file from connecting to the network.}}<br />
<br />
=== Obfuscate wireless passphrase ===<br />
<br />
You can also follow the following step to obfuscate the wireless passphrase (''wifi-menu'' does it automatically when using the {{ic|-o}} flag): <br />
<br />
Users '''not''' wishing to have the passphrase to their wireless network stored in ''plain text'' have the option of storing the corresponding 256-bit pre-shared key instead, which is calculated from the passphrase and the SSID using standard algorithms.<br />
<br />
Calculate your 256-bit PSK using [[WPA_supplicant#Connecting_with_wpa_passphrase|wpa_passphrase]]:<br />
{{hc|$ wpa_passphrase ''your_essid''|2=<br />
network={<br />
ssid="''your_essid''"<br />
#psk="''passphrase''"<br />
psk=64cf3ced850ecef39197bb7b7b301fc39437a6aa6c6a599d0534b16af578e04a<br />
}<br />
}}<br />
<br />
The ''pre-shared key'' (psk) now needs to replace the plain text passphrase of the {{ic|Key}} variable in the profile.<br />
<br />
=== Using an experimental GUI ===<br />
<br />
If you want a graphical user interface to manage ''netctl'' and your connections and you are not afraid of highly experimental unofficial packages, there are some options available. {{AUR|netctl-gui}} provides a Qt-based graphical interface, DBus daemon and KDE widget. An alternative is {{AUR|netmenu}}, which uses {{Pkg|dmenu}} as its graphical interface.<br />
<br />
=== Bonding ===<br />
<br />
From [https://www.kernel.org/doc/Documentation/networking/bonding.txt kernel documentation]:<br />
<br />
:The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical "bonded" interface. The behavior of the bonded interfaces depends on the mode. Generally speaking, modes provide either hot standby or load balancing services. Additionally, link integrity monitoring may be performed.<br />
<br />
==== Load balancing ====<br />
<br />
To use bonding with netctl, additional package from official repositories is required: {{Pkg|ifenslave}}.<br />
<br />
Copy {{ic|/etc/netctl/examples/bonding}} to {{ic|/etc/netctl/bond0}} and edit it, for example:<br />
<br />
{{hc|/etc/netctl/bond0|2=<br />
Description='Bond Interface'<br />
Interface='bond0'<br />
Connection=bond<br />
BindsToInterfaces=('eth0' 'eth1')<br />
IP=dhcp<br />
IP6=stateless}}<br />
<br />
Now you can disable your old configuration and set ''bond0'' to be started automatically. Switch to the new profile, for example:<br />
<br />
# netctl switch-to bond0<br />
<br />
{{Note|This uses the round-robin policy, which is the default for the {{ic|bonding}} driver. See [https://www.kernel.org/doc/Documentation/networking/bonding.txt official documentation] for details. }}<br />
<br />
Setting the MODE in the netctl configuration is not always successful and it may be necessarly to pass options directly to the bonding module on load as noted [https://bbs.archlinux.org/viewtopic.php?id=203255 here]. This may be needed to use LACP / mode 4.<br />
<br />
{{Tip|To check the status and bonding mode: {{bc|$ cat /proc/net/bonding/bond0}}}}<br />
<br />
==== Wired to wireless failover ====<br />
This example describes how to use ''bonding'' to fallback to wireless when the wired ethernet goes down. This is most useful when both the wired and wireless interface will be connected to the same network. Your wireless router/access point must be configured in ''bridge'' mode.<br />
<br />
You will need additional packages from the official repositories: {{Pkg|ifenslave}} and {{Pkg|wpa_supplicant}}.<br />
<br />
First enable the bonding module to be loaded upon boot time, as instructed on [[Kernel modules#Automatic module handling]]:<br />
<br />
{{hc|/etc/modules-load.d/bonding.conf|2=<br />
bonding<br />
}}<br />
<br />
Then, configure the options of the {{ic|bonding}} driver to use {{ic|active-backup}} and configure the {{ic|primary}} parameter to the device you want to be the active one (normally the wired interface). Also, be sure to use the same device name as returned when running {{ic|ip link}}:<br />
<br />
{{hc|/etc/modprobe.d/bonding.conf|2=<br />
options bonding mode=active-backup miimon=100 primary=eth0 max_bonds=0<br />
}}<br />
<br />
The {{ic|miimon}} option is needed, for the link failure detection. The {{ic|max_bonds}} option avoids the {{ic|Interface bond0 already exists}} error. More information can be obtained on the [https://www.kernel.org/doc/Documentation/networking/bonding.txt kernel documentation].<br />
<br />
Next, configure a netctl profile to enslave the two hardware interfaces. Use the name of all the devices you want to enslave. If you have more than two wired or wireless interfaces, you can enslave all of them on a bond interface. But, for most cases you will have only two devices, a wired and a wireless one:<br />
<br />
{{hc|/etc/netctl/failover|2=<br />
Description='A wired connection with failover to wireless'<br />
Interface='bond0'<br />
Connection=bond<br />
BindsToInterfaces=('eth0' 'wlan0')<br />
IP='dhcp'<br />
}}<br />
<br />
Disable any other profiles (specially a wired or wireless) you had enabled before and then enable the failover profile on startup:<br />
<br />
# netctl enable failover<br />
<br />
Now you need to configure ''wpa_supplicant'' to connect to any known network you wish. You should create a file for each interface and enable it on systemd. Create the following file with this content:<br />
<br />
{{hc|/etc/wpa_supplicant/wpa_supplicant-wlan0.conf|2=<br />
ctrl_interface=/run/wpa_supplicant<br />
update_config=1<br />
}}<br />
<br />
And append to the end of this file any network you want to connect to: <br />
<br />
network={<br />
ssid="SSID"<br />
psk=PSK<br />
}<br />
<br />
To generate the obfuscated PSK you can run ''wpa_passphrase'' as on the [[WPA supplicant#Connecting with wpa_passphrase]] page.<br />
<br />
Now, [[enable]] the {{ic|wpa_supplicant@}} template service on the network interface, for example {{ic|wpa_supplicant@wlan0}}.<br />
<br />
You can try now to reboot your machine and see if your configuration worked.<br />
<br />
{{Note|If you get this error on boot bonding:<br />
<br />
wlan0 is up - this may be due to an out of date ifenslave<br />
<br />
Then this is happening because the ''wpa_supplicant'' is being run before the {{ic|failover}} netctl profile. This happens because [[systemd]] runs everything in parallel, unless told otherwise. ''ifenslave'' need all the interfaces to be down before bonding them to the {{ic|bond0}} interface. And, since the ''wpa_supplicant'' need to put the interface up to be able to scan for networks, this might cause the interface to not be enslaved and your bonding to only have the wired interface.<br />
<br />
If this is your case, then you will need to setup a custom dependency on the {{ic|wpa_supplicant@wlan0}} service in relation with the {{ic|netctl@failover}} profile. More specifically, the ''wpa_supplicant'' must be started '''after''' the netctl profile. To accomplish this, create a custom dependency file based on the instructions provided here: [[systemd#Handling dependencies]]<br />
<br />
{{hc|/etc/systemd/system/wpa_supplicant@wlan0.service.d/customdependency.conf|2=<br />
[Unit]<br />
After=netctl@failover.service<br />
}}<br />
<br />
After that you can try to reboot your system again and see if it works. You can check the status of your bonding by checking [[journalctl]] for the {{ic|netctl@failover.service}} unit.<br />
<br />
And by checking:<br />
<br />
# ip link<br />
<br />
You should see something like this:<br />
<br />
1: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000<br />
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff<br />
2: wlan0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP mode DORMANT group default qlen 1000<br />
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff<br />
3: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default <br />
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff<br />
}}<br />
<br />
Now, you can test your failover setup, by initiating a big download. Unplug your wired interface. Your download should keep going over the wireless interface. Then, plug your wired interface again and it should keep working. You can debug by checking [[journalctl]] for the {{ic|netctl@failover.service}} and {{ic|wpa_supplicant@wlan0.service}} units.<br />
<br />
=== Using any interface ===<br />
In some cases it may be desirable to allow a profile to use any interface on the system. A common example use case is using a common disk image across many machines with differing hardware (this is especially useful if they are headless). If you use the kernel's naming scheme, and your machine has only one ethernet interface, you can probably guess that eth0 is the right interface. If you use udev's [http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ Predictable Network Interface Names], however, names will be assigned based on the specific hardware itself (e.g. enp1s0), rather than simply the order that the hardware was detected (e.g. eth0, eth1). This means that a netctl profile may work on one machine and not another, because they each have different interface names.<br />
<br />
A quick and dirty solution is to make use of the {{ic|/etc/netctl/interfaces/}} directory. Choose a name for your interface alias ({{ic|en-any}} in this example), and write the following to a file with that name (making sure it is executable).<br />
{{hc|/etc/netctl/interfaces/en-any|<nowiki><br />
#!/bin/bash<br />
for interface in /sys/class/net/en*; do<br />
break;<br />
done<br />
Interface=$(basename $interface)<br />
echo "en-any: using interface $Interface";<br />
</nowiki>}}<br />
Then create a profile that uses the interface. Pay special attention to the {{ic|Interface}} directive. The rest are only provided as examples.<br />
{{hc|/etc/netctl/wired|<nowiki><br />
Description='Wired'<br />
Interface=en-any<br />
Connection=ethernet<br />
IP=static<br />
Address=('192.168.1.15/24')<br />
Gateway=('192.168.1.1')<br />
DNS=('192.168.1.1')<br />
</nowiki>}}<br />
<br />
When the {{ic|wired}} profile is started, any machine using the two files above will automatically bring up and configure the first ethernet interface found on the system, regardless of what name udev assigned to it. Note that this is not the most robust way to go about configuring interfaces. If you use multiple interfaces, netctl may try to assign the same interface to them, and will likely cause a disruption in connectivity. If you do not mind a more complicated solution, {{ic|netctl-auto}} is likely to be more reliable.<br />
<br />
=== Using hooks ===<br />
<br />
netctl supports hooks in {{ic|/etc/netctl/hooks/}} and per interface hooks in {{ic|/etc/netctl/interfaces/}}. You can set any option in a hook/interface that you can<br />
in a profile. Most importantly this includes {{ic|ExecUpPost}} and {{ic|ExecDownPre}}. <br />
<br />
When a profile is read, netctl sources '''all executable''' scripts in {{ic|hooks}}, then it reads the profile file for the connection and finally it sources an executable script with the name of the interface used in the profile from the {{ic|interfaces}} directory. Therefore, declarations in an interface script override declarations in the profile, which override declarations in hooks. <br />
<br />
The variables {{ic|$INTERFACE}}, {{ic|$SSID}}, {{ic|$ACTION}} and {{ic|$Profile}} are available in hooks/interfaces '''only''' when using {{ic|netctl-auto}} <br />
<br />
==== Examples ====<br />
<br />
===== Execute commands on established connection =====<br />
{{hc|/etc/netctl/hooks/myservices|<nowiki><br />
#!/bin/sh<br />
ExecUpPost="systemctl start crashplan.service; systemctl start dropbox@<username>.service"<br />
ExecDownPre="systemctl stop crashplan.service; systemctl stop dropbox@<username>.service"<br />
</nowiki>}}<br />
<br />
===== Set default DHCP client =====<br />
<br />
To set or change the DHCP client used for all profiles: <br />
<br />
{{hc|/etc/netctl/hooks/dhcp|<nowiki><br />
#!/bin/sh<br />
DHCPClient='dhclient'<br />
</nowiki>}}<br />
<br />
Alternatively, it may also be specified for a specific network interface by creating an executable file {{ic|/etc/netctl/interfaces/<interface>}} with the following line:<br />
<br />
DHCPClient='dhclient'<br />
<br />
{{Expansion|It would be useful to replace the example with a general hook that executes different actions depending on {{ic|$ACTION}} being CONNECT and DISCONNECT.}}<br />
<br />
=== Minimal WPAConfigSection ===<br />
As stated in the [https://projects.archlinux.org/netctl.git/tree/docs/netctl.profile.5.txt#n281 netctl.profile(5)] man page, the {{ic|WPAConfigSection}} variable is an array of config lines passed to [[wpa_supplicant]]. So, a minimal WPAConfigSection would contain:<br />
Description='A wireless connection using a custom network block configuration'<br />
Interface=wlan0<br />
Connection=wireless<br />
Security=wpa-configsection<br />
IP=dhcp<br />
WPAConfigSection=(<br />
'ssid="University"'<br />
'psk="very secret passphrase"'<br />
)<br />
<br />
{{Note|If trying to connect to an SSID with non-ASCII characters (unicode, emoji, etc), you can specify the SSID as hex instead of as a string, e.g. {{ic|1=ssid=F09F90BA}} for "🐺". When unsure on the hex encoding, run ''wifi-menu'' (be sure to remove the \ and x characters).}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Job for netctl@wlan(...).service failed ===<br />
<br />
{{Warning|This section assumes that there is no other network service running before starting a ''netctl'' profile/service. See [[#Installation]] for details.}}<br />
<br />
Some people have an issue when they connect to a network with ''netctl'', for example:<br />
<br />
{{hc|# netctl start wlan0-ssid|<nowiki><br />
Job for netctl@wlan0\x2ssid.service failed. See 'systemctl status netctl@wlan0\x2ssid.service' and 'journalctl -xn' for details.<br />
</nowiki>}}<br />
<br />
When then looking at {{ic|journalctl -xn}}, either of the following are shown:<br />
<br />
1. If your device ({{ic|wlan0}} in this case) is up:<br />
network[2322]: The interface of network profile 'wlan0-ssid' is already up<br />
<br />
Setting the interface down should resolve the problem:<br />
# ip link set wlan0 down<br />
<br />
Then retry:<br />
# netctl start wlan0-ssid<br />
<br />
2. If the error continues, try again after adding the {{ic|ForceConnect}} option:<br />
<br />
{{hc|/etc/netctl/wlan0-ssid|<nowiki><br />
...<br />
ForceConnect=yes<br />
</nowiki>}}<br />
<br />
Save it and try to connect with the profile:<br />
# netctl start wlan0-ssid<br />
<br />
=== dhcpcd: ipv4_addroute: File exists ===<br />
<br />
On some systems dhcpcd in combination with netctl causes timeout issues on resume, particularly when having switched networks in the meantime. netctl will report that you are successfully connected but you still receive timeout issues. In this case, the old default route still exists and is not being renewed. A workaround to avoid this misbehaviour is to switch to [[#Set default DHCP client|dhclient]] as the default dhcp client. More information on the issue can be found [https://bbs.archlinux.org/viewtopic.php?pid=1399842#p1399842 here].<br />
<br />
=== DHCP timeout issues ===<br />
<br />
If you are having timeout issues when requesting leases via DHCP you can set the timeout value higher than netctl's 30 seconds by default. Create a file in {{ic|/etc/netctl/hooks/}} or {{ic|/etc/netctl/interfaces/}}, add {{ic|1=TimeoutDHCP=40}} to it for a timeout of 40 seconds and make the file executable.<br />
<br />
=== Connection timeout issues ===<br />
<br />
If you are having timeout issues that are unrelated to DHCP (on a static ethernet connection for example), and are experiencing errors similar to the following when starting your profile:<br />
{{hc|# journalctl _SYSTEMD_UNIT&#61;netctl@''profile''.service|<br />
Starting network profile &#39;''profile''&#39;...<br />
No connection found on interface 'eth0' (timeout)<br />
Failed to bring the network up for profile &#39;''profile''&#39;<br />
}}<br />
Then you should increase carrier and up timeouts by adding {{ic|1=TimeoutUp=}} and {{ic|1=TimeoutCarrier=}} to your profile file:<br />
{{hc|/etc/netctl/''profile''|<nowiki><br />
...<br />
TimeoutUp=300<br />
TimeoutCarrier=300</nowiki><br />
}}<br />
Do not forget to reenable your profile:<br />
<br />
# netctl reenable ''profile''<br />
<br />
=== Problems with netctl-auto on resume ===<br />
Sometimes ''netctl-auto'' fails to reconnect when the system resumes from suspend, hibernate or hybrid-sleep. An easy solution is to restart the service for ''netctl-auto''. <br />
This can be automated with an additional service like the following ({{Aur|netctl-auto-resume}}):<br />
<br />
{{hc|/etc/systemd/system/netctl-auto-resume@.service|<nowiki><br />
[Unit]<br />
Description=restart netctl-auto on resume.<br />
Requisite=netctl-auto@%i.service<br />
After=sleep.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/systemctl restart netctl-auto@%i.service<br />
<br />
[Install]<br />
WantedBy=sleep.target<br />
</nowiki>}}<br />
<br />
To [[enable]] this service for your wireless card, for example, enable {{ic|netctl-auto-resume@wlan0.service}} as root. Change {{ic|wlan0}} to the required network interface.<br />
<br />
If the device is not yet running on resume when the unit is started, this will fail. It can be fixed by adding the following dependency in the ''After'' line:<br />
<br />
{{hc|/etc/systemd/system/netctl-auto-resume@.service|<nowiki><br />
...<br />
After=sleep.target sys-subsystem-net-devices-%i.device<br />
...<br />
</nowiki>}}<br />
<br />
=== netctl-auto does not automatically unblock a wireless card to use an interface ===<br />
<br />
Many laptops have a hardware button (or switch) to turn off wireless card, however, the card can also be blocked by the kernel. This can be handled by [[rfkill]].<br />
<br />
If you want ''netctl-auto'' to automatically unblock your wireless card to connect to a particular network, set {{ic|1=RFKill=++auto++}} option for the wireless connection of your choice, as specified in the [https://github.com/joukewitteveen/netctl/blob/master/docs/netctl.profile.5.txt netctl.profile(5)] man page.<br />
<br />
=== RTNETLINK answers: File exists (with multiple NICs) ===<br />
<br />
This is a very misleading response, it really means that you have assigned a default gateway in an earlier netctl control file. When netctl starts up the n-th NIC and goes to set its local route, it fails because there is already a default route from n-1.<br />
<br />
Remove it and everything works, except you no longer have a default route and so cannot access things such as the internet. {{ic|ExecUpPost}} does not work as it gets executed for each network card.<br />
<br />
A possible solution is creating a new service. Replace "FIRST_INTERFACE" and "SECOND_INTERFACE" with your interface names, and replace "192.168.xxx.yyy" with your default gateway.<br />
<br />
{{hc|/etc/systemd/system/defaultrouter.service|<nowiki><br />
[Unit]<br />
Description="Configure default gateway"<br />
Requires=netctl@FIRST_INTERFACE.service netctl@SECOND_INTERFACE.service<br />
After=netctl@FIRST_INTERFACE.service netctl@SECOND_INTERFACE.service<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/ip route add default via 192.168.xxx.yyy<br />
<br />
[Install]<br />
WantedBy=network-online.target<br />
</nowiki>}}<br />
<br />
=== Problems with eduroam and other MSCHAPv2 connections ===<br />
<br />
See [[WPA supplicant#Problems with eduroam and other MSCHAPv2 connections]].<br />
<br />
=== sys-subsystem-net-devices-multi-user.device timeour during boot ===<br />
Probably this problem is caused by multiple network services being enabled. To view all enabled services:<br />
<br />
# systemctl list-unit-files --state enabled<br />
<br />
Then disable all network services. Use {{ic|systemctl disable}} to disable one individual service. Then enable the one you want using {{ic|systemctl enable}}.<br />
<br />
== See also ==<br />
<br />
* [https://lists.archlinux.org/pipermail/arch-projects/2012-December/003473.html Initial mailing list announcement]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=157670 Official announcement thread]<br />
* [https://www.archlinux.org/news/netctl-is-now-in-core/ Official news announcement]</div>TheCloudthttps://wiki.archlinux.org/index.php?title=RTorrent&diff=470360RTorrent2017-03-10T19:57:33Z<p>TheCloudt: Added -m and -o flags since current version of magnet2torrent requires that.</p>
<hr />
<div>{{DISPLAYTITLE:rTorrent}}<br />
[[Category:Internet applications]]<br />
[[es:RTorrent]]<br />
[[ja:RTorrent]]<br />
[[ru:RTorrent]]<br />
[[zh-hans:RTorrent]]<br />
[https://rakshasa.github.io/rtorrent/ rTorrent] is a quick and efficient BitTorrent client that uses, and is in development alongside, the libTorrent (not to be confused with {{Pkg|libtorrent-rasterbar}}) library. It is written in C++ and uses the [[Wikipedia:ncurses|ncurses]] programming library, which means it uses a text user interface. When combined with a terminal multiplexer (e.g. [[GNU Screen]] or [[Tmux]]) and [[Secure Shell]], it becomes a convenient remote [[Wikipedia:BitTorrent (protocol)#Operation|BitTorrent client]].<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|rtorrent}} package that is available in the [[official repositories]].<br />
<br />
=== Unofficial packages ===<br />
<br />
* {{AUR|rtorrent-git}} - Git [https://github.com/rakshasa/rtorrent master branch] package<br />
<br />
* {{AUR|rtorrent-ps}} - Release package with [https://github.com/pyroscope/rtorrent-ps rtorrent-ps patchset]<br />
<br />
* {{AUR|rtorrent-pyro-git}} - Git [https://github.com/rakshasa/rtorrent/tree/feature-bind feature-bind branch] package with [https://github.com/pyroscope/rtorrent-ps rtorrent-ps patchset]<br />
<br />
* {{AUR|rtorrent-vi-color}} - Release package with vi-like key bindings<br />
<br />
== Configuration ==<br />
<br />
{{Note|<br />
* See the rTorrent wiki article on this subject for more information: [https://github.com/rakshasa/rtorrent/wiki/Common-Tasks-in-rTorrent Common Tasks in rTorrent for Dummies].<br />
* Vim may mistake the syntax of the config file, causing errors in the highlighting. To resolve this you can [[append]] a modeline {{ic|1=# vim: set syntax=conf:}} to {{ic|~/.rtorrent.rc}}.}}<br />
<br />
Before running rTorrent, find the example configuration file {{ic|/usr/share/doc/rtorrent/rtorrent.rc}} and copy it to {{ic|~/.rtorrent.rc}}:<br />
<br />
$ cp /usr/share/doc/rtorrent/rtorrent.rc ~/.rtorrent.rc<br />
<br />
=== Performance ===<br />
<br />
{{Note|See the rTorrent wiki article on this subject for more information: [https://github.com/rakshasa/rtorrent/wiki/Performance-Tuning Performance Tuning]}}<br />
<br />
The values for the following options are dependent on the system's hardware and Internet connection speed. To find the optimal values read: [http://torrentfreak.com/optimize-your-BitTorrent-download-speed Optimize Your BitTorrent Download Speed]<br />
{{bc|<nowiki><br />
min_peers = 40<br />
max_peers = 52<br />
<br />
min_peers_seed = 10<br />
max_peers_seed = 52<br />
<br />
max_uploads = 8<br />
<br />
download_rate = 200<br />
upload_rate = 28<br />
</nowiki>}}<br />
<br />
The {{ic|check_hash}} option executes a hash check when rTorrent is started. It checks for errors in your completed files. <br />
check_hash = yes<br />
<br />
=== Create and manage files ===<br />
<br />
The {{ic|directory}} option will determine where your torrent data will be saved (could be a relative path):<br />
directory = ~/downloaded<br />
<br />
The {{ic|session}} option allows rTorrent to save the progess of your torrents. It is recommended to create a directory in home directory (e.g. {{ic|mkdir ~/.rtorrent.session}}).<br />
session = ~/.rtorrent.session<br />
<br />
The {{ic|schedule}} option has rTorrent watch a particular directory for new torrent files. Saving a torrent file to this directory will automatically start the download. Remember to create the directory that will be watched (e.g. {{ic|mkdir ~/watch}}). Also, be careful when using this option as rTorrent will move the torrent file to your session folder and rename it to its hash value.<br />
schedule = watch_directory,5,5,load_start=/home/''user''/watch/*.torrent<br />
schedule = untied_directory,5,5,stop_untied=<br />
schedule = tied_directory,5,5,start_tied=<br />
<br />
The following {{ic|schedule}} option is intended to stop rTorrent from downloading data when disk space is low.<br />
schedule = low_diskspace,5,60,close_low_diskspace=100M<br />
<br />
=== Port configuration ===<br />
<br />
The {{ic|port_range}} option sets which port(s) to use for listening. It is recommended to use a port that is higher than 49152 (see: [[Wikipedia:List of TCP and UDP port numbers|List of port numbers]]). Although, rTorrent allows a range of ports, a single port is recommended.<br />
port_range = 49164-49164<br />
<br />
Additionally, make sure port forwarding is enabled for the proper port(s) (see: [http://portforward.com/english/routers/port_forwarding/routerindex.htm Port Forward guides]).<br />
<br />
=== Additional settings ===<br />
<br />
The {{ic|encryption}} option enables or disables encryption. It is very important to enable this option, not only for yourself, but also for your peers in the torrent swarm. Some users need to obscure their bandwidth usage from their ISP. And it does not hurt to enable it even if you do not need the added security.<br />
encryption = allow_incoming,try_outgoing,enable_retry<br />
It is also possible to force all connections to use encryption. However, be aware that this stricter rule will reduce your client's availability:<br />
encryption = require,require_RC4,allow_incoming,try_outgoing<br />
<br />
See also [[Wikipedia:BitTorrent Protocol Encryption]].<br />
<br />
This final {{ic|dht}} option enables [[Wikipedia:Distributed hash table|DHT]] support. DHT is common among public trackers and will allow the client to acquire more peers.<br />
{{bc|<nowiki><br />
dht = auto<br />
dht_port = 6881<br />
peer_exchange = yes<br />
</nowiki>}}<br />
<br />
== Key bindings ==<br />
<br />
rTorrent relies exclusively on keyboard shortcuts for user input. A quick reference is available in the table below. A complete guide is available on the rTorrent wiki (see: [https://github.com/rakshasa/rtorrent/wiki/User-Guide rTorrent User Guide]).<br />
<br />
{{Note|Striking {{ic|Ctrl-q}} twice in quick succession will make rTorrent shutdown without waiting to send a stop announce to the connected trackers.}}<br />
<br />
{| class="wikitable"<br />
|-<br />
!width="75" |Cmd<br />
!Action<br />
|-<br />
|Ctrl-q<br />
|Quit application<br />
|-<br />
|Ctrl-s<br />
|Start download. Runs hash first unless already done.<br />
|-<br />
|Ctrl-d<br />
|Stop an active download or remove a stopped download<br />
|-<br />
|Ctrl-k<br />
|Stop and close the files of an active download.<br />
|-<br />
|Ctrl-r<br />
|Initiate hash check of torrent. Starts downloading if file is not available.<br />
|-<br />
|Ctrl-o<br />
|Specify the download directory for a added, but not started torrent.<br />
|-<br />
|Left<br />
|Returns to the previous screen<br />
|-<br />
|Right<br />
|Goes to the next screen<br />
|-<br />
|Backspace<br />
|Adds and starts the specified *.torrent<br />
|-<br />
|Return<br />
|Adds and doesn't start the specified *.torrent<br />
|-<br />
|<nowiki>a|s|d</nowiki><br />
|<nowiki>Increase global upload throttle about 1|5|50 KB/s</nowiki><br />
|-<br />
|<nowiki>A|S|D</nowiki><br />
|<nowiki>Increase global download throttle about 1|5|50 KB/s</nowiki><br />
|-<br />
|<nowiki>z|x|c</nowiki><br />
|<nowiki>Decrease global upload throttle about 1|5|50 KB/s</nowiki><br />
|-<br />
|<nowiki>Z|X|C</nowiki><br />
|<nowiki>Decrease global download throttle about 1|5|50 KB/s</nowiki><br />
|}<br />
<br />
=== Redundant mapping ===<br />
<br />
{{ic|Ctrl-s}} is often used for terminal control to stop screen output while {{ic|Ctrl-q}} is used to start it. These mappings may interfere with rTorrent. Check to see if these terminal options are bound to a mapping:<br />
{{hc|$ stty -a|<nowiki>...<br />
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;<br />
...<br />
</nowiki>}}<br />
<br />
To remove the mappings, change the terminal characteristics to undefine the aforementioned special characters (i.e. {{ic|stop}} and {{ic|start}}):<br />
# stty stop undef<br />
# stty start undef<br />
<br />
To remove these mappings automatically at startup you may add the two preceding commands to your {{ic|~/.bashrc}} file.<br />
<br />
== Additional tips ==<br />
<br />
=== Systemd services using tmux or screen ===<br />
<br />
Usage of the following services depends on type of service unit.<br />
<br />
'''For system services''' (in /etc/systemd/system/):<br />
<br />
To start at boot time:<br />
# systemctl enable rtorrent<br />
Start manually:<br />
# systemctl start rtorrent<br />
Stop:<br />
# systemctl stop rtorrent<br />
<br />
Make sure 'rtorrent' user is created with the appropriate home directory with your rtorrent.rc placed in.<br />
<br />
'''For user services''' (in /etc/systemd/user/):<br />
$ systemctl --user enable rtorrent<br />
Start manually:<br />
$ systemctl --user start rtorrent<br />
Stop:<br />
$ systemctl --user stop rtorrent<br />
<br />
==== With screen ====<br />
*As system service unit<br />
<br />
{{hc|/etc/systemd/system/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rTorrent<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
KillMode=none<br />
User=rtorrent<br />
ExecStartPre=/usr/bin/bash -c "if test -e %h/.rtorrent_session/rtorrent.lock && test -z `pidof rtorrent`; then rm -f %h/.rtorrent_session/rtorrent.lock; fi"<br />
ExecStart=/usr/bin/screen -dmfa -S rtorrent /usr/bin/rtorrent<br />
ExecStop=/usr/bin/bash -c "test `pidof rtorrent` && killall -w -s 2 /usr/bin/rtorrent"<br />
WorkingDirectory=%h<br />
Restart=on-failure<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
*As user service unit<br />
<br />
{{hc|/etc/systemd/user/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rTorrent<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
KillMode=none<br />
ExecStart=/usr/bin/screen -dmfa -S rtorrent /usr/bin/rtorrent<br />
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent<br />
WorkingDirectory=%h<br />
<br />
[Install]<br />
WantedBy=default.target<br />
</nowiki>}}<br />
<br />
Attach to rtorrent's session:<br />
screen -D -r rtorrent<br />
<br />
Detach:<br />
Ctrl-a d<br />
<br />
==== with tmux ====<br />
*With independent tmux server (restart rtorrent if crashed)<br />
{{hc|~/.config/systemd/user/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rtorrent<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStartPre=/usr/bin/bash -c "if test -e ~/.session/rtorrent.lock && test -z `pidof rtorrent`; then rm -f ~/.session/rtorrent.lock; fi"<br />
ExecStart=/usr/bin/tmux -L rt new-session -s rt -n rtorrent -d rtorrent <br />
ExecStop=/usr/bin/bash -c "/usr/bin/tmux -L rt send-keys -t rt:rtorrent.0 C-q; while pidof rtorrent > /dev/null; do echo stopping rtorrent...; sleep 1; done"<br />
Restart=on-failure<br />
<br />
[Install]<br />
WantedBy=default.target<br />
</nowiki>}}<br />
<br />
*With tmux running as user rtorrent (restart rtorrent if crashed)<br />
{{hc|/etc/systemd/system/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rTorrent Daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
KillMode=none<br />
User=rtorrent<br />
ExecStart=/usr/bin/tmux new-session -c /mnt/storage/rtorrent -s rtorrent -n rtorrent -d rtorrent<br />
ExecStop=/usr/bin/bash -c "/usr/bin/tmux send-keys -t rtorrent C-q && while pidof rtorrent > /dev/null; do sleep 0.5; done"<br />
WorkingDirectory=%h<br />
Restart=on-failure<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Attach to rtorrent's session:<br />
tmux -L rt attach -t rt<br />
tmux attach -t rt<br />
<br />
Detach:<br />
Ctrl-b d<br />
<br />
=== systemd service file with dtach ===<br />
<br />
{{Style|Creating multiple rtorrent sessions this way is far from perfect, why don't we just assume for simplicity that there is only one session? This is assumed in [[#systemd service file with tmux or screen]] anyway.}}<br />
<br />
When running dtach from systemd unit, the {{ic|TERM}} environment variable [[systemd/User#Environment_variables|has to be set explicitly]] for rtorrent to work.<br />
<br />
This service file has no restart because the author occasionally takes the drive in question offline, and rtorrent fails, shall we say, "suboptimally" when started in this scenario and loses many torrent specific settings such as the specific directories each torrent is stored in. In fact the symlinks that kick off rtorrent live on the relevant drive; if it is unmounted rtorrent cannot start. This use case of blocking rtorrent from starting is relevant to users who put the downloaded files on removable media such as NAS, USB or eSATA drives.<br />
<br />
{{hc|~/.config/systemd/user/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rTorrent<br />
#After=network.target<br />
<br />
[Service]<br />
# set TERM according to your terminal<br />
Environment="TERM=xterm"<br />
#Environment="TERM=linux" <br />
Type=forking<br />
KillMode=none<br />
ExecStart=-/usr/bin/dtach -n /home/sam/run/dtach_fifos/fifo -e "^T" /home/sam/bin/rtr_new -n -o import=/home/sam/.config/rtorrent/new_.rc <br />
# dtach -n <separate filename for each instance><br />
# <br />
# rtr_new -n to ignore the default .rtorrent.rc<br />
# rtr_new -o import to load the instance-specific rc<br />
ExecStop=-/usr/bin/killall -u sam -e -w -s INT /home/sam/bin/rtr_new<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Note some other issues exposed in this service file other than just dtach:<br />
<br />
{{ic|/home/sam/bin/rtr_new}} is a symlink to {{ic|/usr/bin/rtorrent}}<br />
<br />
This lets us run several instances and kill each one independently with a different version of the ExecStop, to wit:<br />
<br />
{{bc|1=ExecStop=-/usr/bin/killall -u sam -e -w -s INT /home/sam/bin/rtr_new<br />
ExecStop=-/usr/bin/killall -u sam -e -w -s INT /home/sam/bin/rtr_academic<br />
ExecStop=-/usr/bin/killall -u sam -e -w -s INT /home/sam/bin/rtr_other_stuff}}<br />
<br />
These are each in a different service file, each of which controls one instance.<br />
<br />
Without this step, when running multiple instances a killall solution would kill all the running rtorrent instances. <br />
<br />
If multiple rtorrent instances are not needed and the rtorrent rc file is in the default location the above service file may be simplified. The entire file is included but only the ExecStart and <br />
ExecStop lines change. <br />
<br />
{{hc|~/.config/systemd/user/rtorrent.service|<nowiki><br />
[Unit]<br />
Description=rTorrent<br />
#After=network.target<br />
<br />
[Service]<br />
# set TERM according to your terminal<br />
Environment="TERM=xterm"<br />
#Environment="TERM=linux" <br />
Type=forking<br />
KillMode=none<br />
ExecStart=-/usr/bin/dtach -n /home/sam/run/dtach_fifos/fifo -e "^T" /usr/bin/rtorrent <br />
# dtach -n <user specified FIFO name> -e <user specified character> /usr/bin/rtorrent <br />
ExecStop=/usr/bin/killall -w -s INT /usr/bin/rtorrent<br />
# -e (exact match) and -u (user name) were added above to stop specific processes<br />
# and may be omitted here because only one rtorrent will be running<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
The service can be controlled with [[systemctl --user]]. When it is started, you can attach to the session:<br />
<br />
$ dtach -a /home/sam/run/dtach_fifos/fifo -e "^T"<br />
<br />
=== Pre-allocation ===<br />
<br />
The rTorrent package in the community repository lacks pre-allocation. Compiling rTorrent with pre-allocation allows files to be allocated before downloading the torrent. The major benefit is that it limits and avoids fragmentation of the filesystem. However, this introduces a delay during the pre-allocation if the filesystem does not support the fallocate syscall natively.<br />
<br />
Therefore this switch is recommended for xfs, ext4 and btrfs filesystems, which have native fallocate syscall support. They will see no delay during preallocation and no fragmented filesystem. Pre-allocation on others filesystems will cause a delay but will not fragment the files.<br />
<br />
To make pre-allocation available, recompile libTorrent from the [[ABS]] tree with the following new switch:<br />
$ ./configure --prefix=/usr --disable-debug --with-posix-fallocate<br />
<br />
To enable it, add the following to your {{ic|~/rtorrent.rc}}:<br />
{{hc|~/rtorrent.rc|<nowiki><br />
# Preallocate files; reduces defragmentation on filesystems.<br />
system.file_allocate.set = yes<br />
</nowiki>}}<br />
<br />
=== Manage completed files ===<br />
<br />
{{Note|<br />
*Currently, this part requires either the git version of rtorrent/libtorrent or having applied the patch to 0.8.6 that adds 'equal'.<br />
* If you are having trouble with this tip, it is probably easier to follow [http://web.archive.org/web/20140213003955/http://libtorrent.rakshasa.no/wiki/RTorrentCommonTasks#Movecompletedtorrentstodifferentdirectorydependingonwatchdirectory this].<br />
}}<br />
<br />
It is possible to have rtorrent sort completed torrent data to specific folders based on which 'watch' folder you drop the *.torrent into while continuing to seed. Many examples show how to do this with torrents downloaded by rtorrent. The problem is when you try to drop in 100% done torrent data and then have rtorrent check the data and resume, it will not be sorted.<br />
<br />
As a solution, use the following example in your {{ic|~/.rtorrent.rc}}.<br />
Make sure to change the paths.<br />
<br />
{{bc|1=<br />
# location where new torrent data is placed, and where you should place your<br />
# 'complete' data before you place your *.torrent file into the watch folder<br />
directory = /home/user/torrents/incomplete<br />
<br />
# schedule a timer event named 'watch_directory_1':<br />
# 1) triggers 10 seconds after rtorrent starts<br />
# 2) triggers at 10 second intervals thereafter<br />
# 3) Upon trigger, attempt to load (and start) new *.torrent files found in /home/user/torrents/watch/<br />
# 4) set a variable named 'custom1' with the value "/home/user/torrents/complete"<br />
# NOTE: if you do not want it to automatically start the torrent, change 'load_start' to 'load'<br />
schedule = watch_directory_1,10,10,"load_start=/home/user/torrents/watch/*.torrent,d.set_custom1=/home/user/torrents/complete"<br />
<br />
# insert a method with the alias 'checkdirs1'<br />
# 1) returns true if the current path of the torrent data is not equal to the value of custom1<br />
# 2) otherwise, returns false<br />
system.method.insert=checkdirs1,simple,"not=\"$equal={d.get_custom1=,d.get_base_path=}\""<br />
<br />
# insert a method with the alias 'movecheck1'<br />
# 1) returns true if all 3 commands return true ('result of checkdirs1' && 'torrent is 100% done', 'custom1 variable is set')<br />
# 2) otherwise, returns false<br />
system.method.insert=movecheck1,simple,"and={checkdirs1=,d.get_complete=,d.get_custom1=}"<br />
<br />
# insert a method with the alias 'movedir1'<br />
# (a series of commands, separated by ';') <br />
# 1) "set path of torrent to equal the value of custom1";<br />
# 2) "mv -u <current data path> <custom1 path>";<br />
# 3) "clear custom1", "stop the torrent","resume the torrent"<br />
# 4) stop the torrent<br />
# 5) start the torrent (to get the torrent to update the 'base path')<br />
system.method.insert=movedir1,simple,"d.set_directory=$d.get_custom1=;execute=mv,-u,$d.get_base_path=,$d.get_custom1=;d.set_custom1=;d.stop=;d.start="<br />
<br />
# set a key with the name 'move_hashed1' that is triggered by the hash_done event.<br />
# 1) When hashing of a torrent completes, this custom key will be triggered.<br />
# 2) when triggered, execute the 'movecheck1' method and check the return value.<br />
# 3) if the 'movecheck' method returns 'true', execute the 'movedir1' method we inserted above.<br />
# NOTE-0: *Only* data that has had their hash checked manually with ^R [^R = Control r].<br />
# Or on a rtorrent restart[which initiates a hash check]. Will the data move; ~/torrents/incomplete => ~/torrents/complete for example.<br />
# NOTE-1: 'branch' is an 'if' conditional statement: if(movecheck1){movedir1}<br />
system.method.set_key=event.download.hash_done,move_hashed1,"branch={$movecheck1=,movedir1=}"<br />
}}<br />
<br />
You can add additional watch folders and rules should you like to sort your torrents into special folders.<br />
<br />
For example, if you would like the torrents to download in:<br />
/home/user/torrents/incomplete<br />
and then sort the torrent data based on which folder you dropped the *.torrent into:<br />
/home/user/torrents/watch => /home/user/torrents/complete<br />
/home/user/torrents/watch/iso => /home/user/torrents/complete/iso<br />
/home/user/torrents/watch/music => /home/user/torrents/complete/music<br />
<br />
You can have the following in your .rtorrent.rc:<br />
{{bc|1=<br />
directory = /home/user/torrents/incomplete<br />
schedule = watch_directory_1,10,10,"load_start=/home/user/torrents/watch/*.torrent,d.set_custom1=/home/user/torrents/complete"<br />
<br />
schedule = watch_directory_2,10,10,"load_start=/home/user/torrents/watch/iso/*.torrent,d.set_custom1=/home/user/torrents/complete/iso"<br />
<br />
schedule = watch_directory_3,10,10,"load_start=/home/user/torrents/watch/music/*.torrent,d.set_custom1=/home/user/torrents/complete/music"<br />
<br />
system.method.insert=checkdirs1,simple,"not=\"$equal={d.get_custom1=,d.get_base_path=}\""<br />
system.method.insert=movecheck1,simple,"and={checkdirs1=,d.get_complete=,d.get_custom1=}"<br />
system.method.insert=movedir1,simple,"d.set_directory=$d.get_custom1=;execute=mv,-u,$d.get_base_path=,$d.get_custom1=;d.set_custom1=;d.stop=;d.start="<br />
system.method.set_key=event.download.hash_done,move_hashed1,"branch={$movecheck1=,movedir1=}"<br />
}}<br />
<br />
Also see [http://code.google.com/p/pyroscope/ pyroscope] especially the rtcontrol examples. There is an AUR package.<br />
<br />
==== Notification with Google Mail ====<br />
<br />
Cell phone providers allow you to "email" your phone:<br />
{{bc|<nowiki><br />
Verizon: 10digitphonenumber@vtext.com<br />
AT&T: 10digitphonenumber@txt.att.net<br />
Former AT&T customers: 10digitphonenumber@mmode.com<br />
Sprint: 10digitphonenumber@messaging.sprintpcs.com<br />
T-Mobile: 10digitphonenumber@tmomail.net<br />
Nextel: 10digitphonenumber@messaging.nextel.com<br />
Cingular: 10digitphonenumber@cingularme.com<br />
Virgin Mobile: 10digitphonenumber@vmobl.com<br />
Alltel: 10digitphonenumber@alltelmessage.com OR<br />
10digitphonenumber@message.alltel.com<br />
CellularOne: 10digitphonenumber@mobile.celloneusa.com<br />
Omnipoint: 10digitphonenumber@omnipointpcs.com<br />
Qwest: 10digitphonenumber@qwestmp.com<br />
Telus: 10digitphonenumber@msg.telus.com<br />
Rogers Wireless: 10digitphonenumber@pcs.rogers.com<br />
Fido: 10digitphonenumber@fido.ca<br />
Bell Mobility: 10digitphonenumber@txt.bell.ca<br />
Koodo Mobile: 10digitphonenumber@msg.koodomobile.com<br />
MTS: 10digitphonenumber@text.mtsmobility.com<br />
President's Choice: 10digitphonenumber@txt.bell.ca<br />
Sasktel: 10digitphonenumber@sms.sasktel.com<br />
Solo: 10digitphonenumber@txt.bell.ca<br />
</nowiki>}}<br />
<br />
*Install mailx which is provided by the {{Pkg|s-nail}} package that is found in the [[official repositories]].<br />
<br />
*Clear the {{ic|/etc/mail.rc}} file and enter:<br />
<br />
{{bc|<nowiki><br />
set sendmail="/usr/bin/mailx"<br />
set smtp=smtp.gmail.com:587<br />
set smtp-use-starttls<br />
set ssl-verify=ignore<br />
set ssl-auth=login<br />
set smtp-auth-user=USERNAME@gmail.com<br />
set smtp-auth-password=PASSWORD<br />
</nowiki>}}<br />
<br />
Now to send the text, we must pipe a message to the mailx program.<br />
*Make a Bash script:<br />
{{hc|/path/to/mail.sh|<nowiki><br />
echo "$@: Done" | mailx 5551234567@vtext.com<br />
</nowiki>}}<br />
Where the $@ is a variable holding all the arguments passed to our script.<br />
<br />
*And finally, add the important {{ic|~/.rtorrent.rc}} line:<br />
system.method.set_key = event.download.finished,notify_me,"execute=/path/to/mail.sh,$d.get_name="<br />
<br />
Breaking it down:<br />
<br />
{{ic|notify_me}} is the command id, which may be used by other commands, it can be just about anything you like, so long as it is unique.<br />
<br />
{{ic|1=execute=}} is the rtorrent command, in this case to execute a shell command.<br />
<br />
{{ic|/path/to/mail.sh}} is the name of our script (or whatever command you want to execute) followed by a comma separated list of all the switches/arguments to be passed.<br />
<br />
{{ic|1=$d.get_name=}} 'd' is an alias to whatever download triggered the command, get_name is a function which returns the name of our download, and the '$' tells rTorrent to replace the command with its output before it calls execute.<br />
<br />
The end result? When that torrent, 'All Live Nudibranches', that we started before leaving for work finishes, we will be texted:<br />
All Live Nudibranches: Done<br />
<br />
=== UI Tricks ===<br />
<br />
rTorrent does not list the active tab properly by default, add this line to your {{ic|.rtorrent.rc}} to show only active torrents<br />
schedule = filter_active,30,30,"view_filter = active,\"or={d.get_up_rate=,d.get_down_rate=}\""<br />
<br />
Then press {{ic|9}} in your rTorrent client to see the changes in action.<br />
<br />
To sort the seeding view by the upload rate and only show torrents with peers:<br />
<br />
# Sort the seeding view by the upload rate and only show torrents with peers<br />
view.sort_current = seeding,greater=d.get_up_rate=<br />
view.filter = seeding,"and=d.get_complete=,d.get_peers_connected="<br />
view.sort_new = seeding,less=d.get_up_rate=<br />
view.sort = seeding<br />
<br />
To sort the complete view by the upload rate:<br />
<br />
# Sort the complete view by the upload rate<br />
view.sort_current = complete,greater=d.get_up_rate=<br />
view.filter = seeding,"and=d.get_complete="<br />
view.sort_new = seeding,less=d.get_up_rate=<br />
view.sort = seeding<br />
<br />
=== Manually adding trackers to torrents ===<br />
<br />
# Select torrent to edit from rTorrent console view.<br />
# Hit {{ic|Ctrl+x}}.<br />
# If you had four trackers type following lines one at a time (always press {{ic|Ctrl+x}} first) to add four more for example:<br />
<br />
d.tracker.insert="5","udp://tracker.publicbt.com:80"<br />
d.tracker.insert="6","udp://tracker.openbittorrent.com:80"<br />
d.tracker.insert="7","udp://tracker.istole.it:80"<br />
d.tracker.insert="8","udp://tracker.ccc.de:80"<br />
<br />
== Troubleshooting ==<br />
<br />
=== CA certificates ===<br />
<br />
To use rTorrent with a tracker that uses HTTPS, do the following as root:<br />
<br />
{{bc|<br />
# cd /etc/ssl/certs<br />
<nowiki># wget --no-check-certificate https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Global_eBusiness_CA-1.cer</nowiki><br />
# mv Equifax_Secure_Global_eBusiness_CA-1.cer Equifax_Secure_Global_eBusiness_CA-1.pem<br />
# c_rehash<br />
}}<br />
<br />
And from now on run rTorrent with:<br />
$ rtorrent -o http_capath=/etc/ssl/certs<br />
<br />
If you use GNU Screen, update the {{ic|.screenrc}} configuration file to reflect this change:<br />
$ screen -t rtorrent rtorrent -o http_capath=/etc/ssl/certs<br />
<br />
In rTorrent 0.8.9, set {{ic|<nowiki>network.http.ssl_verify_peer.set=0</nowiki>}} to [https://bbs.archlinux.org/viewtopic.php?pid=981832#p981832 fix the problem].<br />
<br />
For more information see: [https://bbs.archlinux.org/viewtopic.php?pid=331850 rTorrent Error & CA Certificate] and [https://bbs.archlinux.org/viewtopic.php?id=45800 rTorrent Certificates Problem]<br />
<br />
=== Locked directories ===<br />
<br />
rTorrent can sometimes lock up after a crash or incorrect shutdown, and will complain about a lock file.<br />
<br />
Per the error message, the file called "'''rtorrent.lock'''" can be found within the hidden folder {{ic|.rtorrentsession}} for your download directory and manually removed.<br />
<br />
=== Event failed: bad return code ===<br />
<br />
This is caused by there being spaces in your system.method.* lines. Remove the spaces and it will work.<br />
<br />
== Web interface ==<br />
<br />
There are numerous web interfaces and front ends for rTorrent including:<br />
* [[WTorrent]] is a web interface to rtorrent programmed in php using Smarty templates and XMLRPC for PHP library.<br />
* [http://code.google.com/p/ntorrent/ nTorrent] is a graphical user interface client to rtorrent written in Java.<br />
* [https://rtwi.jmk.hu/ rTWi] is a simple rTorrent web interface written in PHP.<br />
* [[Rtgui]] is a web based front end for rTorrent written in PHP and uses XML-RPC to communicate with the rTorrent client.<br />
* [https://github.com/Novik/ruTorrent rutorrent] and [http://forums.rutorrent.org/ Forum] - A web-based front-end with an interface very similar to uTorrent which supports many plugins and advanced features (see also: [[ruTorrent]] and [https://bbs.archlinux.org/viewtopic.php?pid=897577#p897577 Guide on forum]).<br />
* [https://github.com/jfurrow/flood flood] is a web interface for rtorrent written in Node.js using XMLRPC.<br />
<br />
{{Note|rTorrent is currently built using [http://xmlrpc-c.sourceforge.net/ XML-RPC for C/C++], which is required for some web interfaces (e.g. ruTorrent).}}<br />
<br />
=== XMLRPC interface ===<br />
<br />
If you want to use rtorrent with some web interfaces (e.g. rutorrent) you need to add the following line to the configuration file:<br />
scgi_port = localhost:5000<br />
<br />
For more information see: [https://github.com/rakshasa/rtorrent/wiki/RPC-Setup-XMLRPC Using XMLRPC with rtorrent]<br />
<br />
=== Saving magnet links as torrent files in watch folder ===<br />
<br />
{{Note| Rtorrent natively supports downloading torrents through magnet links. At the main view (reached by starting Rtorrent and pressing 1), press enter. At "load.normal>" paste the magnet link and press enter again. This will start the download.}}<br />
<br />
If you wish to have magnet links automatically added to your watch folder, here is a script that will do the trick:<br />
<br />
<nowiki><br />
#!/bin/bash<br />
watch_folder=~/.rtorrent/watch<br />
cd $watch_folder<br />
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;<br />
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"</nowiki><br />
<br />
(adapted from http://blog.gonzih.org/blog/2012/02/17/how-to-use-magnet-links-with-rtorrent/).<br />
<br />
Save it, for instance as rtorrent-magnet, give it execution permission, and place it somewhere under your $PATH. Then in Firefox:<br />
# Type {{ic|about:config}} into the Location Bar (address bar) and press {{ic|Enter}}.<br />
# Right-click: ''New > Boolean > Name: '''network.protocol-handler.expose.magnet''' > Value > false''.<br />
# Next time you click a magnet link you will be asked which application to open it with. Select the script we just created and you will be done.<br />
<br />
If you want xdg-open to handle this, which you need if you are using chrome instead of firefox, (though gnome and other DE might have their own programs overriding xdg-open) you need to create the desktop entry for the rtorrent-magnet script in {{ic|~/.local/share/applications/rtorrent-magnet.desktop}} with the following content:<br />
<br />
<nowiki><br />
[Desktop Entry]<br />
Type=Application<br />
Name=rtorrent-magnet<br />
Exec=rtorrent-magnet %U<br />
MimeType=x-scheme-handler/magnet;<br />
NoDisplay=true</nowiki><br />
<br />
Then all you need to do is to register the mimetype using<br />
$ xdg-mime default rtorrent-magnet.desktop x-scheme-handler/magnet<br />
<br />
== Magnet to Torrent ==<br />
You could also use the {{AUR|magnet2torrent-git}} package which downloads the metadata and creates a torrent file.<br />
<br />
How to use:<br />
$ magnet2torrent -m <magnet link> -o [torrent file]<br />
<br />
==== In order to use this with an ARM device ====<br />
You should have package versions<br />
python-libtorrent-rasterbar 1.0.8-1<br />
libtorrent-rasterbar 1:1.0.9-1<br />
Then you can compile magnet2torrent-git package.<br />
<br />
== rtorrent-pyro ==<br />
<br />
{{AUR|rtorrent-pyro-git}} from the [[AUR]] comes with an extended rtorrent console interface. It does not contain the pyroscope tools yet though. If you also need the pyroscope tools see [[#PyroScope]] .<br />
<br />
Make sure you add following command to ~/.rtorrent.rc, which makes the asterisk key * to a shortcut for toggling between extended and collapsed view within rtorrent's interface:<br />
{{bc|<nowiki>schedule = bind_collapse,0,0,"ui.bind_key=download_list,*,view.collapsed.toggle="</nowiki>}}<br />
<br />
Also set "pyro.extended" to 1 to activate rTorrent-PS features.<br />
{{bc|<nowiki>system.method.insert = pyro.extended, value|const, 1</nowiki>}}<br />
<br />
{{Note|You may notice that some systemd service scripts for rtorrent do not work with rtorrent-ps installed. If you are using tmux or screen this may because it is exiting with the error, "your terminal only supports 8 colors". To fix this make sure your tmux/screen config sets the TERM variable to a 256 color variant, or change your rtorrent theme to an 8 color one such as https://github.com/pyroscope/rtorrent-ps/blob/master/docs/examples/color_scheme8.rc.}}<br />
<br />
=== PyroScope ===<br />
<br />
We create a directory for the installation of pyroscope, then download and update the source code from subversion:<br />
{{bc|<nowiki>mkdir -p ~/.lib<br />
git clone "https://github.com/pyroscope/pyrocore.git" ~/.lib/pyroscope<br />
~/.lib/pyroscope/update-to-head.sh</nowiki>}}<br />
Adding pyroscope bin's PATH to .bashrc:<br />
{{bc|<nowiki>export PATH=$PATH:path_to_the_bin # Example path for pyroscope bin's: /home/user/.lib/pyroscope/bin/</nowiki>}}<br />
Creating the ~/.pyroscope/config.ini:<br />
{{bc|<nowiki>pyroadmin --create-config</nowiki>}}<br />
<br />
Add this to your ~/.rtorrent.rc. Do not forget to add the path of your pyroscope bin's dir (see below).<br />
{{bc|<nowiki>system.method.insert = pyro.bin_dir, string|const, write_here_path_to_your_pyroscope_bin_dir # Example path: /home/user/.lib/pyroscope/bin/<br />
system.method.insert = pyro.rc_dialect, string|const|simple, "execute_capture=bash,-c,\"test $1 = 0.8.6 && echo -n 0.8.6 || echo -n 0.8.9\",dialect,$system.client_version="<br />
system.method.insert = pyro.rtorrent_rc, string|const|private, "$cat=~/.pyroscope/rtorrent-,\"$pyro.rc_dialect=\",.rc.default"<br />
import = $pyro.rtorrent_rc=</nowiki>}}<br />
<br />
Optionally: TORQUE: Daemon watchdog schedule. Must be activated by touching the "~/.pyroscope/run/pyrotorque" file!<br />
You can also just use rtorrent watch dir or give pyro_watchdog a try, which comes with 'treewatch' ability, meaning it also watches for torrents recursively within the given watch path. Further documentation for pyro_watchdog is here: <br />
[http://code.google.com/p/pyroscope/wiki/QueueManager] <br />
To enable pyro_watchdog, add this in ~/.rtorrent.rc and further configurations are in ~/.pyroscope/torque.ini. <br />
{{bc|<nowiki>schedule = pyro_watchdog,30,300,"pyro.watchdog=~/.pyroscope,-v"</nowiki>}}<br />
<br />
Following steps are important. Before using pyroscope tools you have to set the missing "loaded" times to that of the .torrent file. Run this in your terminal:<br />
{{bc|<nowiki>rtcontrol '!*"*' loaded=0 -q -sname -o 'echo "$(name)s"\ntest -f "$(metafile)s" && rtxmlrpc -q d.set_custom $(hash)s tm_loaded \$(\<br />
ls -l --time-style "+%%s" "$(metafile)s" \<br />
| cut -f6 -d" ")\nrtxmlrpc -q d.save_session $(hash)s' | bash</nowiki>}}<br />
<br />
And now set the missing "completed" times to that of the data file or directory:<br />
{{bc|<nowiki>rtcontrol '!*"*' completed=0 done=100 path=\! is_ghost=no -q -sname -o 'echo "$(name)s"\ntest -e "$(realpath)s" && rtxmlrpc -q d.set_custom $(hash)s tm_completed \$(\<br />
ls -ld --time-style "+%%s" "$(realpath)s" \<br />
| cut -f6 -d" ")\nrtxmlrpc -q d.save_session $(hash)s' | bash</nowiki>}}<br />
<br />
Example usage:<br />
Will print out all torrents older than 2 hours:<br />
{{bc|<nowiki>rtcontrol -V completed=+2h -scompleted -ocompleted</nowiki>}}<br />
Deletes all torrents older than 48 hours:<br />
{{bc|<nowiki>rtcontrol -V completed=+48h -scompleted -ocompleted --cull --yes</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [http://linux.die.net/man/1/rtorrent Manpage for rtorrent]<br />
* [[Screen Tips]]<br />
* [[Wikipedia:Comparison of BitTorrent clients|Comparison of BitTorrent clients]] on Wikipedia<br />
* [http://community.rutorrent.org/ rTorrent Community Wiki] - Public place for information on rTorrent and any project related to rTorrent, regarding setup, configuration, operations, and development.<br />
* [http://code.google.com/p/pyroscope/ PyroScope] - Collection of command line tools for rTorrent. It provides commands for creating and modifying torrent files, moving data on completion without having multiple watch folders, and mass-controlling download items via rTorrent's XML-RPC interface: searching, start/stop, deleting items with or without their data, etc. It also offers a documented [[Python]] API.<br />
* [[Rutorrent with lighttpd|ruTorrent with Lighttpd]]<br />
* [http://wiki.theaveragegeek.com/howto/installing_rtorrent_and_hellanzb_on_centos5_64-bit_vps How-to install rTorrent and Hellanzb on CentOS 5 64-bit VPS]<br />
* [http://code.google.com/p/pyroscope/wiki/DebianInstallFromSource Installation guide for rTorrent and Pyroscope on Debian] - Collection of tools for the BitTorrent protocol and especially the rTorrent client<br />
* [http://mktorrent.sourceforge.net/ mktorrent] - Command line application used to generate torrent files, which is available as {{Pkg|mktorrent}} in the [[official repositories]].<br />
* [https://github.com/kfei/docktorrent docktorrent] - Using Docker, rTorrent and ruTorrent to run a full-featured BitTorrent box.<br />
* [https://github.com/nelhage/reptyr reptyr] - another tool to take over a program's TTY (it is in the standard repos). The process may have started being attached to a terminal or to a socket in tmux, screen or dtach.<br />
* [http://caca.zoy.org/wiki/neercs neercs] - a more screen/tmux like tool than reptyr, but, like reptyr, neercs can also "steal" a process that may have started slaved to a terminal or to a socket in tmux, screen or dtach. {{AUR|neercs-git}}{{Broken package link|{{aur-mirror|neercs-git}}}}<br />
<br />
'''Forum threads'''<br />
* 2009-03-11 - Arch Linux - [https://bbs.archlinux.org/viewtopic.php?id=67304 HOWTO: rTorrent stats in Conky]</div>TheCloudt