You are not logged in.

#1 2022-05-26 12:32:32

schwim
Member
From: Coastal VA, Murica
Registered: 2015-09-29
Posts: 342
Website

Using bl-exit on Ubuntu - some questions

Hey there folks!

During our quest to find an OS that worked well with all aspects of my friends new laptop, we landed on Ubu 22, where everything worked out of the box.  He uses BL on his desktop and would like the experience to behave somewhat the same.

Feeling like a hacker, I found the script name in the tint2 panel that I imported.  I found the script in /usr/bin and moved it over... then I ran out of savvy.

What would be my method of bringing in a Python script from one OS to another?  I would imagine it comes down a lot to dependencies but I don't know how to figure out what those are (I've never worked in Python before).

Any help explaining how I would go about getting this to work in something other than BL would be most welcome.

Thanks for your time!

My version of bl-exit can be found here: https://www.toptal.com/developers/haste … peneqog.rb


Schw.im! A social site with an identity crisis.

Offline

#2 2022-05-26 15:19:29

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,605

Re: Using bl-exit on Ubuntu - some questions

You need to have the correct python environment installed for python scripts to work.

In your script, the first line is:

#!/usr/bin/env python2.7

So your script is looking for python2.7. Ubuntu is probably using python3.x so you need to set up the proper python environment. A lot of the modules for python are version dependent so you may need to install python2.7. You can have multiple versions of python installed, just call the right version in your script.

There is also this section:

import sys
import getpass
import subprocess
import dbus
import struct
import ConfigParser

You'l need those modules (dependencies) installed. If they're version dependent, you'll need to install files with names like python2.7-dbus. Run the script in a terminal and python will show errors for any you may need. Like this:

Traceback (most recent call last):
  File "/home/doug/temp/./blexit.py", line 33, in <module>
    import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

Last edited by PackRat (2022-05-26 15:24:24)


You must unlearn what you have learned.
    -- yoda

Offline

#3 2022-05-26 19:24:01

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,605

Re: Using bl-exit on Ubuntu - some questions

Where did you get that bl-exit script?

I thought BL Lithium switched to yad for that script. If they did, you will want to get that script. No python issues, just need to install yad.


You must unlearn what you have learned.
    -- yoda

Offline

#4 2022-05-26 23:26:05

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 978

Re: Using bl-exit on Ubuntu - some questions

@PackRat.. that's a variation on or copy of the one from Helium.
I think the main reason it got changed was want of a maintainer with python in the languages they were comfortable with.

With the right icons & tweaks the current bash/yad one can be made to look pretty similar, someone (I think Damo) demonstrated that when it was first being worked on, the right searches may even turn that up somewhere on the forum.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

Board footer

Powered by FluxBB