Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gduarte/courses
  • mgrueninger/courses
  • thealternative/courses
3 results
Show changes
Showing
with 735 additions and 0 deletions
FOSS_course/img/gp.png

131 B

FOSS_course/img/icloud.png

130 B

FOSS_course/img/osi.png

130 B

FOSS_course/img/play.png

131 B

FOSS_course/img/rh.png

130 B

FOSS_course/img/tor.png

130 B

FOSS_course/img/tux.png

131 B

# for the slide detailing that cryptography/security should be FOSS
https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle
File added
\input{../.style/header}
\title{Free and Open Source Software}
\author{Alexander Schoch}
\institute{SSC TheAlternative | ETHZ and UZH}
\DTLloaddb{server}{data/web_servers.csv}
\DTLloaddb{os}{data/web_os.csv}
\setlength{\DTLpieoutlinewidth}{0.4pt}
\DTLsetpiesegmentcolor{1}{green!40}
\DTLsetpiesegmentcolor{2}{green!20}
\DTLsetpiesegmentcolor{3}{red!40}
\DTLsetpiesegmentcolor{4}{blue!40}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Acronym}
\subsection{What does FOSS stand for?}
\begin{frame}{Free}
\SI{100}{\percent} unrelated to price:
\begin{itemize}
\item \textcolor{lg}{German:} “frei”
\item \textcolor{lg}{French:} “libre”
\item \textcolor{lg}{Italian:} “libero”
\item \textcolor{lg}{Romansh:} “liber”
\end{itemize}
\end{frame}
\begin{frame}{Open Source}
\centering Source code example:
\lstinputlisting[style=customc]{code.c}
\end{frame}
\begin{frame}{Software}
\centering Binary file hexadecimal view:\\\vspace{0.3cm}
\centering\tiny\texttt{{[{...}]}\\
00001660 43 00 5f 5f 69 6e 69 74 5f 61 72 72 61 79 5f 73 |C.\_\_init\_array\_s|\\
00001670 74 61 72 74 00 5f 47 4c 4f 42 41 4c 5f 4f 46 46 |tart.\_GLOBAL\_OFF|\\
00001680 53 45 54 5f 54 41 42 4c 45 5f 00 5f 5f 6c 69 62 |SET\_TABLE\_.\_\_lib|\\
00001690 63 5f 63 73 75 5f 66 69 6e 69 00 5f 49 54 4d 5f |c\_csu\_fini.\_ITM\_|\\
000016a0 64 65 72 65 67 69 73 74 65 72 54 4d 43 6c 6f 6e |deregisterTMClon|\\
000016b0 65 54 61 62 6c 65 00 64 61 74 61 5f 73 74 61 72 |eTable.data\_star|\\
000016c0 74 00 70 75 74 73 40 40 47 4c 49 42 43 5f 32 2e |t.puts@@GLIBC\_2.|\\
000016d0 32 2e 35 00 5f 65 64 61 74 61 00 5f 66 69 6e 69 |2.5.\_edata.\_fini|\\
000016e0 00 5f 5f 6c 69 62 63 5f 73 74 61 72 74 5f 6d 61 |.\_\_libc\_start\_ma|\\
000016f0 69 6e 40 40 47 4c 49 42 43 5f 32 2e 32 2e 35 00 |in@@GLIBC\_2.2.5.|\\
00001700 5f 5f 64 61 74 61 5f 73 74 61 72 74 00 5f 5f 67 |\_\_data\_start.\_\_g|\\
00001710 6d 6f 6e 5f 73 74 61 72 74 5f 5f 00 5f 5f 64 73 |mon\_start\_\_.\_\_ds|\\
00001720 6f 5f 68 61 6e 64 6c 65 00 5f 49 4f 5f 73 74 64 |o\_handle.\_IO\_std|\\
00001730 69 6e 5f 75 73 65 64 00 5f 5f 6c 69 62 63 5f 63 |in\_used.\_\_libc\_c|\\
00001740 73 75 5f 69 6e 69 74 00 5f 65 6e 64 00 5f 73 74 |su\_init.\_end.\_st|\\
00001750 61 72 74 00 5f 5f 62 73 73 5f 73 74 61 72 74 00 |art.\_\_bss\_start.|\\
00001760 6d 61 69 6e 00 5f 4a 76 5f 52 65 67 69 73 74 65 |main.\_Jv\_Registe|\\
00001770 72 43 6c 61 73 73 65 73 00 5f 5f 54 4d 43 5f 45 |rClasses.\_\_TMC\_E|\\
00001780 4e 44 5f 5f 00 5f 49 54 4d 5f 72 65 67 69 73 74 |ND\_\_.\_ITM\_regist|\\
00001790 65 72 54 4d 43 6c 6f 6e 65 54 61 62 6c 65 00 5f |erTMCloneTable.\_|\\
000017a0 69 6e 69 74 00 00 00 00 00 00 00 00 00 00 00 00 |init............|\\
{[{...}]}}
\end{frame}
\section{History}
\subsection{How did we get to free and open?}
\begin{frame}{Early Computing}
\textcolor{ldorange}{$\sim$1950-1960:} Public-domain software, academic “hacking” culture
\begin{figure}
\centering
\includegraphics[width=1\textheight]{img/BendixG15-2015.jpg}
\caption{Bendix G-15 photo by Gah4 - CC BY-SA 4.0 via \href{https://commons.wikimedia.org/wiki/File:BendixG15-2015.JPG}{Commons}}
\end{figure}
\end{frame}
\begin{frame}{Birth of the Proprietary Software Industry}
\textcolor{ldorange}{$\sim$1970-1980:}
\begin{itemize}
\item Increasingly easy to withold control (e.g. binary-only distribution)
\item United States vs. IBM (1969, dropped 1982): “Bundled Software is anticompetitive”
\item Computer Software Copyright Act (1980): “Software is patentable”
\end{itemize}
\end{frame}
\begin{frame}{Confronting the Software Industry}
\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{img/fsf.png}
\end{figure}
\begin{itemize}
\item Promotes 4 universal freedoms: study, distribute, create, and modify computer software.
\item Promotes moral obligation to use free software.
\item “Ethical” (dogmatic?)
\end{itemize}
\end{frame}
\begin{frame}{Working with the Software Industry}
\begin{figure}
\centering
\includegraphics[width=0.4\textheight]{img/osi.png}
\end{figure}
\begin{minipage}{.71\textwidth}
\begin{itemize}
\item Promotes open-source principles \cite{oss}.
\item “Rebranded” the free software movement.
\item Google, Facebook, etc. produce open-source software.
\end{itemize}
\end{minipage}
\begin{minipage}{.28\textwidth}
\begin{figure}
\vspace{-3em}
\centering
\caption{\scriptsize 2017 top Linux kernel contributor organizations \cite{linux}}
\vspace{-.5em}
\includegraphics[width=1\textwidth]{img/contrib.png}
\end{figure}
\end{minipage}
\end{frame}
\begin{frame}{Sticking together}
\centering\Huge \textbf{\textcolor{ldorange}{FOSS}}
\end{frame}
\section{Licences}
\subsection{Key ideas of FOSS}
\begin{frame}{\textbf{GNU Public License} - based on the FSF's “four freedoms”}
\begin{itemize}
\item The freedom to run the program as you wish, for any purpose
\item The freedom to study how the program works, and change it so it does your computing as you wish
\item The freedom to redistribute copies so you can help your neighbor
\item The freedom to distribute copies of your modified versions to others
\end{itemize}
\end{frame}
\begin{frame}{\textbf{BSD License} - very permissive 3 clauses}
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
\begin{itemize}
\item Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
\item Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
\item Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission
\end{itemize}
\begin{spacing}{0.4}
\textcolor{lg}{\fontsize{4}{4}\selectfont THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}
\end{spacing}
\end{frame}
\begin{frame}{Copyleft}
\begin{figure}
\centering
\includegraphics[width=0.25\textwidth]{img/cl.png}
\end{figure}
\begin{itemize}
\item All derivatives must for ever stay free
\item May restrict interaction with non-free programs (e.g. library linking)
\item “Viral Licensing”
\end{itemize}
\end{frame}
\section{Advantages}
\subsection{Why is FOSS awesome?}
\begin{frame}{Performance}
\begin{center}
\textcolor{ldorange}{Linus' Law:} “Given enough eyeballs, all bugs are shallow.”
\end{center}
\vspace{1em}
You:
\begin{itemize}
\item experience less crashes.
\item increase performance (especially for older hardware).
\item get better support - if ever it still fails.
\end{itemize}
\end{frame}
\begin{frame}{Education}
You can:
\begin{itemize}
\item better manifest your intelligence and creativity.
\item learn valuable, transferable skills.
\item get better software habits
\begin{itemize}
\item Open Formats
\item \LaTeX
\item Git
\item CLI
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Empowerment}
You:
\begin{itemize}
\item free yourself from vendor lock-in.
\item get control over any service running on your system.
\item innovate faster, never having to ask for permission.
\item have more freedom, even than on the open market.
\end{itemize}
\end{frame}
\begin{frame}{Security}
You:
\begin{itemize}
\item benefit from more privacy.
\item benefit from more safety.
\item use software which is more transparent (as for government - i.e. trustworthy).
\item have access to better encryption.
\end{itemize}
% Proprietary Software is Often Malware https://www.gnu.org/proprietary/
\end{frame}
\begin{frame}{Sustainability}
\begin{center}
“the quality of being able to continue over a period of time“
\end{center}
The Software:
\begin{itemize}
\item depends on no single entity for its continuity.
\item can be improved by all and degraded by none.
\item is reproducible and transparent (as for science - i.e. comprehensible).
\end{itemize}
\vspace{1em}
You:
\begin{itemize}
\item Can pool your resources with the world.
\end{itemize}
\end{frame}
\section{Challenges}
\subsection{What to look out for now and in the near future.}
\begin{frame}{Software as a Service}
\begin{columns}
\column{0.1\linewidth}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/drive.png}
\end{figure}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/dropbox.png}
\end{figure}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/icloud.png}
\end{figure}
\column{0.1\linewidth}
\end{columns}
\vspace{1.5em}
\begin{itemize}
\item Also known as SaaS or “the cloud”.
\item May be based on FOSS.
\item Usage paradigm is unfree, closed, and unsustainable.
\end{itemize}
\end{frame}
\begin{frame}{Regulation - from without}
E.g. via laws and regulations:
\begin{itemize}
\item “Privacy” threatens admissible information sources.
\item “Copyright” threatens admissible information matter.
\begin{itemize}
\item Embrace, Extend, Extinguish as a business model.
\end{itemize}
\item “Consumer Protection” threatens admissible information destinations.
\end{itemize}
\end{frame}
\begin{frame}{Regulation - from within}
E.g. via political “Codes of Conduct”, which can:
\begin{itemize}
\item make participation contingent on ideology (less free).
\item encourage exclusion from the community (less open).
\item reduce resource pooling (less sustainable).
\end{itemize}
\end{frame}
\begin{frame}{App-ification / Containerization}
\begin{columns}
\column{0.1\linewidth}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.55\textwidth]{img/play.png}
\end{figure}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/app.png}
\end{figure}
\column{0.27\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.75\textwidth]{img/docker.png}
\end{figure}
\column{0.1\linewidth}
\end{columns}
\vspace{1.5em}
\begin{itemize}
\item Possibly FOSS
\item Centralized certification and/or distribution
\item Every application as an island:
\begin{itemize}
\item Reduces user control (less free).
\item Reduces system transparency (less open).
\item Reduces system resource pooling (less sustainable).
\end{itemize}
\end{itemize}
\end{frame}
\section{Examples}
\subsection{What kind of software is FOSS?}
\begin{frame}{Linux Kernel}
\vspace{-2em}
\begin{figure}
\centering
\includegraphics[width=0.3\textwidth]{img/tux.png}
\caption{“Tux” by Larry Ewing, Simon Budig, Anja Gerwinski Licensed under Attribution via \href{https://commons.wikimedia.org/wiki/File:Tux.svg}{Commons}}
\end{figure}
\vspace{-1em}
As of 2010 only \SI{2}{\percent} of the Linux Kernel was written by Linus Torvalds.
\end{frame}
\begin{frame}{The GNU/Linux Operating System}
\begin{columns}
\column{0.45\linewidth}
Developed by the FSF:
\begin{itemize}
\item GNU Compiler Collection
\item GNOME
\item GNU Octave, GnuCash, etc.
\end{itemize}
\column{0.5\linewidth}
\vspace{-1.5em}
\begin{figure}
\centering
\includegraphics[width=0.73\textheight]{img/gp.png}
\caption{“Gnu-and-penguin-color” by FSF - CC BY-SA 3.0 via \href{https://commons.wikimedia.org/wiki/File:Gnu-and-penguin-color.png}{Commons}}
\end{figure}
\end{columns}
\end{frame}
\begin{frame}{\textbf{So} Much More}
\begin{itemize}
\item \textcolor{ldorange}{Desktop:} Chromium, Firefox, LibreOffice, \LaTeX, \textcolor{lg}{etc.}
\item \textcolor{ldorange}{Multimedia:} mpv, mpd, Gmpc, VLC \textcolor{lg}{etc.}
\item \textcolor{ldorange}{Scientific:} NumPy, matplotlib, NiPype, JabRef, R, \textcolor{lg}{etc.}
\item \textcolor{ldorange}{Server/Cloud:} Apache, Openstack, WordPress, \textcolor{lg}{etc.}
\item \textcolor{ldorange}{Graphics:} RawTherapee, GIMP, Inkscape, \textcolor{lg}{etc.}
\item \textcolor{lg}{etc.}
\end{itemize}
\end{frame}
\section{Users/Developers}
\subsection{Who benefits from FOSS?}
\begin{frame}{The Internet}
\vspace{-.3em}
\begin{columns}
\column{0.5\linewidth}
\begin{figure}[htbp]
\vspace{-0.75em}
\centering\tiny
\DTLpiechart{radius=0.235\textheight,variable=\quantity,innerlabel={\DTLpiepercent\%},outerlabel=\name,cutaway={1-2}}{server}{\name=Name,\quantity=percent}
\caption{Web Server Market Share 2020-10-06 via \href{http://w3techs.com/technologies/overview/web_server/all}{w3techs}}
\end{figure}
\column{0.5\linewidth}
\begin{figure}[htbp]
\centering\tiny
%change color palette to preserve green for free and red for non-free
\DTLsetpiesegmentcolor{1}{green!40}
\DTLsetpiesegmentcolor{2}{red!40}
\DTLpiechart{radius=0.265\textheight,variable=\quantity,innerlabel={\DTLpiepercent\%},outerlabel=\name,cutaway={2}}{os}{\name=Name,\quantity=percent}
\caption{Website OS Market Share 2020-10-06 via \href{http://w3techs.com/technologies/overview/operating_system/all}{w3techs}}
\end{figure}
\end{columns}
\end{frame}
\begin{frame}{Public Institutions}
\begin{itemize}
\item Governments (benefits: strategic, economic)
\item ETH
\begin{itemize}
\item Linux cluster running CentOS
\item Fedora/Windows dual boot on public computers
\end{itemize}
\item UZH
\begin{itemize}
\item OpenStack-based cluster (ScienceCloud)
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Businesses}
\begin{columns}
\column{0.5\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/chromium.png}
\caption{“Chromium Material Icon” by The Chromium Project - CC BY 2.5 via \href{https://commons.wikimedia.org/wiki/File:Chromium_Material_Icon-256x256.png}{Commons}}
\end{figure}
\column{0.5\linewidth}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{img/chrome.png}
\caption{“Google Chrome Material Icon” by Google, Google Play. - BSD License via \href{https://commons.wikimedia.org/wiki/File:Chromium_Material_Icon-256x256.png}{Commons}}
\end{figure}
\end{columns}
\end{frame}
\begin{frame}{Businesses}
\begin{figure}
\centering
\includegraphics[width=0.75\textwidth]{img/rh.png}
\caption{\copyright Red Hat, Inc.}
\end{figure}
\begin{itemize}
\item Founded 1993, subsidiary of IBM since 2019
\item 2015--2018 stock price $\mathrm{\upbeta_{RHT}=1.16}$ (e.g. $\mathrm{\upbeta_{MSFT}=1.22}$)
\item Very diverse open source products, e.g. OpenStack, RHEL, CloudForms
\end{itemize}
\end{frame}
\begin{frame}{The Persecuted}
\begin{figure}
\centering
\includegraphics[width=0.55\textheight]{img/tor.png}
\caption{“Tor-logo-2011-flat” by Tor Project - CC BY 3.0 via \href{https://commons.wikimedia.org/wiki/File:Tor-logo-2011-flat.svg}{Commons}}
\end{figure}
Free and Open by design, not by convention.
\begin{multicols}{3}
\begin{itemize}
\item Whistleblowers
\item Marginalized Gvmts.
\item (Alleged) Criminals
\end{itemize}
\end{multicols}
\end{frame}
\begin{frame}{The Busy and Creative}
\begin{itemize}
\item Students
\item Scientists
\item Engineers
\item Analysts
\item Artists
\end{itemize}
\center \textit{Get the opportunity to learn \textbf{the right way}, keep the freedom to do it \textbf{your way}.}
\end{frame}
\begin{frame}{Most of all: You}
\begin{itemize}
\item The sooner the better
\item Less time-intensive than 1KP
\item You have already started!
\end{itemize}
\end{frame}
\section{Meta}
\subsection{About this presentation}
\begin{frame}{What now?}
\begin{itemize}
\item Q\&A round\\
\textcolor{lg}{in a few seconds}
\item Come to the next “Linux Days” events:
\textcolor{lg}{\url{http://thealternative.ch/}}
\item Join the next “Stammtisch”:\\
\textcolor{lg}{This will not take place due to the coronavirus}
\item Give us feedback!\\
\textcolor{lg}{\url{https://feedback.thealternative.ch/}}
\end{itemize}
\end{frame}
\begin{frame}{These Slides}
\begin{itemize}
\item \textcolor{lg}{Latest Slides:}\\ \url{https://gitlab.ethz.ch/thealternative/courses/blob/master/FOSS_course/slides.pdf}
\item \textcolor{lg}{Source:}\\ \url{https://gitlab.ethz.ch/thealternative/courses/blob/master/FOSS_course/}
\end{itemize}
%separate sources from info so it looks nicer
\begin{itemize}
\item \textcolor{lg}{License:} \href{https://creativecommons.org/licenses/by-sa/3.0/}{Slides by Alexander Schoch/Christian Horea, CC BY-SA 4.0}
\end{itemize}
\end{frame}
\begin{frame}{References}
\bibliographystyle{abbrv}
\bibliography{./bib}
\end{frame}
\end{document}
This diff is collapsed.
# Courses
This is a public repository that contains a collection of our current (and past) LinuxDays courses.
Introduction:
- [Free and Open Source Software (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/FOSS_course/slides.pdf)
- [Introduction to Linux (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/intro_course/slides.pdf)
- [Install Guide](https://gitlab.ethz.ch/thealternative/courses/-/blob/master/install_guide_updated/master/install_guide_updated.pdf)
- [Bash Guide](https://thealternative.ch/guides/bash.php)
Console & Bash:
- [Console Toolkit Part 1 (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/console_toolkit/console_toolkit_1.pdf)
- [Console Toolkit Part 1&2 (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/console_toolkit/console_toolkit_2.pdf)
- [Console Toolkit Exercises (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/console_toolkit/exercise_files/exercises.pdf)
- [Bash Course (Slides) (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/bash_course/pres/pres.pdf)
- [Bash Course (Guide) (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/bash_course/guide/guide.pdf)
- [Bash Course Exercises (.pdf)](https://gitlab.ethz.ch/thealternative/courses/blob/master/bash_course/exercisesheet/sheet.pdf) and [Solutions](https://gitlab.ethz.ch/thealternative/courses/blob/master/bash_course/exercisesheet/sol.pdf)
Tools:
- [Git](https://thealternative.ch/courses/git/git.html)
# Cloning the repository
To download this repository, please install [git-lfs](https://git-lfs.github.com/). You can clone (download) this entire repository by issuing the following command in a terminal:
```
git-lfs install
git clone https://gitlab.ethz.ch/thealternative/courses.git
```
You can find the course materials in the various subdirectories of this repository.
You need `git-lfs` installed for the larger files to download as expected.
# For TheAlternative Members
This repository is kept up to date by TheAlternative members. If you teach a course, please add your slides and supplementary material, such as exercise sheets, to this repo. Do not upload any private files, as this repository is publicly visible.
\ProvidesPackage{code}
\usepackage{tcolorbox}
\usepackage{url}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,,arrows,shapes,decorations.pathreplacing}
\tikzset{every picture/.style={remember picture}}
\tcbuselibrary{skins,xparse,listings}
% Props to https://tex.stackexchange.com/questions/517976/drawing-realistic-linux-command-shell-windows-with-tcolorbox
\newtcblisting{shell}{
colback=violet!50!black,
colupper=white,
colframe=gray!65!black,
listing only,
listing options={
style=tcblatex,
language=sh,escapeinside=``,
},
title={\textcolor{orange}{\Large{$\bullet$}}{\textcolor{gray}{\Large{$\bullet\bullet$}}}},
every listing line={\MyMainPrompt}
}
\newtcblisting{shellcomp}{
colback=violet!50!black,
colupper=white,
colframe=gray!65!black,
listing only,
listing options={
style=tcblatex,
language=sh,escapeinside=``,
},
every listing line={\MyMainPrompt}
}
\pgfkeys{/shell/.cd,
user/.code={\gdef\MyMainUser{#1}},
user={},
host/.code={\gdef\MyMainHost{#1}},
host={},
color/.code={\gdef\MyMainColor{#1}},
color=white,
pwd/.code={\gdef\MyMainPwd{#1}},
pwd=\~,
prompt char/.code={\gdef\MyMainPromptChar{#1}},
prompt char=\#,
root/.style={user=root,host=ubuntu,color=lime,pwd=/,prompt char=\#},
bob/.style={user=bob,host=ubuntu,color=cyan,pwd=\~,prompt char=\$},
bobremote/.style={user=bob,host=myRemote,color=green,pwd=\~,prompt char=>},
alice/.style={user=alice,host=arch,color=green,pwd=\~,prompt char=>},
}
\newcommand{\SU}[1]{
\pgfkeys{/shell/.cd,#1}%
\gdef\MyMainPrompt{\textcolor{\MyMainColor}{\MyMainUser @\MyMainHost{\textcolor{white}:}\textcolor{cyan!60}{\url{\MyMainPwd}}{\textcolor{white}\MyMainPromptChar} }}
}
\newcommand{\StartConsole}{\gdef\MyMainPrompt{}}
\ProvidesPackage{general}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{lmodern}
\usepackage{listings}
\usepackage[os=win]{menukeys}
\usepackage{tcolorbox}
\usefonttheme[onlymath]{serif}
\setcounter{MaxMatrixCols}{20}
\newcommand{\todo}[1]{\textcolor{red}{TODO: #1}\PackageWarning{TODO:}{#1!}}
% a red warning box
\definecolor{lred}{HTML}{ffd6dd}
\newtcolorbox{WarningBox}{%
colframe=red,
colback=lred}
File added
This diff is collapsed.
\ProvidesPackage{slideStyle}
\usecolortheme[RGB={37,68,113}]{structure}
\usetheme{Dresden}
% Uncomment to disable top overview
% \setbeamertemplate{headline}{}
%Define TheAlt colors
\definecolor{ldorange}{HTML}{F18A20}
\definecolor{ldblue}{HTML}{254471}
%Apply TheAlt colors to theme
\setbeamercolor{section in head/foot}{fg=ldorange}
\setbeamercolor{author in head/foot}{fg=white}
\setbeamercolor{subsection in head/foot}{fg=white}
\setbeamercolor{caption name}{fg=vlg}
\setbeamercolor{caption}{fg=vlg}
\setbeamercolor{frametitle}{fg=ldblue}
\setbeamercolor{title}{fg=ldorange}
\setbeamercolor{institute}{fg=ldblue}
\setbeamerfont{title}{series=\bfseries}
\setbeamertemplate{caption}{\raggedright\insertcaption\par}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}[text]
archive/ctk_archive/HS22_ConsoleToolkit/Figures/horrorGui.png

129 B

\ProvidesPackage{code}
\usepackage{tcolorbox}
\usepackage{url}
\usepackage{tikz}
\usetikzlibrary{tikzmark,calc,,arrows,shapes,decorations.pathreplacing}
\tikzset{every picture/.style={remember picture}}
\tcbuselibrary{skins,xparse,listings}
% Props to https://tex.stackexchange.com/questions/517976/drawing-realistic-linux-command-shell-windows-with-tcolorbox
\tcbset{common/.style={
colback=violet!50!black,
colupper=white,
colframe=gray!65!black,
listing only,
listing options={
style=tcblatex,
language=sh,escapeinside=``,
},
every listing line={\MyMainPrompt},
}}
\newtcblisting{shell}[1][]{
common,
title={\textcolor{orange}{\Large{$\bullet$}}{\textcolor{gray}{\Large{$\bullet\bullet$}}}},
codewidth,
fontsize,
#1
}
\newtcblisting{shellcomp}[1][]{
common,
codewidth,
fontsize,
#1
}
\tcbset{
codewidth/.style={width=#1\textwidth},
codewidth/.default=1,
fontsize/.style={%
listing options={ % TODO add only relevant stuff here (do not overwrite unrelated default)
style=tcblatex,
language=sh,escapeinside=``,
basicstyle=\ttfamily#1,
},
},
% fontsize/.default=\normalsize,
}
% \BeforeBeginEnvironment{shell}{\centering}
\pgfkeys{/shell/.cd,
user/.code={\gdef\MyMainUser{#1}},
user={},
host/.code={\gdef\MyMainHost{#1}},
host={},
color/.code={\gdef\MyMainColor{#1}},
color=white,
pwd/.code={\gdef\MyMainPwd{#1}},
pwd=\~,
prompt char/.code={\gdef\MyMainPromptChar{#1}},
prompt char=\#,
root/.style={user=root,host=ubuntu,color=lime,pwd=/,prompt char=\#},
bob/.style={user=bob,host=ubuntu,color=cyan,pwd=\~,prompt char=\$},
bobremote/.style={user=bob,host=myRemote,color=green,pwd=\~,prompt char=>},
alice/.style={user=alice,host=arch,color=green,pwd=\~,prompt char=>},
}
\newcommand{\SU}[1]{
\pgfkeys{/shell/.cd,#1}%
\gdef\MyMainPrompt{\textcolor{\MyMainColor}{\MyMainUser @\MyMainHost{\textcolor{white}:}\textcolor{cyan!60}{\url{\MyMainPwd}}{\textcolor{white}\MyMainPromptChar} }}
}
\newcommand{\StartConsole}{\gdef\MyMainPrompt{}}
\ProvidesPackage{general}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{lmodern}
\usepackage{listings}
\usepackage[os=win]{menukeys}
\usepackage{tcolorbox}
\usefonttheme[onlymath]{serif}
\setcounter{MaxMatrixCols}{20}
\newcommand{\todo}[1]{\textcolor{red}{TODO: #1}\PackageWarning{TODO:}{#1!}}
% a red warning box
\definecolor{lred}{HTML}{ffd6dd}
\newtcolorbox{WarningBox}{%
colframe=red,
colback=lred}