The officially official Devuan Forum!

You are not logged in.

#1576 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-18 14:57:23

x-terminal-emulator is set in the alternatives system. That will be a symlink to the actual terminal, which is probably the terminal that came with your desktop or possibly the last terminal you installed.

ls -l /etc/alternatives/x-terminal-emulator

The man page for x-terminal-emulator will be the man page for the actual terminal. On one of my systems, it shows me the man page for lxterminal, and on another it's xfce4-terminal. That means the available options for x-terminal-emulator will not be the same for everyone. If the hold is needed (I suspect it is, but I'm not certain) we can make a function to test which terminal is used and which is the appropriate 'hold' option.

I think it's perfectly reasonable to leave out the terminal. Anyone who prefers upgrading in a terminal already knows how to open one and get root.

#1577 Re: Off-topic » how to automatically get xinput id of keyboard? [SOLVED] » 2019-09-14 12:55:35

That one gives me two numbers, 13 and 12, which corrspond to:

↳ Microsoft Wired Keyboard 600            	id=13	[slave  pointer  (2)]
↳ Microsoft Wired Keyboard 600            	id=12	[slave  keyboard (3)]

#1578 Re: Off-topic » how to automatically get xinput id of keyboard? [SOLVED] » 2019-09-14 10:22:45

The first line with XIKeyClass on my desktop is my mouse. On the laptop, it's Virtual Core Keyboard.

⎜   ↳ Logitech USB Receiver                     id=11   [slave  pointer  (2)]
        Reporting 6 classes:
                Class originated from: 11. Type: XIButtonClass
                Buttons supported: 7
                Button labels: "Button 0" "Button Unknown" "Button Unknown" "Button Wheel Up" "Button Wheel Do
wn" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
                Button state:
                Class originated from: 11. Type: XIKeyClass

#1579 Re: Installation » firefox 52.9 esr » 2019-09-14 10:12:02

You can't find 60.2 because it's not there, and it's been gone for some time.

Run:

apt update

and try again. You should see 60.9.0esr-1~deb9u1

#1580 Re: Off-topic » how to automatically get xinput id of keyboard? [SOLVED] » 2019-09-13 21:26:51

sad   not quite. That way leaves white space at the end. Maybe add another sed that removes the white space. (not sure if it's a tab or several spaces.)

$ echo "$keyboard_id"
10

$echo "$keyboard_id"x
10     x

#1581 Re: Off-topic » how to automatically get xinput id of keyboard? [SOLVED] » 2019-09-13 21:02:23

Maybe more creative grepping will do it. Hm... not so easy. I think I can do it, but I'd need to see what your xinput shows and which line you want.

Assuming I want the one that says "keyboard" but not "Virtual core" on the left side, and says "slave  keyboard" on the right side, this works on two of my machines. (One is "Microsoft Wired Keyboard 600" and the other is "AT Translated set 2 keyboard" on a Thinkpad.)

keyboard_id=$(xinput --list | grep 'slave  keyboard' | sed -e 's/\[.*//g' | grep -i keyboard | grep -v core | cut -d"=" -f2)

#1582 Re: Devuan Derivatives » AVMultimedia with Devuan Beowulf: A powerful RAM based desktop » 2019-09-13 15:00:47

setxkbmap

Thanks! I forgot about that one. It works instantly.

Also, I mis-reported one thing above. After killing the desktop with alt-sysrq-k, the change in keyboard-configuration took effect, and I got the us keyboard.

I didn't get to try the installer but hope to do that some time. Too much other stuff to do now. If anyone else tries it, please let me know.

#1583 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-13 11:51:01

You don't need to install unattended-upgrades to use the periodic update function. Just adding 10periodic to /etc/apt/apt.conf.d/ is enough. The script that runs it is in /etc/cron.daily and runs once a day. In my case, it's running around 6:30am. The actual time it updates is randomized, so that everyone is not hitting on the servers at the same time. In other words, if you use a cron job with a set time, a million miyolinux users will burn out the server on the next update.

It logs in /var/log/syslog. Look for 'cron.daily' to see when it ran.

Oh, I like the @reboot trick. That might be especially useful on a laptop that is asleep at 6:30am. Of course, the usual way to run stuff at boot is to put it in rc.local.

#1584 Re: Devuan Derivatives » AVMultimedia with Devuan Beowulf: A powerful RAM based desktop » 2019-09-13 11:39:25

I tried the avmultimini.iso. Thanks for putting that up. Here are some notes you might find useful.

I can get it to boot in qemu (with kvm) in legacy bios mode with 'eno' boot code. If I try uefi mode, it hangs on the archivista splash screen. The vertical size of the window increases to 2-3 times normal height, and I have to resize the window to see the bottom of the screen. After a few minutes of this, the cpu starts to get hot.

I can't get it to boot in virtualbox. Tried uefi and legacy bios.

It boots normally from usb. Booted it in legacy bios mode with 'eno' boot code.

The language was English except for kodi, which came up in German.

Changing the keyboard layout presented some problems. First I tried 'dpkg-reconfigure keyboard-configuration'. I wanted to log out and in again to get it to take effect, but there's no way to log out of the desktop. I tried 'init 1' and nothing happened. I finally tried alt-sysrq-k and was able to restart the desktop. Keyboard was still German. This was especially frustrating for me because it made it impossible to do some things in the terminal.

Then I went into the desktop settings and found the keyboard layout settings. The drop-down menu for countries goes off-screen, and I can't scroll down.

I did not have any problems with the display orientation. The buttons on the panel work and are very cool. That's the first time I've ever been able to rotate the screen. (I don't need it, but I have tried it out of curiosity. Nice to see it finally work.)

It was also nice to see the pulseaudio volume control work. I haven't had good luck with that in the past.

Getting it to run in virtualbox or qemu is probably not essential to using it, but a lot of people like to test new isos in a virtual environment, for convenience.

#1585 Re: Devuan Derivatives » [mini-i2p-mimo] New 'Devuan-based' release: » 2019-09-10 13:23:40

Here's an example from 'man rsync showing how to keep one file and remove everything around and above it'

+ /some/
+ /some/path/
+ /some/path/this-file-is-found
+ /file-also-included
- *

I think you can do it like this:

+ /home/*/.moonchild_productions/
+ /home/*/.moonchild_productions/pale_moon/
+ /home/*/.moonchild_productions/pale_moon/*.default/
+ /home/*/.moonchild_productions/pale_moon/*.default/prefs.js
- /home/*/.moonchild_productions

Or, you could probably do what the snapshot excludes file does with ~/.mozilla - exclude Cache and the sqlite files, and let everything else stay.

- /home/*/.mozilla/*/Cache/*
- /home/*/.mozilla/*/urlclassifier3.sqlite
- /home/*/.mozilla/*/places.sqlite
- /home/*/.mozilla/*/cookies.sqlite
- /home/*/.mozilla/*/signons.sqlite
- /home/*/.mozilla/*/formhistory.sqlite
- /home/*/.mozilla/*/downloads.sqlite

#1586 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-10 13:00:34

MiyoLinux wrote:

I'm more stumped by the update-sync script.

Me too. It shouldn't work unless you're running it as root. When I split that up into two functions, I had it record the exit code of 'apt-get update', and while it kept running at the expected interval, it spit out an error code every time.

Also stumped by the inability to find sudo. Maybe the quoting needs to be changed?  "sudo $command" instead of 'sudo "$command"' with or without the full path. (grasping at straws here.)

#1587 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-10 03:06:31

Maybe xterm needs the full path. Change 'sudo "$command"' to '/usr/bin/sudo "$command"' in all three xterm lines.

#1588 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-09 11:53:05

Add set -x to the top of the script and run it from terminal. You'll get output for every command. I checked, and they didn't move sudo. It's still in /usr/bin. I want to see where this is screwing up.

#1589 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-09 10:42:28

MiyoLinux wrote:

Clicking on Yes didn't produce another notification saying that I needed to install xterm or synaptic. I tried running upgrade-yes in the terminal, and received this output...

dan@deboowulf:~$ /usr/bin/upgrade-yes
/usr/bin/upgrade-yes: line 9: xterm: command not found

That's weird. Does /var/lib/dpkg/info/xterm.list exist after you remove xterm? If so, the test needs to be changed.

Clicking Yes opened xterm. However, when I entered my sudo password, it gave me this output...

Enter your password
[sudo] password for dan:
sudo: : command not found

Again, weird. Script tests to see if you're in the sudo group. I don't think that group exists if sudo is not installed.

.

#1590 Re: Devuan Derivatives » [mini-i2p-mimo] New 'Devuan-based' release: » 2019-09-09 10:21:02

Figure out where the proxy settings are stored, and we can probably adjust the snapshot excludes file to keep them.

#1591 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 22:13:56

Yes, that was upgrade-yes.

That script is working for me now with either of these lines:
  pkexec /usr/sbin/synaptic --dist-upgrade-mode true --non-interactive
  synaptic-pkexec --dist-upgrade-mode true --non-interactive

"working" means it brings up the pkexec auth window and then it brings up synaptic and shows the updates. I keep canceling so I can do it again.

Currently testing in beowulf.

#1592 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 19:52:35

Synaptic could be a Recommends instead of a Depends. Those who install without Recommends are likely to have xterm installed. That could be a Suggests. Most people will get synaptic without trying.

This tests for synaptic and pkexec and falls back to xterm if they aren't both installed, and if xterm isn't there you get a popup error message.

if [ -e /usr/sbin/synaptic ] && [ -e /usr/bin/pkexec ] ; then
	pkexec /usr/sbin/synaptic --dist-upgrade-mode true --non-interactive
elif [ -e /var/lib/dpkg/info/xterm.list ] ; then
	sudo_allowed=$(sudo -n uptime 2>&1 | grep load | wc -l)
	# for sudo with no password
	if [[ $sudo_allowed -ne 0 ]] ; then
		xterm -fa mono -fs 12 -hold -e 'sudo "$command"'
	
	# for sudo with password
	elif $(groups $USER | grep -qs sudo); then
		xterm -fa mono -fs 12 -hold -e 'echo "Enter your password" && sudo "$command"'
	
	else
		xterm -fa mono -fs 12 -hold -e 'echo "Enter root password" && su -c "$command"'
	fi
else notify-send "Error:
You need to install synaptic or xterm."
fi

Note: I tried synaptic-pkexec instead of pkexec /usr/sbin/synaptic and the window came up for a fraction of a second and disappeared.
Correction: It now disappears with either line for starting synaptic. If I drop the 'non-interactive' the window stays, but it doesn't show the available upgrades. (You already knew that.)
I'm stumped. Where are you finding these synaptic options?

Oh, duh! Corrected correction: It won't show available upgrades if there aren't any. And the synaptic window will go away. Looks like this is working after all. (without the non-interactive option, the synaptic window stays up if you cancel the upgrades.)

#1593 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 18:58:04

When I read that you were playing with synaptic, I thought there should be a choice of synaptic or terminal. That's a real possiblity.

Doesn't the original python script have a way to run synaptic? (Guess I'll look at that.)

Will test the new line.

Edit: It works!  Nice.

#1594 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 15:55:02

My modified upgrade-yes is not working in my openbox/lxterminal. The terminal comes up empty and does nothing. Did someone else mention that this happened to them?

It does work if I use 'xterm -hold -e <command>'.

I'm having trouble getting x-terminal-emulator to run commands, even when I start it in a terminal, and this happens in openbox/lxterminal as well as xfce/xfce4-terminal.

x-terminal-emulator -e xclock works correctly in both systems.
x-terminal-emulator -e 'echo message' does not work. In ob/lx I get the blank terminal; in xfce I get nothing.

If I use the following for /usr/bin/upgrade-yes, it works with sudo nopasswd and with root. I don't have a sudo with passwd to test. I changed the command to gparted for testing, so it doesn't actually do the upgrade. Comment/uncomment the 'command=' lines as desired. One potential problem is that some terminals need the -hold or --hold option and some don't.

#!/bin/bash

#command="apt dist-upgrade"
command="gparted"
message="If user password fails, use root password"
sudo_allowed=$(sudo -n uptime 2>&1 | grep load | wc -l)

	# for sudo with no password
if [[ $sudo_allowed -ne 0 ]] ; then
	sudo "$command"

	# for sudo with password
elif $(groups $USER | grep -qs sudo); then
	x-terminal-emulator -e 'echo "$message" && sudo "$command"'

else
	x-terminal-emulator -e 'echo "$message" && su -c "$command"'
fi

#1595 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 12:20:53

After poking around a bit, I looked in /etc/cron.daily/apt-compat. That gets used for unattended upgrades and also auto-updates the cache. One of the nice things it does is check to see if you're on battery power and cancels any actions if you are.

I have another install from the first time we played with this that I set up to use the daily auto-updates. Create /etc/apt/apt.conf.d/10periodic with the following contents:

APT::Periodic::Enable "1";
#  - Enable the update/upgrade script (0=disable)

APT::Periodic::Update-Package-Lists "1";
#  - Do "apt-get update" automatically every n-days (0=disable)

The package cache will get updated once a day.

Edit: Changed 10_periodic to 10periodic. (see /usr/lib/apt/apt.systemd.daily and don't freak out over the name.)

#1596 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-08 11:26:49

Ron, what DE or WM and panel are you using?

Did you verify in a terminal (or in synaptic) on that same system that there are updates? I'm pretty sure the update-sync script, which runs 'apt-get update' is not working.  (You can check to see who's running that script with 'ps aux | grep update')

#1597 Re: News & Announcements » Migrating from Buster to Beowulf - feedback needed » 2019-09-08 11:19:58

You are correct that network-manager has not been devuanized in beowulf, but I'm not sure if it needs to be done. Dependencies on the buster version are libsystemd0 | libelogind0, libpam-systemd | libpam-elogind, udev | eudev. Looks like we can use it with elogind.

#1598 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-07 14:52:23

One more. Someone noted a high number of available updates in ascii this morning, so I added a count to show-updates.

#!/usr/bin/env bash

list=$(apt-get -s dist-upgrade | awk '/^Inst/ { print $2 }')

count=$(echo "$list" | wc -l)

notify-send "$count updates available:

$list"

exit 0

If you like it, I'll add this, too.

#1599 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-07 14:21:07

Here's an alternate version of upgrade-yes (borrowed from refractainstaller-wrapper.sh) I'll add it to the next version. I think I've tested this with no root account, but if someone else can test that, it would be good. If sudo with no password is enabled, it just runs without asking for the password.

#!/bin/bash
x-terminal-emulator -e "echo 'If user password fails, use root password.' && sudo apt dist-upgrade || su -c apt dist-upgrade"

#1600 Re: Devuan Derivatives » [MiyoLinux] Update on the Update Notifier » 2019-09-07 12:10:26

Test failed. I thought I could use yad to show the list if notify-send failed, but notify-send doesn't actually fail. It works, but without the notification-daemon, the message isn't delivered to the desktop. Oh well, the wm users might have to read a little bit. They should be used to it.

Board footer

Forum Software