Ubuntu software centre install guide on Mint 14

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Ubuntu software centre install guide on Mint 14

Postby KX250 on Tue May 07, 2013 7:31 pm

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/
Attachments
snapshot1.png
KX250
Level 1
Level 1
 
Posts: 10
Joined: Sun May 05, 2013 10:11 am

Linux Mint is funded by ads and donations.
 

Re: Ubuntu software centre install guide on Mint 14

Postby swftech on Mon Jul 01, 2013 11:36 pm

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.
User avatar
swftech
Level 1
Level 1
 
Posts: 41
Joined: Thu Nov 03, 2011 11:57 am
Location: SW Florida

Re: Ubuntu software centre install guide on Mint 14

Postby Welshtramp on Tue Jul 09, 2013 9:13 am

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.
Welshtramp
Level 1
Level 1
 
Posts: 5
Joined: Tue Aug 17, 2010 1:17 pm

Re: Ubuntu software centre install guide on Mint 14

Postby LK101 on Tue Dec 31, 2013 3:54 pm

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/software-center-not-opening-on-ubuntu-13-04-due-to-gdk-error" that is marked answer"

Good luck.
LK101
Level 1
Level 1
 
Posts: 1
Joined: Tue Dec 31, 2013 3:47 pm

Re: Ubuntu software centre install guide on Mint 14

Postby sirfmoyo on Sat Mar 08, 2014 1:51 am

thanks a lot guys. it worked :D
sirfmoyo
Level 1
Level 1
 
Posts: 4
Joined: Fri Oct 12, 2012 2:14 am

Re: Ubuntu software centre install guide on Mint 14

Postby Mrrockitt on Thu Apr 03, 2014 5:55 am

Thanks all, also worked for me on Mnt 16 with the LK101 fix.
Mrrockitt
Level 1
Level 1
 
Posts: 1
Joined: Thu Aug 25, 2011 5:39 am

Re: Ubuntu software centre install guide on Mint 14

Postby skittleys on Fri May 02, 2014 12:47 pm

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()])
skittleys
Level 1
Level 1
 
Posts: 1
Joined: Fri May 02, 2014 12:21 pm

Re: Ubuntu software centre install guide on Mint 14

Postby iveand on Thu May 22, 2014 4:46 pm

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.
iveand
Level 1
Level 1
 
Posts: 13
Joined: Sun Sep 09, 2012 7:07 am

Re: Ubuntu software centre install guide on Mint 14

Postby JCH2 on Sun May 25, 2014 10:22 am

Thanks for the try on LM 17, iveand... but it did not work for me. USC still will not launch.
User avatar
JCH2
Level 1
Level 1
 
Posts: 16
Joined: Sat Jun 08, 2013 4:56 pm
Location: USA

Re: Ubuntu software centre install guide on Mint 14

Postby Pierre on Wed Jul 02, 2014 4:28 am

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
User avatar
Pierre
Level 6
Level 6
 
Posts: 1230
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Linux Mint is funded by ads and donations.
 

Return to Tutorials / Howtos

Who is online

Users browsing this forum: Zorba and 10 guests