Porteus-v3.2+ goodies

Non release banter
Post Reply
User avatar
brokenman
Site Admin
Site Admin
Posts: 5456
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Porteus-v3.2+ goodies

Post#1 by brokenman » 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
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Porteus-v3.2+ goodies

Post#2 by francois » 11 Oct 2016, 11:19

Great to have all these goodies available in one post. :)

Thanks for the huge work to provide porteus 3.2 improved! :D
Voltaire: Le mieux est l'ennemi du bien.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2545
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: Porteus-v3.2+ goodies

Post#3 by Bogomips » 11 Oct 2016, 11:49

Great to have the work scripts as well brought to our attention. :friends:

P.S. Those with eyesight problems may use:

Code: Select all

source  /usr/share/porteus/porteus-functions
8)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
francois
Contributor
Contributor
Posts: 4946
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: Porteus-v3.2+ goodies

Post#4 by francois » 13 Oct 2016, 14:26

This a comment and some hyperlinks concerning update-browser. Here is an interesting trick:
viewtopic.php?f=117&t=6187&start=150
Ed_P: Update-firefox appears to only make FireFox beta modules. Is there a way for it or some other update- script to create official release FireFox modules like 49.0.1?
Brokenman: Download the archive that you want to use and place it in /tmp and then run the udpate script. It should detect an archive there and attempt to use it.
Ed_P: Thank you brokenman. I just saw this answer you posted also. viewtopic.php?f=49&t=6292&p=49586#p49582
Voltaire: Le mieux est l'ennemi du bien.

Post Reply