Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Dale
David Haller wrote:
> Hello,
>
> On Tue, 27 Oct 2020, Dale wrote:
>> This is what the conf file looks like now.  I took out the format
>> option.  Add it back later when this current issue is settled. 
>>
>> --format
>> 'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'
> Is that one or two lines? It think it should be one! I.e.:
>
> --format foo
>
> Try:
>
> --format 
> 'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'
>
> Or, I think it's equivalent:
>
> --format 'bestvideo[ext=webm,ext=mp4][width<=?1280]+bestaudio/best'
>
> HTH,
> -dnh
>


It doesn't like that either.  The original is one line.  That said, I
read where you can put one option on each line and have multiple lines. 
The top line is what I already had so I tried the second one.  It gave
me this.


ERROR: 'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a
valid URL. Set --default-search "ytsearch" (or run  youtube-dl
"ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to
search YouTube
[youtube] byTOZIvyXPo: Downloading webpage


It seems to see something as a URL instead of a option.  Thing is, when
I google, I find a lot of people using the exact same line.  I'm
beginning to wonder if Arve has a point.  Maybe something else changed
and that changed how youtube-dl works.  To test, I wanted to re-emerge
youtube-dl.  When I tried, I got this little bit of spit up on my
keyboard. 


root@fireball / # emerge -a youtube-dl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] net-misc/youtube-dl-::gentoo  USE="-test"
PYTHON_TARGETS="python3_7 -python3_6 -python3_8" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) net-misc/youtube-dl-::gentoo
>>> Failed to emerge net-misc/youtube-dl-, Log file:
>>>  '/var/log/portage/net-misc:youtube-dl-:20201028-012948.log'
>>> Jobs: 0 of 1 complete, 1 failed Load avg: 2.00,
1.70, 1.60
 * Package:    net-misc/youtube-dl-
 * Repository: gentoo
 * Maintainer: j...@gentoo.org
 * USE:    abi_x86_64 amd64 elibc_glibc kernel_linux
python_targets_python3_7 userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Repository id: ytdl-org_youtube-dl.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_YTDL_ORG_YOUTUBE_DL
 *   EGIT_OVERRIDE_BRANCH_YTDL_ORG_YOUTUBE_DL
 *   EGIT_OVERRIDE_COMMIT_YTDL_ORG_YOUTUBE_DL
 *   EGIT_OVERRIDE_COMMIT_DATE_YTDL_ORG_YOUTUBE_DL
 *
 * Fetching https://github.com/ytdl-org/youtube-dl/ ...
git fetch https://github.com/ytdl-org/youtube-dl/ +HEAD:refs/git-r3/HEAD
fatal: could not read Username for 'https://github.com': terminal
prompts disabled
 * ERROR: net-misc/youtube-dl-::gentoo failed (unpack phase):
 *   Unable to fetch from any of EGIT_REPO_URI
 *
 * Call stack:
 * ebuild.sh, line  125:  Called src_unpack
 *   environment, line 3655:  Called git-r3_src_unpack
 *   environment, line 2568:  Called git-r3_src_fetch
 *   environment, line 2562:  Called git-r3_fetch
 *   environment, line 2484:  Called die
 * The specific snippet of code:
 *   [[ -n ${success} ]] || die "Unable to fetch from any of
EGIT_REPO_URI";
 *
 * If you need support, post the output of `emerge --info
'=net-misc/youtube-dl-::gentoo'`,
 * the complete build log and the output of `emerge -pqv
'=net-misc/youtube-dl-::gentoo'`.
 * The complete build log is located at
'/var/log/portage/net-misc:youtube-dl-:20201028-012948.log'.
 * For convenience, a symlink to the build log is located at
'/var/tmp/portage/net-misc/youtube-dl-/temp/build.log'.
 * The ebuild environment file is located at
'/var/tmp/portage/net-misc/youtube-dl-/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/youtube-dl-/work'
 * S:
'/var/tmp/portage/net-misc/youtube-dl-/work/youtube-dl-'
 *
 * The following package has failed to build, install, or execute postinst:
 *
 *  (net-misc/youtube-dl-:0/0::gentoo, ebuild scheduled for
merge), Log file:
 *   '/var/log/portage/net-misc:youtube-dl-:20201028-012948.log'
 *
root@fireball / #


Is that because RIAA made them remove something or have I found a whole
new problem?  o-O

Dale

:-)  :-) 



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread David Haller
Hello,

On Tue, 27 Oct 2020, Dale wrote:
>This is what the conf file looks like now.  I took out the format
>option.  Add it back later when this current issue is settled. 
>
>--format
>'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'

Is that one or two lines? It think it should be one! I.e.:

--format foo

Try:

--format 
'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'

Or, I think it's equivalent:

--format 'bestvideo[ext=webm,ext=mp4][width<=?1280]+bestaudio/best'

HTH,
-dnh

-- 
Linux is not a desktop OS for people whose VCRs are still
flashing "12:00". -- Paul Tomblin



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Dale
Michael wrote:
> On Tuesday, 27 October 2020 21:14:37 GMT Arve Barsnes wrote:
>> On Tue, 27 Oct 2020 at 21:58, Dale  wrote:
>>> I'm using the normal youtube-dl  command.  No options or
>>> anything.  This is what I have in the conf file.
>>>
>>>
>>> --format
>>> bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?128
>>> 0]+bestaudio/best
>>>
>>> --merge-output-format mp4
>>>
>>>
>>> Those options worked for a long time so I guess something changed with
>>> youtube-dl.  I don't get why it says the options are a URL either.  When
>>> I google, I can't find where anyone is getting this error or using
>>> different options either, at least not to accomplish the same goal. I
>> I took a quick look at the commit history, and it seems the
>> documentation for the format options haven't changed in at least a
>> year, so it's hard to say if it is actually youtube-dl being the
>> culprit here.
>>
>> Might be a quoting problem. Have you changed or updated anything
>> regarding your terminal emulator lately?
>>
>> Maybe run your command with the verbose flag (-v) and see if it tells
>> you the full command it is trying to run. Notice in the docs the whole
>> format string is quoted with single quotes.
>>
>> Regards,
>> Arve
> Occasionally the youtube-dl on the tree is not totally up-to-date with the 
> latest and greatest in git.  You can wait for a day or two and see if it gets 
> updated in portage testing branch, or download it from git and run it from 
> within a directory.
>
> Theoretically, your config can run into trouble if the container format you 
> have set to merge video and audio into, will not work with the video/audio 
> extractors available on the stream.
>
> You have specified:  "--merge-output-format mp4"
>
> If the available codex for video or audio is not suitable for the mp4 
> container, you are going to get an error.  For example, if a stream only has 
> bestvideo in a VP9 codec at width 1280, and/or best audio in opus codec, this 
> will barf if you try to merge it into a mp4 container without transcoding the 
> video and/or audio streams using codecs compatible with mp4, instead of 
> merging (copying) them into webm (mkv) as they come.
>
> Hence it throws a wobbly back at you and asks you to run a search in case 
> there is some URL with video/audio streams in codecs which will satisfy your 
> mp4 container format requirement.
>
> I don't think the single/double quote is an issue for Linux.  In MSWindows 
> you 
> ought to use double quotes.


I first noticed this when using a site other than youtube.  For a long
while, I thought it was because of me using other sites.  Today, real
early this morning, I wanted a video off youtube and noticed it still
gave the error.  That made me start to wonder.  Odd thing is, it seems
to pick the best video but the ones I was downloading were already low
definition anyway.  I may find a 4K video and see what it does.  If it
grabs the 4K version, it's ignoring the option in the conf file.  If it
grabs the 720P version, well, it is making use of some of the option
even if it is not happy with the rest of the line. 

I get the same error even when I comment out that merge format line.  I
was hoping but I added that line a while back but so far, it ignores it
or they are not available as you point out. 

If youtube-dl stops working because it can't be maintained, I'm going to
be sad.  I don't use it a lot but it is a nifty tool.  I really like the
resume feature.  It seems other tools stop at 90 something percent and
they require me to start over.  Youtube-dl just picks up where it left
off when you try again.  Saves a lot of time and bandwidth for me and
the site I'm getting a video from. 

Dale

:-)  :-) 



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Dale
Arve Barsnes wrote:
> On Tue, 27 Oct 2020 at 21:58, Dale  wrote:
>> I'm using the normal youtube-dl  command.  No options or
>> anything.  This is what I have in the conf file.
>>
>>
>> --format
>> bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best
>>
>> --merge-output-format mp4
>>
>>
>> Those options worked for a long time so I guess something changed with
>> youtube-dl.  I don't get why it says the options are a URL either.  When
>> I google, I can't find where anyone is getting this error or using
>> different options either, at least not to accomplish the same goal. I
> I took a quick look at the commit history, and it seems the
> documentation for the format options haven't changed in at least a
> year, so it's hard to say if it is actually youtube-dl being the
> culprit here.
>
> Might be a quoting problem. Have you changed or updated anything
> regarding your terminal emulator lately?
>
> Maybe run your command with the verbose flag (-v) and see if it tells
> you the full command it is trying to run. Notice in the docs the whole
> format string is quoted with single quotes.
>
> Regards,
> Arve
>
>


Ran with -v but don't see any clues there.  Basically, it's the same
error twice. 


ERROR: 'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a
valid URL. Set --default-search "ytsearch" (or run  youtube-dl
"ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to
search YouTube
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line
797, in extract_info
    ie_result = ie.extract(url)
  File
"/usr/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line
530, in extract
    ie_result = self._real_extract(url)
  File
"/usr/lib/python3.7/site-packages/youtube_dl/extractor/generic.py", line
2277, in _real_extract
    % (url, url), expected=True)
youtube_dl.utils.ExtractorError:
'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a valid
URL. Set --default-search "ytsearch" (or run  youtube-dl
"ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to
search YouTube


This is what the conf file looks like now.  I took out the format
option.  Add it back later when this current issue is settled. 


--format
'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'


I use KDE so it could be KDE updated something but if so, I'm not aware
of it.  I use Konsole to run the commands.  Nothing else complains but
that may not mean much either. 

I'm going to add single quotes and see if anything changes, as shown
above.  Worst it can do is puke on my keyboard.  lol  Single quotes
didn't change anything either.  Same output.

I wonder if the changes in python could be the issue?  Maybe it went
from python 2.7 to a newer version and changed something??  Just for
giggles. 


[ebuild   R   *] net-misc/youtube-dl-::gentoo  USE="-test"
PYTHON_TARGETS="python3_7 -python3_6 -python3_8"


And for a few more giggles.


root@fireball / # genlop -t youtube-dl
 * net-misc/youtube-dl

 Tue May 12 13:36:32 2020 >>> net-misc/youtube-dl-
   merge time: 1 minute and 6 seconds.

 Wed May 13 21:24:43 2020 >>> net-misc/youtube-dl-
   merge time: 40 seconds.

 Fri Jul  3 16:17:21 2020 >>> net-misc/youtube-dl-
   merge time: 1 minute and 2 seconds.

 Fri Jul  3 16:26:21 2020 >>> net-misc/youtube-dl-
   merge time: 34 seconds.

 Sun Jul 12 23:11:57 2020 >>> net-misc/youtube-dl-
   merge time: 6 minutes and 55 seconds.

root@fireball / #


Keep in mind, I been ignoring the error for a while.  I thought it was a
bug or something that would get stomped on eventually.  I wasn't aware
that youtube-dl was the one being stomped on by a big foot.  :-( 

Open to ideas. 

Dale

:-)  :-) 



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Michael
On Tuesday, 27 October 2020 21:14:37 GMT Arve Barsnes wrote:
> On Tue, 27 Oct 2020 at 21:58, Dale  wrote:
> > I'm using the normal youtube-dl  command.  No options or
> > anything.  This is what I have in the conf file.
> > 
> > 
> > --format
> > bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?128
> > 0]+bestaudio/best
> > 
> > --merge-output-format mp4
> > 
> > 
> > Those options worked for a long time so I guess something changed with
> > youtube-dl.  I don't get why it says the options are a URL either.  When
> > I google, I can't find where anyone is getting this error or using
> > different options either, at least not to accomplish the same goal. I
> 
> I took a quick look at the commit history, and it seems the
> documentation for the format options haven't changed in at least a
> year, so it's hard to say if it is actually youtube-dl being the
> culprit here.
> 
> Might be a quoting problem. Have you changed or updated anything
> regarding your terminal emulator lately?
> 
> Maybe run your command with the verbose flag (-v) and see if it tells
> you the full command it is trying to run. Notice in the docs the whole
> format string is quoted with single quotes.
> 
> Regards,
> Arve

Occasionally the youtube-dl on the tree is not totally up-to-date with the 
latest and greatest in git.  You can wait for a day or two and see if it gets 
updated in portage testing branch, or download it from git and run it from 
within a directory.

Theoretically, your config can run into trouble if the container format you 
have set to merge video and audio into, will not work with the video/audio 
extractors available on the stream.

You have specified:  "--merge-output-format mp4"

If the available codex for video or audio is not suitable for the mp4 
container, you are going to get an error.  For example, if a stream only has 
bestvideo in a VP9 codec at width 1280, and/or best audio in opus codec, this 
will barf if you try to merge it into a mp4 container without transcoding the 
video and/or audio streams using codecs compatible with mp4, instead of 
merging (copying) them into webm (mkv) as they come.

Hence it throws a wobbly back at you and asks you to run a search in case 
there is some URL with video/audio streams in codecs which will satisfy your 
mp4 container format requirement.

I don't think the single/double quote is an issue for Linux.  In MSWindows you 
ought to use double quotes.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Arve Barsnes
On Tue, 27 Oct 2020 at 21:58, Dale  wrote:
> I'm using the normal youtube-dl  command.  No options or
> anything.  This is what I have in the conf file.
>
>
> --format
> bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best
>
> --merge-output-format mp4
>
>
> Those options worked for a long time so I guess something changed with
> youtube-dl.  I don't get why it says the options are a URL either.  When
> I google, I can't find where anyone is getting this error or using
> different options either, at least not to accomplish the same goal. I

I took a quick look at the commit history, and it seems the
documentation for the format options haven't changed in at least a
year, so it's hard to say if it is actually youtube-dl being the
culprit here.

Might be a quoting problem. Have you changed or updated anything
regarding your terminal emulator lately?

Maybe run your command with the verbose flag (-v) and see if it tells
you the full command it is trying to run. Notice in the docs the whole
format string is quoted with single quotes.

Regards,
Arve



[gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread Dale
Howdy,

I'm hearing bad things about youtube-dl.  It seems the RIAA is punishing
people who use it legally for those who don't.  Funny how the people who
don't do anything wrong pays for the ones who do while the ones who do
bad things get away.  Anyway. 

A good while back this list helped me set up the conf file for
youtube-dl so that it grabs the best resolution up to 720P or 1280
resolution videos.  I have no need for a 4K video.  lol  It seems
something changed a while back and the options in the conf file produce
a error.  From the error, I can't figure out what to change.  This is
the error.


ERROR: 'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a
valid URL. Set --default-search "ytsearch" (or run  youtube-dl
"ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to
search YouTube

I'm using the normal youtube-dl  command.  No options or
anything.  This is what I have in the conf file. 


--format
bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best

--merge-output-format mp4


Those options worked for a long time so I guess something changed with
youtube-dl.  I don't get why it says the options are a URL either.  When
I google, I can't find where anyone is getting this error or using
different options either, at least not to accomplish the same goal. I
might add, my googling turned up the RIAA mess.  May have to donate to
help fund lawyers.  :/

Anyone know what to do to fix it?  I can't make heads or tails of it.

Dale

:-)  :-) 



Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread Walter Dnes
On Tue, Oct 27, 2020 at 10:05:28AM -0400, Jack wrote

>  From one of your earlier posts, it looks like tty0-tty9 all exist. My
> guess is that getty was launched on all of them.  Since that is owned
> by root (until someone logs in) you certainly don't have permission
> to use it for X.  I'm not sure where the list of vts on which to spawn
> getty is controlled, but that's what I'd look for.

  On my non-systemd machine, it's /etc/inittab, with the lines below the
comment line...

# TERMINALS

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] Pam configuration for winbind

2020-10-27 Thread Michael
On Wednesday, 14 October 2020 21:18:38 GMT Michael Jones wrote:
> With the recent update to sys-auth/pambase-20201013, i find myself
> struggling to understand how to adapt the new default configuration to work
> with winbind.
> 
> I'm writing to the list for help with this.
> 
> First, I'll provide my current system-auth, the new system-auth that comes
> from sys-auth/pambase-20201013, and my attempt at merging the two versions.
> After those items, I have several questions which I'll ask at the end of my
> email.
> 
> 
> 
> First, here's my current /etc/pam.d/system-auth file:
> 
> authrequired pam_env.so
> authsufficient pam_unix.so try_first_pass likeauth nullok
> authsufficient pam_winbind.so use_first_pass
> authrequired pam_deny.so
> 
> account sufficient pam_unix.so
> account required pam_winbind.so
> 
> password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2
> retry=3
> password sufficient pam_unix.so try_first_pass use_authtok nullok sha512
> shadow
> password sufficient pam_winbind.so use_authtok
> password optional pam_permit.so
> 
> session required pam_limits.so
> session required pam_env.so
> session required pam_unix.so
> session required pam_winbind.so
> session optional pam_permit.so
> 
> 
> Here's the new version that comes from sys-auth/pambase-20201013 with the
> useflags: gnome-keyring nullok passwdqc sha512 systemd
> 
> authrequired pam_env.so
> authrequired pam_unix.so try_first_pass likeauth nullok
> authoptional pam_permit.so
> authrequired pam_faillock.so preauth
> authsufficient pam_unix.so nullok try_first_pass
> auth[default=die] pam_faillock.so authfail
> account required pam_unix.so
> account optional pam_permit.so
> account requiredpam_faillock.so
> password required pam_passwdqc.so config=/etc/security/passwdqc.conf
> password required pam_unix.so try_first_pass use_authtok nullok sha512
> shadow
> password optional pam_permit.so
> session required pam_limits.so
> session required pam_env.so
> session required pam_unix.so
> session optional pam_permit.so
> 
> 
> Here's my attempt at merging these two together.
> 
> authrequiredpam_env.so
> authrequiredpam_faillock.so preauth
> authsufficient pam_unix.so nullok try_first_pass
> authsufficient pam_winbind.so use_first_pass
> authrequisite pam_faillock.so authfail
> 
> account requiredpam_faillock.so
> account sufficient pam_unix.so
> account sufficient pam_winbind.so
> account optionalpam_permit.so
> 
> passwordrequiredpam_passwdqc.so
> config=/etc/security/passwdqc.conf
> passwordsufficient pam_unix.so try_first_pass use_authtok nullok
> sha512 shadow
> passwordsufficient pam_winbind.so use_authtok
> passwordoptionalpam_permit.so
> 
> session requiredpam_limits.so
> session requiredpam_env.so
> session requiredpam_unix.so
> session requiredpam_winbind.so
> session optionalpam_permit.so

I'd rather not comment on the above in case my understanding is incorrect and 
you end up breaking access to your system.  ;-)

Some answers/thoughts below.


> Questions:
> 
> 1. Why does sys-auth/pambase use the "likeauth" flag? I cannot find any
> real information about this except for a redhat bugzilla ticket that says
> it's for legacy usage from 2004.
> https://bugzilla.redhat.com/show_bug.cgi?id=120418

I don't know if this is still required, or is now deprecated.  This thread 
referenced in the bug you mention provides some explanation:

https://www.spinics.net/lists/pam/msg03533.html

I understand it to mean when an application asks pam_unix.so to set a new 
passwd this will use the same authentication criteria/limits checks, as an 
existing authentication credentials would be normally checked against.


> 2. Why is pam_faillock.so used with "preauth" after the first use of
> pam_unix.so ? The manpage for pam_faillock.so says that faillock should be
> called with the "preauth" command prior to asking for the user's password.

I think if the pam_unix.so in the preceding line has been used by an 
application to set a new passwd, the passwd will be asked/checked at the 
subsequent pam_unix.so line, which is below the pam_faillock.so.  I admit this 
logic is not particularly sound, if the preceding pam_unix.so line is not 
setting a new passwd, just asking/checking what is submitted.  :-/


> 3. Why is pam_permit.so used as the last item in each section other than
> auth? The manpage for pam_permit indicates that this module always returns
> success. Using it as an optional module is a no-op.

The pam_permit module is meant to set an application user as 'nobody', some 
applications run with this user name and no passwd.

The optional control flag means it will continue checking 

Re: [gentoo-user] elogind conversion, loginctl user-status fails.

2020-10-27 Thread Michael
On Tuesday, 27 October 2020 14:23:11 GMT Steven Lembark wrote:
> One more elogind update question:
> 
> $ loginctl user-status;
> Could not get properties: is a directory
> 
> Q: Anyone have any idea of what item might be a directory?

loginctl should look into the directory '/run/systemd/sessions/' which 
contains pipes and text files.  The text files contain info on seats, 
sessions, users;  e.g.

# ls -la /run/systemd/sessions/
total 8
drwxr-xr-x 2 root root 120 Oct 27 12:31 .
drwxr-xr-x 7 root root 140 Oct 27 12:11 ..
-rw-r--r-- 1 root root 276 Oct 27 12:31 2
prw--- 1 root root   0 Oct 27 12:11 2.ref
-rw-r--r-- 1 root root 287 Oct 27 12:31 5
prw--- 1 root root   0 Oct 27 12:28 5.ref


> strace doesn't show me anything obvious (which doesn't always
> mean anything).
> 
> 
> 
> Q: Is there any documentation anyone knows about that describes
>this error?
> 
> Thanks

I don't know of any documentation to point you towards.  It could be a 
permissions problem, in the first instance I would start with /run/systemd/
sessions/ which should be owned by root.

PS.  If you converted your system to run with elogind recently, did you set up 
the requisite USE flag and re-emerged @world with '--newuse'?

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] elogind conversion, loginctl user-status fails.

2020-10-27 Thread Steven Lembark


One more elogind update question:

$ loginctl user-status;
Could not get properties: is a directory

Q: Anyone have any idea of what item might be a directory?

strace doesn't show me anything obvious (which doesn't always 
mean anything). 



Q: Is there any documentation anyone knows about that describes
   this error? 

Thanks

-- 
Steven Lembark
Workhorse Computing
lemb...@wrkhors.com
+1 888 359 3508



Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread Jack

On 10/27/20 8:53 AM, edes wrote:

el Tue, 27 Oct 2020 09:35:25 -0300
edes  escribió:


Just to be sure: I should enable the -suid USE flag in
x11-base/xorg-server?

Just for the record, I rebuilt x11-base/xorg-server with +suid, and the
problem persists:

$ startx -- vt7
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
From one of your earlier posts, it looks like tty0-tty9 all exist. My 
guess is that getty was launched on all of them.  Since that is owned by 
root (until someone logs in) you certainly don't have permission to use 
it for X.  I'm not sure where the list of vts on which to spawn getty is 
controlled, but that's what I'd look for.




Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread edes
el Tue, 27 Oct 2020 12:53:44 +
Michael  escribió:
 
> The systemd-logind and elogind by default only allow you to run X on
> the console you have logged in as a user.

So I guess my question is basically if this default can be modified, and
how.

> As I understand it systemd-logind and its elogind derivative both use
> the variable $XDG_VTNR to set the VT number.  I suppose this variable
> could be set to a different VT than the console you login,
> via .xinitrc, or .xserverrc, or .bashrc - but I haven't tried it out.

Setting XDG_VTNR to a different value didn't change anything. As far as
I can see, it's not different from running startx -- vtN, and I get the
same error.



-- 
edes 



Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread Michael
On Tuesday, 27 October 2020 12:35:25 GMT edes wrote:
> el Tue, 27 Oct 2020 13:15:32 +0100
> 
> Arve Barsnes  escribió:
> > If you've migrated to elogind, you have probably moved away from a
> > setuid xorg-server. I'd start loooking here:
> > https://wiki.gentoo.org/wiki/Non_root_Xorg
> 
> Hi, thanks for the response. I had read that document (and others), but
> I thought it addressed the problem of not being able to start Xorg as
> regular user, which is not my case.
> 
> Just to be sure: I should enable the -suid USE flag in
> x11-base/xorg-server?

Running Xorg with suid is insecure and can lead to privilege escalation.  So 
this method of running Xorg is no longer recommended.

The systemd-logind and elogind by default only allow you to run X on the 
console you have logged in as a user - this is controlled by the corresponding 
pam module (e.g. pam-elogind.so).

As I understand it systemd-logind and its elogind derivative both use the 
variable $XDG_VTNR to set the VT number.  I suppose this variable could be set 
to a different VT than the console you login, via .xinitrc, or .xserverrc, or 
.bashrc - but I haven't tried it out.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread edes
el Tue, 27 Oct 2020 09:35:25 -0300
edes  escribió:

> Just to be sure: I should enable the -suid USE flag in
> x11-base/xorg-server?

Just for the record, I rebuilt x11-base/xorg-server with +suid, and the
problem persists:

$ startx -- vt7
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)


-- 
edes 



Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread edes
el Tue, 27 Oct 2020 13:15:32 +0100
Arve Barsnes  escribió:

> If you've migrated to elogind, you have probably moved away from a
> setuid xorg-server. I'd start loooking here:
> https://wiki.gentoo.org/wiki/Non_root_Xorg

Hi, thanks for the response. I had read that document (and others), but
I thought it addressed the problem of not being able to start Xorg as
regular user, which is not my case.

Just to be sure: I should enable the -suid USE flag in
x11-base/xorg-server?



-- 
edes 



Re: [gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread Arve Barsnes
On Tue, 27 Oct 2020 at 12:18, edes  wrote:
> Fatal server error:
> (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
>
> I don't know if this is relevant, but under /dev I see:
>
> crw--w 1 root tty 4, 0 oct 27 07:54 /dev/tty0
> crw--- 1 edes tty 4, 1 oct 27 07:57 /dev/tty1
> crw--w 1 root tty 4, 2 oct 27 07:54 /dev/tty2
> crw--w 1 root tty 4, 3 oct 27 07:54 /dev/tty3
> crw--w 1 root tty 4, 4 oct 27 07:54 /dev/tty4
> crw--w 1 root tty 4, 5 oct 27 07:54 /dev/tty5
> crw--w 1 root tty 4, 6 oct 27 07:54 /dev/tty6
> crw--w 1 root tty 4, 7 oct 27 07:54 /dev/tty7
> crw--w 1 root tty 4, 8 oct 27 07:54 /dev/tty8
> crw--w 1 root tty 4, 9 oct 27 07:54 /dev/tty9
>
> I would appreciate any help, since I'm completely ignorant of all things
> related to authentication, pam, and the rest, which I suspect might
> have something to do with this (or perhaps not?).

If you've migrated to elogind, you have probably moved away from a
setuid xorg-server. I'd start loooking here:
https://wiki.gentoo.org/wiki/Non_root_Xorg

Regards,
Arve



[gentoo-user] startx Cannot open virtual console 7

2020-10-27 Thread edes


Hi,

I'm using xfce without a graphical login. The system boots into a
terminal and after logging in in tty1, I start the GUI with startx.

This used to start X in vt7, but after the migration to elogind, X
starts in the same tty where I type the command, which I don't want.

I can't replicate the old behaviour. I tried "startx -- vt7", but I get
this error message:

Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)

I don't know if this is relevant, but under /dev I see:

crw--w 1 root tty 4, 0 oct 27 07:54 /dev/tty0
crw--- 1 edes tty 4, 1 oct 27 07:57 /dev/tty1
crw--w 1 root tty 4, 2 oct 27 07:54 /dev/tty2
crw--w 1 root tty 4, 3 oct 27 07:54 /dev/tty3
crw--w 1 root tty 4, 4 oct 27 07:54 /dev/tty4
crw--w 1 root tty 4, 5 oct 27 07:54 /dev/tty5
crw--w 1 root tty 4, 6 oct 27 07:54 /dev/tty6
crw--w 1 root tty 4, 7 oct 27 07:54 /dev/tty7
crw--w 1 root tty 4, 8 oct 27 07:54 /dev/tty8
crw--w 1 root tty 4, 9 oct 27 07:54 /dev/tty9

I would appreciate any help, since I'm completely ignorant of all things
related to authentication, pam, and the rest, which I suspect might
have something to do with this (or perhaps not?).



--
edes 



Re: [gentoo-user] Q: Where does elogind get "--keeptty" set?

2020-10-27 Thread Michael
On Monday, 26 October 2020 21:23:54 GMT Steven Lembark wrote:
> After conversion to elogind I cannot start X11.
> 
> I've re-emerged PAM, though the ._cfg_system-auth tried to remove
> elogind.so, oddly enough.

On my systems there is no elogind.so in /etc/pam.d/system-auth.


> At this point my Xorg.0.log includes:
> 
> systemd-elogind: Logind integration requires -keeptty and
> -keeptty was not provided, disabling elogind integration.

I have the same message, but sddm starts Xorg fine.


> Looking for -keeptty I find:
> 
> 
> 
> I found 74 packages installed on my system with at least one systemd
> reference in them. Most only install service files. Some make use of
> systemd-journal. Only 10 make use of libsystemd-login, and I have now
> submitted all of them but x11-base/xorg-server.  The latter has to be
> started with "-keeptty" to add systemd-login/elogind integration, and that
> argument is strictly for debugging.
> 
> Q: Any suggestions as to where or how I might avoid this or
>supply -keeptty?
> 
> thanks

The option '-keeptty' is only needed if you're starting X from a console and 
don't want to detach it for debugging purposes.  From '/usr/bin/Xorg --help':

-keeptty   don't detach controlling tty (for debugging only)

I guess you could pass this option on via .xinitrc or perhaps .xserverrc which 
is parsed by .xinitrc.

signature.asc
Description: This is a digitally signed message part.