Dependencies and Desktop Environment neutral system

Bug #245057 reported by TAC one
2
Affects Status Importance Assigned to Milestone
Remote Apache Management tool
Confirmed
Medium
Unassigned

Bug Description

We should define a clearer list of dependencies and try to purge all desktop-environment specific code.
We currently use gksudo and (soon) gnome-open. We shuold understand how many dependencies we need to use that kind of code.

TAC one (tacone)
Changed in rapache:
assignee: nobody → emgent
importance: Undecided → High
milestone: none → stage0
status: New → Confirmed
Revision history for this message
TAC one (tacone) wrote :

Also we use nautilus, because seemed not possible to use gnome-open to browse files with gksudo.
We really need an alternative.

Revision history for this message
KillerKiwi (killerkiwi2005) wrote :

gnome-open file:///home does work
there is 'xdg-open' in hardy

ie xdg-open file:///home

gksu is a different problem.... there is a xdg-su but its been removed
http://changelogs.ubuntu.com/changelogs/pool/main/x/xdg-utils/xdg-utils_1.0.2-6/changelog

we could mimic the behaviour of xdg-su in python short term until xdg implements what ever they are planning on

Revision history for this message
TAC one (tacone) wrote :

I guess we shuold also refactor platform that kind of code into a single module class, so we can have better control in the future.

Revision history for this message
TAC one (tacone) wrote :

From KillerKiwi.

 def get_desktop_enviroment(self):
  # Taken from orignal xdg scripts
  if os.getenv("GNOME_DESKTOP_SESSION_ID") != None and os.getenv("GNOME_DESKTOP_SESSION_ID") != "":
   return "GNOME"
  if os.getenv("KDE_FULL_SESSION") != None and os.getenv("KDE_FULL_SESSION") == "true":
   return "KDE"

  try:
   if Popen(["xprop", "-root", "_DT_SAVE_MODE"], stdout=PIPE, stderr=open(os.devnull, "w")).communicate()[0].strip().lower().count("xfce") > 0:
    return "XFCE"
  except:
   pass

  return "CLI"

Revision history for this message
TAC one (tacone) wrote :

We should refactor every Desktop Environment dependent line of code in a separate class. then we can use Factory design pattern to load load the right one

TAC one (tacone)
Changed in rapache:
milestone: stage0 → early-eagle
TAC one (tacone)
Changed in rapache:
assignee: emgent → nobody
importance: High → Medium
milestone: early-eagle → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.