Re: HiDPI migration: desktop environment issue

2017-12-24 Thread solitone
On 24/12/17 11:24, Jerome BENOIT wrote:
> I read that Cinnamon and MATE, both former clones of GNOME[2], have HiDPI in 
> mind:
> is there any other possibility ? 

I use KDE's Plasma, which supports HiDPI pretty well.



Re: HiDPI migration: desktop environment issue

2017-12-24 Thread Jerome BENOIT
Thanks for your reply.

On 25/12/17 00:05, Dan Ritter wrote:
> On Sun, Dec 24, 2017 at 02:24:17PM +0400, Jerome BENOIT wrote:
>> Hello, I am currently migrating to a HiDPI box (akda Retina box).
>>
>> Since the arrival of GNOME3, I have used Xfce as an alternative to GNOME[2]:
>> I have been happy so far with this choice. Right now, I migrating to
>> a retina box: it appears, unfortunately, that Xfce support for HiDPI is low.
>> small (if not tiny) icons there, big fonts here; and so forth.
>> I have tried to fix it to stick to Xfce; after all Xfce is lightweight.
>> But the issue is that X is not yet ready to manage HiDPI properly:
>> a lot of tweaks are needed to get something almost readable.
> 
> I only found three tweaks needed for XFCE:
> 
> 1. Change the DPI setting upwards.

tried:
xdpyinfo now gives the expected resolution (220 dpi) and screen dimension.
Nevertheless, in the /v/l/Xorg.0.log, DIP is still set to 96 .

> 2. Increase the size of the panel bars.

done

> 3. Select a theme that scales title bars and buttons with the
>size of the font.

I switched to the Default-hdpi style.
BTW, is there any list of HiDPI compatible theme ?

I also  managed to get readable fonts for my xterm consoles, and gvim.

So far, I could not fix the size of the button/icons for gvim and evince:
any hint ?


Thanks, Jerome


> 
> -dsr-
> 



Re: A sox Question about the silence Module

2017-12-24 Thread davidson

On Mon, 25 Dec 2017, davidson wrote:

On Thu, 21 Dec 2017, Martin McCormick wrote:


I am not new to sox but I am asking to see if I have missed
something because a sox script I am using is mostly working but not
quite.

[...]

#! /bin/sh
sox -t .wav input.wav -t .wav output.wav silence -l 1 0 '-39d' -1 0.5 '-45d'

The field containing 0.5 which is the second-to-the-last field is
the only thing that does not work.  The script records while there
is sound but the 0.5 seconds of blank recording after the sound
doesn't happen.

[...]

Instead, you ought to replace "0.5" with something like "0.5t" or
"0:00.5".


Disclaimer: I don't use sox, and have not tested the above advice. I
only read the manual.



Re: A sox Question about the silence Module

2017-12-24 Thread davidson

On Thu, 21 Dec 2017, Martin McCormick wrote:


I am not new to sox but I am asking to see if I have
missed something because a sox script I am using is mostly
working but not quite.

I am attempting to remove long silent pauses in a
recording of people talking and what is supposed to happen is
that sound is recorded during voice or noises and the recording
should continue for a short period of time after the noise so as
to smooth out what one hears and make the conversation sound
more normal.  I test the script with a recording of 3 beeps with
dead silence in between of periods ranging from 4 or 5 seconds up
to a minute.  The silence parameters are such that one should
hear 3 beeps, each a half-second apart in the processed output.

For those familiar with an electronic voice operated
relay or VOX, the delay is set to 1/2 second and there is where
the trouble is.

To get this effect, one sets a line of sox script as follows:

#! /bin/sh
sox -t .wav input.wav -t .wav output.wav silence -l 1 0 '-39d' -1 0.5 '-45d'

The field containing 0.5 which is the second-to-the-last  field
is the only thing that does not work.  The script records while
there is sound but the 0.5 seconds of blank recording after the
sound doesn't happen.


Below is an excerpt from the online manual at
http://sox.sourceforge.net/sox.html

[synopsis of _silence_ effect...]

| silence [−l] above-periods [duration threshold[d|%] [below-periods duration 
threshold[d|%]]

[discussion of its terms...]

| The option −l indicates that _below-periods_ _duration_ length of
| audio should be left intact at the beginning of each period of
| silence. For example, if you want to remove long pauses between
| words but do not want to remove the pauses completely.

| _duration_ is a time specification with the peculiarity that a bare
| number is interpreted as a sample count, not as a number of
| seconds. For specifying seconds, either use the t suffix (as in
| ‘2t’) or specify minutes, too (as in ‘0:02’).

Note that the second paragraph in the above excerpt indicates that the
argument "0.5" in the sox command in your script is not being
interpreted the way you want.

Instead, you ought to replace "0.5" with something like "0.5t" or
"0:00.5".

Good luck with your project.

--
@gwern 16 Oct 2017 | "Darth Mozilla, the data was to be left under my
   | supervision!" "I am altering the deal. Pray I
   | don't alter it any further."

%% https://mobile.twitter.com/gwern/status/919926184200364032

Re: aplay fails on amd64 laptop

2017-12-24 Thread Pierre Frenkiel

On Sun, 24 Dec 2017, Georgi Naplatanov wrote:


if you are using PulseAudio just remove any exiting content of
~/.asoundrc and put this:


  hi Georgi,
  thank you for your suggestion, but I can't launch pulseaudio:

   Failed to load module "module-alsa-sink"

   and as I have a working config with plughw, I don't want to spend
   too much time with pulsequdio

best regards,
--
Pierre Frenkiel



Re: HiDPI migration: desktop environment issue

2017-12-24 Thread Dan Ritter
On Sun, Dec 24, 2017 at 02:24:17PM +0400, Jerome BENOIT wrote:
> Hello, I am currently migrating to a HiDPI box (akda Retina box).
> 
> Since the arrival of GNOME3, I have used Xfce as an alternative to GNOME[2]:
> I have been happy so far with this choice. Right now, I migrating to
> a retina box: it appears, unfortunately, that Xfce support for HiDPI is low.
> small (if not tiny) icons there, big fonts here; and so forth.
> I have tried to fix it to stick to Xfce; after all Xfce is lightweight.
> But the issue is that X is not yet ready to manage HiDPI properly:
> a lot of tweaks are needed to get something almost readable.

I only found three tweaks needed for XFCE:

1. Change the DPI setting upwards.
2. Increase the size of the panel bars.
3. Select a theme that scales title bars and buttons with the
   size of the font.

-dsr-



Re: aplay fails on amd64 laptop

2017-12-24 Thread Georgi Naplatanov
On 12/21/2017 09:04 PM, Pierre Frenkiel wrote:
> hi,
> the sound works perfectly with vlc or audacity, but I can't make aplay
> to work.
> the "aplay -l" output is:
>     List of PLAYBACK Hardware Devices 
>    card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>    card 1: Generic [HD-Audio Generic], device 0: ALC233 Analog [ALC233
> Analog]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
> 
> and both audacity and vlc actually use the  HD-Audio output.
> 
> After configuring ~/.aoundrc like this:
> 
> pcm.!default {
>     type hw
>     card 1
> }
> 
> ctl.!default {
>     type hw
>     card 1
> }
> 
> running "aplay file.wav" gives:
>    aplay: set_params:1081: Sample format non available
>    Available formats:
>    - S16_LE
>    - S32_LE
> 
> I get the same thing with all .wav files I try.
> 
> This problem is specific to my amd64 laptop, as I don't have it on my
> desktop,
> running the same OS version (Stretch), and with the same files.
> 
> Looking at Google didn't gave me any useful information.
> Has anybody an idea?
> 

Hi Pierre,

if you are using PulseAudio just remove any exiting content of
~/.asoundrc and put this:

pcm.pulse {
type pulse
}

ctl.pulse {
type pulse
}

pcm.!default {
type pulse
}

ctl.!default {
type pulse
}

This redirects ALSA to PulseAudio - see
https://wiki.archlinux.org/index.php/PulseAudio/Examples

then just run:

$ aplay test.wav

OR

$ aplay --device=pcm:pulse test.wav

and you should hear the wave file.

BUT if you are not using PulseAudio then aplay parameters should look
like this:

$ aplay --device=hw:X,Y test.wav

Where X is your sound device number and Y is sub-device number.

For example output of

$ aplay -l

is this on my computer:

 List of PLAYBACK Hardware Devices 
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and

$ aplay --device=hw:2,0 test.wav

works just fine.

hw:2,0 is my USB headset on my computer.

Kind regards
Georgi



Re: aplay fails on amd64 laptop

2017-12-24 Thread Pierre Frenkiel

On Sat, 23 Dec 2017, deloptes wrote:


but I told you also about plughw - no?


  yes, but I told you before that I found it myself by accident, when
  trying on an other wav file.


no idea why you are so resistant to getting the knowledge yourself - the man
page is even not that long and you should start reading yourself.


  I read it, but it seems that you didn't unserstand that it gives just an
  example, and doesn't provide any way to find the right parameters
  for an other file.

  None of the parameters I tried worked, until I used the -Dplughw
  syntax.

  Anyway, I think useless to continue talking with somebody who
  can say that "teaching the hungry how to make food" is equivalent to
  "tell them to find themselves"

  I hope that the Education Minister will not read that, otherwise he
  could think that it is useless to pay thousands of teachers, as
  it is enough to tell the students "find yourself"

best regards,
--
Pierre Frenkiel



Linux Startup Process

2017-12-24 Thread steve
Linux Startup Process

You can use the following incantation to list enabled boot services:

$ systemctl list-unit-files --type=service | grep enabled

How do i know what i need, and what i can safely disable ?


i know that accounts-daemon.service is a potential security risk. It is
part of AccountsService, which allows programs to get and manipulate user
account information.

is it related at my account or at the account of other users (guest) ?

[ accounts-daemon.service: enabled ]
- could i mask/disable it ?


i know that ModemManager.service is a DBus-activated daemon that 
controls
mobile broadband (2G/3G/4G) interfaces. If you don't have a mobile
broadband interface -- built-in, paired with a mobile phone via
Bluetooth, or USB dongle -- you don't need this.

is it related at a wifi/bluetooth connection for other device than a
mobile phone ?

[ ModemManager.service   : enabled ]
[ dbus-org.freedesktop.ModemManager1.service : enabled  ?  ]
- could i mask/disable it ?

and these one :
[ configure-printer@.service : static ]
[ geoclue.service  : static ]
[ rc.local.service : static ]
[ rc.local.service : static ]
(yes 2 )
- could i mask it ?


*  i cannot enable or disable static services, because these are
dependencies of other systemd services and are not meant to run by
themselves.

*  i do not know why i have 2 [ rc.local.service : static ].



Re: Optimized VM setup

2017-12-24 Thread Anders Andersson
On Sun, Dec 24, 2017 at 5:06 AM, Rusi Mody  wrote:
> And this time (for the first time?) I saw that majority of the class were
> running Linux (usually but not always Ubuntu) on a VM on a Windows — 
> typically Windows-10
>
> This made those machines markedly sluggish.

I wonder if some of those students are using a strange VM.

I use Ubuntu as a guest in a virtual machine professionally at work,
on a Windows 10 host laptop. I use the free VirtualBox manager, and
the VirtualBox Ubuntu guest plugins.

Ubuntu is running as smooth as is expected from the bare metal. I run
it in full screen on one monitor, and the rest of the people in the
office were impressed when their octave scripts ran faster in the
virtual machine than on the Windows host.


Make sure that your students 1) Enable hardware virtualization on the
computers - this may have to be enabled in BIOS. 2) Use VirtualBox -
it's a free download and (most) of it is open source. 3) After
installing Ubuntu, make sure they install the Guest Additions,
https://help.ubuntu.com/community/VirtualBox/GuestAdditions

There may be other options I can't remember now, I don't have
everything at hand.



Re: HiDPI migration: desktop environment issue

2017-12-24 Thread Anders Andersson
On Sun, Dec 24, 2017 at 11:24 AM, Jerome BENOIT
 wrote:
> Hello, I am currently migrating to a HiDPI box (akda Retina box).
>
> Since the arrival of GNOME3, I have used Xfce as an alternative to GNOME[2]:
> I have been happy so far with this choice. Right now, I migrating to
> a retina box: it appears, unfortunately, that Xfce support for HiDPI is low.
> small (if not tiny) icons there, big fonts here; and so forth.
> I have tried to fix it to stick to Xfce; after all Xfce is lightweight.
> But the issue is that X is not yet ready to manage HiDPI properly:
> a lot of tweaks are needed to get something almost readable.
>
> I read that Cinnamon and MATE, both former clones of GNOME[2], have HiDPI in 
> mind:
> is there any other possibility ? which one is the best in terms of weight and 
> HiDPI support ?

If you can pull yourself from a Windows 95-era start menu and
always-visible panels, try the natural and more modern and updated
successor: Gnome 3. Really.

I've never found the claims of Xfce being lightweight to hold up under
scrutiny. It's often more sluggish than Gnome 3 on the clients I've
compared.

Right now I'm having the most issues with Xwayland here on debian
testing, but that should be orthogonal to the choice of desktop
environment. I should start another rant about debian's handling of
wayland in a different thread I guess! :)



HiDPI migration: desktop environment issue

2017-12-24 Thread Jerome BENOIT
Hello, I am currently migrating to a HiDPI box (akda Retina box).

Since the arrival of GNOME3, I have used Xfce as an alternative to GNOME[2]:
I have been happy so far with this choice. Right now, I migrating to
a retina box: it appears, unfortunately, that Xfce support for HiDPI is low.
small (if not tiny) icons there, big fonts here; and so forth.
I have tried to fix it to stick to Xfce; after all Xfce is lightweight.
But the issue is that X is not yet ready to manage HiDPI properly:
a lot of tweaks are needed to get something almost readable.

I read that Cinnamon and MATE, both former clones of GNOME[2], have HiDPI in 
mind:
is there any other possibility ? which one is the best in terms of weight and 
HiDPI support ?

Thanks in advance,
Jerome



Re: Debian Stretch: Problems with installation - computer froze

2017-12-24 Thread Mark Sack
I had a similar problem with Debian 9.3. I started by creating a barebones VM 
(all options deselected on the tasksel page). After the machine was created and 
rebooted, I logged in as root and did apt-get install gnome-core. This produced 
the error with rtkit daemon and dbus configure hanging as you described.

I got around the problem with the following steps:

- ctrl-z to get out of the apt-get install command that is hanging at dbus

- reboot the machine

- try apt-get install gnome-core again - this results in a message indicating 
there are some problems and you should try a dpkg command

- run the $ dpkg --configure -a as suggested by the above

- reinstall rtkit, i.e. $ apt-get install --reinstall rtkit

Then when I reboot, everything seems to be working fine and the machine comes 
up with the gnome login screen.

--
Mark Sack
about.me/marksack


Re: Optimized VM setup

2017-12-24 Thread David Christensen

On 12/23/17 20:06, Rusi Mody wrote:

I teach programming.
Students of my class have their own laptops required to have (some recent) 
linux.
And this time (for the first time?) I saw that majority of the class were
running Linux (usually but not always Ubuntu) on a VM on a Windows — typically 
Windows-10

This made those machines markedly sluggish.

I was wondering if its possible to have a setup in which Linux is installed
(probably on a separate NTFS partition) such that one can choose
- Boot to Windows, start VM, start Linux
OR
- Boot to (native) Linux

Note: This option only makes sense if the Linux booted is the SAME one
Otherwise its trivial and useless


I've used zero-cost VMware and VirtualBox over the years, but it's been 
a while.  Both stored the VM HDD image (used blocks only) and VM 
metadata in files in the host file system.  Both offered mechanisms for 
mapping virtual HDD images and/or host file systems, partitions, and 
devices into VM devices.  Their might be a way to put the VM image 
directly on a host HDD partition, and then setting up multi-boot.  I 
would suggest reading the documentation for your hypervisor of choice 
and contacting its community.



I believe Microsoft has a hypervisor.  If the host is Windows, I would 
expect Microsoft's hypervisor to give your students as much as their 
laptops can give.



Hypervisors will work the best on computers with the processor 
virtualization features (e.g. for Intel: VT-x, VT-d, VT-x with EPT, TSX-NI).



A fast SSD for the host and the VM's is important (e.g. M.2 on PCIe 3.0 x4).


Install only as much Linux as is needed (e.g. Debian Installer choose 
"standard system utilities" and "SSH"; if you don't need 64-bits, 
32-bits might be lighter).



Alternatively, a live CD Linux distribution.  Damn Small Linux comes to 
mind.



Further alternate, NetBSD or Minix.


David