Porteus-v3.2+ goodies
Posted: 11 Oct 2016, 04:00
With the imminent release of Porteus-v3.2 I thought I would share some of the less than obvious goodies that I find useful.
root@porteus:/home/guest# check-kernel
This lets you know your current kernel and checks kernel.org for the latest kernels.
root@porteus:/home/guest# transfer
Quickly upload a text file to transger.sh service. Supports encryption.
root@porteus:/home/guest# fastest-mirror
Each time you request a call to the Porteus server (via a script) it will check in /etc/porteus.conf for the preferred server or mirror. By default this is the Porteus server but I strongly suggest that you run this script once and then backup the /etc/porteus.conf file so that each time you call the server it selects a faster mirror.
root@porteus:/home/guest# getpkg
This will quickly pull a slackware package from the slackware-14.2 server.
root@porteus:/home/guest# trans -b "Minha casa é sua casa"
trans is the backend for the polyglot GUI I wrote for quick translations.
root@porteus:/home/guest# bundles
This will check the server for any bundles pertaining to your current desktop. A 'bundle' is a porteus module containing all required dependencies in one packages. This means that they will just work. There are currently very few (zero) bundles on the server but users can begin creating bundles for me to review and put on the server once 3.2 final is released.
root@porteus:/home/guest# update-
There are a bunch of update scripts to make updating browsers, addons and office apps a breeze. Please use these scripts to update your browser as they incorporate the duckduckgo search engine into the browsers which helps support Porteus financially and keeps Porteus alive. The scripts can be found in /opt/porteus-scripts.
update-porteus is a script that will check for any updates to your current version of Porteus. This will be the recommended for updating Porteus in the future without having to download a completely new ISO. A script to update the kernel is in the pipeline.
People interesting in scripting should look in /usr/share/porteus/porteus-functions for some useful functions to use in your scripts.
Just put the following at the top of your script:
. /usr/share/porteus/porteus-functions
Notice the leading dot<space>. This will source all the functions and then you can do things like.
get_colors
green "This is green text."
cyan "This is cyan text"
download http://porteus.org/porteus-mirrors.txt /home/guest/Download
RESULT=( one two three four )
menu_from_array ${RESULT[@]}
echo "You chose $CHOICE"
is_64bit && echo "You are using a 64bit architecture" || echo "This is NOT a 64bit machine"
is_mountpoint /mnt/sda2 && echo "Yep. She is a mountpoint"
is_online_url http://kernel.org && echo "It seems to be up"
is_x && echo "You are currently in a graphical X session"
is_mounted_porteus && echo "The partition that porteus booted from is mounted."
is_root && echo "You da man" || echo "No root"
Enjoy
root@porteus:/home/guest# check-kernel
This lets you know your current kernel and checks kernel.org for the latest kernels.
root@porteus:/home/guest# transfer
Quickly upload a text file to transger.sh service. Supports encryption.
root@porteus:/home/guest# fastest-mirror
Each time you request a call to the Porteus server (via a script) it will check in /etc/porteus.conf for the preferred server or mirror. By default this is the Porteus server but I strongly suggest that you run this script once and then backup the /etc/porteus.conf file so that each time you call the server it selects a faster mirror.
root@porteus:/home/guest# getpkg
This will quickly pull a slackware package from the slackware-14.2 server.
root@porteus:/home/guest# trans -b "Minha casa é sua casa"
trans is the backend for the polyglot GUI I wrote for quick translations.
root@porteus:/home/guest# bundles
This will check the server for any bundles pertaining to your current desktop. A 'bundle' is a porteus module containing all required dependencies in one packages. This means that they will just work. There are currently very few (zero) bundles on the server but users can begin creating bundles for me to review and put on the server once 3.2 final is released.
root@porteus:/home/guest# update-
There are a bunch of update scripts to make updating browsers, addons and office apps a breeze. Please use these scripts to update your browser as they incorporate the duckduckgo search engine into the browsers which helps support Porteus financially and keeps Porteus alive. The scripts can be found in /opt/porteus-scripts.
update-porteus is a script that will check for any updates to your current version of Porteus. This will be the recommended for updating Porteus in the future without having to download a completely new ISO. A script to update the kernel is in the pipeline.
People interesting in scripting should look in /usr/share/porteus/porteus-functions for some useful functions to use in your scripts.
Just put the following at the top of your script:
. /usr/share/porteus/porteus-functions
Notice the leading dot<space>. This will source all the functions and then you can do things like.
get_colors
green "This is green text."
cyan "This is cyan text"
download http://porteus.org/porteus-mirrors.txt /home/guest/Download
RESULT=( one two three four )
menu_from_array ${RESULT[@]}
echo "You chose $CHOICE"
is_64bit && echo "You are using a 64bit architecture" || echo "This is NOT a 64bit machine"
is_mountpoint /mnt/sda2 && echo "Yep. She is a mountpoint"
is_online_url http://kernel.org && echo "It seems to be up"
is_x && echo "You are currently in a graphical X session"
is_mounted_porteus && echo "The partition that porteus booted from is mounted."
is_root && echo "You da man" || echo "No root"
Enjoy