Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

GNOME (GTK2) based GUI management

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
32 posts
  • 1
  • 2
  • Next
Author
Message
Kesereti
Guru
Guru
User avatar
Posts: 520
Joined: Thu Nov 07, 2002 7:09 am

GNOME (GTK2) based GUI management

  • Quote

Post by Kesereti » Sat Jan 10, 2004 2:05 am

So, I was just reading about the Guitoo project in another topic on this forum, and it appears that particular project is going to be QT-based and would use the KDE libraries, so I was wondering...is there interest in a GTK2-based Gentoo management interface for GNOME and other GTK2-using WM users out there? As far as I know, the GnoPortage project is dead, and it was the only promising-looking GTK2-based program remotely like this that I know of...If so, what features would you *have* to have in there? Currently I was thinking:

- Emerge management (view Portage tree, emerge/unmerge packages, sync, view dependency trees...anything else?)

- Runlevel management (basically a GUI interface for rc-update, blatantly stolen from the Guitoo thread because I think it's neat ^_^)

- Two-paneled viewer front-end for etc-update

That's what comes to mind to me at the moment...feel free to add or comment to this, and if there's enough interest I might just be persuaded to whip out my old coding hat and write my first ever GTK2 app =P
Top
floffe
Guru
Guru
User avatar
Posts: 414
Joined: Mon Nov 24, 2003 11:28 am
Location: Linköping, Sweden

  • Quote

Post by floffe » Sat Jan 10, 2004 2:26 am

That would all be nice. Couldn't you cooperate with guitoo for a backend, and just write different frontends? That would probably save both of you some work...
Top
Kesereti
Guru
Guru
User avatar
Posts: 520
Joined: Thu Nov 07, 2002 7:09 am

  • Quote

Post by Kesereti » Sat Jan 10, 2004 2:31 am

floffe wrote:That would all be nice. Couldn't you cooperate with guitoo for a backend, and just write different frontends? That would probably save both of you some work...
It would be nice, but Guitoo is apparently going to be a native KDE app, not just a QT app...configuration all set up in the KDE Control Center, using KDE libs throughout, etc.; there would be massive parts that would need a re-write, not just the frontend, unfortunately, it seems =( The backend shouldn't even take me that long, anyway -- I've never written a UI in GTK2 before, though, so it might take me a bit before I cobble together something that I'm happy with =P
Top
xlyz
Veteran
Veteran
User avatar
Posts: 1470
Joined: Sun Oct 27, 2002 8:04 pm
Location: Italy

  • Quote

Post by xlyz » Sat Jan 10, 2004 2:42 am

maybe you can join this project
Top
Kesereti
Guru
Guru
User avatar
Posts: 520
Joined: Thu Nov 07, 2002 7:09 am

  • Quote

Post by Kesereti » Sat Jan 10, 2004 2:45 am

Aha! Seems someone *has* beaten me to the punch...although I do have my reservations about it being written in Python, but that's just my old-fashionedness kicking in, I think...I'll definitely have to give it a look (I'm hard at work installing Gentoo on this new laptop I got today at the moment, but once it's done...), and get in touch with the developer to see if s/he's interested in expanding the scope of the project a bit =)
Top
floffe
Guru
Guru
User avatar
Posts: 414
Joined: Mon Nov 24, 2003 11:28 am
Location: Linköping, Sweden

  • Quote

Post by floffe » Sat Jan 10, 2004 2:46 am

OK, I see. I'm no programmer, but I can see the problem.

xlyz: I just thought of that, and went to find it. Then I saw your link here...
Top
slarti`
Retired Dev
Retired Dev
User avatar
Posts: 376
Joined: Sat Sep 20, 2003 3:04 pm
Location: UK
Contact:
Contact slarti`
Website

  • Quote

Post by slarti` » Sat Jan 10, 2004 11:39 am

Would it be possible to blend something like Meld into an etc-update utility?
Gentoo/AMD64, shell-tools, net-mail, vim, recruiters
IRC: slarti @ irc.freenode.net
Devspace
Top
Spack
n00b
n00b
User avatar
Posts: 32
Joined: Sun Feb 02, 2003 3:46 am

  • Quote

Post by Spack » Thu Apr 22, 2004 12:47 am

slarti] wrote:Would it be possible to blend something like Meld into an etc-update utility?
You can do that already: http://forums.gentoo.org/viewtopic.php? ... pdate+meld
Last edited by Spack on Thu Apr 22, 2004 2:19 am, edited 1 time in total.
Gentoo 2004.4
Gnome 2.8
Athlon XP 1800+ 512MB DDR
Promise SATA
Top
placeholder
Advocate
Advocate
Posts: 2500
Joined: Sat Feb 07, 2004 12:15 am

  • Quote

Post by placeholder » Thu Apr 22, 2004 1:00 am

This will be something you can optionally emerge, right? I would absolutely hate to see Gentoo become GUI infested. :(
Top
Spack
n00b
n00b
User avatar
Posts: 32
Joined: Sun Feb 02, 2003 3:46 am

  • Quote

Post by Spack » Thu Apr 22, 2004 1:20 am

Pwnz3r wrote:This will be something you can optionally emerge, right? I would absolutely hate to see Gentoo become GUI infested. :(
No, basically just changing the diff tool in etc-update config to a GUI tool.
Gentoo 2004.4
Gnome 2.8
Athlon XP 1800+ 512MB DDR
Promise SATA
Top
charlieg
Advocate
Advocate
User avatar
Posts: 2149
Joined: Tue Jul 30, 2002 11:05 am
Location: Manchester UK
Contact:
Contact charlieg
Website

  • Quote

Post by charlieg » Thu Apr 22, 2004 5:25 am

You want Porthole which is, incidently, mentioned in the forums and has it's own thread.

A little bird tells me the OP didn't search.
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Top
dreas
Guru
Guru
User avatar
Posts: 359
Joined: Wed Aug 06, 2003 7:24 am
Location: Germany
Contact:
Contact dreas
Website

  • Quote

Post by dreas » Thu Apr 22, 2004 7:55 am

Porthole is want you want when it comes to emerge management via GUI, GTK2 to be specific. In my opinion an etc-update front-end should be included in Porthole but I don't know if this is planned/in the works. It does not cover run-level management though, but then this should be a seperate application anyway.

So what's really missing is a GTK2 run-level management. I'm all for such an app and am willing to help developing it if time permits. I've just started my first GTK2/Python project recently and setting up a GUI via Glade is pretty easy except for the event handlers/signals probably. Feel free to contact me, maybe we can get this rolling.
Kesereti wrote:The backend shouldn't even take me that long, anyway -- I've never written a UI in GTK2 before, though, so it might take me a bit before I cobble together something that I'm happy with =P
curst [kûrst] a past tense and a past participle of curse, a variant of cursed
Top
dol-sen
Retired Dev
Retired Dev
User avatar
Posts: 2805
Joined: Sun Jun 30, 2002 2:44 pm
Location: Richmond, BC, Canada

  • Quote

Post by dol-sen » Wed May 05, 2004 1:47 pm

I'll put the etc-update on our todo list to look at the possibility of applying a gtk front end to it.

Keep in mind that portage is undergoing some changes so that it will have a proper api so that porthole & other apps can use features of portage without fear of constantly updating their code when portage changes.

{one of the reasons porthole remains masked, changes coming in portage are going to break porthole}

I don't know at this point if the portage devs are going to include access points to etc-update code.
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Top
rusty
Apprentice
Apprentice
User avatar
Posts: 181
Joined: Fri May 07, 2004 3:58 am
Location: St.Louis

  • Quote

Post by rusty » Fri May 14, 2004 3:28 am

Here is a class for manipulating run levels and services ( based on rc-update, of course ).

http://www.clarkson.edu/~solomarv/runlevel/

This might make your life easier if you are looking into creating a GUI front-end for rc-update.
Top
ecatmur
Advocate
Advocate
User avatar
Posts: 3595
Joined: Mon Oct 20, 2003 8:07 pm
Location: Edinburgh
Contact:
Contact ecatmur
Website

  • Quote

Post by ecatmur » Fri May 14, 2004 4:29 am

An idea - instead of writing a GUI you could write a Gentoo backend to the services tool in gnome-system-tools. gnome-system-tools has a very nice UI and it would take care of a lot of the work for you.
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Top
placeholder
Advocate
Advocate
Posts: 2500
Joined: Sat Feb 07, 2004 12:15 am

  • Quote

Post by placeholder » Fri May 14, 2004 11:54 am

I'm personally not looking forward to or wanting a GUI program to manage Gentoo, so whatever they make it for it matters not to me. I'd rather stick with the current UI and hit the terminal when I want to manage things.
Top
Drooling Iguana
Tux's lil' helper
Tux's lil' helper
Posts: 94
Joined: Wed Apr 07, 2004 6:50 pm
Location: Sector ZZ9 Plural Z Alpha

  • Quote

Post by Drooling Iguana » Fri May 14, 2004 1:38 pm

I just want a version of Portage with a progress bar, even if it's just an ASCII bar that would go across the bottom of the terminal for the regular, console based interface.

Hell, I'd prefer it that way, actually, but having a nice, user-friendly GUI would also be nice and make it easier to recommend Gentoo to my less technically-inclined friends.
Top
charlieg
Advocate
Advocate
User avatar
Posts: 2149
Joined: Tue Jul 30, 2002 11:05 am
Location: Manchester UK
Contact:
Contact charlieg
Website

  • Quote

Post by charlieg » Fri May 14, 2004 5:30 pm

Drooling Iguana wrote:I just want a version of Portage with a progress bar, even if it's just an ASCII bar that would go across the bottom of the terminal for the regular, console based interface.
PORTHOLE PORTHOLE PORTHOLE PORTHOLE PORTHOLE!

Again:

PORTHOLE

Sheesh, can people not read any more?
Last edited by charlieg on Sat May 15, 2004 2:25 am, edited 1 time in total.
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Top
regeya
Apprentice
Apprentice
User avatar
Posts: 270
Joined: Sun Jul 28, 2002 6:55 pm
Location: Desoto, IL, USA

  • Quote

Post by regeya » Fri May 14, 2004 5:46 pm

charlieg wrote:
Drooling Iguana wrote:I just want a version of Portage with a progress bar, even if it's just an ASCII bar that would go across the bottom of the terminal for the regular, console based interface.

Hell, I'd prefer it that way, actually, but having a nice, user-friendly GUI w

PORTHOLE PORTHOLE PORTHOLE PORTHOLE PORTHOLE!

Again:

PORTHOLE

Sheesh, can people not read any more?
You're talking about an existing project, and that wasn't the original poster's question, and besides, porthole only encompassess part of the functionality planned for guitoo. Invalid.

:wink: :wink: :wink: :wink: :lol:
Top
Drooling Iguana
Tux's lil' helper
Tux's lil' helper
Posts: 94
Joined: Wed Apr 07, 2004 6:50 pm
Location: Sector ZZ9 Plural Z Alpha

  • Quote

Post by Drooling Iguana » Fri May 14, 2004 8:52 pm

I haven't tried Porthole since it's masked, but I've looked at the screenshots adn I didn't see any progress bar.
Top
far
Guru
Guru
User avatar
Posts: 394
Joined: Mon Mar 10, 2003 12:30 am
Location: Stockholm, Sweden
Contact:
Contact far
Website

  • Quote

Post by far » Fri May 14, 2004 9:33 pm

Drooling Iguana wrote:I haven't tried Porthole since it's masked, but I've looked at the screenshots adn I didn't see any progress bar.
There is none. There is no way of knowing how long an emerge will take, although I believe someone made a util that displays a progress bar based on statistics from earlier emerges.
The Porthole Portage Frontend
Top
Dr Gonzo
Apprentice
Apprentice
User avatar
Posts: 276
Joined: Sat Jan 31, 2004 6:29 pm
Location: Austin, TX
Contact:
Contact Dr Gonzo
Website

  • Quote

Post by Dr Gonzo » Sat May 15, 2004 5:25 am

I think CharlieG just likes to tell people that everything they'd ever want to talk about has already been said somewhere else on the forum.

Y'know, sometimes people want to talk about stuff. Sometimes they want to start a new thread because all of the existing ones are, like, 5 pages long and take an hour to read before you're able to post anything -- kinda like entering a conversation that's been going on for a few hours and trying to edge in.

This is all the socialization some of these people get. Give 'em a break. Let 'em talk, and if you know of a link that you'd like them to see, offer it nicely. The fact that you've been around for a long time does not make you better in any way, shape, or form. Courtesy, on the other hand...

That's my $.02.
"Families is where our nation finds hope, where wings take dream."

George W. Bush
Top
rusty
Apprentice
Apprentice
User avatar
Posts: 181
Joined: Fri May 07, 2004 3:58 am
Location: St.Louis

  • Quote

Post by rusty » Sat May 15, 2004 6:18 am

Screenshot! :D

It does not do what it is supposed to do yet, but it looks cool. Wrote it all with my hands, too. Boo Glade!
Top
placeholder
Advocate
Advocate
Posts: 2500
Joined: Sat Feb 07, 2004 12:15 am

  • Quote

Post by placeholder » Sat May 15, 2004 6:57 am

Nice job so far rusty. :) Looks like it might become useful since it's not too bloated.
Top
bicolao
n00b
n00b
Posts: 50
Joined: Mon Jan 05, 2004 6:48 am

  • Quote

Post by bicolao » Sat May 15, 2004 10:35 am

Here is another rc-update wrapper. It requires root to check service status properly. You should run with option --test first so that you can check what command it will run. Then remove --test and play :)

Code: Select all

#!/usr/bin/env python

import sys
import os
import gobject
import gtk
from gtk import TRUE, FALSE

testing = False

class Item(gobject.GObject):
    name = ''
    run_levels = []
    running = False
    
gobject.type_register(Item)

def refresh(model):
    global full_list
    global run_levels

    l = os.listdir("/etc/init.d")
    full_list = []
    for i in l:
        if i[-3:] != ".sh":
            full_list.append(i)

    full_list_id = {}
    for i in range(len(full_list)):
        full_list_id[full_list[i]] = i

    run_levels = os.listdir("/etc/runlevels")
    services = []

    for i in range(len(full_list)):
        a = Item()
        a.name = full_list[i];
        a.run_levels = []
        a.running = False
        for j in range(len(run_levels)):
            a.run_levels.append(False)
        services.append(a)

    for i in range(len(run_levels)):
        for j in os.listdir("/etc/runlevels/"+run_levels[i]):
            services[full_list_id[j]].run_levels[i] = True

    for i in range(len(full_list)):
        print "Checking " + full_list[i]
        status = os.spawnl(os.P_WAIT,"/etc/init.d/"+full_list[i],full_list[i],'--quiet','status');
        services[i].running = status == 0

    model.clear()
    for item in services:
	iter = model.append()
	model.set(iter, 0, item)
    

def create_model():
    store = gtk.ListStore(Item)
    refresh(store)
    return store

def add_columns(treeview):
    model = treeview.get_model()

    # service name
    column = gtk.TreeViewColumn()
    column.set_title('Service')
    renderer = gtk.CellRendererText()
    column.pack_start(renderer,True)
    column.set_cell_data_func(renderer,macro_set_func_text)
    treeview.append_column(column)

    # column for fixed toggles
    column = gtk.TreeViewColumn()
    column.set_title('Running')
    renderer = gtk.CellRendererToggle()
    renderer.connect('toggled',running_toggled,model)
    column.pack_start(renderer,True)
    column.set_cell_data_func(renderer,macro_set_func_running)
    treeview.append_column(column)    

    for i in range(len(run_levels)):
        # column for fixed toggles
        column = gtk.TreeViewColumn()
        column.set_title(run_levels[i])
        renderer = gtk.CellRendererToggle()
        renderer.connect('toggled',runlevel_toggled,[model,i])
        column.pack_start(renderer,True)
        column.set_cell_data_func(renderer,macro_set_func_toggle,i)
        treeview.append_column(column)    
 
def macro_set_func_text(tree, cell, model, iter):
    info = model.get_value(iter, 0)
    cell.set_property('text', info.name)

def macro_set_func_toggle(tree, cell, model, iter, data):
    info = model.get_value(iter, 0)
    cell.set_property('active', info.run_levels[data])

def macro_set_func_running(tree, cell, model, iter):
    info = model.get_value(iter, 0)
    cell.set_property('active', info.running)

def running_toggled(cell,path,model):
    iter = model.get_iter(path)
    item = model.get_value(iter,0)
    new_status = not cell.get_active()
    if new_status != item.running:
        if new_status:
            cmd = 'start'
        else:
            cmd = 'stop'
        if testing:
            print "/etc/init.d/%s %s" % (item.name,cmd)
            status = 0
        else:
            status = os.spawnl(os.P_WAIT,"/etc/init.d/"+item.name,item.name,cmd)
        if status != 0:
            print "error"
        item.running = new_status
        cell.set_active(item.running)
    

def runlevel_toggled(cell,path,data):
    model = data[0]
    index = data[1]
    iter = model.get_iter(path)
    item = model.get_value(iter,0)
    new_status = not cell.get_active()
    if new_status != item.run_levels[index]:
        if new_status:
            cmd = 'add'
        else:
            cmd = 'del'
        if testing:
            print "/sbin/rc-update %s %s %s" % (cmd,item.name,run_levels[index])
            status = 0
        else:
            status = os.spawnl(os.P_WAIT,"/sbin/rc-update",'rc-update',cmd,item.name,run_levels[index])
        if status != 0:
            print "error"
        item.run_levels[index] = new_status
        cell.set_active(item.run_levels[index])

def main():
    if len(sys.argv) > 1 and sys.argv[1] == "--test":
        print "Testing mode"
        global testing
        testing = True

    
    win = gtk.Window()
    win.connect('destroy', lambda win: gtk.main_quit())
	
    win.set_title('Gtk rc-update')
    win.set_border_width(8)
    
    vbox = gtk.VBox(FALSE, 8)
    win.add(vbox)
    
    sw = gtk.ScrolledWindow()
    sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
    sw.set_policy(gtk.POLICY_NEVER,
                   gtk.POLICY_AUTOMATIC)
    vbox.pack_start(sw)
    
    model = create_model()
    
    treeview = gtk.TreeView(model)
    
    sw.add(treeview)
    
    add_columns(treeview)

    hbox = gtk.HButtonBox()
    vbox.pack_start(hbox, FALSE, FALSE)
    b = gtk.Button('_Close')
    b.connect('clicked', lambda l1: gtk.main_quit())
    hbox.pack_start(b)
    b = gtk.Button('_Refresh')
    b.connect('clicked',  lambda l2: refresh(model))
    hbox.pack_start(b)

    
    win.set_default_size(280, 250)
    
    win.show_all()


    gtk.main()
                                     
if __name__ == '__main__':
    main()
	    
Bi Cờ Lao
Top
Post Reply
  • Print view

32 posts
  • 1
  • 2
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy