The officially official Devuan Forum!

You are not logged in.

#451 Re: Hardware & System Configuration » on network-manager, how to run bash script before connecting to wifi? » 2017-08-30 00:45:04

Thanks, garyz, but I don't use wicd. I use network-manager.

I figured out a workaround. It doesn't actually run my script before every wifi connection, but does run the script before connecting to wifi at two critical times: after boot and after resuming from suspend. That's good enough for what I need.

Two scripts are required:

#!/bin/bash

# Save this one as /etc/init.d/jobs-preconnect

### BEGIN INIT INFO
# Provides:          jobs-preconnect
# Required-Start:    $remote_fs dbus udev
# Required-Stop:     $remote_fs dbus udev
# Should-Start:	     $syslog
# Should-Stop:       $syslog
# X-Start-Before:    network-manager
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: bruno's jobs-preconnect
# Description:       jobs to run before network-manager starts
### END INIT INFO

[ "$1" = "start" ] && /path/to/preconnect/script
#!/bin/bash

# Save this one as /etc/pm/sleep.d/33jobs-preconnect

if [[ "$1" = "resume" ]]; then
	service network-manager stop 
	bash /path/to/preconnect/script
	service network-manager start
fi

Then run these commands in a terminal as root:

chown root /etc/init.d/jobs-preconnect
chmod 755 /etc/init.d/jobs-preconnect
update-rc.d jobs-preconnect defaults
chown root /etc/pm/sleep.d/33jobs-preconnect
chmod 755 /etc/pm/sleep.d/33jobs-preconnect

#452 Hardware & System Configuration » on network-manager, how to run bash script before connecting to wifi? » 2017-08-29 19:23:47

GNUser
Replies: 2

I have a bash script that I would like to run just before my system connects to any wireless network. Does anybody know how to accomplish this? I know wicd makes it easy with its "preconnect" directory, but I can't seem to figure out how to do it with network-manager, which is what I use now.

I know how to run scripts after connecting, but not before. The /etc/NetworkManager/dispatcher.d/pre-up.d directory sounds promising but is not exactly what I'm looking for because those jobs are actually run after the interface is connected:

pre-up

The interface is connected to the network but is not yet fully activated. Scripts acting on this event must be placed or symlinked into the /etc/NetworkManager/dispatcher.d/pre-up.d directory, and NetworkManager will wait for script execution to complete before indicating to applications that the interface is fully activated.

Any ideas?

#453 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-29 12:22:36

Thanks for the tip, golinux. I was able to read the post.

Fungus, your post is clearly political and tangential. I don't see what neoliberalism, veganism, and political correctness have to do with this thread. If this forum's rules prohibit political/tangential posts, then the post is inappropriate and golinux is just doing his job. Nevertheless, I agree with you that the rules need to apply to all forum/list users and that certain users should not be singled out.

BTW, I hope you realize that you are convicting yourself of selfishness and saying that you don't deserve to use Devuan when you write: "individuals who do use open/free software, do they deserve it?  In my perception no, because they are doing it just for their own selfish interests." You do realize that Debian and Devuan's core is all free software? The main repository consists of nothing but free software smile It all goes back to Debian's founding: "The Debian Project is an association of individuals who have made common cause to create a free operating system."

As for "self restricting", we all do it: We don't associate with certain people or use certain things in the interest of avoiding harm or potential for harm. The potential for harm in using proprietary software is well documented and I'm not going to rehash that here. If your point is that free software in userspace is of little use when things are proprietary closer to metal (BIOS and firmware), then I completely agree and that's why I'm not going to waste time and effort to hop from compromised phone to compromised phone.

---

Anyway, back to the main topic of the thread: I hope the Librem 5 proves to be the holy grail phone that's fully functional and uses only free software from the bootloader on up, but I guess we'll have to wait and see.

If Purism makes compromises when they hit road blocks, theirs will be just another "security and privacy focused" "mostly free" phone. I think such devices are doomed from the start because most potential users (folks who care about privacy) already have a "mostly free" device that they've configured to be "security and privacy focused".

#454 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-29 01:47:07

Fungus, I can't comment on post #11 because the text is gone.

Regarding free software, I am not an ideologue and am comfortable with either the FSF's definition (https://www.gnu.org/philosophy/free-sw.html) or Debian's (https://www.debian.org/intro/free).

Different people obviously have different levels of tolerance for proprietary software. Personally, I tolerate proprietary firmware for mobile peripherals to work, but only as a temporizing measure until folks who are much smarter than I am figure out a way to do without.

I'm too old and tired to hop from phone to phone, but am definitely looking to switch from my current Android phone to one that runs GNU/Linux and requires no proprietary firmware. Again, that's just my game plan and what I am personally comfortable with. If other people find it fun to experiment with different phones and have more tolerance for proprietary software, they should go for it. Different strokes for different folks smile

#455 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-28 20:58:43

Thanks, fungus. I'll look into udoo, but my guess is that it isn't 100% libre given that I couldn't find it anywhere on FSF's lists.

The only fully free phone OS I am aware of is Replicant. I've tried Replicant 6 on a few phones but I couldn't get any of them to recognize my SIM card, making the phones useless.

I'm going to hold on to my current "compromised" phone until I have something that runs only free software and, unlike Replicant, actually works for me.

#456 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-28 20:08:32

Thank you both. I guess the moral of the story is that if it sounds too good to be true, it probably is. Sigh.

I'll believe in a 100% libre phone where everything works when I see a RYF announcement from the FSF.

Sorry for the noise. I'll curb my enthusiasm with Purism and will support them with half of what I had planned to. I'd at least like to see them try.

#457 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-28 18:08:27

I wrote to Purism. My question:

If you can't find existing peripherals (e.g., mobile WiFi and Bluetooth chips) that can run with 100% free software--no proprietary blobs anywhere--will you make (or ask someone to make) such peripherals for the Librem 5?

Their answer:

I asked our CEO directly, this is his reply:

"Yes. This is one of the reasons I formed Purism, to push the beliefs
into fabrication."

-Mladen Pejaković
Purism support

#458 Re: Off-topic » Finally a free software GNU/Linux phone? » 2017-08-28 15:42:36

Their goal is 100% free software, no blobs. That's implied in their desire to obtain RYF ("Respects Your Freedom") certification from the FSF--if there are blobs anywhere, FSF will not certify the phone.

This from their FAQ:

Are all hardware components running completely free software, with the source code available?

From testing the CPU, GPU, Bootloader and all software will run free software, we are evaluating the WiFi and Bluetooth chips and firmware, this is an area we have to evaluate, finalize, and test. The mobile baseband will most likely use ROM loaded firmware, but a free software kernel driver. We intend to invest time and money toward freeing any non-free firmware.

Will you be seeking FSF RYF endorsement?

We will constantly keep FSF up-to-date on the hardware and software, our current understanding is any non-free kernel firmware needed for RF chips will not meet the RYF qualifications today, so we will continue to evaluate the WiFi and Bluetooth cards in the hopes to advance toward RYF. The end goal for us is to gain RYF for all Purism products.

I don't like the vague "we will continue to evaluate the WiFi and Bluetooth cards". That needs some clarification.

Nevertheless, I think this effort deserves to be supported: How many phone developers have ever said "we intend to invest time and money toward freeing any non-free firmware...and the end goal for us is to gain RYF [certification]"?

P.S. I realize that this is a longshot given that Replicant has been at it for many years and has yet to deliver a libre phone where everything (including WiFi and Bluetooth) works. Nevertheless, I'm cautiously optimistic about the Librem5 given that, unlike Replicant, Purism will be building the phone themselves out of components they have selected/made.

#459 Off-topic » Finally a free software GNU/Linux phone? » 2017-08-28 14:42:43

GNUser
Replies: 20

https://puri.sm/shop/librem-5/

I've been looking for a completely libre GNU/Linux phone for many years. It sounds like the Purism folks are serious about trying to build such a device.

#460 Re: DIY » automatically disable screensaver during video (incl. web browser) » 2017-08-16 18:01:13

Here's version 2.0, with cleaner logic and a new feature: Cursor disappears during video/audio playback (requires that the "unclutter" package be installed).

#!/bin/bash

while true; do
    sleep 10
    if grep -q RUNNING /proc/asound/card*/pcm*/sub*/status; then # there is sound, so we want "movie mode"...
        # xscreensaver nudge:
        /usr/bin/xscreensaver-command -deactivate
        # screensaver-agnostic nudge:
        # xdotool key Pause
        pgrep unclutter || unclutter & # if unclutter isn't running, start it
    else # there is no sound, so no "movie mode"...
        pgrep unclutter && pkill unclutter # if unclutter is running, kill it
    fi
done

#461 Other Issues » heimdall not working on Devuan Jessie [SOLVED] » 2017-08-11 20:02:52

GNUser
Replies: 0

TL;DR version: There is nothing wrong with your Devuan Jessie install or with your Samsung phone. You just need a more recent heimdall than what's in the Jessie repository smile Link to what you need is at the end of the post.

So, I got one Samsung Galaxy S5 for myself and one for the wife, with intention of installing TWRP recovery and LineageOS 14.1 on them. First step is to install TWRP via heimdall.

To test whether heimdall is working, put your phone in "Download mode" (with phone off: volume down + home + power), connect it to your GNU/Linux box, and run this in a terminal as regular user (i.e., without sudo):

heimdall print-pit

My heart sank when, on my Devuan system, this is what happens after the above:

ERROR: Failed to send request to end PIT file transfer!
ERROR: Failed to download PIT file!
Ending session...
ERROR: Failed to send end session packet!
Releasing device interface...

I got the idea in my head to try a newer heimdall package from Debian Stretch, Buster, or Sid. This is what I get with those:

heimdall: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./heimdall)
heimdall: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./heimdall)

The issue here, as you may have guessed, is that the newer packages are compiled against a glibc version that's newer than Jessie's (glibc is forwards-compatible but notoriously not always backwards-compatible).

What you need to do is to compile heimdall from source (to get latest version), on Devuan/Debian Jessie or older distro (so that the package is compiled against Jessie's glibc or older).

I did the above and all errors went away when I used the resulting binary. The phones are now loaded with TWRP and LineageOS cool

If you don't know how to compile or don't feel like the hassle...
Here is the .deb: heimdall-flash_1.4.2_amd64.deb
If you prefer just the binary, here is is: heimdall 1.4.2 amd64

Enjoy,
Bruno

#462 Re: Devuan » Stretch is coming, Devuan status backported or up to date packages » 2017-08-11 13:00:31

golinux wrote:
greenjeans wrote:
golinux wrote:

Relax and enjoy the stability that 'just works'.

You know, it's funny, because probably nobody that ever posts on this forum will ever do that . . .

Well, I do!  I like stable and boring and only try new things when absolutely necessary.  wink

Ditto! I love stable and boring. It's nice to turn my computer on and know exactly what to expect day to day. I'm perfectly happy with Devuan Jessie smile

#463 Re: Off-topic » Good book recommendation on networking? [SOLVED] » 2017-08-10 16:53:51

fungus wrote:

a hardcopy is what you print on your own

Yes, I think this is what I'll end up doing. I work at the computer all day and last thing I want when I'm reading "for fun" is more screen time.

#464 Re: Off-topic » Good book recommendation on networking? [SOLVED] » 2017-08-10 16:28:30

Here's a cornucopia of online texts:
https://www.quora.com/What-is-the-best- … -hand-outs

I think I'm going to give up on finding a hardcopy book. I've been looking around for three days and the books that look interesting are at least 10 years old sad

#465 Re: Off-topic » Good book recommendation on networking? [SOLVED] » 2017-08-10 16:07:21

I figured. The book doesn't have to be super recent. I'd be happy with something 5 years old or less.

#466 Re: Off-topic » Good book recommendation on networking? [SOLVED] » 2017-08-10 14:53:39

I found this: http://lartc.org/howto/

Almost exactly what I'm looking for, but hoping to find a hard copy book.

#467 Off-topic » Good book recommendation on networking? [SOLVED] » 2017-08-10 14:08:32

GNUser
Replies: 6

I'm looking for a book (real one made from dead trees to hold in my hands) on networking, taught from GNU/Linux perspective so that I can experiment at the command line with different utilities. I am comfortable with the very basics (IP addresses, DHCP, DNS) but want to get a grip on jargon such as NAT, DMZ, MASQUERADE, etc. Details of routing and firewalls are especially intimidating and are the topics I want to learn the most.

I've looked around but the books I'm finding tend to have one or more of these problems:

- Too old
- Too advanced
- From Windows perspective

Do any of you have a favorite book that helped you go from noob to confident intermediate skills in networking (especially router and firewall settings)?

#468 Re: Hardware & System Configuration » USB 3.0 expresscard detected but not working [SOLVED] » 2017-08-09 18:16:17

@fungus: Fair enough.

Back to the problem at hand. I definitely found a pattern: When the laptop is on AC power, the USB 3.0 ports on the ExpressCard work just fine. Strange that the card slot doesn't provide the card enough power to work when on battery power, since my battery is in good condition. Oh, well. I'll mark the issue as "solved".

#469 Re: Hardware & System Configuration » USB 3.0 expresscard detected but not working [SOLVED] » 2017-08-09 16:07:26

Only free software from main repository on both Debian and Devuan, so that's not it.

I discovered (via lshw) that the driver is xhci_hcd. lsmod shows that the respective kernel module is loaded on both Debian and Devuan.

@fungus: Not to get political, but your signature invites it smile Respecting other people's right to free speech does not constitute endorsement of their worldview.

#470 Re: Hardware & System Configuration » USB 3.0 expresscard detected but not working [SOLVED] » 2017-08-09 14:48:16

Devuan comes with dbus by default. I can confirm that dbus-daemon is running on my Devuan Jessie installation.

When I plug the same thumbdrive into a USB 2.0 port, it automounts to /media (specifically, to /media/bruno/PATRIOT).

#471 Hardware & System Configuration » USB 3.0 expresscard detected but not working [SOLVED] » 2017-08-09 14:11:56

GNUser
Replies: 8

I'm on a Thinkpad T400 with Devuan Jessie + MATE. The laptop only came with USB 2.0 ports. However, it does have a 54 mm ExpressCard slot that until now has never been used.

As a little upgrade, I decided to get a an ExpressCard with two USB 3.0 ports (this one). Devuan seems to detect it:

bruno@thinkpad:~$ lspci
---snip---
04:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
---snip---

But when I plug a thumbdrive into one of the USB 3.0 ports, nothing happens: Device doesn't automount, doesn't show up in caja's side pane, its little light doesn't even blink. The thumbdrive automounts in Devuan just fine when I use one of the laptop's built-in USB 2.0 ports.

I tried booting into my Debian Jessie + MATE partition--which I kept to kick around in troubleshooting situations such as this--and no problems there: In Debian, when I plug the same thumbdrive into one of the USB 3.0 ports, caja automounts it as expected.

Can you please help me make these USB 3.0 ports usable in Devuan Jessie?

EDIT: The fix (if you can call it that) is in post #8.

#472 Re: Other Issues » enigmail broken since upgrade of Thunderbird to 52.2.1-4~dev8u1 » 2017-08-01 21:06:02

I'm happy to hear that you're in good shape, and that these issues are not present in ascii smile

Adding the "unset" line to /usr/bin/thunderbird is a good idea with one caveat: An upgrade to TB will overwrite the file. A wrapper script is ugly but upgrades will leave it alone.

#473 Re: Other Issues » enigmail broken since upgrade of Thunderbird to 52.2.1-4~dev8u1 » 2017-08-01 14:36:15

You're welcome, Armin. Ha ha--we're both refugees from Gnome3/systemd smile

Thanks for inspiring me to do things the right way, and for the link to the Enigmail FAQs. That was huge.

Given how similar our setups are, it's a safe bet that the steps in #5 above will work for you. Please let me know how it goes.

#474 Re: Other Issues » enigmail broken since upgrade of Thunderbird to 52.2.1-4~dev8u1 » 2017-08-01 14:28:07

BTW, I tried uninstalling gnome-keyring to see what would happen (i.e., to see if I could get away with not having a wrapper script). Unfortunately, it seems that network-manager requires gnome-keyring (or the like) to prompt for wifi passwords.

If I understood the discussion here correctly (see Hans' post at the very bottom of page 1), it seems that currently there are two options for getting full Enigmail functionality without interfering with packages that need a keyring:

(1) Leave gnome-keyring installed, requiring a wrapper script for Thunderbird (as I outlined in #5 above)
or
(2) Uninstall gnome-keyring, install the better-behaved mate-keyring, dump the wrapper script. The fly in the ointment is that mate-keyring is deprecated and no longer in Debian/Devuan repositories--it would require finding it somewhere and downloading it.

Between using a wrapper script or using a deprecated package not in the repository, the wrapper script option seems to better follow the KISS principle.

If anyone can think of a way to get gnome-keyring to stay out of Enigmail's way without resorting to a TB wrapper script, please do tell.

#475 Re: Other Issues » enigmail broken since upgrade of Thunderbird to 52.2.1-4~dev8u1 » 2017-08-01 13:39:48

afuerst wrote:

I try to install nearly everything from packages because my hope is, that upgrades are as smooth as possible smile
I'm not sure staying at TB 45.8 is a good solution, since the upgrade is marked as a security-upgrade.

I completely agree. It was pure laziness that was holding me back.

At any rate, since my laziness was called out smile I went ahead and upgraded thunderbird and installed enigmail (version 1.9.8) from Devuan repository using package manager--then took a deep breath to deal with the fallout.

From reading Enigmail's FAQ, it seems the Enigmail developers are most familiar with gpg-agent/pinentry and not gnome-keyring and the like. I'm on MATE with gnome-keyring and decided to see if my problems would go away if configured Enigmail to use gpg-agent/pinentry instead of gnome-keyring.

Here is how I configured Enigmail to use gpg-agent and pinentry instead of gnome-keyring:

1. Add "use-agent" (without quotes) to ~/.gnupg/gpg.conf

2. Add "use-standard-socket" (without quotes) to ~/.gnupg/gpg-agent.conf (if the file does not already exist, create it)

3. Reboot

Launch Thunderbird and try using Enigmail. If the window that pops up asking for your password is not called "pinentry", then gnome-keyring is forcing itself on Enigmail and you need a few more steps (I needed steps 4-6 as well, so don't feel bad):

4. Create /usr/bin/thunderbird-wrapper with your favorite text editor, put this in it:

#!/bin/bash
unset GPG_AGENT_INFO
exec /usr/bin/thunderbird "$@"

5. In a terminal, make the wrapper script executable:

sudo chmod a+x /usr/bin/thunderbird-wrapper

6. Make sure that the Thunderbird icons in your menu +/- panel point to /usr/bin/thunderbird-wrapper and not /usr/bin/thunderbird

Reboot, launch Thunderbird, and try using Enigmail again. The window asking for your password when you use Enigmail should now be called "pinentry" and everything should work (encryption, signing, decryption, remembering pin for desired time period).

Board footer

Forum Software