Ubuntu software centre install guide on Mint 14

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
KX250

Ubuntu software centre install guide on Mint 14

Post by KX250 »

enjoy!!

first you need to install Ubuntu software-center

for that open up your terminal
type following commands


Code: Select all

sudo apt-get install software-center 


then it will ask you for permission

press y and press enter


it will take some time

and after that it will end up with some error msg like this
correct gamma=(0/100000)
Setting up humanity-icon-theme (0.6.1) ...
Setting up software-center-aptdaemon-plugins (0.1.5) ...
Setting up oneconf (0.2.9.1) ...
Setting up software-center (5.4.1.3) ...
ERROR:root:DebFileApplication import
Traceback (most recent call last):
File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in
from debfile import DebFileApplication, DebFileOpenError
File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in
from softwarecenter.db.application import Application, AppDetails
File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in
import softwarecenter.distro
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint
Traceback (most recent call last):
File "/usr/sbin/update-software-center", line 38, in
from softwarecenter.db.update import rebuild_database
File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in
from softwarecenter.backend.scagent import SoftwareCenterAgent
File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 28, in
from softwarecenter.distro import get_distro, get_current_arch
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 197, in
distro_instance = _get_distro()
File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 172, in _get_distro
module = __import__(distro_module_name, globals(), locals(), [], -1)
ImportError: No module named linuxmint


or showing appcrash (Ubuntu software-center has closed unexpectedly)


its installed in your pc but you cant start it because software-center will crash

now you need to follow some steps to fix this problem

, let's do a little bit of coding :D

open /usr/share/software-center/softwarecenter/distro as root (dont do any thing foolishness because you cant undo )
if you cant find LinuxMint.py in there.



then rename LinuxMint.py to linuxmint.py (just lowercase)
open it and edit line 36, change LinuxMint to linuxmint


rename debian.pyc to Debian.pyc


open _init_.py
change the value in line 170
change it from capitalize to lower


if you try to run it, it will show error because it cant find it's xapian, so just get xapian files: http://cl.ly/1w1W2l3n2E2c , unzip then and paste to: /var/cache/software-center/
swftech

Re: Ubuntu software centre install guide on Mint 14

Post by swftech »

Just an update to let you know this also worked for Linux Mint 15 Xfce. The only difference is the last step...

open _init_.py
change the value in line 170
change it from capitalize to lower

In Mint 15 it's line 171 that needs changing instead of line 170.
Welshtramp

Re: Ubuntu software centre install guide on Mint 14

Post by Welshtramp »

You may also need to run it as admin or change the permission on the xapian folder on Mint 15 to get it to run.
LK101

Re: Ubuntu software centre install guide on Mint 14

Post by LK101 »

open _init_.py
change the value in line 170
change it from capitalize to lower

On Linux Mint 16 it is Line 181 and you have to change "distro_class_name" to "distro_module_name" and then all seems to work.

distro_class_name is distro_id.capitalize() which becomes "Linuxmint" so no module will be found. Since all the file names were changed to lowercase in the initial steps, distro_module_name is all lowercase and makes it work.

#181 original: distro_class = getattr(module, distro_class_name)
becomes
#181 new: distro_class = getattr(module, distro_module_name)

Also, i got a gdk error sometimes, apply the solution on this page "http://askubuntu.com/questions/359490/s ... -gdk-error" that is marked answer"

Good luck.
sirfmoyo

Re: Ubuntu software centre install guide on Mint 14

Post by sirfmoyo »

thanks a lot guys. it worked :D
Mrrockitt

Re: Ubuntu software centre install guide on Mint 14

Post by Mrrockitt »

Thanks all, also worked for me on Mnt 16 with the LK101 fix.
skittleys

Re: Ubuntu software centre install guide on Mint 14

Post by skittleys »

Works on Linux Mint 16 with the gdk error fix mentioned by LK101 (see question on Ask Ubuntu).

I did not need to change distro_class = getattr(module, distro_class_name) as outlined in LK101's post. The only change made to _get_distro is the one mentioned in the first post (distro_class_name = distro_id.lower()).

This is what it looks like:

Code: Select all

def _get_distro():
    distro_info = platform.linux_distribution()
    distro_id = distro_info[0]
    LOG.debug("get_distro: '%s'", distro_id)
    # normalize name for the import
    distro_module_name = distro_id.lower()
    distro_class_name = distro_id.capitalize()
    # start with a import, this gives us only a softwarecenter module
    module = __import__(distro_module_name, globals(), locals(), [], -1)
    # get the right class and instantiate it
    distro_class = getattr(module, distro_class_name)
    instance = distro_class()
    return instance
In summary, to install in Mint 16:
  1. Follow instructions in first post
  2. Remove this line from /usr/share/software-center/softwarecenter/ui/gtk3/views/lobbyview.py

    Code: Select all

    self.exhibit_banner.set_exhibits([FeaturedExhibit()])
iveand

Re: Ubuntu software centre install guide on Mint 14

Post by iveand »

LinuxMint 17: I was having trouble with the downloaded "xapian" folder from the original post, as then I had descriptions showing in spanish, etc.. I have found that it is NOT needed. Instead, run "sudo update-software-center". The reason this is needed is because when the "linuxmint" distro isn't found on install of software-center, it doesn't generate the package listings.

So, in summary here are my modifications:

1.

Code: Select all

sudo apt-get install software-center
2A. if no /usr/share/software-center/softwarecenter/distro/linuxmint.py, then copy from ubuntu.py:

Code: Select all

sudo cp  /usr/share/software-center/softwarecenter/distro/ubuntu.py  /usr/share/software-center/softwarecenter/distro/linuxmint.py
2B. if /usr/share/software-center/softwarecenter/distro/LinuxMint.py, then rename to linuxmint.py:

Code: Select all

sudo mv  /usr/share/software-center/softwarecenter/distro/LinuxMint.py  /usr/share/software-center/softwarecenter/distro/linuxmint.py
3.

Code: Select all

 sudo gedit /usr/share/software-center/softwarecenter/distro/linuxmint.py
and change "class Ubuntu(Debian)" (if copied from ubuntu.py above step 2), or "class LinuxMint(Debian)" to "class Linuxmint(Debian)"

4.

Code: Select all

sudo update-software-center
ALL DONE! No need to hack on _init_.py, which would get overwritten if software-center reinstalled.
JCH2

Re: Ubuntu software centre install guide on Mint 14

Post by JCH2 »

Thanks for the try on LM 17, iveand... but it did not work for me. USC still will not launch.
User avatar
Pierre
Level 21
Level 21
Posts: 13204
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Ubuntu software centre install guide on Mint 14

Post by Pierre »

To get a graphical interface for automating the installation of the most commonly requested applications in Ubuntu,
then try Ultamatix:

http://linux.softpedia.com/get/System/I ... 9892.shtml
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Post Reply

Return to “Tutorials”