The officially official Devuan Forum!

You are not logged in.

#226 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 19:48:28

Run

mousepad $HOME/.asoundrc

Copy and past 4 lines:

defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0

Save it.

Run

cat $HOME/.asoundrc

It should look like this:

$ cat $HOME/.asoundrc
defaults.pcm.!card Headphones
defaults.ctl.!card Headphones
defaults.pcm.!device 0
defaults.ctl.!device 0

Run

speaker-test --channels 2

It should play "pink noise" to the default device (Headphones)

#227 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 19:20:06

Do you want to know how to create $HOME/.asoundrc with a text editor?

Do you have a text editor?

sudo apt install mousepad

#228 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 18:39:40

Can you create a text file (two lines) with a text editor such mousepad, pluma, and the like?

If you can, it should not be a problem to create a simple ALSA config.

Do you want to use pulseaudio, or it can be removed?

#229 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 17:50:24

Post the output of these commands:

fuser -av $(find /dev/snd -type c 2>/dev/null)
inxi -A
cat /proc/asound/cards

#230 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 17:19:40

Yes. To avoid troubles, one has to use the names.

$ cat /proc/asound/cards
 0 [system         ]: USB-Audio - iMic USB audio system
                      Griffin Technology, Inc iMic USB audio system at usb-0000:00:1a.0-1.3.4, full s
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: system [iMic USB audio system], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Card number: 0   Name: "system"

This is config generated by arateconf:

$ cat $HOME/.asoundrc
# ALSA library configuration file managed by arateconf.
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.

#=====================================================
# Configuration for system
#-----------------------------------------------------

# Perform dmixer
pcm.dmixer
{
	type			dmix
	ipc_key			1024
	ipc_perm		0666

	hint
	{
		show		off
		description	"Direct mixing of multiple audio streams"
	}

	slave
	{
		pcm		"hw:system,0"

		rate		48000
		channels	2
		format		S16_LE

		period_size	1920
		buffer_size	7680
	}
}

# Perform dsnooper
pcm.dsnooper
{
	type			dsnoop
	ipc_key			1025
	ipc_perm		0666

	hint
	{
		show		off
		description	"Recording from the same device for several applications simultaneously"
	}

	slave
	{
		pcm		"hw:system,0"

		rate		48000
		format		S16_LE

		period_size	1920
		buffer_size	7680
	}
}

# Perform duplex
pcm.duplex
{
	type			asym
	playback.pcm		"dmixer"
	capture.pcm		"dsnooper"

	hint
	{
		show		off
		description	"Full duplex for simultaneous playback and recording"
	}
}

# Perform convert
pcm.convert
{
	type			rate
	converter		fftrate

	hint
	{
		show		off
		description	"Sample rate converter"
	}

	slave
	{
		pcm	"duplex"
		rate	48000
		format	S16_LE
	}
}

#=====================================================
# Configuration for default audio device
#-----------------------------------------------------

# Perform plug device
pcm.!default
{
	type			plug
	slave.pcm		"convert"
	hint.description	"Default device"
}

#231 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 16:31:21

No need to re-start ALSA, if you change (or create) ~/.asoundrc

If sound quality does not matter, a simple config might be a solution.

You may need to reload ALSA, if you remove pulseaudio or pipewire.

#232 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 15:45:58

Can you create two ALSA configs (with different default devices) with arateconf?

For example:
1. Create a config with arateconf and save it.
2. Open it with a text editor a save a copy of it, for example:

pluma $HOME/.asoundrc 
mousepad $HOME/.asoundrc 
echo $HOME

3. Create another config and save a copy of it.

#233 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 15:18:04

If you do not like my solution, you may try something like this :
One united default PCM for two cards, or TwoCardsAsOne
_https://unix.stackexchange.com/a/295050
_https://unix.stackexchange.com/a/194631

#234 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 13:49:19

Have you tested this method?

It works without problems.

If a problem occurs, the user can restart mpv player.

#235 Re: Desktop and Multimedia » (alsa) changin soundcard easily via terminal » 2025-09-22 12:29:36

If you have two ALSA configs with different default devices, you can toggle them with a mouse click. What is needed is a simple bash script and a Desktop launcher.
Example is here:
_https://dev1galaxy.org/viewtopic.php?pid=57177#p57177
It was designed for a Linux Mint user who wanted to switch from a Bluetooth headphones to Intel HDA codec (and other way round) with a mouse click.

The magic commans:

cp $HOME/.asoundrc-BT $HOME/.asoundrc 

cp $HOME/.asoundrc-HDA $HOME/.asoundrc 

cp means "copy".

$ alsamixer -h
Usage: alsamixer [options]
Useful options:
  -h, --help              this help
  -c, --card=NUMBER       sound card number or id
  -D, --device=NAME       mixer device name
  -m, --mouse             enable mouse
  -M, --no-mouse          disable mouse
  -f, --config=FILE       configuration file
  -F, --no-config         do not load configuration file
  -V, --view=MODE         starting view mode: playback/capture/all
Debugging options:
  -g, --no-color          toggle using of colors
  -a, --abstraction=NAME  mixer abstraction level: none/basic

#236 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-22 11:16:56

You are avoiding to answer the question, because you are not going to take any responsibility for your statements, because you cannot trust them.

EDIT:

Would you trust a security expert who does not trust his senses and his ability to think?

#237 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-22 10:49:38

If you do not trust your senses and your ability to think, your statements can be dismissed as lunatic ravings or a sort of bullshit.

#238 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-22 09:25:09

1. If ALSA is so good, why do you need pulseaudio or pipewire?

2. Do you trust your senses and your ability to think?

#239 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-21 20:44:56

There was no need to know that there was a sound system, because it worked out of the box. But with ALSA, one has to learn something.

Pulseaudio was created to fix problems with ALSA.
Pipewire was created to fix problems with pulseaudio.

The problems began with ALSA, because it is "advanced".

APT is also "advanced".

Advanced Package Tool (APT)

APT was originally designed as a front end for dpkg to work with Debian's .deb packages.
_https://en.wikipedia.org/wiki/APT_(software)#Variants

#240 Re: Installation » Cant do upgrade Dadedalus to Ceres » 2025-09-21 19:26:48

stultumanto wrote:

I first started using Debian in 2000

Did you have problems with sound and sound quality in 2000? Or it worked out of the box?

#241 Re: Packaging for Devuan » different versions of same package, kicad » 2025-09-18 13:34:16

If you cannot compile, you may try Ubuntu debs from PPA
_https://launchpad.net/~kicad/+archive/ubuntu/kicad-9.0-releases

DEBs:
_https://launchpad.net/~kicad/+archive/ubuntu/kicad-9.0-releases/+packages
_https://ppa.launchpadcontent.net/kicad/kicad-9.0-releases/ubuntu/pool/main/k/
_https://ppa.launchpadcontent.net/kicad/kicad-9.0-releases/ubuntu/pool/main/k/kicad/kicad_9.0.3-0~ubuntu24.10.1_amd64.deb

Deb packages can be repacked and renamed without compilation.

You may also try to compile:

$ dget --extract --allow-unauthenticated https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/kicad/9.0.3+dfsg-1/kicad_9.0.3+dfsg-1.dsc
dget: retrieving https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/kicad/9.0.3+dfsg-1/kicad_9.0.3+dfsg-1.dsc
...
dpkg-source: info: extracting kicad in kicad-9.0.3+dfsg
dpkg-source: info: unpacking kicad_9.0.3+dfsg.orig.tar.xz
dpkg-source: info: unpacking kicad_9.0.3+dfsg.orig-doc.tar.xz
dpkg-source: info: unpacking kicad_9.0.3+dfsg-1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying fixes/Adjusting-content-in-the-desktop-files.patch
dpkg-source: info: applying reproducibility/doc-Add-field-revdate-to-asciidoc-files.patch
dpkg-source: info: applying debian-hacks/KiCadFullVersion-Drop-hyphen-in-the-string.patch
dpkg-source: info: applying fixes/demos-Adjust-MIME-encoding-to-UTF8-of-some-libraries.patch
dpkg-source: info: applying fixes/python-Use-raw-strings-expressions.patch
$ ls -1
kicad-9.0.3+dfsg
kicad_9.0.3+dfsg-1.debian.tar.xz
kicad_9.0.3+dfsg-1.dsc
kicad_9.0.3+dfsg.orig-doc.tar.xz
kicad_9.0.3+dfsg.orig.tar.xz

Read the Build-Deps:

cat kicad-9.0.3+dfsg/debian/control

Install the Build-Deps

Rename the package (in debian/control)

Rename the binary

$ cat kicad-9.0.3+dfsg/CMakeLists.txt | grep project\(
project( kicad )

cd to SourceDir

cd kicad-9.0.3+dfsg

And compile it with

dpkg-buildpackage -us -uc -b

You may also want to read the manual:
_https://wiki.debian.org/CreatePackageFromPPA

#242 Re: Packaging for Devuan » different versions of same package, kicad » 2025-09-17 20:27:17

/usr/local/bin is the standard solution.

cmake -D CMAKE_INSTALL_PREFIX=/usr/local  < + other options: -S (sourcedir), etc.>

However, debhelper (Devuan) does not permit /usr/local/bin (by default).
Though, there is a secret esoteric command to force debhelper to permit prefix=/usr/local
In any case, it is much easier to package it manually, or with CPack .
You may want to rename the deb package, and ProjectName

project( )  is inside CMakeLists.txt

To compile it, you need cmake and ninja

Portable CMake is available here:
_https://github.com/Kitware/CMake
Portable Ninja is available here:
_https://github.com/ninja-build/ninja

PKGBUILD:

build() {
  cmake \
    -B build \
    -S "$pkgname" \
    -G Ninja \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D KICAD_USE_EGL=ON \
    -D KICAD_USE_BUNDLED_GLEW=OFF \
    -D KICAD_BUILD_I18N=ON \
    -D KICAD_I18N_UNIX_STRICT_PATH=ON \
    -D KICAD_BUILD_QA_TESTS=OFF \
    -D KICAD_USE_CMAKE_FINDPROTOBUF=0 \
    -W no-dev

  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  strip "$STRIP_SHARED" "${pkgdir}"/usr/lib/python*/site-packages/_pcbnew.so
}

_https://archlinux.org/packages/extra/x86_64/kicad/
_https://gitlab.archlinux.org/archlinux/packaging/packages/kicad
_https://gitlab.archlinux.org/archlinux/packaging/packages/kicad/-/blob/main/PKGBUILD?ref_type=heads

EXAMPLE for cmake+ninja
_https://dev1galaxy.org/viewtopic.php?id=7175

#243 Re: Off-topic » Opinions about keypassXC » 2025-09-16 12:35:33

Perhaps, you failed to compile something with CMake. Was it keypassXC ?

Is it about sour grapes?
_https://read.gov/aesop/005.html

#244 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-15 15:47:39

Do you think that it is the simplest solution?

You may not use your gksu.sh with file. mediainfo, and the like.

So that, one desktop launcher, and one script which can be modified for the current needs.
You can simply uncomment the command you need.
NOTE: Filenames and paths with spaces should be supported.

If it is about security, then

Exec=gksu.sh /usr/bin/apt-get install %f

Linux Mint has two different apt

/usr/bin/apt
/usr/local/bin/apt

_https://github.com/linuxmint/mintsystem/blob/master/usr/local/bin/apt

greenjeans wrote:
Terminal=true

This is not acceptable. It should be like this:

Terminal=false

Terminal should be opened by a bash script named, for example, "deb_installer".
Terminal should remain open after apt-get exits, for it might be needed to fix problems. It should be under your control.
Paths with spaces should be supported.
USAGE: Right click on a deb file and select "deb_installer". It opens a terminal, and runs sudo /usr/bin/apt-get install <path to your deb> on it.

If you do not know how to open terminal from bash script and run commands on it, you may try to think. It is not difficult, if you trust your ability to think.

The complexity level of this problem is, let us say, "Ubuntu newbie".

Hint: mate-terminal -e <command>

If you pretend to be more intelligent than AI, you may try to solve this problem.

There are many experts on security, on sound, on ALSA, and on everything else, who cannot write a simple script and cannot compile anything. Such "universal experts", as a rule, have affinity to censorship. This affinity can manifest in various ways, from individual tendencies to participate in online content moderation to governmental actions that suppress certain forms of speech.

Because of pulseaudio, systemd, and pipewire, many users left Linux. As a result, the percentage of "universal experts" on Linux forums has significantly increased. They know little about Linux, but they can censor everything.

The problem is that such "universal experts" tend to overestimate their knowledge and underestimate their ignorance. To protect their overblown ego from the reality that challenges it, they have to censor everything they do not understand. That is why, they often attempt to censor jokes. For the same reason, they hate AI and strive to abolish it. Though there might also be economic reasons for AI hate. The "universal experts" may feel that they can be replaced by AI in the same way as Luddites were replaced by machines during the Industrial Revolution. They have to fear AI, because they do not trust their ability to think. To be enslaved by fear, one must relinquish trust in his God-given ability to think.

NOTE: The ability to think is a gift from God. However, if you trust the gifts from God, the Trotskyists and pseudo-Buddhists may diagnose you with "delusional arrogance on steroids".

Pseudo-Buddhism is a religion for slaves who can be replaced by AI. In contrast, authentic Buddhism emphasizes personal responsibility, ethical conduct, critical thinking, and the pursuit of wisdom. Critical thinking, exemplified in teachings like the Kalama Sutta, encourages independent inquiry rather than blind faith, while wisdom, the ultimate goal, is developed through a combination of ethical living and mental discipline.

If you don't trust your ability to think, the gift from God, you are a slave of the Devil.

#245 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-15 15:02:32

If you do not know how to write such script (that is,  a GUI-less substitute for gdebi, a sort of timesaver), you may try to think.

The same method can be used to run media files with CLI aps, e.g., aplay, mplayer, ffplay and the like, or with scripts (e.g, to resample waves with pcm_conv).

#246 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-15 10:00:27

when packages get in a real mess it also lacks the full features of apt to unbreak things.

Since apt is a sort of "unstable wrapper", it may lacks the full features of apt-get to unbreak things.

#247 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-15 01:53:09

Why not a simple solution? A bash script with one command inside (as a substitute for gdebi).

For example:

mate-terminal -e <command>

To install a "local .deb" with dependencies, you can use apt or apt-get

A user-friendly GUI-less substitute for gdebi

1. a very simple bash script (e.g., three lines of code)

2. desktop launcher for this bash script

Right click on a deb file and select "install deb".
It opens a terminal, and runs sudo /usr/bin/apt-get install <path to your deb> on it.

It is much more user-friendly than gdebi

apt-get does not need a gui, it can be used as is.

#248 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-14 23:20:10

There are "security experts", who cannot write simple scripts, and cannot compile anything.

#249 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-14 22:45:01

Try "su" to root, then "apt" or "dpkg".

It seems that you do not know how to write a simple script.

#250 Re: Freedom Hacks » apt seems to be a sort of "unstable wrapper" » 2025-09-14 17:58:38

The standard solution:

1. bash script with one simple command inside

2. desktop launcher for it

Right click on a deb file and select "install deb".
It opens a terminal, and runs "sudo dpkg -i <your deb>" on it.

gksu is not needed.

"local .deb packages" can be installed with "dpkg" or with "apt" (together with dependencies, if available) similar to "gdebi".

Board footer

Forum Software