Re: Modify user PATH in GNOME in Debian 12

2023-11-24 Thread Greg Wooledge
On Sat, Nov 25, 2023 at 10:28:13AM +0700, Max Nikulin wrote:
> SDDM does read /etc/profile and ~/.profile when starting a user session:
> https://sources.debian.org/src/sddm/0.20.0-1/data/scripts/Xsession/

Interesting.  I wondered whether that might be a Debian patch, since I
couldn't see mention of it in the upstream SDDM changelog.  But it's
in the upstream repository as well, and it seems it's been there for a
rather long time:

https://github.com/sddm/sddm/blob/develop/data/scripts/Xsession

The cute little unquoted $0 is practically mandatory -- you can't release
a shell script without massively stupid quoting bugs, right?  Ah well,
I'm sure no operating system vendor would **EVER** make a directory
with a space in its name, so it should be **just fine**, right?? :-(

> (wayland-session is a sibling file). I do not like that a part of code is
> similar, but not identical to /etc/X11/Xsession from x11-common. Ideally
> there should be no code duplication.

Well, if the ultimate goal is to have everything work consistently, then
there's gonna be code duplication.  Of course, we're nowhere near that
goal.

> I expect that GDM contains similar code reading /etc/profile and ~/.profile.
> LightDM Ubuntu package (but not Debian one) has it.

Ubuntu makes a change of that nature?  That surprises me.  It seems
uncharacteristically nerdy for their mission goal of dumbing everything
down to a common denominator.  Could it be an upstream change instead,
with Ubuntu simply using a newer upstream version than Debian?



Re: Modify user PATH in GNOME in Debian 12

2023-11-24 Thread Max Nikulin

On 25/11/2023 00:15, Greg Wooledge wrote:

On Fri, Nov 24, 2023 at 11:51:53PM +0700, Max Nikulin wrote:


On the other hand I can not say that I understand what happens with PATH.
Likely modifications made through environment.d are overwritten by
/etc/profile. The latter is called by /etc/sddm/Xsession (or
wayland-session).

/etc/profile is only read by login shells of the Bourne family, unless
something goes out of its way to read that file explicitly.  Does KDE
spawn login shells instead of regular ones?


I see no evidences that launching konsole or xterm using menu or krunner 
causes starting bash as a login shell. I added a "logger" call to 
~/.bash_profile and log entries appear during login only.


SDDM does read /etc/profile and ~/.profile when starting a user session:
https://sources.debian.org/src/sddm/0.20.0-1/data/scripts/Xsession/
(wayland-session is a sibling file). I do not like that a part of code 
is similar, but not identical to /etc/X11/Xsession from x11-common. 
Ideally there should be no code duplication.


I expect that GDM contains similar code reading /etc/profile and 
~/.profile. LightDM Ubuntu package (but not Debian one) has it.


I suspect that startplasma does a bit more and transfers environment 
variables to systemd user session. The reason is the following.


plasma X11:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/added-by-etc-profile-d
systemctl --user show-environment | grep '^PATH'
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/added-by-etc-profile-d

fluxbox

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/added-by-etc-profile-d
systemctl --user show-environment | grep '^PATH'
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/added-by-user-config-environment-d

Notice that a component from ~/.config/evironment.d appears only in 
systemd and only in the case of fluxbox.




Re: Hi, I'm using Neptune os. I'm new to Debian. I got it it successfully installsd, how do I setup network?

2023-11-24 Thread David Wright
On Fri 24 Nov 2023 at 23:52:29 (+), Chris Goody wrote:
> Neptune is based on Debian, I cant also activate my wired connection via USB 
> tethering. It says actives. But not fully on.

My notes say the following:

Connect phone with USB cable. Pull down notifications:
Tap USB,
Tap again for other uses,
Tap USB tethering.

On the computer, ifupdown is installed (the debian-installer default).
Root wrote this file:

  $ cat /etc/network/interfaces.d/tethered
  allow-hotplug usb0
  iface usb0 inet dhcp
  $ 

  # ifup usb0

  $ ip r
  default via 192.168.50.93 dev usb0 
  192.168.50.0/24 dev usb0 proto kernel scope link src 192.168.50.231 
  $ 

When finished:

  # ifdown usb0

On the phone, deselect USB tethering button.
(This may require selecting something else, like Charging Only.)
Remove cable.

(Leave ifupdown and interfaces.d/tethered.)

Cheers,
David.



Re: AW: Part II dd copy destroyed DVD

2023-11-24 Thread David Christensen

On 11/24/23 08:35, Schwibinger Michael wrote:


Good afternoon

Sorry for misunderstanding.

There is a DVD
Many files are burned on the DVD.

I try ro copy the DVD to HD
mc is saying
"file not ok" in German language.
Then I check the HD.
The DVD is full with 4 GB, many files.
I check the HD.
There I can see 2 GB of files.
So mc did copy 50% or less or more of the DVD.

So I think during burning some files are made by "bad burning."

So the idea was:
Copy with dd.

So question:Is it better to use dvdcopy or another tool?



STFW dvdisaster(1) looks like it might be able to recover all or part of 
the files on a corrupt data DVD:


https://en.wikipedia.org/wiki/Dvdisaster


dvdisaster(1) and documentation are available as Debian packages:

2023-11-24 16:37:25 dpchrist@taz ~
$ apt-cache search dvdisaster
dvdisaster - data loss/scratch/aging protection for CD/DVD media
dvdisaster-doc - data loss/scratch/aging protection for CD/DVD media 
(documentation)



There are videos on YouTube about dvdiaster(1):

https://www.youtube.com/results?search_query=dvdisaster


I suggest that you use your favorite package management tool to install 
both packages and try using dvdisaster(1) to recover the files on your DVD.



David



Hi, I'm using Neptune os. I'm new to Debian. I got it it successfully installsd, how do I setup network?

2023-11-24 Thread Chris Goody
Neptune is based on Debian, I cant also activate my wired connection via USB 
tethering. It says actives. But not fully on.


I use Realtek drivers and rtw89.

Sent from Mail for Windows



Re: Work environment

2023-11-24 Thread Karl Vogel
On Fri, Nov 24, 2023 at 03:28:34AM -0500, Darac Marjal wrote:
> On 23/11/2023 04:34, William Torrez Corea wrote:
> > Why the people use two desktops and one laptop?

> Without any context, it's hard to answer.  But there are some possibilities:
> 
> * Regardless of any other factor, desktops are bigger than laptops, so
> there is room for more hard drives, optical drives, more PCI cards etc.

  It gives me a big monitor, a good mouse, and a keyboard that doesn't suck.

-- 
Karl Vogel  I don't speak for anyone but myself

Drunk Grizzlies Keep Getting Hit By Trains In Montana
  --"Cowboy State Daily" headline, 4 Nov 2023



AW: Part II dd copy destroyed DVD

2023-11-24 Thread Schwibinger Michael

Good afternoon

Sorry for misunderstanding.

There is a DVD
Many files are burned on the DVD.

I try ro copy the DVD to HD
mc is saying
"file not ok" in German language.
Then I check the HD.
The DVD is full with 4 GB, many files.
I check the HD.
There I can see 2 GB of files.
So mc did copy 50% or less or more of the DVD.

So I think during burning some files are made by "bad burning."

So the idea was:
Copy with dd.

So question:Is it better to use dvdcopy or another tool?

Regards
Sophe




Von: to...@tuxteam.de
Gesendet: Mittwoch, 22. November 2023 14:34
Bis: Schwibinger Michael
Cc: Timothy M Butterworth; debian-user@lists.debian.org
Betreff: Re: Part II dd copy destroyed DVD

On Wed, Nov 22, 2023 at 02:11:13PM +, Schwibinger Michael wrote:
>
> Yes.
> This is the problem.
> So mc cannot copy all files

Perhaps. But perhaps not. It is possible we misunderstand.

Can you please

 - show us the file name you are trying to copy the ISO to?
   Please, with the full path.
 - show us which file systems you have mounted?
   In a console, enter "mount" (without the quotes)
 - show us how much space is left in your file system
   In a console, enter "df"

Then, perhaps, we may understand what is happening.

Cheers

(Your mail provider, Microsoft, still hates me)
--
t


Re: Modify user PATH in GNOME in Debian 12

2023-11-24 Thread Greg Wooledge
On Fri, Nov 24, 2023 at 11:51:53PM +0700, Max Nikulin wrote:
> I guess you are not running Gnome.

I'm using fvwm.

> A window manager still might do some magic by calling "systemctl
> set-environment". My impression is that nowadays an application spawned by
> systemd is not something unusual.

The world is definitely changing, and user sessions are becoming more
diverse and more complex.  I certainly don't understand all of the
cases in use today.

> I experimented a bit with KDE and SDDM (I do not have a Gnome VM ready for
> tests). Terminal applications (konsole, xterm) are started as children of
> systemd user session, not startplasma that is spawned by the display
> manager. So /etc/environment.d and ~/.config/environment.d *affect*
> environment of shell in terminal applications.

Well, that's new to me, and very interesting.  I can't say whether it's
a good or bad change, but it's good to know about it.

> On the other hand I can not say that I understand what happens with PATH.
> Likely modifications made through environment.d are overwritten by
> /etc/profile. The latter is called by /etc/sddm/Xsession (or
> wayland-session).

/etc/profile is only read by login shells of the Bourne family, unless
something goes out of its way to read that file explicitly.  Does KDE
spawn login shells instead of regular ones?

> I am puzzled why neither environment.d nor /etc/profile works in the case of
> the topic starter. I suspect a typo somewhere. I am unsure if various bugs
> like https://github.com/systemd/systemd/issues/6414 are relevant.

My reading was that /etc/profile *would* work for them, if they
reconfigured their desktop environment to launch login shells instead
of regular shells, but that isn't what they want to do.

They also pointed out that /etc/bash.bashrc or ~/.bashrc would work,
but only for bash, whereas they were looking for something independent of
the user's shell.

> Just a reminder: BASH does not read ~/.profile if ~/.bash_login or
> ~/.bash_profile exists.

And none of them are read by regular shells.  Those read ~/.bashrc instead.

> You post is great in respect to details concerning current state of affairs.
> I tried to ask if you see a way to make configuration easier for users. E.g.
> /etc/profile is suitable when a shell is involved. It was fine decades ago,
> but display managers may start sessions bypassing shells. Perhaps
> environment.d may be sourced by shells in the case of console login and
> xinit. I still hope that it is possible to create a single point for
> environment configuration and to provide helper tools for various ways to
> login.

The way everything is diversifying right now, it appears that the
situation is going to become more complicated, not simpler, in the next
few years/decades.

If *simple* and *consistent* user configuration across session types
and shells is a goal that any of the desktop environment authors care
about, they need to talk to each other and come up with *one* scheme
that they can all agree on, and implement that.

I've yet to see any evidence that this is a priority for them.

Even if they do come up with one scheme and implement it, we'll still
have legacy environments (like fvwm and fluxbox, presumably) that won't
use it.  And of course direct login shells (console, ssh) will remain
separate entities.



Re: Modify user PATH in GNOME in Debian 12

2023-11-24 Thread Max Nikulin

On 24/11/2023 00:20, Greg Wooledge wrote:

For me, all of the environment.d(5) stuff goes into the systemd --user
service manager which spawns... nothing that's visible to me.  Nothing
at all.

All of my visible applications (terminals, web browsers, etc.) are
spawned by my window manager, which is spawned by my X session, which
is spawned by startx, which is spawned by my console login shell, when
I type the "startx" command.


I guess you are not running Gnome. I am not surprised that environment.d 
and /etc/profile and other shell settings are almost not connected in 
your case. A window manager still might do some magic by calling 
"systemctl set-environment". My impression is that nowadays an 
application spawned by systemd is not something unusual.

- emacs.service (optional)
- Gtk and Qt application may activate various D-Bus services ("busctl 
--user" to get list of ones ready to start)
- MIME type or URI scheme handlers advertised through .desktop files may 
be invoked by GUI applications through D-Bus: "grep DBusActivatable 
/usr/share/applications/*.desktop" see

https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-dbusactivatable

Certainly for particular set of application there may be almost no 
systemd services. Alternatives may be available, e.g. XDG autostart is 
implemented in KDE and Gnome using systemd user session, but other 
window managers may invoke them directly.


Due to these reasons I would not neglect environment.d completely.

I experimented a bit with KDE and SDDM (I do not have a Gnome VM ready 
for tests). Terminal applications (konsole, xterm) are started as 
children of systemd user session, not startplasma that is spawned by the 
display manager. So /etc/environment.d and ~/.config/environment.d 
*affect* environment of shell in terminal applications.


On the other hand I can not say that I understand what happens with 
PATH. Likely modifications made through environment.d are overwritten by 
/etc/profile. The latter is called by /etc/sddm/Xsession (or 
wayland-session).


Another observation is that /etc/profile settings (besides PATH!) do not 
affect "systemctl --user show-environment", but the same settings are 
present in children processes of systemd obtained using


tr '\0' '\n' Fluxbox session has both trees: systemd and window manager. 
environment.d does not affect terminals launched by fluxbox. 
(fbautostart was not installed.)


I am puzzled why neither environment.d nor /etc/profile works in the 
case of the topic starter. I suspect a typo somewhere. I am unsure if 
various bugs like https://github.com/systemd/systemd/issues/6414 are 
relevant.


Just a reminder: BASH does not read ~/.profile if ~/.bash_login or 
~/.bash_profile exists.



Greg, do you have ideas how to relieve pain with environment configuration?
E.g. to not override pam_environment by PATH hardcoded in /etc/profile, to
negotiate what files display managers should read, etc.


Didn't I just post a long message about this?


You post is great in respect to details concerning current state of 
affairs. I tried to ask if you see a way to make configuration easier 
for users. E.g. /etc/profile is suitable when a shell is involved. It 
was fine decades ago, but display managers may start sessions bypassing 
shells. Perhaps environment.d may be sourced by shells in the case of 
console login and xinit. I still hope that it is possible to create a 
single point for environment configuration and to provide helper tools 
for various ways to login.





Re: Boot fails to load network or USB, piix4_smbus - SMBus Host Controller, after update to dbus (1.14.10-3) unstable

2023-11-24 Thread Andy Dorman

I'm pretty sure you can bind mount /proc, /sys, /dev, /run, chroot and
then update-initramfs to regen.


Thanks Tim. You make it sound so simple.

I searched for "chroot to mounted disk to update initramfs" and found 
several detailed descriptions of the process.


https://forums.debian.net/viewtopic.php?t=143279

Thank you so much.  I will give it a shot today and report back.

Cheers.

--
Andy Dorman



Debian archive rsync service changed

2023-11-24 Thread Dan Ritter
In case people didn't see the announcment:
--

The worldwide Debian mirrors network has served archive.debian.org via both 
HTTP and rsync. As part of improving the reliability of the service for users, 
the Debian mirrors team is separating the access methods to different host 
names:

http://archive.debian.org/ will remain the entry point for HTTP clients such as 
APT

rsync://rsync.archive.debian.org/debian-archive/ is now available for those who 
wish to mirror all or parts of the archives.

rsync service on archive.debian.org has stopped, and we encourage anyone using 
the service to migrate to the new host name as soon as possible.
--


I am not responsible for any part of this, I'm just relaying the
news.

-dsr-



high delay while prointing

2023-11-24 Thread Stefan K
Hello Debian guys,

I hope someone can help me with my problem because I'm a little bit frustrated 
and I don't have absolutely no clue how to fix that.

I have a Debian 12 based print server running, all printers are connected via 
IPP which works so far but it takes a while if we start printing multiple pages 
and then for each page, it takes >15s for the next page. It doesn't matter if 
we print PDF or simple text files.

For me, it looks like that cups is waiting until the printer says "I'm done". 
According to the Documentation I tried ?waitjob=false&waitprinter=false at the 
end of the deviceURI and restart cups, but it's still the same. This happens on 
different types of printers eg. HP PageWide Pro 477dw MFP or Kyocera TASKalfa 
4052ci

I can attach the error_log with debug information.

Ideas or solutions are very welcome ;-)

thanks in advance

best regards
Stefan



Re: Work environment

2023-11-24 Thread Darac Marjal


On 23/11/2023 04:34, William Torrez Corea wrote:

Why the people use two desktops and one laptop?
What is the purpose?

I could use a main laptop with Debian for software development (write 
code) and the other two desktop:


 1. Testing
 2. Server


Without any context, it's hard to answer. But there are some possibilities:

* Regardless of any other factor, desktops are bigger than laptops, so 
there is room for more hard drives, optical drives, more PCI cards etc. 
Therefore, someone might use a desktop computer for copying optical 
disks (e.g. two optical drives in the desktop) or they might use it for 
gaming (e.g. a large GPU in the desktop)


* Typically a laptop is smaller, quieter and more energy efficient than 
a desktop. Someone might prefer to use the laptop for general 
office-type work (browsing the web, reading emails etc), while reserving 
the desktops for occasional use (e.g. a gaming night).


* You mention a work environment, so there could be contractual reasons 
for maintaining physically separate computers. The computers could be at 
different classification levels; some of the computers could belong to a 
customer; some of the computers could have a very particular 
specification which virtualisation can't represent.


* There could also be an aspect of hand-me-downs. If the three computers 
are significantly different in age, perhaps the user has upgraded their 
"workstation" over time, but continued to maintain their existing 
computers alongside.


* Depending on how we interpret your question, there may even be the 
possibility that the computers are physically separated. A user might 
have one desktop in the office, a second desktop in "the lab", while 
also having a laptop for when they are working from home / on a client 
site / on the train.




OpenPGP_signature.asc
Description: OpenPGP digital signature