The officially official Devuan Forum!

You are not logged in.

#501 Re: Off-topic » community radio stations » 2020-12-20 13:11:05

I dont think this needed to be split off. It was just a few passing comments. Ive renamed it to community radio, so it can include other countries.

#502 Re: Off-topic » community radio stations » 2020-12-19 13:28:24

GlennW wrote:
dice wrote:
GlennW wrote:

since noscript became scarce and problematic, im using "Palemoon" and "eMatrix" for my main browser.

I use other browsers for smaller jobs, like ff for internet radio (4zzz). Just adding my support...

fellow aussie? i listen to 4zzz on sundays for the doc and the metal maiden. Im assuming you are listening to the same 4zzz i am?

http://ondemand.4zzzfm.org.au/the-doc-a … tal-maiden

Absolutely! But there's been a shake up lately, no more jazz show sundy morn... but plenty of new shows coming through.

I love the format, and the energy. Peace Brother!

Cool. Yeah i listen to the channel off and on, they have a real diverse spectrum of music. Good community radio run by volunteers.

Sorry for OT - OP.

#503 Off-topic » community radio stations » 2020-12-19 03:34:53

dice
Replies: 5

This was split from another thread where i went off topic. Share a station you enjoy here we can all listen to from online.

GlennW wrote:

since noscript became scarce and problematic, im using "Palemoon" and "eMatrix" for my main browser.

I use other browsers for smaller jobs, like ff for internet radio (4zzz). Just adding my support...

fellow aussie? i listen to 4zzz on sundays for the doc and the metal maiden. Im assuming you are listening to the same 4zzz i am?

http://ondemand.4zzzfm.org.au/the-doc-a … tal-maiden

#504 Re: Other Issues » at program » 2020-12-15 16:53:04

Head_on_a_Stick wrote:

I don't think an init script would be appropriate for a per-user script running something in an X session. It is possible to run services just for one user and with the various permissions required for X with systemd but I don't know how to do that with other service managers.

It is possible, i just need to figure it out.

https://unix.stackexchange.com/question … t-like-a-d

#505 Re: Other Issues » at program » 2020-12-15 16:42:35

Head_on_a_Stick wrote:
dice wrote:

I could try and daemonize it but that would be similar to a while loop script i think?

Not sure what you mean by "daemonize it" but as written the script only runs through once so it can't change the wallpaper unless it is run again at some point.

Why don't you like the while loop? It only runs three very simple shell commands & feh every ten minutes so it's not exactly resource heavy.

I was just trying to think outside the box, explore other ways if there are any.

By daemonize i mean create an init script. Start stop daemon if possible ?

#506 Re: Other Issues » at program » 2020-12-15 13:56:44

Think i have figured it out without a while loop. This script should just set the background between the hours specified.

EDIT: oops no it wont. I could try and daemonize it but that would be similar to a while loop script i think?

#!/usr/bin/env bash
H=$(date +%H)
if (( 7 <= 10#$H && 10#$H < 13 )); then 
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-morning.jpg
    echo between 8AM and 1PM
elif (( 13 <= 10#$H && 10#$H < 19 )); then 
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-day.jpg
    echo between 1PM and 7PM
else
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-night.jpg
    echo night
fi

I give in, looks like a while loop is the way to go, below is a variant. Hoping this works...

#!/usr/bin/env bash

get_wall () {

H=$(date +%H)
if (( 7 <= 10#$H && 10#$H < 13 )); then 
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-morning.jpg
    echo between 8AM and 1PM
elif (( 13 <= 10#$H && 10#$H < 19 )); then 
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-day.jpg
    echo between 1PM and 7PM
else
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-night.jpg
    echo night
fi

}

while true; do
  get_wall;
  sleep 600;
done

#507 Re: Other Issues » at program » 2020-12-15 12:43:53

Thats a good one head on a stick, no need for "at" at all indeed.

I tried to make something that wasnt in a while loop and have come up with the below, i would like to add in a 3rd command so it is 3 times of day (morn, day, night) but cant figure that out.

#!/usr/bin/env bash

DATE=$(date +%p)
DATE2=$(date +%p)
MORNING="AM"
NIGHT="PM"

if [[ "$DATE" == "$MORNING" ]] ; then
	feh --bg-scale /usr/share/backgrounds/gnome/adwaita-morning.jpg
elif [[ "$DATE2" == "$NIGHT" ]] ; then
        feh --bg-scale /usr/share/backgrounds/gnome/adwaita-night.jpg
fi

#508 Re: Other Issues » at program » 2020-12-13 12:45:19

Thanks for your help head on a stick, what do you think of below script? It works for me, sets the background in 1 minute increments x 3 using command functions in parallel. Im thinking if i put this in my autostart file (.xinitrc) with the correct time/date (today) it should suffice to emulate how the gnome backgrounds function for these wallpapers. The only issue i see is that the wallpapers wont load up if the "at" command is used in the past, it will fail and ill have a blank background. Ill have to figure out the time specifications better maybe.

#!/usr/bin/env bash

morning () {
        at now + 1 minute <<< 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-morning.jpg'
}

day () {
        at now + 2 minute <<< 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-day.jpg'
}

night () {
        at now + 3 minute <<< 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-night.jpg'
}

morning && day && night

#509 Re: Other Issues » at program » 2020-12-12 16:30:39

Head_on_a_Stick wrote:
dice wrote:

but this below would not work as a line not broken.

echo 'DISPLAY=:0 $HOME/bin/fehrand' > ~/test
at now + 1 minute -f ~/test

I don't think $HOME will be understood unless you specify it (replace $user with the actual username):

echo 'DISPLAY=:0 HOME=/home/$user $HOME/bin/fehrand' > ~/test
at now + 1 minute -f ~/test

Or just call the full path to the script, which would be simpler.

im just not using full paths publicly on the forum.

#510 Re: Other Issues » at program » 2020-12-12 16:25:02

Think i have it, thanks head on a stick. Need to adjust times and add into a startup script, but this is what im after...

echo 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-morning.jpg' > ~/test
at now + 1 minute -f ~/test
echo 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-day.jpg' > ~/test
at now + 1 minute -f ~/test
echo 'DISPLAY=:0 feh --bg-scale /usr/share/backgrounds/gnome/adwaita-night.jpg' > ~/test
at now + 1 minute -f ~/test

#511 Re: Other Issues » at program » 2020-12-12 16:09:31

Thanks head on a stick.

I cant understand how the command is laid out though. very strange if you ask me.

This below worked for a feh command.

echo 'DISPLAY=:0 $HOME/bin/fehrand' > ~/test
at now + 1 minute -f ~/test

but this below would not work as a line not broken.

echo 'DISPLAY=:0 $HOME/bin/fehrand' > ~/test at now + 1 minute -f ~/test

home env variable added to the code quotes.

contents of fehrand

#!/bin/bash

feh --randomize --bg-scale /usr/share/backgrounds/*

#512 Re: Other Issues » at program » 2020-12-12 14:58:44

yeah made me a bit angry as well.  I will have to try and incorporate cron into what im thinking of. I wanted to emulate gnome backgrounds adwaita morning noon night wallpapers somehow with feh.

#513 Other Issues » at program » 2020-12-12 13:41:17

dice
Replies: 17

Im trying to figure out the at command without much luck.

at executes commands at a specified time.

https://packages.debian.org/bullseye/at

i have the atd daemon running in service

 ~ $ > service atd status
atd is running

Im not sure what im to expect but im pretty sure a terminal window should appear in 1 minute from executing the at command using these commands?

~ $ > at now + 1 minute -f /usr/local/bin/st
warning: commands will be executed using /bin/sh
job 21 at Sat Dec 12 23:37:00 2020

Nothing happens ??

Im want to integrate at into a script somehow but if it doesnt work on the commandline then its useless or im useless and dont know what im doing.

This is a chimaera/testing installation.

#514 Re: Devuan Derivatives » Release » Refractux GNU/Linux » 2020-12-12 06:25:33

Head_on_a_Stick wrote:
dice wrote:

Also most crypto software uses broken AES or asymmetric crypto soon broken by The Shor's Algorithm with Quantum Computers.
    Today's global cyber espionage can only be stopped by One-Time Pad File Encryption. That's why FinalCrypt.

What a load of crap...

https://en.wikipedia.org/wiki/Post-quantum_cryptography

That was an interesting read. So doubling the key size may effectively block quantum attacks.

#515 Re: Devuan Derivatives » Release » Refractux GNU/Linux » 2020-12-12 06:10:04

rgl808 wrote:

Thank you dice, i will see how this run in the distribution in order to replace "finalcrypt". [ ]

They were just some examples to think about.

There is also https://packages.debian.org/buster/otp

Generator for One Time Pads or Passwords
otp creates key and password lists for verification and security purposes in a variety of formats. Keys can be of any length, consist of digits or letters (capital or lower case), and alphabetic passwords can either be entirely random (most secure) or obey the digraph statistics of English text (easier to remember when transcribing, but less secure).

For computer applications, for example one-time login passwords, otp can create a file containing the MD5 signature of each of the generated keys. This permits the computer to verify keys without the need to store the keys in plaintext.

#516 Re: Devuan Derivatives » Release » Refractux GNU/Linux » 2020-12-11 15:55:20

neither am i.

Another unique approach to file encryption in this link from stackoverflow using perl6.

https://stackoverflow.com/questions/540 … 4#54093334

and or shell level.

https://github.com/S2-/sshenc.sh/

& this is a good one time pad shell script: https://snippets.bentasker.co.uk/page-1 … -BASH.html

#517 Re: Devuan Derivatives » Release » Refractux GNU/Linux » 2020-12-11 14:12:07

Interesting spin, seems you have packed in some programs that are not in the stable or testing repos.
For instance finalcrypt. The website for that program doesnt even have https enabled and the program uses java.
https://github.com/ron-from-nl/FinalCrypt

FinalCrypt - The No¹ One-Time Pad Encryption

Why FinalCrypt ?

    Today's cyber espionage comes from hidden spyware waiting for you to unlock your drive. Disk Encryption no longer protects!
    Even when you're logged on, unopened files have to remain encrypted. Only File Encryption stops spyware reading your files.
    Also most crypto software uses broken AES or asymmetric crypto soon broken by The Shor's Algorithm with Quantum Computers.
    Today's global cyber espionage can only be stopped by One-Time Pad File Encryption. That's why FinalCrypt.

Is AES broken ?

#518 Re: Other Issues » beowulf repositry update problem [SOLVED] » 2020-12-10 14:22:21

what fsmithred said. Its just a matter of getting the update to work properly i think?

#519 Re: Other Issues » beowulf repositry update problem [SOLVED] » 2020-12-10 14:06:29

Possible mirror outage during update.

Wait awhile and do what apt says. Use apt-get. This happened to me when i upgraded from beowulf to chimaera.

maybe run apt-get update or try with --fix-missing?

#520 Re: Desktop and Multimedia » E233: cannot open display » 2020-12-09 16:13:15

I tried to use gvim as root to open /usr/share/X11/xorg.conf.d/10-backlight.conf i got the same error message. My guess is it is a limitation for running a gui application as root user, a safeguard built into gvim.

I could use gvim as sudo for the same command though.

#521 Re: Documentation » yad tips and tricks. » 2020-12-09 08:49:40

as promised, the yad exit icons. They are just recolored #15539E papirus 24x24 action and panel icons done in inkscape, all credit to papirus icons.

https://notabug.org/dice_1/dotfiles/src … with-icons

no longer available, deleted repo. The idea was no good anyway, i cant figure out how to save svg file properly.

#522 Re: Documentation » yad tips and tricks. » 2020-12-09 00:46:36

Im very novice at scripts, i had thought that they could just be /bin/sh, thanks.

Ahh yes i forgot yad had a calendar function, i will have to incorporate that instead maybe, although does gsimplecal have a bit more functionality than yad calendar? i will have to find out.

#523 Documentation » yad tips and tricks. » 2020-12-08 13:56:54

dice
Replies: 8

Having discovered the wonderful yad program awhile back i have revisited it and give you the following cool scripts. The calendar is mainly a good script to use for the dwm statusbar with the systray patch.

Yad exit menu with papirus icons, this needs elogind to work, you could swap out the commands with sudo though.
Xscreensaver for locking, all other locking programs dont quite compare to it.

#!/usr/bin/env bash

yad-cancel() {
	kill -USR1 $YAD_PID
}

export -f yad-cancel
	
yad --no-buttons --close-on-unfocus --width 200 --height 50 --form --columns 5 --borders=20 --center --on-top \
        --field=Lock!"$HOME/bin/exit-icons/lock.svg":fbtn "xscreensaver-command -l" \
        --field=Logout!"$HOME/bin/exit-icons/logout.svg":fbtn "pkill -U $USER" \
        --field=Reboot!"$HOME/bin/exit-icons/reboot.svg":fbtn "loginctl reboot" \
        --field=Poweroff!"$HOME/bin/exit-icons/poweroff.svg":fbtn "loginctl poweroff" \
        --field=Cancel!"$HOME/bin/exit-icons/close.svg":fbtn "bash -c yad-cancel"

Yad notification calendar using gsimplecal.

#!/usr/bin/env bash

yad --notification \
	--image="/usr/share/icons/Papirus-Dark/24x24/apps/office-calendar.svg" \
	--command="gsimplecal" --text="$(date)" \

Some scrots

2020-12-08-234940-1366x768-scrot.png 2020-12-08-235059-1366x768-scrot.png

EDIT: calendar tooltip --text="$(date)" needs a 60 second loop, not sure how to implement that alongside yad?

UPDATE 12/12/20 : for yad exit menu using a newer version of yad (on artixlinux), i can call the icons from /usr/share/icons/Papirus as per below.

#!/bin/bash

yad-cancel() {
	kill -USR1 $YAD_PID
}

export -f yad-cancel

yad --no-buttons --close-on-unfocus --width 500 --height 50 --form --columns=5 --borders=10 --center --on-top \
        --field='!database-lock!lock':fbtn "xscreensaver-command -l" \
        --field='!application-exit!logout':fbtn "loginctl kill-user $USER" \
        --field='!reload!reboot':fbtn "loginctl reboot" \
        --field='!system-shutdown-panel!poweroff':fbtn "loginctl poweroff" \
        --field='!button_cancel!cancel':fbtn "bash -c yad-cancel"

#524 Re: Desktop and Multimedia » Obmenu-generator problem » 2020-12-06 13:09:53

sort of off topic my post here but might be worth it.

I was on reddit unixporn a few days ago and their is this person creating an openbox menu in python3. Worth a look atleast if you are using openbox. Doesn't have all the functionality of obmenu-generator but i like where it is heading only using python libraries.

https://github.com/jruss06/boxmenu

https://www.reddit.com/r/unixporn/comme … generator/

#525 Documentation » dwm statusbar bash script » 2020-12-06 12:41:13

dice
Replies: 11

Managed to hack this together today from various sources, if you use it you would have to play around with the bash command functions.

What i like about this script is ive found a way to maintain timed loops inside the while loop itself using let. I would love any feedback to see if this is a viable script free from errors.

#!/bin/bash

get_cpu (){
	printf "Cpu:"
	top -bn1 | awk 'NR==3 {print $2}'
	
}

get_disk (){
	printf "| Disk:"
	df -h | awk 'NR==4 { print $3" / "$2}'
}

get_mem (){
	printf "| Mem:"
	free -h | awk 'NR==2 {print $3" / "$2}'
}

get_temp (){
	printf "| Temps:"
	sensors | awk '/Core/ { printf substr($3,2,2)"°C " }'
}

get_time (){
	printf "| Time:"
	date +"%R"
}

let loop=0
while true; do
   if [[ $loop%60 -eq 0 ]]; then
      Time=$(get_time)
   fi
   
   if [[ $loop%300 -eq 0 ]]; then
      Disk=$(get_disk)
      let loop=0  #this prevents an eventual overflow
   fi
   
   if [[ $loop%8 -eq 0 ]]; then
      Temp=$(get_temp)
   fi
   
   if [[ $loop%3 -eq 0 ]]; then
      Mem=$(get_mem)
   fi
      if [[ $loop%2 -eq 0 ]]; then
      Cpu=$(get_cpu)
   fi
   
   xsetroot -name "$Cpu $Temp $Disk $Mem $Time"
   let loop=$loop+1
   sleep 1
   
done

Update: ran this script through shell check, interesting diff.
https://www.shellcheck.net/

#!/bin/bash

get_cpu (){
	printf "Cpu:"
	top -bn1 | awk 'NR==3 {print $2}'
	
}

get_disk (){
	printf "| Disk:"
	df -h | awk 'NR==4 { print $3" / "$2}'
}

get_mem (){
	printf "| Mem:"
	free -h | awk 'NR==2 {print $3" / "$2}'
}

get_temp (){
	printf "| Temps:"
	sensors | awk '/Core/ { printf substr($3,2,2)"°C " }'
}

get_time (){
	printf "| Time:"
	date +"%R"
}

(( loop=0 ))
while true; do
   if [[ $loop%60 -eq 0 ]]; then
      Time=$(get_time)
   fi
   
   if [[ $loop%300 -eq 0 ]]; then
      Disk=$(get_disk)
      (( loop=0 ))  #this prevents an eventual overflow
   fi
   
   if [[ $loop%8 -eq 0 ]]; then
      Temp=$(get_temp)
   fi
   
   if [[ $loop%3 -eq 0 ]]; then
      Mem=$(get_mem)
   fi
      if [[ $loop%2 -eq 0 ]]; then
      Cpu=$(get_cpu)
   fi
   
   xsetroot -name "$Cpu $Temp $Disk $Mem $Time"
   (( loop=loop+1 ))
   sleep 1
   
done

Board footer

Forum Software