Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
3450
views
How to generate ppd file for CUPS
I want to add my printer, HP Laserjet Professional M1136 MFP, to CUPS utility on raspberry pi with raspian OS. I have got the relevant printer driver for debian OS from HP website which is a file with .run extension (hplip-3.20.9.run). But I need to provide a PPD file to the CUPS utility. How to gen...
I want to add my printer, HP Laserjet Professional M1136 MFP, to CUPS utility on raspberry pi with raspian OS. I have got the relevant printer driver for debian OS from HP website which is a file with .run extension (hplip-3.20.9.run). But I need to provide a PPD file to the CUPS utility. How to generate the PPD file for this purpose?
Note: moving this question from www.askubuntu.com. There was one answer already provided, which I am pasting below:
> try
sudo apt-get install hpijs-ppds
or sudo apt-get install hp-ppd
>
> I just use the 127.0.0.1:631 to config my printers and I don't use HP, so I don't know if these will automatically get populated in your tool.
>
> But I usually end up going through this because my (ubuntu)raspberry pi > cups' driver selection is not filled out with all the drivers I need... > I think also I add foomatic and one other that escapes me (maybe openprinting), until I eventually get what I need...
>
> I generally have to something like apt-cache search ppd
or apt-cache search cups
to search what is available.
user439960
Nov 1, 2020, 03:32 PM
• Last activity: Jul 27, 2025, 07:09 PM
1
votes
1
answers
3395
views
How do I retain keyboard setup for my xrdp session?
Running RDP on my Win10 box against my Raspbian distro on an R4 with xrdp. My keyboard layout was not corresponding to my Norwegian keyboard. I followed the advice in https://unix.stackexchange.com/questions/99085/save-setxkbmap-settings to get the keyboard (Norwegian). `setxkbmap no` in a terminal...
Running RDP on my Win10 box against my Raspbian distro on an R4 with xrdp.
My keyboard layout was not corresponding to my Norwegian keyboard.
I followed the advice in https://unix.stackexchange.com/questions/99085/save-setxkbmap-settings to get the keyboard (Norwegian).
setxkbmap no
in a terminal fixes it. I also followed the advice and added that to ~/profile
.
Problem is my keyboard layout seems to be reset when the connection is broken (for what ever reason, network glitch, rebooting router after fiddling with some settings etc) or simply being inactive for a while even without the connection being broken.
Any takers?
Quick question. What's the difference between setxkbmap no
and setxkbmap -layout no
? Both seems to do the trick but both suffers from the same lack of permanency.
Brumlemannen
(11 rep)
May 26, 2020, 08:50 AM
• Last activity: Jul 22, 2025, 07:04 AM
2
votes
1
answers
4665
views
How can I install Policykit with System V?
I created a minimal install on my Raspbian Raspberry Pi running Debian Jessie. Among other things, I removed `libx11-.*` and dependencies, which included removal of `policykit-1`. I'm trying to reinstall `policykit-1`, but hit the following errors. $ sudo apt-get install policykit-1 ... The followin...
I created a minimal install on my Raspbian Raspberry Pi running Debian Jessie. Among other things, I removed
libx11-.*
and dependencies, which included removal of policykit-1
. I'm trying to reinstall policykit-1
, but hit the following errors.
$ sudo apt-get install policykit-1
...
The following packages will be REMOVED:
sysvinit-core
...
dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:
sysvinit depends on sysvinit-core | upstart | systemd-sysv; however:
Package sysvinit-core is to be removed.
Package upstart is not installed.
Package systemd-sysv is not installed.
After this, booting now hangs, and I have to restore the SD card to an image before this install command. (N.B. booting worked fine before the creation of the minimal install, and after the removal of libx11-.*
and dependencies.) How can I reinstall policykit-1
?
-------
## Edit
This worked for a little while, but no longer.
There is a long thread here discussing how policykit-1
can break your system in Debian. I didn't read it all, but this (closed) bug report suggests that systemd-shim
might be helpful.
Running the following command allowed me to reboot the computer, although I'm unsure as to how functional policykit-1
is.
sudo apt-get install systemd-shim policykit-1
However, a recent update to Debian Jessie prevents this from working. policykit-1
was uninstalled after sudo apt-get dist-upgrade
, and running this command still asks you to uninstall sysvinit-core
.
Sparhawk
(20499 rep)
Jul 15, 2014, 10:38 AM
• Last activity: Jul 20, 2025, 07:03 PM
0
votes
1
answers
2964
views
Unable to generate keys for openvpn using easy-rsa
I've been following a tutorial to set up my Raspberry Pi to run OpenVPN (I'm quite new to the Pi and networking, and this seemed to be a fun intro project). However, I've run into a road block when trying to generate keys using easy-rsa. I've edited the `vars` file to point to the `easy-rsa` directo...
I've been following a tutorial to set up my Raspberry Pi to run OpenVPN (I'm quite new to the Pi and networking, and this seemed to be a fun intro project). However, I've run into a road block when trying to generate keys using easy-rsa. I've edited the
vars
file to point to the easy-rsa
directory, but whenever I try to source the vars
file, I get the following message:
-bash: /etc/openvpn/easy-rsa: Is a directory
-bash: /whichopensslcnf: No such file or directory
NOTE: If you run ./clean-all, I will be doing a rm -rf on /keys
/etc/openvpn/easy-rsa
is the location of the directory, so I find the first line to be a bit redundant. Also, the /whichopensslcnf
file is clearly right there inside the directory.
Any advice or pointers would be much appreciated.
### UPDATE #1
The tutorial can be found here: https://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing/
source ./vars
is the command being given that results in the error.
# easy-rsa parameter settings
# NOTE: If you installed from an RPM,
# don't edit this file in place in
# /usr/share/openvpn/easy-rsa --
# instead, you should copy the whole
# easy-rsa directory to another location
# (such as /etc/openvpn) so that your
# edits will not be wiped out by a future
# OpenVPN package upgrade.
# This variable should point to
# the top level of the easy-rsa
# tree.
export EASY_RSA="/etc/openvpn/easy-rsa
"
#
# This variable should point to
# the requested executables
#
export OPENSSL="openssl"
export PKCS11TOOL="pkcs11-tool"
export GREP="grep"
# This variable should point to
# the openssl.cnf file included
# with easy-rsa.
export KEY_CONFIG=$EASY_RSA/whichopensslcnf
# Edit this variable to point to
# your soon-to-be-created key
# directory.
#
# WARNING: clean-all will do
# a rm -rf on this directory
# so make sure you define
# it correctly!
export KEY_DIR="$EASY_RSA/keys"
# Issue rm -rf warning
echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR
# PKCS11 fixes
export PKCS11_MODULE_PATH="dummy"
export PKCS11_PIN="dummy"
# Increase this to 2048 if you
# are paranoid. This will slow
# down TLS negotiation performance
# as well as the one-time DH parms
# generation process.
export KEY_SIZE=2048
# In how many days should the root CA key expire?
export CA_EXPIRE=3650
# In how many days should certificates expire?
export KEY_EXPIRE=3650
# These are the default values for fields
# which will be placed in the certificate.
# Don't leave any of these fields blank.
export KEY_COUNTRY="US"
export KEY_PROVINCE="CA"
export KEY_CITY="SanFrancisco"
export KEY_ORG="Fort-Funston"
export KEY_EMAIL="me@myhost.mydomain"
export KEY_OU="MyOrganizationalUnit"
# X509 Subject Field
export KEY_NAME="EasyRSA"
# PKCS11 Smart Card
# export PKCS11_MODULE_PATH="/usr/lib/changeme.so"
# export PKCS11_PIN=1234
# If you'd like to sign all keys with the same Common Name, uncomment the
KEY_C$
# You will also need to make sure your OpenVPN server config has the
duplicate-$
# export KEY_CN="CommonName"
Line 14 is the only one I've modified.
**Update #2**
Thanks to sim, I was able to move past this initial problem, but now when I try to issue the ./clean-all
command, I'm told to source the vars
file even though I've already done that.
pi@cympi:/etc/openvpn/easy-rsa $ source ./vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-
rsa/keys
pi@cympi:/etc/openvpn/easy-rsa $ sudo ./clean-all
Please source the vars script first (i.e. "source ./vars")
Make sure you have edited it to reflect your configuration.
I've gone 'round and 'round a couple times but I can't seem to get past this point.
CCramer
(1 rep)
Jul 28, 2018, 03:07 AM
• Last activity: Jul 20, 2025, 06:05 AM
0
votes
1
answers
2834
views
Can’t see files on an USB stick attached to a Raspberry PI 2
I have formated an USB stick from my Raspberry in `VFAT` and use it with Syncthing which works fine (dropping files from Windows 10, store them on the stick and access them on an Android Tablet). But when on my RPI and trying to store files from it to the USB stick, I don’t see any file or directory...
I have formated an USB stick from my Raspberry in
VFAT
and use it with Syncthing which works fine (dropping files from Windows 10, store them on the stick and access them on an Android Tablet).
But when on my RPI and trying to store files from it to the USB stick, I don’t see any file or directory.
Just prints System Volume Information
.
What have I done wrong?
Roland
(11 rep)
Jul 24, 2016, 01:25 PM
• Last activity: Jul 16, 2025, 09:04 AM
1
votes
1
answers
5902
views
ssh_exchange_identification: read: Connection timed out
I connecting into a Raspberry PI using ssh from my windows machine and getting the following message : PS C:\Users\user> ssh pi@172.16.20.100 -vvv OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 debug1: Reading configuration data C:\\Users\\user/.ssh/config debug1: Reading configuration data __PROGRAMDATA...
I connecting into a Raspberry PI using ssh from my windows machine and getting the following message :
PS C:\Users\user> ssh pi@172.16.20.100 -vvv
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\user/.ssh/config
debug1: Reading configuration data __PROGRAMDATA__\\ssh/ssh_config
debug2: resolve_canonicalize: hostname 172.16.20.100 is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 172.16.20.100 [172.16.20.100] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\user/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/user/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_dsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ecdsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ecdsa-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519 error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/user/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug3: recv - from CB(2) ERROR:138, io:000001A90E8E96E0
ssh_exchange_identification: read: Connection timed out
On the raspberry pi (server side) I type:
sudo /usr/sbin/sshd -d
debug1: sshd version OpenSSH_7.9, OpenSSL 1.1.1d 10 Sep 2019
debug1: private host key #0: ssh-rsa SHA256:aXZ4Le7wCYPTbrCbVJ0rFrIlTcXKAllLJ9BgFgtwDEA
debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:LCjd0igPxbcFfN+9wK7m2C4SykVPK7scQxrUnwYJyDQ
debug1: private host key #2: ssh-ed25519 SHA256:C+fhR3x/Vj7W4VY5ZeQhFoSJkhGWAkdgK2baFJ0IJcM
debug1: rexec_argv='/usr/sbin/sshd'
debug1: rexec_argv='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.
how do i get connected?
resolver101
(641 rep)
May 25, 2021, 12:59 PM
• Last activity: Jul 15, 2025, 02:04 PM
1
votes
1
answers
42
views
Whenever audio is playing, I'd like to close a relay powering a speaker. Where and how can I attach a hook to do that?
I'd like to run 32-bit Raspberry Pi OS Bullseye on a Raspberry Pi 2B system headless, with it receiving audio from various sources (e.g. S/PDIF input from TV, through acting as a Bluetooth speaker, or via running Spotify), apply some filters and EQ (using PulseEffects for example), and output balanc...
I'd like to run 32-bit Raspberry Pi OS Bullseye on a Raspberry Pi 2B system headless, with it receiving audio from various sources (e.g. S/PDIF input from TV, through acting as a Bluetooth speaker, or via running Spotify), apply some filters and EQ (using PulseEffects for example), and output balanced audio to the XLR inputs of mains-powered studio monitors (using a Raspberry Pi DAC Pro for example). Hardware selection and software configuration for this is relatively straightforward.
The speakers constantly draw a few watts from the mains, even when idle. It would be nice if I could automate switching power to them on or off depending on whether there's an audible signal being played or not. I could easily build an analog level detection circuit for the task, but I wonder if it's possible to achieve the same in software.
I've looked into ALSA documentation (https://www.alsa-project.org/alsa-doc/alsa-lib/) for a few hours, but I'm in over my head. Searching for similar questions from the past revealed two old yet relevant threads, but unfortunately they lack a satisfactory answer.
On this site: https://unix.stackexchange.com/questions/203963/detect-when-audio-card-is-powered-using-alsa
On the Raspberry Pi forums: [Audio Activation Switch](https://forums.raspberrypi.com/viewtopic.php?t=57808)
jms
(113 rep)
Jul 13, 2025, 09:01 PM
• Last activity: Jul 14, 2025, 12:13 PM
1
votes
1
answers
3551
views
How to automatically run mkinitramfs on Debian after apt update for kernel packages?
What I am trying to achieve is to have an encrypted root file system on a Raspberry Pi (running Raspian Buster) that gets unlocked at boot via ssh. I got quite far by adapting [a tutorial for Kali linux][1] and got it working at least once, but it does not survive kernel updates yet. One of the prob...
What I am trying to achieve is to have an encrypted root file system on a Raspberry Pi (running Raspian Buster) that gets unlocked at boot via ssh. I got quite far by adapting a tutorial for Kali linux and got it working at least once, but it does not survive kernel updates yet.
One of the problems is, that this setup is using an initramfs that is referenced in
/boot/config.txt
by
initramfs initramfs.gz followkernel
and that needs to be updated after an kernel update by manually calling e.g.
mkinitramfs -o /boot/initramfs.gz 4.19.118-v7+
where 4.19.118-v7+
depends on the current kernel version and the kind of Raspberry Pi hardware that is used. Of course, I want to have this automatically done whenever apt upgrade
installs a new kernel.
This is where I got stuck with 2 problems:
- A) Where and how do I plug in that update process in a proper way?
- B) How do I determine the correct kernel version to use?
Regarding A) I came as far as learning that raspberrypi-kernel.postinst
executes /etc/kernel/postinst.d/
. This again calls /usr/sbin/update-initramfs
which in the end will call mkinitramfs
. Where I got confused was this code in /usr/sbin/update-initramfs
:
set_initramfs()
{
initramfs="${BOOTDIR}/initrd.img-${version}"
}
It determines the filename for the initramfs. No such file got ever generated during the update and I'm not sure if I am on the right track, as wikipedia says that the init.rd scheme was superseded by the initramfs scheme. However, I was not able to find a good documentation that describes how things are supposed to happen after a kernel module upgrade. (Good links appreciated).
So my question is:
Where is a good place to plug in a script that runs the mkinitramfs
command? Should I modify /etc/kernel/postinst.d/
? Will this solution be stable over the next few Debian versions?
Regarding B), it is easy to get available kernel versions with
> ls -l /lib/modules/ | awk -F" " '{print $9}'`
5.4.51+
5.4.51-v7+
5.4.51-v7l+
5.4.51-v8+
But how do I automatically select the right one for the current hardware? For a Pi3B+ this would be 5.4.51-v7+
. Is there a way to determine this automatically?
Thank you very much for your help!
Alexander Lorz
(11 rep)
Aug 14, 2020, 08:29 PM
• Last activity: Jul 12, 2025, 05:03 PM
0
votes
2
answers
2777
views
Access windows symbolic link from linux cifs
I have created symbolic link of the mapped drive (DOS share) on Windows 7 computer 200.90.12.25. The symbolic link was created using mklink command. Trying to access this from Linux (Raspberry PI) using CIFS command, I get `mount error(5): Input/output error`. CIFS command and dmesg attached below....
I have created symbolic link of the mapped drive (DOS share) on Windows 7 computer 200.90.12.25. The symbolic link was created using mklink command. Trying to access this from Linux (Raspberry PI) using CIFS command, I get
**CIFS command**
sudo mount -t cifs -o user=username,guest,vers=2.0 //200.90.12.25/DOSA /home/pi/myNAS/myShare
**dmesg** (also on the Linux client)
[1027098.510573] FS-Cache: Duplicate cookie detected
[1027098.510583] FS-Cache: O-cookie c=c6d9fc6c [p=33027f2d fl=222 nc=2 na=1]
[1027098.510588] FS-Cache: O-cookie d=e8ce4e52 n=203d934d
[1027098.510592] FS-Cache: O-key= '020001bd0a090c12'
[1027098.510606] FS-Cache: N-cookie c=435e27ec [p=33027f2d fl=2 nc=0 na=1]
[1027098.510611] FS-Cache: N-cookie d=e8ce4e52 n=9f19c9a0
[1027098.510614] FS-Cache: N-key= '020001bd0a090c12'
[1027098.515854] CIFS VFS: cifs_mount failed w/return code = -5
As per the suggested comments, i have tried below commands. I got the same
mount error(5): Input/output error
. CIFS command and dmesg attached below.
I cannot access the DOS share from Linux because of NETBEUI. Line diagram shown below for reference.

mount error(5): Input/output error
sudo mount -t cifs -o username=username,guest,vers=2.1,mfsymlinks //200.90.12.25/DOSA /home/pi/myNAS/myShare
mount.cifs
sudo mount.cifs //200.90.12.25/DOSA /home/pi/myNAS/myShare -o username=username,guest,domain=domain,mfsymlinks
any alternative solution much appreciated.
Bhuvan Kumar
(51 rep)
Aug 2, 2020, 09:33 AM
• Last activity: Jun 30, 2025, 01:05 PM
0
votes
2
answers
8197
views
Why did my service become masked?
I've provisioned a bunch of RPis with a systemd service that runs an instance of chromium-browser in kiosk mode, but on a few seemingly random devices it doesn't run. I checked the status just by trying to enable it and I get ``` $ sudo systemctl enable kiosk.service Failed to enable unit: Unit file...
I've provisioned a bunch of RPis with a systemd service that runs an instance of chromium-browser in kiosk mode, but on a few seemingly random devices it doesn't run. I checked the status just by trying to enable it and I get
$ sudo systemctl enable kiosk.service
Failed to enable unit: Unit file /lib/systemd/system/kiosk.service is masked.
I looked up what it means for it to become "masked" in order to understand how this happened, and responses simply state that "the units are linked to /dev/null
". Okay, but *why* did that happen to my service? ~~systemctl unmask kiosk.service
will unmask my service but~~ (scratch that, see edit below) I'd like to make sure it doesn't continue to happen.
Here is the actual "kiosk.service" contents if relevant:
[Unit]
Description=Chromium Kiosk
Wants=graphical.target
After=graphical.target
[Service]
ExecStartPre=/bin/sleep 20
Environment=DISPLAY=:0.0
Environment=XAUTHORITY=/home/pi/.Xauthority
Type=simple
ExecStart=/bin/bash /home/pi/kiosk.sh
Restart=on-abort
User=pi
Group=pi
[Install]
WantedBy=graphical.target
**EDIT:**
Actually sudo systemctl unmask kiosk.service
doesn't seem to do anything. When I do that then sudo systemctl enable kiosk.service
it returns the same complaint that it's masked.
**EDIT2:**
So instead of succesfully being able to unmask I simply deleted lib/systemd/system/kiosk.service and re-subscribed it as a service, now it appears to remain enabled. Still have no idea why it was masked to begin with.
A__
(101 rep)
Sep 20, 2023, 05:41 PM
• Last activity: Jun 14, 2025, 05:09 AM
0
votes
0
answers
25
views
How to remove ALSA mixer entries?
I'm trying to make I2S on a Raspberry Pi, and I had to edit ALSA config files (`/etc/asound.conf` and `~/.asoundrc`) a lot. Now, because of the changes I did to the config files, I now have to entries for my I2S chip in the alsamixer. These are called "PCM" and "SoftMaster", however I guess the name...
I'm trying to make I2S on a Raspberry Pi, and I had to edit ALSA config files (
/etc/asound.conf
and ~/.asoundrc
) a lot. Now, because of the changes I did to the config files, I now have to entries for my I2S chip in the alsamixer. These are called "PCM" and "SoftMaster", however I guess the names don't matter here.
But now that I undid these config changes, the mixer entries are still there and I don't know how to remove them. The files ~/.asoundrc
, /etc/asound.conf
and /etc/asound.conf.old
are all empty, but somehow Alsa still finds two devices called "PCM" and "SoftMaster".
So how do I remove those devices or "reload" the alsamixer?
axolotlKing0722
(119 rep)
May 31, 2025, 11:24 AM
0
votes
1
answers
1934
views
Encrypting home directory on Raspberry pi with password file on USB
I have been trying to follow this guide: https://www.howtoforge.com/tutorial/how-to-encrypt-directories-and-partitions-with-ecryptfs-on-debian/ to encrypt the home directory on my pi with out a password by saving the password on a file onto a usb. But the issue is that the pi boots up to a login scr...
I have been trying to follow this guide: https://www.howtoforge.com/tutorial/how-to-encrypt-directories-and-partitions-with-ecryptfs-on-debian/ to encrypt the home directory on my pi with out a password by saving the password on a file onto a usb. But the issue is that the pi boots up to a login screen and prompts for a password. The only difference to the configuration in the guide I have made is that my usb is ntfs and the name of the directory that is being encrypted (pi) and the password. I tried it again and afterwards when the pi booted up it said root account was locked and I only had command line access to the system.
Are there any passwordless encryption alternatives that I can use? As the pi will have a display but no keyboard.
somerandomguy95
(11 rep)
Nov 10, 2017, 01:59 AM
• Last activity: May 24, 2025, 10:08 AM
1
votes
0
answers
163
views
Trouble getting gammu to identify brovi LTE stick
I have a USB LTE modem "Brovi E3372-325". With that and a Raspberry Pi 4 (latest and fresh Raspbian OS bookworm) I want to use gammu to send and retrieve sms messages. LTE functuality is currently not needed. However, `gammu detect` seems not to recognize this modem. I followed Pavel's excellent gui...
I have a USB LTE modem "Brovi E3372-325". With that and a Raspberry Pi 4 (latest and fresh Raspbian OS bookworm) I want to use gammu to send and retrieve sms messages.
LTE functuality is currently not needed.
However,
gammu detect
seems not to recognize this modem.
I followed Pavel's excellent guide (https://blog.tanatos.org/posts/huawei_e3372h-325_brovi_with_linux_stickmode/) to switch the modem to stick mode.
Running mmcli -m 0
works and returns modem information, including information on the system:
System | device: /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2
| drivers: option, cdc_ncm
| plugin: generic
| primary port: ttyUSB1
| ports: ttyUSB1 (at), ttyUSB2 (ignored), ttyUSB4 (ignored),
| usb0 (net)
Running dmesg returns
[ 9.868002] usbcore: registered new interface driver option
[ 9.868043] usbserial: USB Serial support registered for GSM modem (1-port)
[ 9.869796] option 1-1.2:1.0: GSM modem (1-port) converter detected
[ 9.869994] option 1-1.2:1.1: GSM modem (1-port) converter detected
[ 9.870146] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 9.870237] option 1-1.2:1.2: GSM modem (1-port) converter detected
[ 9.870348] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 9.870435] option 1-1.2:1.3: GSM modem (1-port) converter detected
[ 9.870542] option 1-1.2:1.4: GSM modem (1-port) converter detected
[ 9.870647] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB4
[ 10.007369] cdc_ncm 1-1.2:1.5: MAC-Address: 5a:d0:6c:f4:22:67
[ 10.013166] cdc_ncm 1-1.2:1.5 usb0: register 'cdc_ncm' at usb-0000:01:00.0-1.2, CDC NCM (NO ZLP), 5a:d0:6c:f4:22:67
[ 10.013392] usbcore: registered new interface driver cdc_ncm
[ 10.021546] usbcore: registered new interface driver cdc_wdm
[ 10.031318] usbcore: registered new interface driver cdc_mbim
gammu-detect
lists ttyUSB1, ttyUSB2 and ttyUSB3, however running gammu identify
it results in timeouts regardless of the port.
I also set ttyUSB1 to be unmanaged by NetworkManager service, which did not help with my problem.
Also, I have firmware version 3.0.2.61 with no available update.
Is there anything else I can check or do?
Andreas
(131 rep)
Mar 5, 2024, 01:28 PM
• Last activity: May 10, 2025, 10:24 AM
3
votes
1
answers
12425
views
Raspbian restart network without reboot
When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian. In such cases, I try: service networking restart with a cron every hour; this doesn't work. I tried also `ifdown -a && ifup -a` -- not much bet...
When I am using raspbian with a 4g USB modem, sometimes the network goes down and there is no option to bring back the network unless I reboot the raspbian.
In such cases, I try:
service networking restart
with a cron every hour; this doesn't work.
I tried also
ifdown -a && ifup -a
-- not much better.
The thing is, when I execute these commands in a terminal, I get no output.
What is the solution to bring network as if I rebooted?
root@raspberrypi:/home/pi# ifconfig -a
eth0: flags=4163 mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::48f5:e07c:1544:2d24 prefixlen 64 scopeid 0x20
ether b8:27:eb:38:6e:29 txqueuelen 1000 (Ethernet)
RX packets 23902 bytes 8949877 (8.5 MiB)
RX errors 0 dropped 17 overruns 0 frame 0
TX packets 30039 bytes 6388288 (6.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Boucle locale)
RX packets 20996 bytes 8495857 (8.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20996 bytes 8495857 (8.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099 mtu 1500
ether b8:27:eb:6d:3b:7c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
user1335838
(31 rep)
Dec 15, 2018, 05:48 PM
• Last activity: May 9, 2025, 01:08 AM
2
votes
1
answers
7033
views
cups unable to communicate with avahi-daemon when running as a service
I'm finishing setting up my Raspberry Pi in a read-only mode and cups service seems to be the last thing that is causing me issues. As cups writes the config to /etc, I decided to mount /etc/cups as an overlay system: $ mount ... overlay on /etc/cups type overlay (rw,relatime,lowerdir=/etc/cups_org,...
I'm finishing setting up my Raspberry Pi in a read-only mode and cups service seems to be the last thing that is causing me issues.
As cups writes the config to /etc, I decided to mount /etc/cups as an overlay system:
$ mount
...
overlay on /etc/cups type overlay (rw,relatime,lowerdir=/etc/cups_org,upperdir=/etc/cups_rw/upper,workdir=/etc/cups_rw/work)
...
The cups service starts successfully, I'm able to access the localhost:631 page, however going to /admin subpage results in "Internal server error" and the /printer subpage shows: Unable to get printer list: Bad file descriptor.
During startup of the service I see in the log:
E [03/Sep/2016:17:17:13 +0200] Unable to communicate with avahi-daemon: Daemon not running
while the avahi daemon is active and running
When accessing the /admin subpage the log shows:
D [03/Sep/2016:18:22:39 +0200] [CGI] Started /usr/lib/cups/cgi-bin/admin.cgi (PID 5367)
I [03/Sep/2016:18:22:39 +0200] [Client 13] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=5367)
D [03/Sep/2016:18:22:39 +0200] [Client 13] file=14
D [03/Sep/2016:18:22:39 +0200] [Client 13] Waiting for CGI data.
D [03/Sep/2016:18:22:39 +0200] Report: clients=1
D [03/Sep/2016:18:22:39 +0200] Report: jobs=0
D [03/Sep/2016:18:22:39 +0200] Report: jobs-active=0
D [03/Sep/2016:18:22:39 +0200] Report: printers=1
D [03/Sep/2016:18:22:39 +0200] Report: stringpool-string-count=654
D [03/Sep/2016:18:22:39 +0200] Report: stringpool-alloc-bytes=6392
D [03/Sep/2016:18:22:39 +0200] Report: stringpool-total-bytes=11720
D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:22:39 +0200] [CGI] admin.cgi started...
D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown.
E [03/Sep/2016:18:22:39 +0200] [CGI] Unable to connect to cupsd: Bad file descriptor
E [03/Sep/2016:18:22:39 +0200] [CGI] Unable to connect to cupsd: Bad file descriptor
D [03/Sep/2016:18:22:39 +0200] [CGI] cupsServer()="/var/run/cups/cups.sock"
D [03/Sep/2016:18:22:39 +0200] [CGI] ippPort()=631
D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:22:39 +0200] [CGI] cupsEncryption()=0
D [03/Sep/2016:18:22:39 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:22:39 +0200] [Client 13] CGI data ready to be sent.
D [03/Sep/2016:18:22:39 +0200] PID 5367 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 1.
However, when I stop the service, and run the program manually:
/usr/sbin/cupsd -f
the problem does not occur at all. The log shows:
D [03/Sep/2016:18:25:33 +0200] Avahi server connection now available, registering printers for Bonjour broadcasting.
And I'm able to access /admin (and all the other subpages):
D [03/Sep/2016:18:25:36 +0200] [CGI] Started /usr/lib/cups/cgi-bin/admin.cgi (PID 6269)
I [03/Sep/2016:18:25:36 +0200] [Client 17] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=6269)
D [03/Sep/2016:18:25:36 +0200] [Client 17] file=18
D [03/Sep/2016:18:25:36 +0200] [Client 17] Waiting for CGI data.
D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:25:36 +0200] [CGI] admin.cgi started...
D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:25:36 +0200] [Client 19] Accepted from localhost (Domain)
D [03/Sep/2016:18:25:36 +0200] [Client 19] Waiting for request.
D [03/Sep/2016:18:25:36 +0200] [CGI] http=0x554e9db8
D [03/Sep/2016:18:25:36 +0200] [CGI] cgiSetVariable: SECTION="admin"
D [03/Sep/2016:18:25:36 +0200] [CGI] cgiSetVariable: REFRESH_PAGE=""
D [03/Sep/2016:18:25:36 +0200] cupsd is not idle any more, canceling shutdown.
D [03/Sep/2016:18:25:36 +0200] [CGI] org.cups.sid cookie is "72b5efbcd72416115613b87b329ce911"
D [03/Sep/2016:18:25:36 +0200] [CGI] No form data, showing main menu...
Any hints on what can be the reason of this behavior and how to solve the issue (change the config in cups.service file?) or at least to move this troubleshooting further?
asliwinski
(121 rep)
Sep 3, 2016, 04:43 PM
• Last activity: May 2, 2025, 01:02 PM
0
votes
1
answers
2087
views
How to route traffic from a wifi AP via a docker container on a Raspberry Pi
I have a container **A** running a VPN client, then I traffic other containers' (**B** and **C**) traffic via container **A**. Is there a way to create a container **D**, which internally is running something like **HostAP** or **RaspAP** for the creation a wifi network in e.g. interface `wlan0`, an...
I have a container **A** running a VPN client, then I traffic other containers' (**B** and **C**) traffic via container **A**.
Is there a way to create a container **D**, which internally is running something like **HostAP** or **RaspAP** for the creation a wifi network in e.g. interface
wlan0
, and then all the traffic is routed via container **A**?
I found some docker images in docker hub with the above clients for my architechture, and while the few descriptions they have seem to have similar purpose to what I am trying to achieve, none of the worked properly.
If previous option is not possible, how could this be achieved by directly changing the files in the host OS (Raspbian)? The host is connected via eth0
to the router.
First I tried to run the containers directly from the interface eth0
and then tried to attach it to container **A**. None of them worked.
**Docker compose for hostap:**
sudo docker run --restart unless-stopped -dit --name hostap \
-e INTERFACE=docker0 \
-e CHANNEL=6 \
-e SSID=runssid \
-e AP_ADDR=192.168.254.1 \
-e SUBNET=192.168.254.0 \
-e WPA_PASSPHRASE=passw0rd \
-e OUTGOINGS=eth0 \
-e HW_MODE=g \
--net host --privileged sdelrio/rpi-hostap:latest
Log file:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
2448abea512bf5207f7692d242804b0a0198b6e076b011c311b06092af1b5d80
Then it crashes the entire raspberry docker installation (no access to any other container). I have to kill the container and eliminate to re-gain access.
** Docker compose using raspap:**
sudo docker run --name raspap -it -d --privileged --network=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN jrcichra/raspap-docker
This one stops the container after its creation.
Log file:
systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture arm.
Welcome to Debian GNU/Linux 10 (buster)!
Set hostname to .
Failed to create /init.scope control group: Read-only file system
Failed to allocate manager object: Read-only file system
[!!!!!!] Failed to allocate manager object.
Setup:
- Docker running on Raspbian in a Raspberry Pi 4
Docker images checked:
- https://github.com/sdelrio/rpi-hostap
- https://github.com/RaspAP/raspap-docker
Thanks in advance.
wdsgn
(101 rep)
Aug 24, 2022, 08:41 PM
• Last activity: Apr 30, 2025, 10:10 AM
0
votes
0
answers
37
views
How to interpret overlapping journalctl boots on Raspberry Pi OS Bookworm?
I need to know the hours of the reboots of a machine. The system used is Raspberry Pi OS Bookworm. However, I'm a bit confused about what I read... If I understand correctly, the first date will be the startup, and the second will be the shutdown. But in this case, I have multiple startups with conf...
I need to know the hours of the reboots of a machine. The system used is Raspberry Pi OS Bookworm. However, I'm a bit confused about what I read... If I understand correctly, the first date will be the startup, and the second will be the shutdown. But in this case, I have multiple startups with conflicting information. Here's my output:
-9 78e891182c6e4686aec796bf8b69f7e3 Mon 2025-04-28 09:17:01 CEST Mon 2025-04-28 14:32:01 CEST
-8 90301c02b7d9415b80109bc8cebe6d8f Mon 2025-04-28 14:17:01 CEST Mon 2025-04-28 16:15:01 CEST
-7 d4a81802b6ff49f596858c72a912874b Mon 2025-04-28 15:17:01 CEST Mon 2025-04-28 15:17:01 CEST
-6 cbbb35a537eb4abf94d34fed8a5591ab Mon 2025-04-28 15:17:01 CEST Mon 2025-04-28 16:19:01 CEST
-5 4e6a8bb5edba49fbafed1cc600a63852 Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 16:21:01 CEST
-4 3c7bb8dc1c4d4d1fa332faec48c14b92 Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 16:18:01 CEST
-3 57da6dc6a9ef4621b7015cd96d74e54b Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 16:18:01 CEST
-2 a78180d2c8844db484d6e380e88e93f5 Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 16:25:01 CEST
-1 a27e260f7c724f8cbd3195f54e7e155c Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 16:29:01 CEST
0 dc8a18268f83437ba40bbc9377c284dd Mon 2025-04-28 16:18:01 CEST Mon 2025-04-28 17:07:01 CEST
Entry -8 indicates a session from 14:17 to 16:15, but the following lines show reboots during this timespan. The same is true for entries from -5 to 0: they all show a boot at 16:18 but with different shutdown times. What exactly is happening here? Is this system boots or something else (like a user session)?
Thomas Renault
(1 rep)
Apr 28, 2025, 03:19 PM
• Last activity: Apr 28, 2025, 06:22 PM
2
votes
1
answers
2003
views
How to add LIRC to ir-keytable protocols?
I'm trying to issue a bash command on infrared remote control button presses. The IR receiver device is an usb device included in the Anysee e30 Combo plus DVB-T tuner, which works perfectly, otherwise. The output of the ir-keytable output: Found /sys/class/rc/rc0/ (/dev/input/event0) with: Driver d...
I'm trying to issue a bash command on infrared remote control button presses. The IR receiver device is an usb device included in the Anysee e30 Combo plus DVB-T tuner, which works perfectly, otherwise.
The output of the ir-keytable output:
Found /sys/class/rc/rc0/ (/dev/input/event0) with:
Driver dvb_usb_anysee, table rc-anysee
Supported protocols: NEC
Enabled protocols:
Name: Anysee
bus: 3, vendor/product: 1c73:861f, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
When I run
ir-keytable -t
to test whether the button presses are received, this works and I see scan codes and button labels(KEY_UP etc) showing up. To make a button press fire a bash conmmand, I think my only option is to use LIRC's irexec command.
In installed lirc and configured it, then ran irw
which is lirc's testing command. No output whatsoever. I checked that lircd is running and that irw can connect to the daemon.
Note that LIRC is not under supported protocols of the ir-keytable command. Does this mean I can't use the hardware for this purpose?
root@raspberrypi:/home/pi# modprobe ir-lirc-codec
root@raspberrypi:/home/pi# ir-keytable -c -p NEC,LIRC
Old keytable cleared
/sys/class/rc/rc0//protocols: Invalid argument
Couldn't change the IR protocols
I saw on a few websites that people do this to add lirc as a protocol. I am not surprised this failed for me though, it would be odd that you could add an unsupported protocol by simply echoing it's name to a file.
root@raspberrypi:/home/pi# echo lirc > /sys/class/rc/rc0/protocols
bash: echo: write error: Invalid argument
I am using a Raspberry Pi v2 as system (Debian Wheezy)
Nino van Hooff
(169 rep)
Sep 6, 2015, 08:40 AM
• Last activity: Apr 22, 2025, 08:03 AM
0
votes
2
answers
1957
views
Mariadb on Raspbian: Can't connect to local MySQL server through socket
I'm setting up a "clean" image for my home Raspberry pi running the latest Raspbian, and I'm finding a small problem when installing the mariadb database. So far, the steps I've taken are the following: ```` sudo apt-get install -y mariadb-server sudo nano /etc/mysql/my.cnf ```` Add the following li...
I'm setting up a "clean" image for my home Raspberry pi running the latest Raspbian, and I'm finding a small problem when installing the mariadb database.
So far, the steps I've taken are the following:
`
sudo apt-get install -y mariadb-server
sudo nano /etc/mysql/my.cnf
`
Add the following lines to my.cnf:
`
[mysqld]
datadir=/mnt/RaspberryData/mysql
socket=/mnt/RaspberryData/mysql/mysql.sock
[client]
port=3306
socket=/mnt/RaspberryData/mysql/mysql.sock
`
The path /mnt/RaspberryData/mysql
contains the database info of my previous installation, which was configured through a hard link. This may or may not be the issue.
Then execute:
`
sudo sytemctl start mariadb
journalctl -u mariadb
`
And here's when I have the issue:
`
Jun 22 19:18:33 raspberrypi systemd: Starting MariaDB 10.3.22 database server...
Jun 22 19:18:34 raspberrypi mysqld: 2020-06-22 19:18:34 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 2623 ...
Jun 22 19:18:35 raspberrypi systemd: Started MariaDB 10.3.22 database server.
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: Looking for 'mysql' as: /usr/bin/mysql
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: Version check failed. Got the following error when calling the 'mysql' command line client
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jun 22 19:18:35 raspberrypi /etc/mysql/debian-start: FATAL ERROR: Upgrade failed
`
As you can see, there's some kind of update process that is trying to connect through a socket located in /var/run/mysqld/mysqld.sock
but that path has nothing (Only a mysqld.pid
file).
I'm guessing the guides on how to move the data from one location to another omitted some process or whatnot, as I can actually get into the database and execute queries. So, what am I missing here?
Neuromante
(131 rep)
Jun 22, 2020, 06:56 PM
• Last activity: Apr 18, 2025, 12:01 PM
0
votes
0
answers
610
views
Sharing Ethernet connection with Wifi and USB ethernet using systemd-networkd
I am running Raspbian 11 on a Raspberry Pi 4 and have connected a USB Ethernet NIC. My goal is to allow clients to connect via Wi-Fi (wlan0) or the USB Ethernet adapter (eth1), then have the Raspberry Pi route all traffic through the primary Ethernet connection (eth0). This setup must still function...
I am running Raspbian 11 on a Raspberry Pi 4 and have connected a USB Ethernet NIC.
My goal is to allow clients to connect via Wi-Fi (wlan0) or the USB Ethernet adapter (eth1), then have the Raspberry Pi route all traffic through the primary Ethernet connection (eth0).
This setup must still function when eth0 is disconnected (though obviously without internet access).
**Problem**: I have configured all interfaces (wlan0, eth1, and eth0), but traffic from wlan0 and eth1 is not being routed through eth0 to the internet..
Here is how I have configured
systemd-networkd
:
/etc/systemd/network/09-default.network
:
[Match]
Name=eth0
[Link]
RequiredForOnline=no
[Network]
DHCP=ipv4
[Bridge]
Priority=0
[DHCPv4]
ClientIdentifier=mac
/etc/systemd/network/10-wlan0.network
:
[Match]
Name=wlan0
Type=wlan
[Network]
DHCP=no
Address=192.168.8.1/24
DHCPServer=yes
IPMasquerade=yes
[DHCPServer]
PoolOffset=10
PoolSize=100
/etc/systemd/network/11-eth1.network
:
[Match]
Name=eth1
[Network]
DHCP=no
Address=192.168.10.1/24
DHCPServer=yes
IPForward=yes
IPMasquerade=yes
[DHCPServer]
PoolOffset=10
PoolSize=100
Jim Cortez
(101 rep)
Jun 9, 2023, 11:14 PM
• Last activity: Apr 3, 2025, 09:57 AM
Showing page 1 of 20 total questions