In the last two days, I've noticed that something starts youtube-dl when I start my system (Debian 11); it seems to be as soon as I login. The reason I noticed is that it steals all resources and I have to go to a console with Ctl-Alt-F2 and log in as root. Killing the process doesn't help - it seems to be part of a job stream, so the only way is to temporarily rename the python executable, which makes them fail quickly.
I suspect it is related to the fact that I have been downloading a large number of small videos for a course, but where does it actually start from?
***Edit***
I think I may have found what the problem was - I will see when I get a chance to reboot (or just log out/in). It was quite subtle; I couldn't find any reference to youtube-dl in any file that has anything to do with sddm (since I use KDE), except for my
.local/share/sddm/xorg-session.log
, where it says:
/etc/sddm/Xsession: 70: /etc/profile: function: not found
Error: /undefinedfilename in (/usr/bin/startplasma-x11.ps)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push
Dictionary stack:
--dict:733/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
rm: cannot remove '/usr/bin/startplasma-x11.ps': No such file or directory
/etc/sddm/Xsession: 78: /etc/profile: function: not found
ERROR: [something very long ...]\ufffd\x03\x12\x08' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:^?ELF^B^A^A^C^C>^A0M@��@8^K@^^^]^F^D@@@h^Bh^B^H^C^D�^B�^B�^B^\^\^A^A^D�=�=^P^A^E@@@^]O^]O^P^A^D����#�#^P^A^Fh�h�hǨ^H�^H^P^B^Fp�p�pȀ^B�^B^H^D^D�^B�^B�^BDD^DP�td^Dh�h�h��^A�^A^DQ�td^F^PR�td^Dh�h�hǘ^H�^H^A/lib64/ld-linux-x86-64.so.2^D^T^CGNU���eBFD�ӝ^C�^KC�u�U�^D^P^AGNU^C^B^C�^A^F�@�^A^H����|�e�mCE���qX^\�^R^Rj^G^R^_^L^RB^P^R^H^B^R�^S^R^_^U^R�^C^R^H" ) to search YouTube
Looking at the first line of /etc/sddm/Xsession
:
#! /bin/sh
# Xsession - run as user
session=$1
I suddenly realised that the old Bourne shell doesn't understand the newer shell function syntax function xyz
, but requires xyz()
instead - hence the error message in .local/share/sddm/xorg-session.log
. I had just defined a function that calls youtube-dl
when the problem started; the Xsession
script sources /etc/profile
, can't handle function
and then runs what is inside the function definition, ie youtube-dl
, with whatever parameter happen to be defined in Xsession
.
Asked by j4nd3r53n
(779 rep)
Mar 13, 2022, 08:52 AM
Last activity: Mar 15, 2022, 04:04 PM
Last activity: Mar 15, 2022, 04:04 PM