You are not logged in.

#1 2020-01-05 00:51:39

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Solved - Lithium: Errors with bl-xdg-autostart

damo wrote:
rbh wrote:

Command "bl-xdg-autostart --list | more" gives some error and no list.

I don't see that. The next line in my output is "User folders update" - have you made any changes since installing?

Installed from lithium iso 2019.09.23. So, it's no fresh installation. Installed about 4500 packages. Among many things, upgraded python to latest version.

EDIT: I see from your other post that you have upgraded from a previous install, not a fresh iso.

Two different pc.

Last edited by rbh (2020-02-01 16:00:11)


// Regards rbh

Offline

#2 2020-01-05 01:15:57

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

I tried to redirect to textfile:

"bl-xdg-autostart --list >>  bl-xdg-autostart.txt" gave another error:

 
rbh@W-TPL440:~/tmp$ bl-xdg-autostart --list >>  bl-xdg-autostart.txt
Traceback (most recent call last):
  File "/usr/bin/bl-xdg-autostart", line 200, in <module>
    sys.exit(main())
  File "/usr/bin/bl-xdg-autostart", line 69, in main
    if list: autofile.display(environments)
  File "/usr/bin/bl-xdg-autostart", line 151, in display
    print "[*] " + self.de.getName()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 18: ordinal not in range(128)

Note, "bl-xdg-autostart --list", works ok, but I have to scroll terminal window to see from begining.

Tried to page with "less", also error. With pager "most", I can only see the two first entrys:

[*] Unified Remote
          File: /home/rbh/.config/autostart/urserver.desktop
          Executes: /opt/urserver/urserver-start --no-manager --no-notify

[ ] xbindkeys
          File: /home/rbh/.config/autostart/xbindkeys.desktop
          Executes: xbindkeys_autostart
        * Excluded by: Hidden

// Regards rbh

Offline

#3 2020-01-05 10:51:29

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

I have one VM installed 30/12, with Lithium iso. The only thing installed after running bl-welcome script is linux-headers-amd64, build-essential and mc.

On it, nothing is listed when running "bl-xdg-autostart --list" or "bl-xdg-autostart --list | more". The same respons, only:

** (light-locker:1011): WARNING **: 11:17:46.096: screensaver already running in this session

Nothing changed in ~/config/bunsen/autostart.

Listed in /etc/xdg/autostart:

at-spi-dbus-bus.desktop
clipit-startup.desktop
gnome-keyring-pkcs11.desktop
gnome-keyring-secrets.desktop
gnome-keyring-ssh.desktop
light-locker.desktop
nm-applet.desktop
polkit-gnome-authentication-agent-1.desktop
pulseaudio.desktop
vboxclient.desktop
xbindkeys.desktop
xdg-user-dirs.desktop
xfce4-power-manager.desktop

As far as I can see, they are autostarting as they should. In Tint2 systry i have nm-aplett, clipit and mixer.


// Regards rbh

Offline

#4 2020-01-05 11:06:34

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

Installed python3-xdg, now i get a listing with "bl-xdg-autostart --list". Still errors with "bl-xdg-autostart --list | more".

Command "man bl-xdg-autostart" does not mention how to use the scipt. Dose not mention  "--list".
It says:

DESCRIPTION
       /usr/bin/env: 'python': No such file or directory

// Regards rbh

Offline

#5 2020-01-05 11:25:39

damo
....moderator....
Registered: 2015-08-20
Posts: 6,252

Re: Solved - Lithium: Errors with bl-xdg-autostart

$ bl-xdg-autostart --help
Usage: bl-xdg-autostart [OPTION]... [ENVIRONMENT]...

This tool will run xdg autostart .desktop files

OPTIONS
  --list        Show a list of the files which would be run
                Files which would be run are marked with an asterix
                symbol [*].  For files which would not be run,
                information is given for why they are excluded
  --help        Show this help and exit
  --version     Show version and copyright information

ENVIRONMENT specifies a list of environments for which to run autostart
applications.  If none are specified, only applications which do not 
limit themselves to certain environments will be run.

ENVIRONMENT can be one or more of:
  GNOME         Gnome Desktop
  KDE           KDE Desktop
  ROX           ROX Desktop
  XFCE          XFCE Desktop
  Old           Legacy systems

The bl-xdg-autostart script contains "requires PyXDG to be installed". I suspect that your python environment is causing the error you get. Maybe try running the script with a different python executable?

Last edited by damo (2020-01-05 11:32:05)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2020-01-05 12:12:51

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

damo wrote:

$ bl-xdg-autostart --help
Usage: bl-xdg-autostart [OPTION]... [ENVIRONMENT]...

I must have only tried "bl-xdg-autostart -h", that does not work... But, it is no difference if I run "bl-xdg-autostart --list Old | more", "bl-xdg-autostart --list GNOME | more" or "bl-xdg-autostart --list | more", still get errors:

[ ] xbindkeys
	  File: /home/rbh/.config/autostart/xbindkeys.desktop
	  Executes: xbindkeys_autostart
	* Excluded by: Hidden

Traceback (most recent call last):
  File "/usr/bin/bl-xdg-autostart", line 200, in <module>
    sys.exit(main())
  File "/usr/bin/bl-xdg-autostart", line 69, in main
    if list: autofile.display(environments)
  File "/usr/bin/bl-xdg-autostart", line 153, in display
    print "[ ] " + self.de.getName()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 25: ordinal not in range(128)

The bl-xdg-autostart script contains "requires PyXDG to be installed".

Yes. When I saw that, i tested to install python3-xdg. But, dependsies of python-xdg, is not listed in package bunsen-configs. You only see it if you lkist the script.

I suspect that your python environment is causing the error you get. Maybe try running the script with a different python executable?

It was a new installation. Nothing but "linux-headers-amd64, build-essential and mc" added after initial installation. Nothing changed in default configs. First after installing python3-xdg, the script worked and listed autostarts.

Python2 is on the way out. Many devs working hard to replace with python3...


// Regards rbh

Offline

#7 2020-01-05 18:46:34

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

Tested run "bl-xdg-autostart --list" in the live DVD. Worked ok.
New installation, script works ok, even after running bl-welcome sript and installing linux-headers-amd64, build-essential and mc.

"bl-xdg-autostart --list | more" and "bl-xdg-autostart -h", still gives errors.


// Regards rbh

Offline

#8 2020-01-08 16:33:49

damo
....moderator....
Registered: 2015-08-20
Posts: 6,252

Re: Solved - Lithium: Errors with bl-xdg-autostart

I've posted a possible fix on github

If you edit your bl-xdg-autostart and add this to def main(argv=sys.argv):, any script args which aren't "allowed" just show the help text:

def main(argv=sys.argv):
    
    arg_list = ['--help', '--list', '--version']
    if len(argv) == 1 or argv[1] not in arg_list:
        show_help()
        return 1

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#9 2020-01-10 02:41:31

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,282
Website

Re: Solved - Lithium: Errors with bl-xdg-autostart

Also, @rbl can you compare with the results of running the builtin openbox script:

/usr/lib/x86_64-linux-gnu/openbox-xdg-autostart --list | more #etc

Same errors?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#10 2020-02-01 15:58:14

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

Forgot about this.

I think there was an upgrade recently. Both commands wokr now on the macine I now use.


// Regards rbh

Offline

#11 2020-02-02 18:50:43

Naik
Member
From: Lipsia
Registered: 2015-10-03
Posts: 260

Re: Solved - Lithium: Errors with bl-xdg-autostart

maybe i missed an update but for me both commands produce the same error:

┌─[naik@GerryTSSD ~]
└──$ /usr/lib/x86_64-linux-gnu/openbox-xdg-autostart --list | more #etc
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/openbox-xdg-autostart", line 198, in <module>
    sys.exit(main())
  File "/usr/lib/x86_64-linux-gnu/openbox-xdg-autostart", line 67, in main
    [ ] xbindkeys
if list: autofile.display(environments)
	  File: /home/naik/.config/autostart/xbindkeys.desktop
  File "/usr/lib/x86_64-linux-gnu/openbox-xdg-autostart", line 151, in display
	  Executes: xbindkeys_autostart
	* Excluded by: Hidden

[ ] Legitimationsdienst von PolicyKit
	  File: /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
    print "[ ] " + self.de.getName()
	  Executes: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
UnicodeEncodeError	* Excluded by: OnlyShowIn (XFCE, Unity, X-Cinnamon)
: 
'ascii' codec can't encode character u'\xfc' in position 20: ordinal not in range(128)
[*] Blueman-Applet
	  File: /etc/xdg/autostart/blueman.desktop
	  Executes: blueman-applet

[*] Netzwerk
	  File: /etc/xdg/autostart/nm-applet.desktop
	  Executes: nm-applet

┌─[naik@GerryTSSD ~]
└──$ bl-xdg-autostart --list | more #etc
Traceback (most recent call last):
  File "/usr/bin/bl-xdg-autostart", line 200, in <module>
    sys.exit(main())
  File "/usr/bin/bl-xdg-autostart", line 69, in main
[ ] xbindkeys
    	  File: /home/naik/.config/autostart/xbindkeys.desktop
if list: autofile.display(environments)
	  Executes: xbindkeys_autostart
  File "/usr/bin/bl-xdg-autostart", line 153, in display
	* Excluded by: Hidden

[ ] Legitimationsdienst von PolicyKit
	  File: /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
    print "[ ] " + self.de.getName()
	  Executes: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
UnicodeEncodeError	* Excluded by: OnlyShowIn (XFCE, Unity, X-Cinnamon)

: 'ascii' codec can't encode character u'\xfc' in position 20: ordinal not in range(128)[*] Blueman-Applet

	  File: /etc/xdg/autostart/blueman.desktop
	  Executes: blueman-applet

[*] Netzwerk
	  File: /etc/xdg/autostart/nm-applet.desktop
	  Executes: nm-applet

┌─[naik@GerryTSSD ~]
└──$ 

checked back: No update availible....

naik --greetz


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen on GitHub

Offline

#12 2020-02-02 19:01:19

damo
....moderator....
Registered: 2015-08-20
Posts: 6,252

Re: Solved - Lithium: Errors with bl-xdg-autostart

Both commands are fine for me in a fresh Lithium VM install.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#13 2020-02-02 19:44:19

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

bunsen-configs_10.5-1_all.deb came 2020-01-25 09:45. Now it works for me on all pc exept one. There other pythonskripts lika gwakeonlan also fails.

Last edited by rbh (2020-02-02 19:44:45)


// Regards rbh

Offline

#14 2020-02-02 20:19:35

Naik
Member
From: Lipsia
Registered: 2015-10-03
Posts: 260

Re: Solved - Lithium: Errors with bl-xdg-autostart

^ now I am confused :

dpkg -s bunsen-configs

Package: bunsen-configs
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 431
Maintainer: John Crawley <john@bunsenlabs.org>
Architecture: all
Version: 10.5-1

"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen on GitHub

Offline

#15 2020-02-03 02:01:33

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,282
Website

Re: Solved - Lithium: Errors with bl-xdg-autostart

This is strange. I'm not seeing these errors on any of my Lithium installs either.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#16 2020-02-03 13:00:56

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 654

Re: Solved - Lithium: Errors with bl-xdg-autostart

Naik wrote:

^ now I am confused :

dpkg -s bunsen-configs

I do not realey understand what you are confused about...

You have latest bunsen-configs.
Does all other python-skripts work for you?
If you have problem with python (gwakeonloan for example), then it's not strange that "bl-xdg-autostart --list" gives errors for you.

Which python version do you use? Have you tried upgrade to python3 (I recommend that)?

Is the box a productive one or for testing? If the latter why just don't reisnstall?
Do you hav any other box, physical or virtual?


// Regards rbh

Offline

#17 2020-02-03 22:50:57

Naik
Member
From: Lipsia
Registered: 2015-10-03
Posts: 260

Re: Solved - Lithium: Errors with bl-xdg-autostart

rbh wrote:
Naik wrote:

^ now I am confused :

dpkg -s bunsen-configs

I do not realey understand what you are confused about...

I just thought earlier posts stated the problem would vanish as soon as latest bunsen-configs is installed and wasn't aware that the actual problem is a python related one.
I will try to sort the problem out with this new insights

rbh wrote:

Which python version do you use? Have you tried upgrade to python3 (I recommend that)?

Is the box a productive one or for testing? If the latter why just don't reisnstall?
Do you hav any other box, physical or virtual?

Actually I have python (2.7.16)  and python3 (Python 3.7.3) running here but haven't had any problems with them so far.
Which brings up the question whether or not it is a good idea to have python and python3 packages installed alongside?
and how I would proceed to get rid of everything not python3 because a simple apt remove python would kill some essential programs:

sudo apt remove python
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libcdr-0.1-1 libgdata-common libgdata22 libgoa-1.0-0b libgoa-1.0-common
  libgtkspell0 libimage-magick-perl libimage-magick-q16-perl libjs-sphinxdoc
  libjs-underscore libkeybinder0 libldb1 libmagick++-6.q16-8 liboauth0
  libpotrace0 libpython-stdlib libtalloc2 libtevent0 libvisio-0.1-1 libwbclient0
  lua-bit32 lua-expat lua-penlight lua-posix lua-socket lua5.2 phantomjs
  python-minimal python3-lxml python3-pyxattr python3-scour rtmpdump scour wmctrl
  youtube-dl
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  jackd1 jackd1-firewire libjack0 libzita-alsa-pcmi0 libzita-resampler1
Vorgeschlagene Pakete:
  jack-tools meterbridge
Empfohlene Pakete:
  qjackctl
Die folgenden Pakete werden ENTFERNT:
  apt-xapian-index arandr bleachbit bunsen-pipemenus bunsen-utilities discus
  gespeaker gvfs-backends inkscape jackd jackd2 jackd2-firewire libjack-jackd2-0
  libsmbclient meterbridge mpv obmenu python python-all python-all-dev python-apt
  python-asn1crypto python-backports.functools-lru-cache python-bcrypt python-bs4
  python-cairo python-cffi-backend python-chardet python-configparser
  python-crypto python-cryptography python-dbus python-debian python-dev
  python-entrypoints python-enum34 python-gi python-glade2 python-gobject
  python-gobject-2 python-gtk2 python-html5lib python-ipaddress python-keybinder
  python-keyring python-keyrings.alt python-lxml python-nacl python-notify
  python-numpy python-paramiko python-pip python-pkg-resources python-pyasn1
  python-pyicu python-scandir python-scour python-secretstorage python-setuptools
  python-six python-soupsieve python-talloc python-webencodings python-wheel
  python-xapian python-xdg python-xlib python3-smbc qjackctl samba-libs scons
  steam-launcher
Die folgenden NEUEN Pakete werden installiert:
  jackd1 jackd1-firewire libjack0 libzita-alsa-pcmi0 libzita-resampler1
0 aktualisiert, 5 neu installiert, 72 zu entfernen und 0 nicht aktualisiert.
Es müssen 363 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 164 MB Plattenplatz freigegeben.
Möchten Sie fortfahren? [J/n] n
Abbruch.

But this is a problem for another thread I guess.


BTW: this box is kind of both: my main - and only - box used for production (not for a living though) an also a bit of a testing environment. But since I have a separate partition for /home and make heavy use of nas-backups, I have not encountered great problems with this so far.  But I wouldn't like to reinstall the system. Just because .. you know .. not because of that and not as long as I see a chance for fixing it.

UPDATE: My research led me to believe this is some kind of encoding problem like in someone used str() when .encode would give proper output when the string is containing utf-8 characters,
but looking closely it seems like there is just a problem with quoting or have I been mislead  here:

┌─[naik@GerryTSSD ~]
└──$ bl-xdg-autostart --list | more #etc
Traceback (most recent call last):
  File "/usr/bin/bl-xdg-autostart", line 200, in <module>
    sys.exit(main())
  File "/usr/bin/bl-xdg-autostart", line 69, in main
[*] Maestral
    if list: autofile.display(environments)
  File "/usr/bin/bl-xdg-autostart", line 153, in display
	  File: /home/naik/.config/autostart/maestral-maestral.desktop
	  Executes: maestral gui --config-name='maestral'

[ ] xbindkeys
    print "[ ] " + self.de.getName()
	  File: /home/naik/.config/autostart/xbindkeys.desktop
UnicodeEncodeError	  Executes: xbindkeys_autostart
	* Excluded by: Hidden
: 
'ascii' codec can't encode character u'\xfc' in position 20: ordinal not in range(128)
┌─[naik@GerryTSSD ~]
└──$ python -c 'print(u'\xfc');'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'uxfc' is not defined
┌─[naik@GerryTSSD ~]
└──$ python -c 'print(u"\xfc");'
ü
┌─[naik@GerryTSSD ~]
└──$ 

naik --greetz

Last edited by Naik (2020-02-03 23:15:28)


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen on GitHub

Offline

Board footer

Powered by FluxBB