Hungarian Puppy Software Collection

Moderator: Forum moderators

Post Reply
User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Hungarian Puppy Software Collection

Post by KuLuSz »

Hi folks
I started this topic for hungarian posts.

I would like to present the kns_v2_ENG script, which is partly based on the first version, which now starts graphically, so we can set up the net on X and console as well ... I made 1 demonstration image to see how it works:

sh-kns_v2.png
sh-kns_v2.png (401.54 KiB) Viewed 3963 times

IP allocation window just show when "static IP" box was ticked in the first window, anyway just double click on what u want and come next step ...

NOTE of attachment: remove fake .tgz extension from attachment, add permisson , then run as script.

Attachment link

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

I have already need edit my script...In this case, nocsak needed PULSE audio support for my Screen Recorder script. The script has changed so that when it comes to sound card selection, things look a little different. The list shows the audio devices that can be used by ffmpeg, as shown in the code:
my ALSA devices:

Code: Select all

ffmpeg -hide_banner -sources alsa | grep -v "^A" | sed 's/^/alsa:/'
alsa:  null [Discard all samples (playback) or generate zero samples (capture)]
alsa:  pulse [PulseAudio Sound Server]
alsa:  default:CARD=Audigy2 [Default Audio Device]
alsa:  sysdefault:CARD=Audigy2 [Default Audio Device]
alsa:  front:CARD=Audigy2,DEV=0 [Front speakers]
alsa:  rear:CARD=Audigy2,DEV=0 [Rear speakers]
alsa:  center_lfe:CARD=Audigy2,DEV=0 [Center and Subwoofer speakers]
alsa:  side:CARD=Audigy2,DEV=0 [Side speakers]
alsa:  surround21:CARD=Audigy2,DEV=0 [2.1 Surround output to Front and Subwoofer speakers]
alsa:  surround40:CARD=Audigy2,DEV=0 [4.0 Surround output to Front and Rear speakers]
alsa:  surround41:CARD=Audigy2,DEV=0 [4.1 Surround output to Front, Rear and Subwoofer speakers]
alsa:  surround50:CARD=Audigy2,DEV=0 [5.0 Surround output to Front, Center and Rear speakers]
alsa:  surround51:CARD=Audigy2,DEV=0 [5.1 Surround output to Front, Center, Rear and Subwoofer speakers]
alsa:  surround71:CARD=Audigy2,DEV=0 [7.1 Surround output to Front, Center, Side, Rear and Woofer speakers]
alsa:  iec958:CARD=Audigy2,DEV=0 [IEC958 (S/PDIF) Digital Audio Output]
alsa:  dmix:CARD=Audigy2,DEV=0 [Direct sample mixing device]
alsa:  dmix:CARD=Audigy2,DEV=1 [Direct sample mixing device]
alsa:  dmix:CARD=Audigy2,DEV=2 [Direct sample mixing device]
alsa:  dmix:CARD=Audigy2,DEV=4 [Direct sample mixing device]
alsa:  dsnoop:CARD=Audigy2,DEV=0 [Direct sample snooping device]
alsa:  dsnoop:CARD=Audigy2,DEV=1 [Direct sample snooping device]
alsa:  dsnoop:CARD=Audigy2,DEV=2 [Direct sample snooping device]
alsa:  dsnoop:CARD=Audigy2,DEV=4 [Direct sample snooping device]
alsa:  hw:CARD=Audigy2,DEV=0 [Direct hardware device without any conversions]
alsa:  hw:CARD=Audigy2,DEV=1 [Direct hardware device without any conversions]
alsa:  hw:CARD=Audigy2,DEV=2 [Direct hardware device without any conversions]
alsa:  hw:CARD=Audigy2,DEV=4 [Direct hardware device without any conversions]
alsa:  plughw:CARD=Audigy2,DEV=0 [Hardware device with all software conversions]
alsa:  plughw:CARD=Audigy2,DEV=1 [Hardware device with all software conversions]
alsa:  plughw:CARD=Audigy2,DEV=2 [Hardware device with all software conversions]
alsa:  plughw:CARD=Audigy2,DEV=4 [Hardware device with all software conversions]

When we use ALSA, recommended selection is any default , sysdefault or hw device.
Nocsak was show me his PULSE audio source list. Look like this:

Code: Select all

ffmpeg -sources pulse -hide_banner
Auto-detected sources for pulse:
  alsa_output.pci-0000_00_14.2.analog-stereo.monitor [Monitor of Built-in Audio Analog Stereo]
* alsa_input.pci-0000_00_14.2.analog-stereo [Built-in Audio Analog Stereo]

Lot user will look same devices for PULSE audio system.
Note: "input = mic, line in channels" "output = PCM channel (programs sound)"
Keep this stuff when u want record ...
Script can recognise PULSE or ALSA service ... when u look "alsa: ..." used ALSA, and when u look "pulse: ..." used PULSE audio

Script now look like this:

SR_v2.2_ENG.png
SR_v2.2_ENG.png (69.84 KiB) Viewed 3925 times

NOTE of attachment: remove fake .tgz extension from attachment, add permisson , then run as script.

LINK for attachment: Screen Recorder v2.2 by KuLuSz

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

hi folks
I already edit my kns_v2 script.
Changes:
- can save the "succesfully" network to /root/.kns-save
Note:
My save file look like this with wired and wireless network:

Code: Select all

# KuLuSz's Network Setup v2.1 save file
# * at line start means it will start automatically at boot
#|interface|essid|password|type|wpa_sup driver|wpa_sup conf|dhcp options

*|eth0|||lan|||
|wlan0|NO_SHARE|password|wifi|-Dwext |ctrl_interface=/var/run/wpa_supplicant;;network={;	ssid="NO_SHARE";....

* at line start means it will start automatically at sys boot

- can connect network automatically at sys boot
Note: script create symlink to /etc/init.d/kns_autostart when get "succesfully" network
This link launch the script like a daemon, with save file. "You can make symlink to Desktop for fast reconnect."

The last successful connection will always be set to start automatically.

If u want change between saved connections:
- start again the script set network and done ...
- or edit the "/root/.kns-save" savefile, replace star in line start , what u want ...

If u not want auto start:
- remove /etc/init.d/kns_autostart file
- or remove star from the "/root/.kns-save" savefile
- or remove the savefile

Script replace the /usr/local/bin/defaultconnect file too for use network tray.

Note of DL link: remove .tgz extension , add permission , run as script.
Download: kns_v2.1

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
AntonioPt
Posts: 211
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 92 times
Been thanked: 37 times

Re: Hungarian Puppy Software Collection

Post by AntonioPt »

in Fossa a wasnt able to install bouth apps :(

ok got it need to remove .tgz extension :)

Why astronauts use Linux
Because you can't open windows in space

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

hi pupfans.
I made my new script for set hardware/software brightness control. We can set brightness , gamma ( r, g ,b separately) in realtime... I was make some preset button for simple set... and can handle hardware brightness control too, if kernel support it (usualy work with notebooks)
Depends: gtkdialog, xrandr

Program now looks like this:
Image

Download: Light_control_v2_by_KuLuSz.tgz
Note of attachment: remove fake .tgz extension, add permission,then run as script

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
josejp2424
Posts: 242
Joined: Sun Jul 12, 2020 11:40 pm
Has thanked: 258 times
Been thanked: 153 times

Re: Hungarian Puppy Software Collection

Post by josejp2424 »

KuLuSz wrote: Sat Mar 19, 2022 9:15 pm

hi pupfans.
I made my new script for set hardware/software brightness control. We can set brightness , gamma ( r, g ,b separately) in realtime... I was make some preset button for simple set... and can handle hardware brightness control too, if kernel support it (usualy work with notebooks)
Depends: gtkdialog, xrandr

Program now looks like this:
Image

Download: Light_control_v2_by_KuLuSz.tgz
Note of attachment: remove fake .tgz extension, add permission,then run as script

thanks @KuLuSz

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

No sweat. :D

Thanks for trying it out,
and that you thanked me. :thumbup2:

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

hi folks
i share my new little script of replace "dpkg --root=<dir> -i", while its not work.

The script:
-not necessary for a normal puppy system.
- use the dpkg-deb command.
-will be part of my new system builder.
- it was made because dpkg was not willing to work in a new root directory (I googled the net)
-description:
1. create the directories files needed by dpkg if they are not in the new root directory
2. unpacks the added deb package into the directory of the new root
3. create an entry for the package in the standard dpkg database in the new root directory
4. delete unnecessary files from the new root directory (man,doc)
-usage:
debi /path/to/file.deb /path/to/target/rootdir
or
debi <deb pkg> <new root dir>

Note: If we do not specify a new root directory or the deb package does not exist, the script exits.
Note of attachment link: Remove the fake tgz extension, add premission, then run it as described above.
Download: debi script

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

i was modify the debi script. we can now use the * symbol as an input to read all the deb files for the script...

Code: Select all

 Command: ./debi -h
 usage:		./debi /path/to/file.deb /path/to/target/rootdir
 In directory:	./debi ./*.deb ./rootdir

I added that the individual installer remover configuration scripts of the packages to be installed should be added to the /var/lib/dpkg/pkg-root-scripts directory (this is not really necessary, I only added it because of the system builder...)

Code: Select all

/var/lib/dpkg
├── info
│   ├── busybox-static.list
│   ├── grub-common.list
│   ├── grub-efi-amd64-bin.list
│   ├── grub-pc-bin.list
│   ├── isolinux.list
│   └── syslinux-common.list
├── lock
├── pkg-root-scripts
│   ├── busybox-static
│   │   └── triggers
│   └── grub-common
│       ├── conffiles
│       ├── postinst
│       ├── postrm
│       ├── preinst
│       └── prerm
├── status
└── updates

Original post on hun forum: https://skamilinux-hu.translate.goog/ph ... app#p10189

Note for the attachment: Remove the tgz extension, add permission, then run it as a script.
DOWNLOAD LINK

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi all!

I wrote a shell script which is intended for make easier to decide on a running machine and now with any linux system, based on hardware abilities mainly memory and cpu, - which variations of OS should be installed on it at maximum. There are four categories and because of it was originally made for Puppy Linux derivatives, then this four categories are the following:

Recommended: 64bit
Recommended: modern 64bit
Recommended: pae 32bit
Recommended: retro - noPAE 32 bit

It is very long story to explain in details why that if statements inside are applied to filter and guess and make a choice for recommendations, but at this point I should say: feel free to edit, to modify, to make it more accurate, by on your own. The idea was the most wanted importance at writing this script to let decide in a more accurate way from beginners to experts to be able to decide with, which version of OS-es should be installed or be booted, used, etc. on the tested machine. Additional informations can be exported in several ways, such as from screenshots to command outputs to a plain log or txt files.

On Puppy Linuxes the behavior is simple: Click on script under running DE - and gtkdialog gui version will appear. If you run it from console or terminal on any linux, the following methods possible:

Code: Select all

./BriefSyInfo.sh

sudo ./BriefSysInfo.sh

sudo watch -n1 ./BriefSysInfo.sh

watch -n1 ./BriefSysInfo.sh

sudo ./BriefSysInfo.sh > text.txt

./BriefSysInfo.sh | grep -i recommended

So again, feel free to modify or edit, reproduce in a more accurate way etc...

And ecxuse me dear experts who able to read the script, for my specific strings and variables named in it.

Enjoy: https://sourceforge.net/projects/hunpup ... h/download

BSI-as-root_2023-12-04_20-38-53.png
BSI-as-root_2023-12-04_20-38-53.png (55.47 KiB) Viewed 1991 times
BSI-with-sudo-anylinux-terminal-explained.jpg
BSI-with-sudo-anylinux-terminal-explained.jpg (79.08 KiB) Viewed 1991 times

And finally sorry for my English if there are grammatical mistakes!

User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi All!

New minor corrected BriefSysInfo.sh available:

Code: Select all

#!/bin/bash
# This script has been originally created by nocsak with help of KuLuSz and NTamas and Mobulla.



export LANG=C
export LC_NUMERIC=C
export OUTPUT_CHARSET=UTF-8
if [[ ! -f "/tmp/MEM.txt" ]];then
touch /tmp/MEM.txt && echo -e "Please wait ..." > /tmp/MEM.txt

else
echo "mar van txt"

fi

echo "#!/bin/bash
LANG=C
MEMTF=\"\$(grep \"Mem[TF]\" /proc/meminfo | grep -o \"[0-9]*\")\"
TOTAL=\"\$[\$(sed 2d <<< \"\$MEMTF\")*1024]\"
FREE=\"\$[\$(sed 1d <<< \"\$MEMTF\")*1024]\"
 
MEMBUFF=\"\$(grep \"Buffers:\|^Cached:\" /proc/meminfo | grep -o \"[0-9]*\")\"
CACH=\"\$[\$(sed 2d <<< \"\$MEMBUFF\")*1024]\"
BUUF=\"\$[\$(sed 1d <<< \"\$MEMBUFF\")*1024]\"

MEMSHAR=\"\$(grep \"SReclaimable:\|^Shmem:\" /proc/meminfo | grep -o \"[0-9]*\")\"
SHMEM=\"\$[\$(sed 2d <<< \"\$MEMSHAR\")*1024]\"
SREC=\"\$[\$(sed 1d <<< \"\$MEMSHAR\")*1024]\"

MEMswap=\"\$(grep \"Swap[TF]\" /proc/meminfo | grep -o \"[0-9]*\")\"
TOTALS=\"\$[\$(sed 2d <<< \"\$MEMswap\")*1024]\"
FREES=\"\$[\$(sed 1d <<< \"\$MEMswap\")*1024]\"

CUCC=\"\$[\$CACH+\$SREC]\"
CUCCALL=\"\$[\$CUCC-\$SHMEM]\"


USED=\"\$[\$TOTAL-\$FREE]\"
swapUSED=\"\$[\$TOTALS-\$FREES]\"


Allcache=\"\$[\$BUUF+\$CUCCALL]\"

REALUSED=\"\$[\$USED-\$Allcache]\"

# GBREALUSED=\"\$(printf '%.2f\n' \$(echo \"scale=2; \$REALUSED*1024\" | bc -l))\"

echo -e \"
Used: \$(echo \$[\$TOTAL-\$FREE-\$BUUF-\$CACH] | numfmt --to=iec-i --format='%.2f')
RealUsed: \$(echo \$REALUSED | numfmt --to=iec-i --format='%.2f')
Allocated: \$(echo \$USED | numfmt --to=iec-i --format='%.2f')
Free: \$(echo \$FREE | numfmt --to=iec-i --format='%.2f')
TOTAL: \$(echo \$TOTAL | numfmt --to=iec-i --format='%.2f')

swapUsed: \$(echo \$swapUSED | numfmt --to=iec-i --format='%.2f')
FreeSwap: \$(echo \$FREES | numfmt --to=iec-i --format='%.2f')
TOTALswap: \$(echo \$TOTALS | numfmt --to=iec-i --format='%.2f')
\" > /tmp/MEM.txt



" > /tmp/MEM.sh && chmod +x /tmp/MEM.sh

export since="$(uptime -s)"
decoder=""

valuedd=""
export valuedd=$(grep "flags" /proc/cpuinfo | tr " " "\n" |sort|uniq|sed 's/ //g' | grep -io "^sha_ni$\|^pae$\|^nx$\|^lm$\|^avx$\|^avx2$\|^sse$\|^ssse3$\|^sse2$\|^sse3$\|^pni$\|^fma$\|^aes$\|^sse4_1$\|^sse4_2$\|^mmx$\|^vmx$\|^svm$\|^smx$\|^hypervisor$\|^ht$\|^mp$\|^abm$\|^sse4a$\|^lpae$"|sort |uniq)
ertek=""


if [[ -t 0 ]]; then

echo "$valuedd" | tr "\n" " "
printf "\n\n"
echo "$valuedd" | wc -l | tr "\n" " "; echo "matching Instructon sets found in CPU"
printf "\n\n"
grep 'microcode\|model name\|cache size' /proc/cpuinfo| sort |uniq|rev|cut -f1 -d':'|rev|cut -f2- -d' '| tr '\n' ' '; printf '\n\n';grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev

/tmp/MEM.sh && cat /tmp/MEM.txt

if [[ "$(dmidecode -t memory | grep "Maximum Capacity: " > /dev/null && echo "OK" || echo "Failed")" != "Failed" ]];then

dmidecode -t memory | grep 'Maximum Capacity: '

else

echo 'sudo or root required here'


fi
. /tmp/MEM.sh



if [[ "$(printf "$valuedd" | grep -io "lm\|ssse3" | tr "\n" " ")" == *"lm ssse3"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -gt 3 ]] || [[ "$(printf "$valuedd" | grep -io "lm\|sse4a" | tr "\n" " ")" == *"lm sse4a"* ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -gt 2 ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -gt 3 ]]; then




echo "Recommended: modern 64bit"





elif [[ "$(printf "$valuedd" | grep -io "lm\|pae\|nx\|sse2" | tr "\n" " ")" == *"lm nx pae sse2"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -ge 2 ]] || [[ "$(printf "$valuedd" | grep -io "lm\|pae\|nx\|sse2\|sse4a" | tr "\n" " ")" == *"lm nx pae sse2 sse4a"* ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -ge 2 ]]; then





echo "Recommended: 64bit"



elif [[ "$(printf "$valuedd" | grep -io "lm" | tr "\n" " ")" == " " ]] && [[ "$(printf "$valuedd" | grep -io "pae\|nx\|sse2" | tr "\n" " ")" == *"nx pae sse2"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -ge 2 ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -ge 1 ]]; then




echo "Recommended: pae 32bit"



else



echo "Recommended: retro - noPAE 32 bit"




fi

echo ${since}

echo -n "Uptime: ";uptime | cut -f4- -d' ' | cut -d',' -f1



else









if [[ "$(which gtkdialog)" != "" ]];then




# grep "microcode\|model name\|cache size" /proc/cpuinfo| sort |uniq|rev|cut -f1 -d":"|rev|cut -f2- -d" "| tr "\n" " "; grep -io --color=always " pae \| nx \| lm \| avx \| avx2 " /proc/cpuinfo |sort |uniq|tr "\n" "|";grep "cpu MHz" /proc/cpuinfo|rev|cut -f1 -d" "|rev| tr "\n" " "

# wakkk=$(iw dev | awk '$1=="Interface"{print $2}')

####export wakkk="$(cat /proc/net/arp | grep -v 'IP' | awk '{print $6}' | head -n1)"
#export wakkkl="$(cat /proc/net/arp | grep -v 'IP' | awk '{print $6}' | wc -l)"

if [[ "$(dmidecode -t memory | grep "Maximum Capacity: " > /dev/null && echo "OK" || echo "Failed")" != "Failed" ]];then
decoder="$decoder

<text wrap=\"true\" width-chars=\"20\">
       <label>nincs</label>
       <input>dmidecode -t memory | grep 'Maximum Capacity: '</input>
       <variable>nocsakid</variable>
     </text>
<timer milliseconds=\"true\" interval=\"5500\" visible=\"false\">
     
<action>refresh:nocsakid</action> </timer> " else decoder="$decoder <text wrap=\"true\" width-chars=\"20\"> <label>sudo or root required</label> <input>echo 'sudo or root required here'</input> </text> " fi . /tmp/MEM.sh if [[ "$(printf "$valuedd" | grep -io "lm\|ssse3" | tr "\n" " ")" == *"lm ssse3"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -gt 3 ]] || [[ "$(printf "$valuedd" | grep -io "lm\|sse4a" | tr "\n" " ")" == *"lm sse4a"* ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -gt 2 ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -gt 3 ]]; then ertek="$ertek <text wrap=\"true\" width-chars=\"25\"> <label>Recommended: modern 64bit</label>
</text> " elif [[ "$(printf "$valuedd" | grep -io "lm\|pae\|nx\|sse2" | tr "\n" " ")" == *"lm nx pae sse2"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -ge 2 ]] || [[ "$(printf "$valuedd" | grep -io "lm\|pae\|nx\|sse2\|sse4a" | tr "\n" " ")" == *"lm nx pae sse2 sse4a"* ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -ge 2 ]]; then ertek="$ertek <text wrap=\"true\" width-chars=\"25\"> <label>Recommended: 64bit</label>
</text> " elif [[ "$(printf "$valuedd" | grep -io "lm" | tr "\n" " ")" == " " ]] && [[ "$(printf "$valuedd" | grep -io "pae\|nx\|sse2" | tr "\n" " ")" == *"nx pae sse2"* ]] && [[ "$(echo $TOTAL | numfmt --to=iec-i --format='%.2f' | cut -f1 -d'.')" -ge 2 ]] && [[ "$(grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev | wc -l)" -ge 1 ]]; then ertek="$ertek <text wrap=\"true\" width-chars=\"25\"> <label>Recommended: pae 32bit</label>
</text> " else ertek="$ertek <text wrap=\"true\" width-chars=\"25\"> <label>Recommended: retro - noPAE 32 bit</label>
</text> " fi export MAIN_DIALOG=" <window title=\"$(gettext 'Brief Sys Info')\" icon-name=\"gtk-convert\" resizable=\"true\"> <vbox scrollable=\"true\" width=\"420\" height=\"420\">
<hbox> <frame CPU and Clock speed:> <text wrap=\"true\" width-chars=\"25\"> <label>$(echo $valuedd)</label> </text>
<text wrap=\"true\" width-chars=\"25\"> <label>nincs</label> <input>exec grep 'microcode\|model name\|cache size' /proc/cpuinfo| sort |uniq|rev|cut -f1 -d':'|rev|cut -f2- -d' '| tr '\n' ' '; printf '\n\n';grep 'cpu MHz' /proc/cpuinfo|rev|cut -f1 -d' '|rev </input> <variable>nocsak</variable> </text> <timer milliseconds=\"true\" interval=\"1500\" visible=\"false\">
<action>refresh:nocsak</action> </timer> </frame> <frame RAM> <text auto-refresh=\"true\"> <label>wait</label> <input file>/tmp/MEM.txt</input> <variable>nocsako</variable> </text> <timer milliseconds=\"true\" interval=\"2500\" visible=\"false\"> <action>exec /tmp/MEM.sh</action> </timer> ${decoder} </frame>
</hbox> ${ertek} <text> <label>nincs</label> <input>echo -n \"since: \"; echo ${since} </input> </text>
<text> <label>nincs</label> <input>echo -n \"Uptime: \";uptime | cut -f4- -d' ' | cut -d',' -f1</input> <variable>nocsaki</variable> </text> <timer milliseconds=\"true\" interval=\"5500\" visible=\"false\">
<action>refresh:nocsaki</action> </timer>






<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>

</hbox> </vbox> </window>" gtkdialog --program=MAIN_DIALOG --center else xmessage -title "Error" "No gtkdialog installed!" & fi fi rm /tmp/MEM.txt /tmp/MEM.sh

The corrections were at the top:

Code: Select all

export LANG=C
export LC_NUMERIC=C
export OUTPUT_CHARSET=UTF-8

Because decimal separator from comma to dot.

User avatar
rockedge
Site Admin
Posts: 6518
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2725 times
Been thanked: 2611 times
Contact:

Re: Hungarian Puppy Software Collection

Post by rockedge »

@nocsak Nice! I set the script up on a F96-CE_4 and it works well.

Screenshot(43).jpg
Screenshot(43).jpg (33.27 KiB) Viewed 1687 times

One issue is the height of the gtkdialog window. The bottom "Quit" button is partially under the visible window area ->

Screenshot(42).jpg
Screenshot(42).jpg (40.75 KiB) Viewed 1687 times
User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi @rockedge !

Thanks for cheking the script and giving feedback about!
Yes, that is why I've set the window and first vbox properties to:

Code: Select all

<window title=\"$(gettext 'Brief Sys Info')\" icon-name=\"gtk-convert\" resizable=\"true\">
 <vbox scrollable=\"true\" width=\"420\" height=\"420\">

I decided to do this because different themes on different window managers leads to different appearances. Some of them fit well, but others not. So the ability to scroll is left as a choice.

And I giving now another tip to test it, is to run from terminal. Then terminal only informations will appear.

Because of this if statement:

Code: Select all

if [[ -t 0 ]]; then

which check if the script ran from terminal - console or not.

So again, thanks for checking the script! :)

User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi all again!

I've rewrote my missing lib finder shell script based on KuLuSz previous help and stack overflow results.

it named as gui_not_found_IX.sh

Code: Select all

#!/bin/bash 
#This script REmade by nocsak yyyy.mm.dd. - 2024.02.24. with HUGE HELP OF KuLuSz - Thanks!
 
 export OUTPUT_CHARSET=UTF-8
 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'Missing lib finder')\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox scrollable=\"true\" height=\"250\" width=\"650\">
    <hbox>
    <frame Folders for non-symlinked systems>
<checkbox>
      <label>/bin</label>
      <default>true</default>
      <variable>elso1</variable>
    </checkbox>
    <checkbox>
      <label>/sbin</label>
      <default>true</default>
      <variable>masodik2</variable>
    </checkbox>
    <checkbox>
      <label>/lib</label>
      <default>true</default>
      <variable>nyolcadik8</variable>
    </checkbox>
    <checkbox>
      <label>/lib32</label>
      <default>true</default>
      <variable>kilencedik9</variable>
    </checkbox>
    <checkbox>
      <label>/lib64</label>
      <default>true</default>
      <variable>tizedik10</variable>
    </checkbox>
    <checkbox>
      <label>/libx32</label>
      <default>true</default>
      <variable>huszonkettedik22</variable>
    </checkbox>
    </frame>
<frame optional Folders>
    <checkbox>
      <label>/opt</label>
      <default>false</default>
      <variable>tizenkilencedik19</variable>
    </checkbox>
        <checkbox>
      <label>~/my-applications/bin</label>
      <default>true</default>
      <variable>huszadik20</variable>
    </checkbox>
    <checkbox>
      <label>~/my-applications/lib</label>
      <default>true</default>
      <variable>huszonegyedik21</variable>
    </checkbox>
    </frame>
    <frame Folder for all system>
    <checkbox>
      <label>/usr</label>
      <default>true</default>
      <variable>huszonharmadik23</variable>
    </checkbox>
</frame>
</hbox>
       
<hbox homogeneous=\"true\"> <button ok></button> <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton> </hbox> </vbox> </window> " RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`" eval "$RETSTRING" if [[ "$pagg" = true ]]; then echo "nothing" else exit 1 fi if [[ "$elso1" == true ]]; then elso="/bin" else elso="" fi if [[ "$masodik2" == true ]]; then masodik="/sbin" else masodik="" fi if [[ "$nyolcadik8" == true ]]; then nyolcadik="/lib" else nyolcadik="" fi if [[ "$kilencedik9" == true ]]; then kilencedik="/lib32" else kilencedik="" fi if [[ "$tizedik10" == true ]]; then tizedik="/lib64" else tizedik="" fi if [[ "$tizenkilencedik19" == true ]]; then tizenkilencedik="/opt" else tizenkilencedik="" fi if [[ "$huszadik20" == true ]]; then huszadik="~/my-applications/bin" else huszadik="" fi if [[ "$huszonegyedik21" == true ]]; then huszonegyedik="~/my-applications/lib" else huszonegyedik="" fi if [[ "$huszonkettedik22" == true ]]; then huszonkettedik="/libx32" else huszonkettedik="" fi if [[ "$huszonharmadik23" == true ]]; then huszonharmadik="/usr" else huszonharmadik="" fi LANG=C FAG="" FAG=$(echo "${elso} ${masodik} ${nyolcadik} ${kilencedik} ${tizedik} ${tizenkilencedik} ${huszadik} ${huszonegyedik} ${huszonkettedik} ${huszonharmadik}" | tr -s '[:space:]') ldd $(find -H $FAG -type f -executable -exec file -i '{}' \; | grep 'charset=binary' | cut -f1 -d':') | grep ":\|=> not found" | grep -v required | sed '/\//s/^/|/' | tr -d '\n' | sed 's/|/\n/g' | grep "=> not found" | sort | uniq -c | sort -n > "$HOME"/kimenet_fugges25.txt & export loadrunner=$! ICONSETSGUI8="" ICONSETSGUI8="$ICONSETSGUI8 <vbox> <hbox> <button> <label>OPEN: output</label> <action>geany \"$HOME\"/kimenet_fugges25.txt &</action> </button> </hbox> <frame Process> <text> <label>nothing</label> <input>ps -p $loadrunner</input> <variable>nocsakdokk</variable> </text> <timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action> </timer> </frame> </vbox> " export MAIN_DIALOG=" <window title=\"Finding missing libs\" icon-name=\"gtk-disconnect\" resizable=\"true\"> <vbox> <frame Functions:> <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'OPEN')</label></text> </frame>
<frame Current process:> ${ICONSETSGUI8}
<text> <label>-1-</label> </text> </frame> <hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label></button>

</hbox> </vbox> </window>" gtkdialog --program=MAIN_DIALOG --center & wait $loadrunner if [[ "$(which leafpad)" == "" ]]; then geany "$HOME"/kimenet_fugges25.txt & else leafpad "$HOME"/kimenet_fugges25.txt & fi

please keep in mind, if you choose /usr option then the search process may lasts for a long time!

And another shell script which is for listing all executable binaries' (including shared objects) GLIBC versions. The script is similar like the previous above, but only listing the found GLIBC version numbers from the smallest to the largest. The main window's title shows the system's current glibc version.

it named as objdumper.sh

Code: Select all

#!/bin/bash 
#This script made by nocsak 2024.02.24.
 
 export OUTPUT_CHARSET=UTF-8
 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'GLIBC version finder on: ';ldd --version | head -n1 |rev|cut -f1 -d' '|rev)\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox scrollable=\"true\" height=\"250\" width=\"650\">
    <hbox>
    <frame Folders for non-symlinked systems>
<checkbox>
      <label>/bin</label>
      <default>true</default>
      <variable>elso1</variable>
    </checkbox>
    <checkbox>
      <label>/sbin</label>
      <default>true</default>
      <variable>masodik2</variable>
    </checkbox>
    <checkbox>
      <label>/lib</label>
      <default>true</default>
      <variable>nyolcadik8</variable>
    </checkbox>
    <checkbox>
      <label>/lib32</label>
      <default>true</default>
      <variable>kilencedik9</variable>
    </checkbox>
    <checkbox>
      <label>/lib64</label>
      <default>true</default>
      <variable>tizedik10</variable>
    </checkbox>
    <checkbox>
      <label>/libx32</label>
      <default>true</default>
      <variable>huszonkettedik22</variable>
    </checkbox>
    </frame>
<frame optional Folders>
    <checkbox>
      <label>/opt</label>
      <default>false</default>
      <variable>tizenkilencedik19</variable>
    </checkbox>
        <checkbox>
      <label>~/my-applications/bin</label>
      <default>true</default>
      <variable>huszadik20</variable>
    </checkbox>
    <checkbox>
      <label>~/my-applications/lib</label>
      <default>true</default>
      <variable>huszonegyedik21</variable>
    </checkbox>
    </frame>
    <frame Folder for all system>
    <checkbox>
      <label>/usr</label>
      <default>true</default>
      <variable>huszonharmadik23</variable>
    </checkbox>
</frame>
</hbox>
       
<hbox homogeneous=\"true\"> <button ok></button> <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton> </hbox> </vbox> </window> " RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`" eval "$RETSTRING" if [[ "$pagg" = true ]]; then echo "nothing" else exit 1 fi if [[ "$elso1" == true ]]; then elso="/bin" else elso="" fi if [[ "$masodik2" == true ]]; then masodik="/sbin" else masodik="" fi if [[ "$nyolcadik8" == true ]]; then nyolcadik="/lib" else nyolcadik="" fi if [[ "$kilencedik9" == true ]]; then kilencedik="/lib32" else kilencedik="" fi if [[ "$tizedik10" == true ]]; then tizedik="/lib64" else tizedik="" fi if [[ "$tizenkilencedik19" == true ]]; then tizenkilencedik="/opt" else tizenkilencedik="" fi if [[ "$huszadik20" == true ]]; then huszadik="~/my-applications/bin" else huszadik="" fi if [[ "$huszonegyedik21" == true ]]; then huszonegyedik="~/my-applications/lib" else huszonegyedik="" fi if [[ "$huszonkettedik22" == true ]]; then huszonkettedik="/libx32" else huszonkettedik="" fi if [[ "$huszonharmadik23" == true ]]; then huszonharmadik="/usr" else huszonharmadik="" fi LANG=C FAG="" FAG=$(echo "${elso} ${masodik} ${nyolcadik} ${kilencedik} ${tizedik} ${tizenkilencedik} ${huszadik} ${huszonegyedik} ${huszonkettedik} ${huszonharmadik}" | tr -s '[:space:]') objdump -T $(find -H $FAG -type f -executable -exec file -i '{}' \; | grep 'charset=binary' | cut -f1 -d':') | grep "GLIBC_" | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu > "$HOME"/kimenet_GLIBC_25.txt & export loadrunner=$! ICONSETSGUI8="" ICONSETSGUI8="$ICONSETSGUI8 <vbox> <hbox> <button> <label>OPEN: output</label> <action>geany \"$HOME\"/kimenet_GLIBC_25.txt &</action> </button> </hbox> <frame Process> <text> <label>nothing</label> <input>ps -p $loadrunner</input> <variable>nocsakdokk</variable> </text> <timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action> </timer> </frame> </vbox> " export MAIN_DIALOG=" <window title=\"Listing GLIBC versions\" icon-name=\"gtk-disconnect\" resizable=\"true\"> <vbox> <frame Functions:> <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'OPEN')</label></text> </frame>
<frame Current process:> ${ICONSETSGUI8}
<text> <label>-1-</label> </text> </frame> <hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label></button>

</hbox> </vbox> </window>" gtkdialog --program=MAIN_DIALOG --center & wait $loadrunner if [[ "$(which leafpad)" == "" ]]; then geany "$HOME"/kimenet_GLIBC_25.txt & else leafpad "$HOME"/kimenet_GLIBC_25.txt & fi

missing lib finder leaves output in $HOME/kimenet_fugges25.txt
GLIBC version finder leaves output in $HOME/kimenet_GLIBC_25.txt

require geany or leafpad to be opened by default.

objdump is in binutils package.

screenshot.jpg
screenshot.jpg (82.35 KiB) Viewed 1587 times
User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hello!

I've corrected with the help of KuLuSz and stack overflow examples, the objdumper.sh GLIBC version finder shell script to objdumper2.sh.

So what is made for and what is it do?

It is mainly made for developers who would like to check mixed binaries or shared objects and guess which mismatching in system. For example:
Given puplet has modern kernel but 2.27 glibc. Kernel libc version is 2.34 but netmon_wce is below this version and has segmentation fault. Two way left:
checking the system binaries and check their minimum and maximum glibc versions. Then compare to the segfaulting one. That's it. And now a developer can find or compile itself a matching version of netmon_wce for example. But this applies to any executable binary.

so the script is:

Code: Select all

#!/bin/bash 
#This script made by nocsak yyyy.mm.dd. : 2024.02.25. With help of KuLuSz and stackoverflow website.
 

 export LANG=C
 export LC_NUMERIC=C
 export OUTPUT_CHARSET=UTF-8
 
 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'GLIBC version finder on: ';ldd --version | head -n1 |rev|cut -f1 -d' '|rev)\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox scrollable=\"true\" height=\"250\" width=\"650\">
    <hbox>
    <frame Folders for non-symlinked systems>
<checkbox>
      <label>/bin</label>
      <default>true</default>
      <variable>elso1</variable>
    </checkbox>
    <checkbox>
      <label>/sbin</label>
      <default>true</default>
      <variable>masodik2</variable>
    </checkbox>
    <checkbox>
      <label>/lib</label>
      <default>true</default>
      <variable>nyolcadik8</variable>
    </checkbox>
    <checkbox>
      <label>/lib32</label>
      <default>true</default>
      <variable>kilencedik9</variable>
    </checkbox>
    <checkbox>
      <label>/lib64</label>
      <default>true</default>
      <variable>tizedik10</variable>
    </checkbox>
    <checkbox>
      <label>/libx32</label>
      <default>true</default>
      <variable>huszonkettedik22</variable>
    </checkbox>
    </frame>
<frame optional Folders>
    <checkbox>
      <label>/opt</label>
      <default>false</default>
      <variable>tizenkilencedik19</variable>
    </checkbox>
        <checkbox>
      <label>~/my-applications/bin</label>
      <default>true</default>
      <variable>huszadik20</variable>
    </checkbox>
    <checkbox>
      <label>~/my-applications/lib</label>
      <default>true</default>
      <variable>huszonegyedik21</variable>
    </checkbox>
    </frame>
    <frame Folder for all system>
    <checkbox>
      <label>/usr</label>
      <default>true</default>
      <variable>huszonharmadik23</variable>
    </checkbox>
</frame>
</hbox>
       
<hbox homogeneous=\"true\"> <button ok></button> <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton> </hbox> </vbox> </window> " RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`" eval "$RETSTRING" if [[ "$pagg" = true ]]; then echo "nothing" else exit 1 fi if [[ "$elso1" == true ]]; then elso="/bin" else elso="" fi if [[ "$masodik2" == true ]]; then masodik="/sbin" else masodik="" fi if [[ "$nyolcadik8" == true ]]; then nyolcadik="/lib" else nyolcadik="" fi if [[ "$kilencedik9" == true ]]; then kilencedik="/lib32" else kilencedik="" fi if [[ "$tizedik10" == true ]]; then tizedik="/lib64" else tizedik="" fi if [[ "$tizenkilencedik19" == true ]]; then tizenkilencedik="/opt" else tizenkilencedik="" fi if [[ "$huszadik20" == true ]]; then huszadik="~/my-applications/bin" else huszadik="" fi if [[ "$huszonegyedik21" == true ]]; then huszonegyedik="~/my-applications/lib" else huszonegyedik="" fi if [[ "$huszonkettedik22" == true ]]; then huszonkettedik="/libx32" else huszonkettedik="" fi if [[ "$huszonharmadik23" == true ]]; then huszonharmadik="/usr" else huszonharmadik="" fi LANG=C FAG="" FAG=$(echo "${elso} ${masodik} ${nyolcadik} ${kilencedik} ${tizedik} ${tizenkilencedik} ${huszadik} ${huszonegyedik} ${huszonkettedik} ${huszonharmadik}" | tr -s '[:space:]') for i in $(find -H $FAG -type f -executable -exec file -i '{}' \; | grep 'charset=binary' | cut -f1 -d':') ; do objdump -T "$i" 2>/dev/null | grep -o "/[^:]*\|GLIBC_[0-9][^ \|^\)]*" | sed 's/GLIBC_//' | sort -Vur | sed -n '1,2p;$p'| sed '/\//s/^/|/' | tr '\n' ' ' | sed 's/|/\n/g';done | sort -Vk2 | grep -E "([0-9]{1,}\.)+. $" > "$HOME"/kimenet_GLIBC_allbinary.txt && cat "$HOME"/kimenet_GLIBC_allbinary.txt | sed -n '1p;$p' > "$HOME"/kimenet_GLIBC_min-max.txt & export loadrunner=$! ICONSETSGUI8="" ICONSETSGUI8="$ICONSETSGUI8 <vbox> <hbox> <button> <label>OPEN: output</label> <action>geany \"$HOME\"/kimenet_GLIBC_allbinary.txt &</action> </button> </hbox> <frame Process> <text> <label>nothing</label> <input>ps -p $loadrunner</input> <variable>nocsakdokk</variable> </text> <timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action> </timer> </frame> </vbox> " export MAIN_DIALOG=" <window title=\"Listing GLIBC versions\" icon-name=\"gtk-disconnect\" resizable=\"true\"> <vbox> <frame Functions:> <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'OPEN')</label></text> </frame>
<frame Current process:> ${ICONSETSGUI8}
<text> <label>-1-</label> </text> </frame> <hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label></button>

</hbox> </vbox> </window>" gtkdialog --program=MAIN_DIALOG --center & wait $loadrunner if [[ "$(which leafpad)" == "" ]]; then geany "$HOME"/kimenet_GLIBC_allbinary.txt && geany "$HOME"/kimenet_GLIBC_min-max.txt & else leafpad "$HOME"/kimenet_GLIBC_allbinary.txt && leafpad "$HOME"/kimenet_GLIBC_min-max.txt & fi

and these are the outputs:

Code: Select all

if [[ "$(which leafpad)" == "" ]]; then
geany "$HOME"/kimenet_GLIBC_allbinary.txt && geany "$HOME"/kimenet_GLIBC_min-max.txt &
else

leafpad "$HOME"/kimenet_GLIBC_allbinary.txt && leafpad "$HOME"/kimenet_GLIBC_min-max.txt &

fi

example output:

kimenet_GLIBC_allbinary.txt

Code: Select all

/lib/x86_64-linux-gnu/libc.so.6 2.36 2.2.5 
/sbin/apparmor_parser 2.36 2.2.5 
/sbin/chgpasswd 2.36 2.2.5 
/sbin/chpasswd 2.36 2.2.5 
/sbin/cupsd 2.36 2.2.5 
/sbin/dhclient 2.36 2.2.5 
/sbin/ippeveprinter 2.36 2.2.5 

and

kimenet_GLIBC_min-max.txt

Code: Select all

/bin/glxdemo.x86_64-linux-gnu 2.2.5 2.2.5 
/sbin/ippeveprinter 2.36 2.2.5 
User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi all again!

----Edited, corrected on yyyy.mm.dd. 2024.09.09. CEST 19:47----

I've re-tested the following scripts and seems they are working much better now:

1st: NOStreamer_MX-antix-2.0.sh

Code: Select all

#!/bin/bash



export frame_rate="25"
export video_bitrate="2500k"
export audio_bitrate="256k"


###DO_NOT_EDIT_BELOW######

export LANG=C
export LC_NUMERIC=C



export OUTPUT_CHARSET=UTF-8
export cucf=$(xrandr | grep 'Screen' | grep -o "t.*, " | sed 's/ //g ; s/t\|\,//g')
#export ipcim="$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')"
export ipcim="$(ip route | grep -m1 -o "src [^ ]*" | cut -f2 -d' ')"
export audiocodecs="$(ffmpeg -hide_banner -encoders|grep "A..\..." | grep -v "= Audio\|[248]\-bit\|planar\|[aA][dD][pP]" | cut -f3- -d' ' | sed 's/          / /g')"
export videocodecs="$(ffmpeg -hide_banner -encoders|grep "V..\..." | grep "mpeg\|H\.\|VP\|theora\|wmv" | cut -f3- -d' ' | sed 's/          / /g ; s: / : :g ; s/ part 2// ; s/(cod.*)// ; s/ AVC MPEG-4//')"


NOSTMP="$HOME/ernyostreamelo"
if [[ -d "$NOSTMP" ]];then
echo "1"
else
mkdir -p "$NOSTMP"
xmessage -title "Something Happen" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "Created:

$NOSTMP

" &

fi
export ablakf="$NOSTMP/ablakf.txt"
export ablak="$NOSTMP/ablak.txt"
if [[ -f "$ablak" ]];then
echo "" > "$ablak"
else
touch "$ablak"

fi
if [[ -f "$ablakf" ]];then
echo "" > "$ablakf"
else
touch "$ablakf"

fi
if [[ "$(pgrep pulseaudio)" ]] || [[ "$(pgrep pipewire-pulse)" ]];then
ffmpeg -hide_banner -sources pulse | grep -v "^A" | sed 's/\* /  / ; s/^/pulse:/' > "$NOSTMP"/audio_card_list
else
DEVS="$(ffmpeg -hide_banner -sources alsa | grep -v "^A" | sed 's/^/alsa:/')"
grep default: -m1 <<< "$DEVS" > "$NOSTMP"/audio_card_list
echo "$DEVS" >> "$NOSTMP"/audio_card_list
fi
if [[ ! -f "$NOSTMP/func.sh" ]];then 
echo "#!/bin/bash

export PATHPROG01=\"\$PATHPROG01\"
export PATHPROG02=\"\$PATHPROG02\"
export PATHPROG03=\"\$PATHPROG03\"
export PATHPROG04=\"\$PATHPROG04\"
export filsizz=\"\$filsizz\"
export display=\"\$display\"
export frame_rate=\"\$frame_rate\"

export video_bitrate=\"\$video_bitrate\"
export audio_bitrate=\"\$audio_bitrate\"
export HTVP2=\"\$HTVP2\"
export HTVP1=\"\$HTVP1\"
export iffile=\"\$iffile\"

export ablak=\"\$ablak\"
export ablakf=\"\$ablakf\"

export SR_AUDIO_CARD=\"\$SR_AUDIO_CARD\"

export SOSE=\"\${SR_AUDIO_CARD%%:*}\" # SOund SErver xD
export SODEV=\"\$(cut -f3 -d' ' <<< \"\$SR_AUDIO_CARD\")\"  # Sound device


fos (){
#sert=\$(xwininfo -frame | grep \"Corners\" | tr -d '\n' | sed 's/ Corners: //' | cut -f-4 -d' ' | tr -d ' '| sed 's/+/\,/2')
sert=\$(xwininfo -frame | grep \"Cor\|Wid\|He\" | tr -d '\n' | sed 's/h:/\n/ ; s/Height:/x/ ; s/  / /g ; s/ Corners: //' | cut -f-4 -d' ' | tr -d ' ' | sed 1d | sed 's/+/\,/2')
echo \":0.0+\$(echo \${sert} | cut -f2- -d'+')\" > \"\$ablak\"
echo \"\${sert}\" | cut -f1 -d'+' > \"\$ablakf\"
#rxvt --hold -e echo \$(xwininfo -frame | grep 'geometry\|Corners' | cut -f1- -d 'y')
#printf \" \n\"
}


tosr(){

roadrunner=
roadrunner=\"\"

if [[ \"\$iffile\" == \"\" ]] || [[ \"\$iffile\" == \"0\" ]] || [[ ! \"\$iffile\" ]];then
#ififfile


if [[ \"\$HTVP1\" == true ]];then
#ifHTVP1



if [[ ! \"\$PATHPROG02\" ]] || [[ \"\$PATHPROG02\" == \"0\" ]] || [[ ! \"\$filsizz\" ]] || [[ \"\$filsizz\" == \"0\" ]]; then 
#if_pathprog02_or_filsizz
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"No value given!\" &
else
#else_pathprog02_or_filsizz
		if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" == \"0\" ]] || [[ \"\$PATHPROG04\" == \"\" ]] || [[ ! \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]];then
		#only video screen stream with cvlc broadcast
		ffmpeg -y -hwaccel auto -s \${PATHPROG01} -thread_queue_size \${PATHPROG02} -framerate \${frame_rate} -f x11grab -i \${display} -vcodec \${PATHPROG03} -vb \${video_bitrate} -pix_fmt yuv420p -flags unaligned -f mpegts udp://\${filsizz}?pkt_size=1316 &
			
export loadrunner=\$!
			cvlc -vvv udp://@\${filsizz} --sout '#transcode {scodec=none}:std{access=http,mux=ts,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
			
export loadvlc=\$!
			echo \"v\"
			
		else
	if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" != \"0\" ]] || [[ \"\$PATHPROG04\" != \"\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]] || [[ \"\$PATHPROG03\" != \"\" ]];then
	ffmpeg -y -hwaccel auto -s \${PATHPROG01} -thread_queue_size \${PATHPROG02} -framerate \${frame_rate} -f x11grab -i \${display} -f \${SOSE} -thread_queue_size \${PATHPROG02} -ar 44100 -i \${SODEV} -ac 2 -vcodec \${PATHPROG03} -vb \${video_bitrate} -acodec \${PATHPROG04} -ab \${audio_bitrate} -pix_fmt yuv420p -flags unaligned -f mpegts udp://\${filsizz}?pkt_size=1316 &
					export loadrunner=\$!
					cvlc -vvv udp://@\${filsizz} --sout '#transcode {scodec=none}:std{access=http,mux=ts,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
					export loadvlc=\$!
					echo \"av\"
					
	else
								
								#cvlc -vvv alsa://default --sout '#transcode {acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=http,mux=mp3,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
									ffmpeg -y -f \${SOSE} -thread_queue_size \${PATHPROG02} -ar 44100 -i \${SODEV} -ac 2 -acodec \${PATHPROG04} -ab \${audio_bitrate} -f mpegts udp://\${filsizz}?pkt_size=1316 &
					export loadrunner=\$!
					cvlc -vvv udp://@\${filsizz} --sout '#transcode {scodec=none}:std{access=http,mux=ts,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
					export loadvlc=\$!
								
								
								echo \"a\"
								


	fi
fi
#fi_of_filsizz_and_pathprog02




#fofeltetel
sleep 3



sleep 6
	if ps -p \$loadvlc > /dev/null
	then

	vlfc=\"\"
	vlfc=\"OK\"
	
else
#fofeltetel else
echo \"nincs vfrcvlc\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"cvlc broadcast does not started or cvlc command does not exists!\" &

fi
#fofeltetel fi
sleep 6


if ps -p \$loadrunner > /dev/null
then
	if [[ \"\$vlfc\" == \"OK\" ]];then
	ICONSETSGUI8=\"\"
	ICONSETSGUI8='


	<text>
       <label>nothing</label>
       <input>ps -p \$loadvlc</input>
       <variable>nocsakdokku</variable>
     </text>
	<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokku</action>
     
     </timer>

	<button>
	<label>STOP: cvlc stream</label>
	<action>exec kill -15 \$loadvlc</action>
	</button>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokukh</variable>
     </text>
	<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokukh</action>
     
     </timer>

	<button>
	<label>STOP: ffmpeg felvétel</label>
	<action>exec kill -15 \$loadrunner</action>
	</button>

'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<text>
<label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokuk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokuk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadvlc</input>
       <variable>nocsakdokku</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokku</action>
     
     </timer>

<button>
<label>STOP: cvlc stream</label>
<action>sleep 6 && kill -15 \$loadvlc &</action>
</button>
'
		if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
		export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
		else
		export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
		fi
	else

ICONSETSGUI8=\"\"
ICONSETSGUI8='
<vbox>

<hbox>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg record</label>
<action>exec kill -15 \$loadrunner</action>
</button>
</hbox>
</vbox>
'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<vbox>
<hbox>
      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdookk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdookk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>
</hbox>
</vbox>
'
				if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
				else
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &

				fi
		fi
	else
echo \"not run\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"cvlc broadcast does not started!\" &

	fi

fi







elif [[ \"\$HTVP2\" == true ]];then
#elifHTVP2



#ittartok






if [[ ! \"\$PATHPROG02\" ]] || [[ \"\$PATHPROG02\" == \"0\" ]] || [[ ! \"\$filsizz\" ]] || [[ \"\$filsizz\" == \"0\" ]]; then 
#if_pathprog02_or_filsizz
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"No value given!\" &
else
#else_pathprog02_or_filsizz
		if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" == \"0\" ]] || [[ \"\$PATHPROG04\" == \"\" ]] || [[ ! \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]];then
		#only video screen stream with cvlc broadcast
		ffmpeg -y -hwaccel auto -s \${PATHPROG01} -thread_queue_size \${PATHPROG02} -framerate \${frame_rate} -f x11grab -i \${display} -vcodec \${PATHPROG03} -vb \${video_bitrate} -pix_fmt yuv420p -flags unaligned -f mpegts udp://\${filsizz}?pkt_size=1316 &
			export loadrunner=\$!
			
			
			echo \"v\"
			
		else
	if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" != \"0\" ]] || [[ \"\$PATHPROG04\" != \"\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]] || [[ \"\$PATHPROG03\" != \"\" ]];then
	ffmpeg -y -hwaccel auto -s \${PATHPROG01} -thread_queue_size \${PATHPROG02} -framerate \${frame_rate} -f x11grab -i \${display} -f \${SOSE} -thread_queue_size \${PATHPROG02} -ar 44100 -i \${SODEV} -ac 2 -vcodec \${PATHPROG03} -vb \${video_bitrate} -acodec \${PATHPROG04} -ab \${audio_bitrate} -pix_fmt yuv420p -flags unaligned -f mpegts udp://\${filsizz}?pkt_size=1316 &
					export loadrunner=\$!
					
					
					echo \"av\"
					
	else
								
								#roadrunner=\"cvlc -vvv alsa://default --sout '#transcode {acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=http,mux=mp3,dst=0.0.0.0:12000/}'\"
									ffmpeg -y -f \${SOSE} -thread_queue_size \${PATHPROG02} -ar 44100 -i \${SODEV} -ac 2 -acodec \${PATHPROG04} -ab \${audio_bitrate} -f mpegts udp://\${filsizz}?pkt_size=1316 &s
export loadrunner=\$!
								echo \"a\"
								


	fi
fi
#fi_of_filsizz_and_pathprog02




#fofeltetel fi
sleep 6


if ps -p \$loadrunner > /dev/null
then
	
ICONSETSGUI8=\"\"
ICONSETSGUI8='
<vbox>

<hbox>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg record</label>
<action>exec kill -15 \$loadrunner</action>
</button>
</hbox>
</vbox>
'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<vbox>
<hbox>
      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdookk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdookk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>
</hbox>
</vbox>
'
				if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
				else
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &

				fi
	else
echo \"not run\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"ffmpeg multicast does not started!\" &

	fi
fi









#eddigtartok

else
#elseHTVP


echo \"HTVP else\"




fi
#fiHTVP







else
#elseofiffile







if [[ \"\$HTVP1\" == true ]];then
#ifHTVP1



if [[ ! \"\$PATHPROG02\" ]] || [[ \"\$PATHPROG02\" == \"0\" ]] || [[ ! \"\$filsizz\" ]] || [[ \"\$filsizz\" == \"0\" ]]; then 
#if_pathprog02_or_filsizz
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"No value given!\" &
else
#else_pathprog02_or_filsizz
		if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" == \"0\" ]] || [[ \"\$PATHPROG04\" == \"\" ]] || [[ ! \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]];then
		#only video screen stream with cvlc broadcast

			ffmpeg -y -hwaccel auto -thread_queue_size \${PATHPROG02} -re -i \"\${iffile}\" -f mpegts udp://\${filsizz}?pkt_size=1316 &
			export loadrunner=\$!
			cvlc -vvv udp://@\${filsizz} --sout '#transcode {scodec=none}:std{access=http,mux=ts,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
			export loadvlc=\$!
			echo \"v\"
			
		else
	if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" != \"0\" ]] || [[ \"\$PATHPROG04\" != \"\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]] || [[ \"\$PATHPROG03\" != \"\" ]];then



	ffmpeg -y -hwaccel auto -thread_queue_size \${PATHPROG02} -re -i \"\${iffile}\" -f mpegts udp://\${filsizz}?pkt_size=1316 &
					export loadrunner=\$!
					cvlc -vvv udp://@\${filsizz} --sout '#transcode {scodec=none}:std{access=http,mux=ts,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
					export loadvlc=\$!
					echo \"av\"
					
	else
								
								cvlc -vvv \"\${iffile}\" --sout '#transcode {acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=http,mux=mp3,dst=0.0.0.0:12000/}' :sout-all :sout-keep &
								export loadrunner=\$!
								echo \"a\"
								


	fi
fi
#fi_of_filsizz_and_pathprog02




#fofeltetel
sleep 3



sleep 6
	if ps -p \$loadvlc > /dev/null
	then

	vlfc=\"\"
	vlfc=\"OK\"
	
else
#fofeltetel else
echo \"nincs vfrcvlc\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"cvlc broadcast does not started or cvlc command does not exists!\" &

fi
#fofeltetel fi
sleep 6


if ps -p \$loadrunner > /dev/null
then
	if [[ \"\$vlfc\" == \"OK\" ]];then
	ICONSETSGUI8=\"\"
	ICONSETSGUI8='


	<text>
       <label>nothing</label>
       <input>ps -p \$loadvlc</input>
       <variable>nocsakdokku</variable>
     </text>
	<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokku</action>
     
     </timer>

	<button>
	<label>STOP: cvlc stream</label>
	<action>exec kill -15 \$loadvlc</action>
	</button>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokukh</variable>
     </text>
	<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokukh</action>
     
     </timer>

	<button>
	<label>STOP: ffmpeg felvétel</label>
	<action>exec kill -15 \$loadrunner</action>
	</button>

'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<text>
<label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokuk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokuk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadvlc</input>
       <variable>nocsakdokku</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokku</action>
     
     </timer>

<button>
<label>STOP: cvlc stream</label>
<action>sleep 6 && kill -15 \$loadvlc &</action>
</button>
'
		if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
		export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
		else
		export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
		fi
	else

ICONSETSGUI8=\"\"
ICONSETSGUI8='
<vbox>

<hbox>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg record</label>
<action>exec kill -15 \$loadrunner</action>
</button>
</hbox>
</vbox>
'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<vbox>
<hbox>
      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdookk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdookk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>
</hbox>
</vbox>
'
				if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
				else
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &

				fi
		fi
	else
echo \"not run\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"cvlc broadcast does not started!\" &

	fi
fi








elif [[ \"\$HTVP2\" == true ]];then
#elifHTVP2



#ittartokccc






if [[ ! \"\$PATHPROG02\" ]] || [[ \"\$PATHPROG02\" == \"0\" ]] || [[ ! \"\$filsizz\" ]] || [[ \"\$filsizz\" == \"0\" ]]; then 
#if_pathprog02_or_filsizz
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"No value given!\" &
else
#else_pathprog02_or_filsizz
		if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" == \"0\" ]] || [[ \"\$PATHPROG04\" == \"\" ]] || [[ ! \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]];then
		#only video screen stream with cvlc broadcast
			ffmpeg -y -hwaccel auto -thread_queue_size \${PATHPROG02} -re -i \${iffile} -f mpegts udp://\${filsizz}?pkt_size=1316 &
			export loadrunner=\$!
			
			echo \"v\"
			
		else
	if [[ \"\$PATHPROG04\" ]] && [[ \"\$PATHPROG04\" != \"0\" ]] || [[ \"\$PATHPROG04\" != \"\" ]] && [[ \"\$PATHPROG03\" ]] && [[ \"\$PATHPROG03\" != \"0\" ]] || [[ \"\$PATHPROG03\" != \"\" ]];then
ffmpeg -y -hwaccel auto -thread_queue_size \${PATHPROG02} -re -i \${iffile} -f mpegts udp://\${filsizz}?pkt_size=1316 &
export loadrunner=\$!	
					
					echo \"av\"
					
	else
								
								#roadrunner=\"cvlc -vvv alsa://default --sout '#transcode {acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=http,mux=mp3,dst=0.0.0.0:12000/}'\"
ffmpeg -y -hwaccel auto -thread_queue_size \${PATHPROG02} -re -i \${iffile} -f mpegts udp://\${filsizz}?pkt_size=1316 &
export loadrunner=\$!
								echo \"a\"
								


	fi
fi
#fi_of_filsizz_and_pathprog02




#fofeltetel fi
sleep 6


if ps -p \$loadrunner > /dev/null
then
	
ICONSETSGUI8=\"\"
ICONSETSGUI8='
<vbox>

<hbox>

      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg record</label>
<action>exec kill -15 \$loadrunner</action>
</button>
</hbox>
</vbox>
'
ICONSETSGUI9=\"\"
ICONSETSGUI9='
<vbox>
<hbox>
      <text>
       <label>nothing</label>
       <input>ps -p \$loadrunner</input>
       <variable>nocsakdookk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdookk</action>
     
     </timer>

<button>
<label>STOP: ffmpeg felvétel</label>
<action>sleep 6 && kill -15 \$loadrunner &</action>
</button>
</hbox>
</vbox>
'
				if [[ \"\$PATHPROG03\" == \"h264\" ]] || [[ \"\$PATHPROG03\" == \"libx264\" ]];then
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI9}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &
				else
export MAIN_DIALOG='
<window title=\"Screen Streamer - Stop\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>Stop Recording</label></text>
  </frame>
     <frame  Running process:>
  '\"\${ICONSETSGUI8}\"'
    <text>
      <label>-1-</label>
     </text>
    </frame>
  <hbox>
<button><input file stock=\"gtk-quit\"></input><label>QUIT</label></button>
  </hbox>
 </vbox>
</window>'
gtkdialog --program=MAIN_DIALOG --center &

				fi
	else
echo \"not run\"
xmessage -title \"Something Wrong\" -buttons Ok:0,Cancel:1 -default Ok -nearmouse \"ffmpeg multicast does not started!\" &

	fi
fi









#eddigtartok

else
#elseHTVP


echo \"HTVP else\"




fi
#fiHTVP




fi
#iffilefi


}


if [[ \"\$1\" == \"fos\" ]];then

fos

elif [[ \"\$1\" == \"tosr\" ]];then

tosr

else

echo \"BaD\"

fi








" > "$NOSTMP"/func.sh && chmod +x "$NOSTMP"/func.sh
else
echo "van"

fi
#export novik="$(date +'%Y_%m_%d-%H-%M-%S')"


if [[ "$(which cvlc)" != "" ]];then
echo "cvlc found"
xmessage -title "cvlc check" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "cvlc:

FOUND!

" -timeout 5 &

else
vfrcvlc=""

fi





 DEF=""
[[ "$1" ]]&& DEF="<default>$1</default>"
 
 export MAIN_DIALOG='
 <window title="Screen or File Streamer - ffmpeg - nocsak" icon-name="folder-remote" resizable="true" width-request="400">
    <vbox>
    <frame File>
    <hbox homogeneous="true">
    
    <entry space-expand="false" space-fill="false">
     '"${DEF}"'
<variable>iffile</variable>
     </entry>
     
     <button>
   <label>Open File for stream</label>
   
   <input file stock="gtk-open"></input>
   <action>fileselect:iffile</action>
   </button>
   
   </hbox>
     </frame>

    
     <frame Resolution and thread_queue_size>
    <hbox homogeneous="true" tooltip-text="Resolution">
    
	
    <entry auto-refresh="true" space-expand="false" space-fill="false" editable="false"><default>'$cucf'</default><input file>'$ablakf'</input>
    <variable>PATHPROG01</variable>
    </entry>	
	
     
     
     
     
     <entry space-expand="false" space-fill="false">
      <default>16M</default>
      <variable>PATHPROG02</variable>
     </entry>
     </hbox>
     </frame>
     <frame display and position:>
     <hbox homogeneous="true" tooltip-text="window">
	
    <entry auto-refresh="true" editable="false" space-expand="false" space-fill="false"><default>:0.0+0,0</default><input file>'$ablak'</input>
    <variable>display</variable>
    </entry>	
	
     <button><action>'$NOSTMP'/func.sh fos &</action><label>window</label></button>
     </hbox>
     </frame>
     <frame vcodec acodec:>
     <hbox homogeneous="true">
	<entry tooltip-text="'$videocodecs'">
	 <default>mpeg2video</default>
	<variable>PATHPROG03</variable>
	</entry>
	<entry tooltip-text="'$audiocodecs'">
	 <default>libmp3lame</default>
	<variable>PATHPROG04</variable>
	</entry>
	</hbox>
     </frame>
     <frame choices to stream>
               <radiobutton active="true">
      <label>ffmpeg multicast with cvlc broadcast</label>
      <variable>HTVP1</variable>
    </radiobutton>

    <radiobutton>
      <label>ffmpeg multicast only</label>
      <variable>HTVP2</variable>
    </radiobutton>
     </frame>
     <frame UDP IP address:portnumber http cvlc port is 12000>
     <entry>
      <default>'$ipcim':11000</default>
      <variable>filsizz</variable>
     </entry>
     </frame>
     <frame Sound>
        <comboboxtext width-request="100" tooltip-text="Chooseable soundcards">
    <variable>SR_AUDIO_CARD</variable>    <input file>'$NOSTMP'/audio_card_list</input>
   </comboboxtext>
     
     </frame>
     <frame killall ffmpeg and vlc>
     <hbox>

	<timer interval="1" visible="false">
     
     <action condition="command_is_true([ ! -z $(pidof ffmpeg) ]&& echo true)">enable:ffmpeget</action>
     <action condition="command_is_true([ -z $(pidof ffmpeg) ]&& echo true)">disable:ffmpeget</action>
     
     </timer>

	<timer interval="1" visible="false">
     
       <action condition="command_is_true([ ! -z $(pidof vlc) ]&& echo true)">enable:vlct</action>
       <action condition="command_is_true([ -z $(pidof vlc) ]&& echo true)">disable:vlct</action>
     
     </timer>
     </hbox>
     
     <button>
<label>killall ffmpeg</label>

<action>killall -9 ffmpeg</action>
<variable>ffmpeget</variable>
</button>
     <button>
<label>killall vlc</label>

<action>killall -9 vlc</action>
<variable>vlct</variable>
</button>

    
     </frame>
     <hbox homogeneous="true">
     
      <button><label>START</label><action>'$NOSTMP'/func.sh tosr &</action></button>
      <togglebutton><input file stock="gtk-quit"></input><label>Quit</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton>
     </hbox>
    </vbox>
    </window>
   '
 RETSTRING="$(gtkdialog --program=MAIN_DIALOG --center)"
 eval "$RETSTRING"
if [[ "$pagg" = true ]]; then
echo "nothing"
else
exit 1
fi


exit 0


nostreamer.gif
nostreamer.gif (528.59 KiB) Viewed 1413 times

-------

2nd: dbmW.sh

Code: Select all

#!/bin/bash
export LANG=C
export LC_NUMERIC=C
export OUTPUT_CHARSET=UTF-8
if [[ ! -f "/tmp/cukik.txt" ]];then
touch "/tmp/cukik.txt"

else

echo "ok"
fi

cat << 'EOF' > "/tmp/FuF.sh" && chmod +x "/tmp/FuF.sh"
#!/bin/bash

funcelso(){
if [[ "$cuki" -lt "1000" ]];then

ans="$(echo "scale=10;1*e(($cuki/10)*l(10))*1" | bc -l | awk '{printf "%f", $0}')"
echo "$ans" > /tmp/cukik.txt
else
echo "OverDose" > /tmp/cukik.txt

fi
	
	
	
}


funck(){

fans="$(echo "scale=10;1*((l($cukix)/l(10)*10))*1" | bc -l | awk '{printf "%f", $0}')"
echo "$fans" > /tmp/cukik.txt
	
	
	
}
if [[ "$1" == "ablak" ]];then
funcelso "$@"

elif [[ "$1" == "ajto" ]];then
funck "$@"
else
echo "nem"
fi
EOF


export MAIN_DIALOG='
<window title="mW and dBm conversion" allow-shrink="true" icon-name="gtk-select-color">
 <vbox>
   <frame dBm to mW>
     <entry>
       <variable>cuki</variable>
       <action type="refresh">cukik</action>
       
       <action>/tmp/FuF.sh ablak</action>
     </entry>
   </frame>
   <frame result>
     <entry auto-refresh="true">
       <variable>cukik</variable>
       <input file>/tmp/cukik.txt</input>
     </entry>
   </frame>
      <frame mW to dBm>
     <entry auto-refresh="true">
       <variable>cukix</variable>
       
       
       <action>/tmp/FuF.sh ajto</action>
     </entry>
   </frame>
   <hbox>
     <button ok></button>
     <button cancel></button>
   </hbox>
 </vbox>
 </window>
'

gtkdialog --program=MAIN_DIALOG

rm /tmp/FuF.sh
rm /tmp/cukik.txt






dBm_mW.gif
dBm_mW.gif (115.52 KiB) Viewed 1413 times

The 1st script is a Desktop or file streamer over ffmpeg multicast and cvlc broadcast capabilities. This gtkdialog script's main deps are: ffmpeg, x11-utils, xmessage, wmctrl, gtkdialog and vlc and cvlc mostly run on the rest of puppy linuxes and or MX and antix derivatives or on those Devuan and or Debian systems which matches with the earilier listed deps.

If file given then file will be streamed, if this field is blank then the mic and the entire screen will be streamed. If both video and audio codec entries are given, then AuidoVideo stream will be started, if only one of them isn't blank then that given codec audio or video will start only, and if mouse hovering over the codecs' fields then tooltip will appear with the available ffmpeg codecs over both fields audio and video. Any further combinations are depends on the user. For example if only ffmpeg multicast are given, then the address beginning at the IP address with (at) sign

Code: Select all

udp://@192.168.0.101:11000

if it will be streamed over another machine, it is possible with this syntax. And of course with the correct steps over http stream in VLC.

In this case the multicast target IP address must be the streamer PC's IP address, and as the above exmaple shows, the udp ip which will be streamed over the Streamer PC with (at) sign before the IP address, with Streaming steps over the streamer machine's VLC. Do not forget to Port Forward the streamer PC-s LAN IP and port number on the correct way, to let it public over the World Wide Web. Do not forget the script is streaming it over http if clvc was a choosen option.

Every cvlc stream is over http and port 12000
Every udp multicast stream with ffmpeg can be modified in the field. If you edit the shell script you can choose these presets at the top:

Code: Select all


export frame_rate="5"
export video_bitrate="1900k"
export audio_bitrate="96k"

Enjoy!

2nd script is a gtkdialog shell script which is for calculate between mW and dBm with. This version is the newest, and corrected.

Enjoy!

Last edited by nocsak on Mon Sep 09, 2024 5:51 pm, edited 1 time in total.
User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi again!

Some scripts made by me again:

zdrv-converter.sh
edited, corrected if 32bit kernel merged... usr lib modules should be moved only....

Code: Select all

#!/bin/bash

 export LANG=C
 export LC_NUMERIC=C
 
 export OUTPUT_CHARSET=UTF-8
 
 
fuxni=""
wrner=""
wrner="gtkdialog"
erner=""
erner="dir2xsfs"
terner=""
terner=""



if [[ ! -f "/usr/sbin/dir2xsfs" ]];then 

cat << 'EOF' > /usr/sbin/dir2xsfs && chmod +x /usr/sbin/dir2xsfs
#!/bin/bash

. /etc/DISTRO_SPECS

t=`echo "$1" | sed "s/\/$//"`
z=`echo "$1" | sed "s/\/$//"`

if [ ! -d "$t" ];then

  echo "error: no valid folder specified!"
  exit 0

fi

### if no _versionnummer in the end, get it from system
check=`echo $t | sed "s/\(.*\)_[0-9][0-9][0-9]$/\1/"`

#echo --- $check

if [ "$check" == "$t" ];then

  v=$DISTRO_VERSION
  z="${check}_$v"

fi
#echo $t - $z


if [ -f "$z.sfs" ];then

  echo "$z.sfs already exists, refusing to overwrite it!"
  exit 0

fi

urxvt -g 80x6 -e mksquashfs "$t" "$z.sfs" -comp xz -Xbcj x86 -b 512K
md5sum "$z.sfs" > "$z.sfs-md5.txt"
sync


echo
echo
s=`du -m "$z.sfs" | sed "s/\s.*//"`
echo "created: $z.sfs ( $s MB )"
echo "created: $z.sfs-md5.txt"
echo
echo "...byebye..."
echo


EOF


else
echo "exists"

fi


for i in echo gtkdialog grep sed $wrner $erner date uname;do
if [ -z "$(which $i)" ];then
puci=$(echo $i)
fi
done


if [[ "$puci" == *"$wrner"* || "$puci" == *"$erner"* ]];then
fuxni="WARNING: no $wrner AND $erner"


if [ -t 0 ];then
echo "missing commands: $puci and $duci    $fuxni"
else
xmessage "missing commands: $puci and $duci     $fuxni"
fi

else




novik=$(date +'%Y_%m_%d-%H-%M-%S')

export CURD="/tmp/unki"


 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'zdrv converter v1.0')\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox>
    <frame kernel (modules) or zdrv sfs file>
     <entry>
      <variable>PATHPROG01</variable>
     </entry>
          <button>
       <label>Search</label>
   <input file stock=\"gtk-open\"></input>
   <action>fileselect:PATHPROG01</action>
   </button>
     </frame>
     <frame Filename to save>
     <hbox homogeneous=\"true\">
     <entry space-expand=\"false\" space-fill=\"false\" fs-title=\"Choose a directory:\" fs-action=\"folder\">
    <default>$CURD</default>
    <variable>DIReR</variable>
   </entry>
   <button>
   <label>Search</label>
   <input file stock=\"gtk-open\"></input>
   <action>fileselect:DIReR</action>
   </button>
   </hbox>
     </frame>
     <radiobutton active=\"true\">
      <label>to usrmerged</label>
      <variable>HTVP1</variable>
    </radiobutton>

    <radiobutton>
      <label>to semi-usrmerged</label>
      <variable>HTVP2</variable>
    </radiobutton>
    <radiobutton>
      <label>to non-usrmerged</label>
      <variable>HTVP3</variable>
    </radiobutton>
     <hbox homogeneous=\"true\">
      <button></button>
      <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton>
     </hbox>
    </vbox>
    </window>
   "
 RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`"
 eval "$RETSTRING"

if [[ "$pagg" = true ]]; then

echo "nothing"

else

exit 1

fi

if [[ ! -d "$DIReR" ]];then
mkdir -p "$DIReR"

else
echo "dir ok"
fi

if [[ -d "$DIReR/zzdrv" ]];then
rm -rf "$DIReR"/*
else
echo "DELETED, OK"
fi

if [ ! "$PATHPROG01" ] || [ "$PATHPROG01" = "0" ] || [ ! "$DIReR" ] || [ "$DIReR" = "0" ]; then 


xmessage -title "Something wrong" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "No value given" -timeout 5 

else 




if [[ ! -f "$PATHPROG01" ]];then
cp -pan "$PATHPROG01" "$DIReR" && unsquashfs -d "$DIReR"/zzdrv "$PATHPROG01" && touch "$DIReR"/zz.txt
else
unsquashfs -d "$DIReR"/zzdrv "$PATHPROG01" && touch "$DIReR"/zz.txt

fi







if [[ -f "$DIReR/zz.txt" ]] && [[ "$(ls -l $DIReR/zzdrv | grep -o "lib\|sbin" | tr "\n" " ")" == "" ]];then

source=""
source="merged"

echo "$source" > "$DIReR"/zz.txt
elif [[ -f "$DIReR/zz.txt" ]] && [[ "$(ls -l $DIReR/zzdrv | grep -o "lib\|sbin" | tr "\n" " ")" == "lib " ]];then
source=""
source="semi"

echo "$source" > "$DIReR"/zz.txt
elif [[ -f "$DIReR/zz.txt" ]] && [[ "$(ls -l $DIReR/zzdrv | grep -o "lib\|sbin" | tr "\n" " ")" == "lib sbin " ]];then

source=""
source="classic"
echo "$source" > "$DIReR"/zz.txt
else
echo "FAIL"
xmessage -title "ERROR" "Failed to determine source!
exiting....
" &


exit 1
fi











if [[ "$HTVP1" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" == "merged" ]];then


xmessage -title "ERROR" "output structure will be same as input
$(cat "$DIReR"/zz.txt)
exiting....
" &



exit 1

elif [[ "$HTVP2" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" == "semi" ]];then


xmessage -title "ERROR" "output structure will be same as input
$(cat "$DIReR"/zz.txt)
exiting....
" &

exit 1
elif [[ "$HTVP3" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" == "classic" ]];then
xmessage -title "ERROR" "output structure will be same as input
$(cat "$DIReR"/zz.txt)
exiting....
" &



exit 1

else






if [[ "$HTVP1" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" != "merged" ]];then



if [[ "$(cat "$DIReR"/zz.txt)" == "classic" ]];then
mv "$DIReR"/zzdrv/lib/* "$DIReR"/zzdrv/usr/lib/ && rm -rf "$DIReR"/zzdrv/lib && mv "$DIReR"/zzdrv/sbin "$DIReR"/zzdrv/usr/ && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &
elif [[ "$(cat "$DIReR"/zz.txt)" == "semi" ]];then
mv "$DIReR"/zzdrv/lib "$DIReR"/zzdrv/usr/ && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &
else
xmessage -title "ERROR" "Can not create output sfs!
Source different or not recognized of the 3 options.
exiting....
" &



exit 1
fi


elif [[ "$HTVP2" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" != "semi" ]];then
if [[ "$(cat "$DIReR"/zz.txt)" == "merged" ]];then
mkdir -p "$DIReR"/zzdrv/lib && mv "$DIReR"/zzdrv/usr/lib/modules "$DIReR"/zzdrv/lib && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &


elif [[ "$(cat "$DIReR"/zz.txt)" == "classic" ]];then
mv "$DIReR"/zzdrv/sbin "$DIReR"/zzdrv/usr/ && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &
else
xmessage -title "ERROR" "Can not create output sfs!
Source different or not recognized of the 3 options.
exiting....
" &



exit 1
fi


elif [[ "$HTVP3" == true ]] && [[ "$(cat "$DIReR"/zz.txt)" != "classic" ]];then
if [[ "$(cat "$DIReR"/zz.txt)" == "semi" ]];then
mv "$DIReR"/zzdrv/usr/sbin "$DIReR"/zzdrv/ && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &

elif [[ "$(cat "$DIReR"/zz.txt)" == "merged" ]];then
mv "$DIReR"/zzdrv/usr/sbin "$DIReR"/zzdrv/ && mkdir -p "$DIReR"/zzdrv/lib && mv "$DIReR"/zzdrv/usr/lib/modules "$DIReR"/zzdrv/lib  && dir2xsfs "$DIReR"/zzdrv && defaultfilemanager "$DIReR" &

else

xmessage -title "ERROR" "Can not create output sfs!
Source different or not recognized of the 3 options.
exiting.... 
" &

exit 1
fi

fi



fi










export loadrunner=$!
export $DIReR













sleep 1

if ps -p $loadrunner > /dev/null
then



ICONSETSGUI8=""







ICONSETSGUI8="$ICONSETSGUI8

<vbox>
<hbox>
<button>
<label>Delete output</label>
<action>rm -rf \"$DIReR\"/* &</action>
</button>
<button>
<label>open output</label>
<action>defaultfilemanager \"$DIReR\" &</action>
</button>

</hbox>

<frame Process>
      <text>
       <label>nothing</label>
       <input>ps -p $loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>
</frame>
</vbox>

"


export MAIN_DIALOG="
<window title=\"zzdrv output\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'OPEN zzdrv output')</label></text>
  </frame>
  
     <frame  Current Converting:>
 <text>
 <label>$PATHPROG01</label>
 </text>
     
  ${ICONSETSGUI8}
  
    <text>
      <label>-1-</label>
     </text>
    </frame>

  <hbox>
  
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
  
   
  </hbox>
 </vbox>

</window>"

gtkdialog --program=MAIN_DIALOG --center


else




echo "not run"

xmessage -title "Something wrong" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "Recording didn't start!" -timeout 5 


fi








fi
fi







o2.gif
o2.gif (34.84 KiB) Viewed 1305 times
o3.gif
o3.gif (40.45 KiB) Viewed 1305 times

and

fdrv-converter.sh

Code: Select all

#!/bin/bash

 export LANG=C
 export LC_NUMERIC=C
 
 export OUTPUT_CHARSET=UTF-8
 
 
fuxni=""
wrner=""
wrner="gtkdialog"
erner=""
erner="dir2xsfs"
terner=""
terner=""



if [[ ! -f "/usr/sbin/dir2xsfs" ]];then 

cat << 'EOF' > /usr/sbin/dir2xsfs && chmod +x /usr/sbin/dir2xsfs
#!/bin/bash

. /etc/DISTRO_SPECS

t=`echo "$1" | sed "s/\/$//"`
z=`echo "$1" | sed "s/\/$//"`

if [ ! -d "$t" ];then

  echo "error: no valid folder specified!"
  exit 0

fi

### if no _versionnummer in the end, get it from system
check=`echo $t | sed "s/\(.*\)_[0-9][0-9][0-9]$/\1/"`

#echo --- $check

if [ "$check" == "$t" ];then

  v=$DISTRO_VERSION
  z="${check}_$v"

fi
#echo $t - $z


if [ -f "$z.sfs" ];then

  echo "$z.sfs already exists, refusing to overwrite it!"
  exit 0

fi

urxvt -g 80x6 -e mksquashfs "$t" "$z.sfs" -comp xz -Xbcj x86 -b 512K
md5sum "$z.sfs" > "$z.sfs-md5.txt"
sync


echo
echo
s=`du -m "$z.sfs" | sed "s/\s.*//"`
echo "created: $z.sfs ( $s MB )"
echo "created: $z.sfs-md5.txt"
echo
echo "...byebye..."
echo


EOF


else
echo "exists"

fi


for i in echo gtkdialog grep sed $wrner $erner date uname;do
if [ -z "$(which $i)" ];then
puci=$(echo $i)
fi
done


if [[ "$puci" == *"$wrner"* || "$puci" == *"$erner"* ]];then
fuxni="WARNING: no $wrner AND $erner"


if [ -t 0 ];then
echo "missing commands: $puci and $duci    $fuxni"
else
xmessage "missing commands: $puci and $duci     $fuxni"
fi

else




novik=$(date +'%Y_%m_%d-%H-%M-%S')

export CURD="/tmp/unki"


 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'fdrv converter v1.0')\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox>
    <frame firmware or fdrv sfs file>
     <entry>
      <variable>PATHPROG01</variable>
     </entry>
          <button>
       <label>Search</label>
   <input file stock=\"gtk-open\"></input>
   <action>fileselect:PATHPROG01</action>
   </button>
     </frame>
     <frame Filename to save>
     <hbox homogeneous=\"true\">
     <entry space-expand=\"false\" space-fill=\"false\" fs-title=\"Choose a directory:\" fs-action=\"folder\">
    <default>$CURD</default>
    <variable>DIReR</variable>
   </entry>
   <button>
   <label>Search</label>
   <input file stock=\"gtk-open\"></input>
   <action>fileselect:DIReR</action>
   </button>
   </hbox>
     </frame>
     <radiobutton active=\"true\">
      <label>to usrmerged</label>
      <variable>HTVP1</variable>
    </radiobutton>
    <radiobutton>
      <label>to non-usrmerged or semi</label>
      <variable>HTVP3</variable>
    </radiobutton>
     <hbox homogeneous=\"true\">
      <button></button>
      <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton>
     </hbox>
    </vbox>
    </window>
   "
 RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`"
 eval "$RETSTRING"

if [[ "$pagg" = true ]]; then

echo "nothing"

else

exit 1

fi

if [[ ! -d "$DIReR" ]];then
mkdir -p "$DIReR"

else
echo "dir ok"
fi

if [[ -d "$DIReR/ffdrv" ]];then
rm -rf "$DIReR"/*
else
echo "DELETED, OK"
fi

if [ ! "$PATHPROG01" ] || [ "$PATHPROG01" = "0" ] || [ ! "$DIReR" ] || [ "$DIReR" = "0" ]; then 


xmessage -title "Something wrong" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "No value given" -timeout 5 

else 


if [[ ! -f "$PATHPROG01" ]];then
cp -pan "$PATHPROG01" "$DIReR" && unsquashfs -d "$DIReR"/ffdrv "$PATHPROG01" && touch "$DIReR"/ff.txt
else
unsquashfs -d "$DIReR"/ffdrv "$PATHPROG01" && touch "$DIReR"/ff.txt

fi


if [[ -f "$DIReR/ff.txt" ]] && [[ "$(ls -l $DIReR/ffdrv | grep -o "lib" | tr "\n" " ")" == "" ]];then

source=""
source="merged"

echo "$source" > "$DIReR"/ff.txt
elif [[ -f "$DIReR/ff.txt" ]] && [[ "$(ls -l $DIReR/ffdrv | grep -o "lib" | tr "\n" " ")" == "lib " ]];then

source=""
source="classic"
echo "$source" > "$DIReR"/ff.txt
else
echo "FAIL"
xmessage -title "ERROR" "Failed to determine source!
exiting....
" &


exit 1
fi


if [[ "$HTVP1" == true ]] && [[ "$(cat "$DIReR"/ff.txt)" == "merged" ]];then


xmessage -title "ERROR" "output structure will be same as input
$(cat "$DIReR"/ff.txt)
exiting....
" &



exit 1


elif [[ "$HTVP3" == true ]] && [[ "$(cat "$DIReR"/ff.txt)" == "classic" ]];then
xmessage -title "ERROR" "output structure will be same as input
$(cat "$DIReR"/ff.txt)
exiting....
" &



exit 1

else


if [[ "$HTVP1" == true ]] && [[ "$(cat "$DIReR"/ff.txt)" != "merged" ]];then



if [[ "$(cat "$DIReR"/ff.txt)" == "classic" ]];then
mkdir -p "$DIReR"/ffdrv/usr && mv "$DIReR"/ffdrv/lib "$DIReR"/ffdrv/usr/ && dir2xsfs "$DIReR"/ffdrv && defaultfilemanager "$DIReR" &

else
xmessage -title "ERROR" "Can not create output sfs!
Source different or not recognized of the 2 options.
exiting....
" &



exit 1
fi


elif [[ "$HTVP3" == true ]] && [[ "$(cat "$DIReR"/ff.txt)" != "classic" ]];then
if [[ "$(cat "$DIReR"/ff.txt)" == "merged" ]];then
mv "$DIReR"/ffdrv/usr/lib "$DIReR"/ffdrv/ && rm -rf "$DIReR"/ffdrv/usr && dir2xsfs "$DIReR"/ffdrv && defaultfilemanager "$DIReR" &

else

xmessage -title "ERROR" "Can not create output sfs!
Source different or not recognized of the 2 options.
exiting.... 
" &

exit 1
fi

fi



fi


export loadrunner=$!
export $DIReR


sleep 1

if ps -p $loadrunner > /dev/null
then
ICONSETSGUI8=""

ICONSETSGUI8="$ICONSETSGUI8

<vbox>
<hbox>
<button>
<label>Delete output</label>
<action>rm -rf \"$DIReR\"/* &</action>
</button>
<button>
<label>open output</label>
<action>defaultfilemanager \"$DIReR\" &</action>
</button>

</hbox>

<frame Process>
      <text>
       <label>nothing</label>
       <input>ps -p $loadrunner</input>
       <variable>nocsakdokk</variable>
     </text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
     
     <action>refresh:nocsakdokk</action>
     
     </timer>
</frame>
</vbox>

"


export MAIN_DIALOG="
<window title=\"ffdrv output\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'OPEN ffdrv output')</label></text>
  </frame>
  
     <frame  Current Converting:>
 <text>
 <label>$PATHPROG01</label>
 </text>
     
  ${ICONSETSGUI8}
  
    <text>
      <label>-1-</label>
     </text>
    </frame>

  <hbox>
  
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
  
   
  </hbox>
 </vbox>

</window>"

gtkdialog --program=MAIN_DIALOG --center


else
echo "not run"

xmessage -title "Something wrong" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "Recording didn't start!" -timeout 5 


fi

fi
fi

o0.gif
o0.gif (31.65 KiB) Viewed 1305 times

with same output control gtkdialog window as zdrv-converter's.

If input structure are the same as the desired outputs' structure then an error message appears with xmessage.

Be careful about output folder should on filesystem different than ntfs or vfat because of symlinks!
I hope it helps.

----

Lastly some language mistakes corrected on: CEST 22:45 , yyyy.mm.dd:2024.04.14.

User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi all!

I've increased decimals and corrected them to be more accurate the results:

Code: Select all

#!/bin/bash
export LANG=C
export LC_NUMERIC=C
export OUTPUT_CHARSET=UTF-8
if [[ ! -f "/tmp/cukik.txt" ]];then
touch "/tmp/cukik.txt"

else

echo "ok"
fi

cat << 'EOF' > "/tmp/FuF.sh" && chmod +x "/tmp/FuF.sh"
#!/bin/bash

funcelso(){
if [[ "$cuki" -lt "1000" ]];then

ans="$(printf '%.30f\n' "$(echo "scale=30;1*e(($cuki/10)*l(10))*1" | bc -l)")"
echo "$ans" > /tmp/cukik.txt
else
echo "OverDose" > /tmp/cukik.txt

fi
	
	
	
}


funck(){

fans="$(printf '%.10f\n' "$(echo "scale=10;1*((l($cukix)/l(10)*10))*1" | bc -l)")"
echo "$fans" > /tmp/cukik.txt
	
	
	
}
if [[ "$1" == "ablak" ]];then
funcelso "$@"

elif [[ "$1" == "ajto" ]];then
funck "$@"
else
echo "nem"
fi
EOF


export MAIN_DIALOG='
<window title="mW and dBm conversion" allow-shrink="true" icon-name="gtk-select-color">
 <vbox scrollable="true" width="500" height="250">
   <frame dBm to mW>
     <entry>
       <variable>cuki</variable>
       <action type="refresh">cukik</action>
       
       <action>/tmp/FuF.sh ablak</action>
     </entry>
   </frame>
   <frame result>
     <entry auto-refresh="true">
       <variable>cukik</variable>
       <input file>/tmp/cukik.txt</input>
     </entry>
   </frame>
      <frame mW to dBm>
     <entry auto-refresh="true">
       <variable>cukix</variable>
       
       
       <action>/tmp/FuF.sh ajto</action>
     </entry>
   </frame>
   <hbox>
     <button ok></button>
     <button cancel></button>
   </hbox>
 </vbox>
 </window>
'

gtkdialog --program=MAIN_DIALOG

rm /tmp/FuF.sh
rm /tmp/cukik.txt





dBmW.gif
dBmW.gif (36.6 KiB) Viewed 1021 times
User avatar
nocsak
Posts: 33
Joined: Thu Mar 04, 2021 10:32 pm
Location: Hungary
Has thanked: 8 times
Been thanked: 14 times

Re: Hungarian Puppy Software Collection

Post by nocsak »

Hi !
Some stuff made again:

dmesg-debugger.gif
dmesg-debugger.gif (134.59 KiB) Viewed 764 times

dmesg-debugger.sh:

Code: Select all

#!/bin/bash
###2.2##nocsak's dmesg debugger made: yyyy.mm.dd: 2024.07.06.#
export LANG=C
export LC_NUMERIC=C
CURD=""
USERNN=""

novitime=""
forside=""
if [[ -d "/home" ]];then
export forside="$(find /home/* -type d -name "*" | head -n1 | cut -f3 -d"/")"
else
export forside=""
fi

export CURD="$HOME"
export USERNN="/home/${forside}"


if [[ "$1" == "--help" ]];then

echo "

This is nocsak's dmesg debugger v2.2:
needs gtkdialog and sudo or root privileges to work properly.
Works under Puppy Linux, MX Linux and Antix Linux instantly.
---
Terminal options:

--help : print this help
--filtered : save dmesg filtered to kimenet.txt
--full : save dmesg full to kimenet.txt
--delete : delete kimenet.txt


"
exit
elif [[ "$1" == "--filtered" ]] && [[ "$CURD" == "/root" ]] && [[ ! -z "${forside}" ]];then
echo "EXPORT FILTERED:${USERNN}/kimenet.txt"
dmesg | grep -i "error\|not_found\|(bug)\|disabled\|Command line:" > "${USERNN}"/kimenet.txt && chown "${forside}":"${forside}" "${USERNN}"/kimenet.txt
echo "Done!"
exit
elif [[ "$1" == "--full" ]] && [[ "$CURD" == "/root" ]] && [[ ! -z "${forside}" ]];then
echo "EXPORT FULL:${USERNN}/kimenet.txt"
dmesg > "${USERNN}"/kimenet.txt && chown "${forside}":"${forside}" "${USERNN}"/kimenet.txt
echo "Done!"
exit
elif [[ "$1" == "--filtered" ]] && [[ "$CURD" == "/root" ]] && [[ -f "/etc/DISTRO_SPECS" ]];then
echo "EXPORT FILTERED:${CURD}/kimenet.txt"
dmesg | grep -i "error\|not_found\|(bug)\|disabled\|Command line:" > "${CURD}"/kimenet.txt
echo "Done!"
exit
elif [[ "$1" == "--full" ]] && [[ "$CURD" == "/root" ]] && [[ -f "/etc/DISTRO_SPECS" ]];then
echo "EXPORT FULL:${CURD}/kimenet.txt"
dmesg > "${CURD}"/kimenet.txt
echo "Done!"
exit
elif [[ "$1" == "--delete" ]] && [[ "$CURD" == "/root" ]] && [[ ! -z "${forside}" ]];then
echo "DELETE:${USERNN}/kimenet.txt"
rm -f "${USERNN}"/kimenet.txt
echo "Done!"
exit

elif [[ "$1" == "--delete" ]] && [[ "$CURD" == "/root" ]] && [[ -f "/etc/DISTRO_SPECS" ]];then
echo "DELETE:${CURD}/kimenet.txt"
rm -f "${CURD}"/kimenet.txt
echo "Done!"
exit
else
echo "
sudo or root required,
or /home/* missing,
or not Puppy Linux,

or run this script from Terminal with --help first !!!
" &


fi


if [[ -z "$(which gtkdialog)" ]];then

xmessage -title "ERROR" "gtkdialog 

missing !!!" &

else

export OUTPUT_CHARSET=UTF-8
# export novitime="$(echo -e "date +%Y_%m_%d-%H-%M-%S")"







if [[ "$CURD" == "/root" ]] && [[ ! -z "${forside}" ]];then

export MAIN_DIALOG="
<window title=\"$(gettext 'nocsaks dmesg debugger')\" icon-name=\"gtk-convert\" resizable=\"true\">
 <vbox scrollable=\"true\" width=\"940\" height=\"350\">

  

 
     
     

   
    
    <hbox>
    
    <frame dmesg filtered: error, not_found, (bug), disabled, Command line: >
    
    

      <text wrap=\"true\" width-chars=\"100\" selectable=\"true\">
       <label>nincs</label>
       <input>dmesg | grep -i \"error\|not_found\|(bug)\|disabled\|Command line:\"</input>
       <variable>nocsaki</variable>
     </text>
<timer milliseconds=\"true\" interval=\"2500\" visible=\"false\">
     
     <action>refresh:nocsaki</action>
     
     </timer>
</frame>
  </hbox>
      <hbox>
  <button>
<label>EXPORT FILTERED:${USERNN}/kimenet.txt</label>
<action>dmesg | grep -i \"error\|not_found\|(bug)\|disabled\|Command line:\" > ${USERNN}/kimenet.txt && chown ${forside}:${forside} ${USERNN}/kimenet.txt &</action>

</button>
<button>
<label>EXPORT FULL:${USERNN}/kimenet.txt</label>
<action>dmesg > ${USERNN}/kimenet.txt && chown ${forside}:${forside} ${USERNN}/kimenet.txt &</action>

</button>
    <button>
<label>DELETE:${USERNN}/kimenet.txt</label>
<action>rm -f ${USERNN}/kimenet.txt &</action>

</button>
   
  </hbox>
    
    
    
    
    
    
  <hbox>
  
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
  
   
  </hbox>
 </vbox>

</window>"

gtkdialog --program=MAIN_DIALOG --center

elif [[ -f "/etc/DISTRO_SPECS" ]] && [[ "$CURD" == "/root" ]];then

export MAIN_DIALOG="
<window title=\"$(gettext 'nocsaks dmesg debugger')\" icon-name=\"gtk-convert\" resizable=\"true\">
 <vbox scrollable=\"true\" width=\"940\" height=\"350\">

  

 
     
     

   
    
    <hbox>
    
    <frame dmesg filtered: error, not_found, (bug), disabled, Command line: >
    
    

      <text wrap=\"true\" width-chars=\"100\" selectable=\"true\">
       <label>nincs</label>
       <input>dmesg | grep -i \"error\|not_found\|(bug)\|disabled\|Command line:\"</input>
       <variable>nocsaki</variable>
     </text>
<timer milliseconds=\"true\" interval=\"2500\" visible=\"false\">
     
     <action>refresh:nocsaki</action>
     
     </timer>
</frame>
  </hbox>
      <hbox>
  <button>
<label>EXPORT FILTERED:${CURD}/kimenet.txt</label>
<action>dmesg | grep -i \"error\|not_found\|(bug)\|disabled\|Command line:\" > ${CURD}/kimenet.txt &</action>

</button>
<button>
<label>EXPORT FULL:${CURD}/kimenet.txt</label>
<action>dmesg > ${CURD}/kimenet.txt &</action>

</button>
    <button>
<label>DELETE:${CURD}/kimenet.txt</label>
<action>rm -f ${CURD}/kimenet.txt &</action>

</button>
   
  </hbox>
    
    
    
    
    
    
  <hbox>
  
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
  
   
  </hbox>
 </vbox>

</window>"

gtkdialog --program=MAIN_DIALOG --center


else




xmessage -title "MUST BE ROOT" "sudo or root required,
or /home/* missing,
or not Puppy Linux,

or run this script from Terminal with --help first !!!
" &

fi
fi








sshfs-mount.png
sshfs-mount.png (26.6 KiB) Viewed 764 times

sshfs-mount.sh:

Code: Select all

#!/bin/bash 
#This script made by nocsak 2020.09.29. remade 2024.08.02. with help of Mob
#dependencies: sshfs, gtkdialog, ssh, fusermount
#MX and Antixized on 2023y04m13d

 if [[ "$(which sshfs)" == "" ]] || [[ "$(which fusermount)" == "" ]];then
 
 xmessage -title "Nothing to do" -buttons Ok:0,"Hmm":1,Cancel:2 -default Ok -nearmouse "Missing fusermount or sshfs!" -timeout 5
 exit 1
 
 else
 
 echo "OK"
 
 
 fi
 
 
 
 
 export OUTPUT_CHARSET=UTF-8

# echo -e "Ha nem megfelelő paramétereket állítunk\n be, az SMS szkript hibásan működhet!" | xmessage -title "Emlékeztető" -buttons Ok:0,"Hmm":1,Cancel:2 -default Ok -nearmouse -timeout 4 -file -
 
 if [[ "$(which thunar)" == "" ]];then
 
 export filekezelo="rox"
 else
 
 export filekezelo="thunar"
 
 fi
 
 
 export MAIN_DIALOG="
 <window title=\"$(gettext 'sshfs Mount Script for Puppy '${filekezelo}'')\" icon-name=\"folder-remote\" resizable=\"true\">
    <vbox scrollable=\"true\" height=\"240\" width=\"400\">
    <hbox homogeneous=\"true\">
    <frame Remote sshfs path>
     <entry>
      <default>192.168.0.100:/mnt</default>
      <variable>PATHPROG01</variable>
     </entry>
     </frame>
     <frame username>
     <entry>
      <default>username</default>
      <variable>PATHPROG02</variable>
     </entry>
     </frame>
    </hbox>
    <hbox homogeneous=\"true\">
     <frame sshfs password>
     <entry visibility=\"false\" caps-lock-warning=\"true\">
     <variable>PATHPROG04</variable>
     </entry>
     </frame>
     <frame target mount point:>
     <entry>
      <default>${HOME}/TARGET</default>
      <variable>PATHPROG03</variable>
     </entry>
     </frame>
    </hbox>
    <hbox homogeneous=\"true\">
     <frame options:>
    <comboboxtext>
      <variable>COMB</variable>
      <item>reconnect</item>
      <item>allow_other</item>
      <item>idmap=user</item>
      <item>allow_root</item>
    </comboboxtext>
    </frame>
     <frame Port:>
     <entry>
      <default>22</default>
      <variable>PATHPROG07</variable>
     </entry>
     </frame>
     </hbox>
     <hbox homogeneous=\"true\">
      <button ok></button>
      <togglebutton><input file stock=\"gtk-quit\"></input><label>$(gettext 'Quit')</label><input>exit 1</input><action>exit:abort</action><default>true</default><variable>pagg</variable></togglebutton>
     </hbox>
    </vbox>
    </window>
   "
 RETSTRING="`gtkdialog --program=MAIN_DIALOG --center`"
 eval "$RETSTRING"

if [[ "$pagg" = true ]]; then

echo "nothing"

else

exit 1

fi

if [[ ! "$PATHPROG03" ]] || [[ ! "$PATHPROG02" ]] || [[ ! "$PATHPROG01" ]] || [[ ! "$PATHPROG07" ]] || [[ ! "$COMB" ]]; then
	
	xmessage -title "Something wrong" -buttons Ok:0,"Hmm":1,Cancel:2 -default Ok -nearmouse "No value given!" -timeout 5
  
 
  else
  if [[ ! -d "$PATHPROG03" ]]; then
	
	mkdir "$PATHPROG03"

  else
  
  echo "Directory $PATHPROG03 exists."
  
fi

if [[ ! "$PATHPROG04" ]] || [[ "$PATHPROG04" == "" ]];then


sshfs -p "$PATHPROG07" "$PATHPROG02"@"$PATHPROG01" "$PATHPROG03" -o "$COMB" &

else


  printf "$PATHPROG04\n" | sshfs -o password_stdin -o ssh_command='ssh -o StrictHostKeyChecking=no' -p "$PATHPROG07" "$PATHPROG02"@"$PATHPROG01" "$PATHPROG03" -o "$COMB" &
fi
fi


if [[ ! "$PATHPROG03" ]] || [[ ! "$PATHPROG02" ]] || [[ ! "$PATHPROG01" ]] || [[ ! "$PATHPROG07" ]]; then

xmessage -title "Nothing to umount" -buttons Ok:0,"Hmm":1,Cancel:2 -default Ok -nearmouse "Nothing to umount!" -timeout 5

else 

ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8

<vbox>
<hbox>
<button>
<label>Open ${PATHPROG03}</label>
<action>${filekezelo} ${PATHPROG03}</action>
</button>
<button>
<label>Eject ${PATHPROG03}</label>
<action>fusermount -u ${PATHPROG03}</action>
</button>
</hbox>
</vbox>

"


export MAIN_DIALOG="
<window title=\"$(gettext 'Eject sshfs Script')\" icon-name=\"gtk-disconnect\" resizable=\"true\">
 <vbox>
 <frame Functions:>
  <text wrap=\"true\" width-chars=\"40\"><label>$(gettext 'sshfs drive eject')</label></text>
  </frame>
  
     <frame  Mounted places:>
 
     
  ${ICONSETSGUI8}
  
    <text>
      <label>-1-</label>
     </text>
    </frame>

  <hbox>
  
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
  
   
  </hbox>
 </vbox>

</window>"

gtkdialog --program=MAIN_DIALOG --center

fi




User avatar
KuLuSz
Posts: 20
Joined: Sun Sep 06, 2020 4:33 pm
Location: HuNgArY
Has thanked: 1 time
Been thanked: 13 times
Contact:

Re: Hungarian Puppy Software Collection

Post by KuLuSz »

Well, after a long time, I'm reporting again with 1 little crunches... In this case, I got a little confused around kns... The new thing is that " SAE " encryption key support (WPA3) has been added to the script, which (just according to) no network manager can use it (eg connman). The other novelty is that we can also connect to an already configured working network ... (save function). We can reconfigure this save (auto start and connection, with a double click), or if the situation so requires, we can also delete it from the saved list (an item must be selected)

Original site for download kns_v2.4_ENG.tgz

<(].K.u.L.u.S.z.[)> Contact: Discord hun / eng , IRC

Post Reply

Return to “Package Collections/Repositories”