How to add Ubuntu Software Centre on Mint 13 (KDE)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
daret

How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by daret »

I think Ubuntu SW Center is better than mintInstall (sorry) ... OK, i like it more :D

This ist how i make it work on my Linux Mint KDE Installation.

1) Install the package
sudo aptitude install software-center

2) Update (hack :shock: ) __init__.py
/usr/share/software-center/softwarecenter/distro/__init__.py

Code: Select all

def _get_distro():
    distro_info = platform.linux_distribution()
    distro_id = distro_info[0]
    distro_id = "Ubuntu"
    LOG.debug("get_distro: '%s'", distro_id)
    # start with a import, this gives us only a softwarecenter module
    module = __import__(distro_id, globals(), locals(), [], -1)
    # get the right class and instanciate it
    distro_class = getattr(module, distro_id)
    instance = distro_class()
    return instance
distro_id = "Ubuntu"
- added is distro_id, for "Ubuntu", because SW Center doesn't know LinuxMint (no such module):
ImportError: No module named LinuxMint
3) Create xapian apt database
sudo update-apt-xapian-index

- otherwise it doesn't start with:
xapian.DatabaseOpeningError: Couldn't stat '/var/cache/software-center/xapian'
4) Run Ubuntu SW Center
software-center
Last edited by daret on Mon Oct 15, 2012 3:50 pm, edited 1 time in total.
giantjoebot

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by giantjoebot »

I think I already know the answer, but I'm going to ask just in case. This does not replace the default Software manager, it just adds another one, correct?

This looks cool, and I really want to try it, but I just want to make sure that I don't lose anything in the process.
giantjoebot

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by giantjoebot »

sudo aptitude software-center
gives me an error
Unknown command "software-center"

this worked
sudo aptitude install software-center

but that installs a lot of packages, and some of it is gnome stuff. 69 total packages and 2 upgrades. I thought since there was Kubuntu there would be a KDE version.
Does installing this affect stability or performance at all?
daret

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by daret »

Yes, it should be with install - repaired :)

And yes, software-center installs lot of gnome stuff, because ... it's ubuntu thing :?

I haven't noticed any stability issue yet, ... but who knows ...
Drmgiver

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by Drmgiver »

It works like a charm! Thank you! I use MATE and not KDE, but it still goes through with no issues.
gabriel-samfira

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by gabriel-samfira »

Hmmm it might be more portable to just create a symbolic link. For example:

Code: Select all

ln -s /usr/share/software-center/softwarecenter/distro/ubuntu.py /usr/share/software-center/softwarecenter/distro/LinuxMint.py
That way when software-center updates, you won't loose the changes you made to __init__.py.


Regards,
Gabriel
ubuntuaddicted

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by ubuntuaddicted »

this doesn't work for Linux Mint 14 with Mate. Here's what returns when I run the sudo update-apt-xapian-index command

Code: Select all

ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
    from softwarecenter.db.application import Application, AppDetails
  File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
    import softwarecenter.distro
  File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 167
    distro_id = "Ubuntu"
   ^
IndentationError: unexpected indent
Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 101, in <module>
    if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None):
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 466, in setupIndexing
    self.plugins = Plugins(progress=self.progress, system=system)
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 89, in __init__
    addon = Addon(fullname, **kw)
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 49, in __init__
    self.module = imp.load_source("axi.plugin_" + self.name, fname)
  File "/usr/share/apt-xapian-index/plugins/software_center.py", line 13, in <module>
    from softwarecenter.db.update import (
  File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
    from softwarecenter.backend.scagent import SoftwareCenterAgent
  File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 28, in <module>
    from softwarecenter.distro import get_distro, get_current_arch
ImportError: cannot import name get_distro
Any other way to get Ubuntu Software Center working in Mint? I want RC Mini Racer game
ubuntuaddicted

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by ubuntuaddicted »

BUMP. I would really love to support paid games within the Ubuntu Software Center but also really like using LInux Mint versus Ubuntu. Can anyone help please?
jeypeyy

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by jeypeyy »

I get this message when I run sudo update-apt-xapian-index
ERROR:root:DebFileApplication import
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
from debfile import DebFileApplication, DebFileOpenError
File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in <module>
from softwarecenter.db.application import Application, AppDetails
File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>
import softwarecenter.distro
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 210, in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 185, in _get_distro
module = __import__(distro_id, globals(), locals(), [], -1)
ImportError: No module named Ubuntu
Traceback (most recent call last):
File "/usr/sbin/update-apt-xapian-index", line 101, in <module>
if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None):
File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 466, in setupIndexing
self.plugins = Plugins(progress=self.progress, system=system)
File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 89, in __init__
addon = Addon(fullname, **kw)
File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 49, in __init__
self.module = imp.load_source("axi.plugin_" + self.name, fname)
File "/usr/share/apt-xapian-index/plugins/software_center.py", line 13, in <module>
from softwarecenter.db.update import (
File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
from softwarecenter.backend.scagent import SoftwareCenterAgent
File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 28, in <module>
from softwarecenter.distro import get_distro, get_current_arch
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 210, in <module>
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 185, in _get_distro
module = __import__(distro_id, globals(), locals(), [], -1)
ImportError: No module named Ubuntu
It doesn't recognize Ubuntu either?! Then what the hell does it recognize? :/
User avatar
mbnoimi
Level 4
Level 4
Posts: 206
Joined: Sat Dec 04, 2010 7:45 pm
Contact:

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by mbnoimi »

No need to make the steps complicated I found this solution it's too easy and works fine.
beatink

Re: How to add Ubuntu Software Centre on Mint 13 (KDE)

Post by beatink »

Did all the steps, but when I try to run software-center I get the following error despite running and rerunning the "sudo update-apt-xapian-index":
xapian.DatabaseOpeningError: Couldn't stat '/var/cache/software-center/xapian' (No such file or directory)
I fixed this by running: sudo update-software-center
Post Reply

Return to “Tutorials”