Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GNOME (GTK2) based GUI management
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Kesereti
Guru
Guru


Joined: 07 Nov 2002
Posts: 520

PostPosted: Sat Jan 10, 2004 2:05 am    Post subject: GNOME (GTK2) based GUI management Reply with quote

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
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Sat Jan 10, 2004 2:26 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Kesereti
Guru
Guru


Joined: 07 Nov 2002
Posts: 520

PostPosted: Sat Jan 10, 2004 2:31 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
xlyz
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1470
Location: Italy

PostPosted: Sat Jan 10, 2004 2:42 am    Post subject: Reply with quote

maybe you can join this project
_________________
wanna change how bootsplash or qingy look like? try here
Back to top
View user's profile Send private message
Kesereti
Guru
Guru


Joined: 07 Nov 2002
Posts: 520

PostPosted: Sat Jan 10, 2004 2:45 am    Post subject: Reply with quote

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 =)
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Sat Jan 10, 2004 2:46 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
slarti`
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 376
Location: UK

PostPosted: Sat Jan 10, 2004 11:39 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Spack
n00b
n00b


Joined: 02 Feb 2003
Posts: 32

PostPosted: Thu Apr 22, 2004 12:47 am    Post subject: Reply with quote

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?t=29045&highlight=etcupdate+meld
_________________
Gentoo 2004.4
Gnome 2.8
Athlon XP 1800+ 512MB DDR
Promise SATA


Last edited by Spack on Thu Apr 22, 2004 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Apr 22, 2004 1:00 am    Post subject: Reply with quote

This will be something you can optionally emerge, right? I would absolutely hate to see Gentoo become GUI infested. :(
Back to top
View user's profile Send private message
Spack
n00b
n00b


Joined: 02 Feb 2003
Posts: 32

PostPosted: Thu Apr 22, 2004 1:20 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2148
Location: Manchester UK

PostPosted: Thu Apr 22, 2004 5:25 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
dreas
Guru
Guru


Joined: 06 Aug 2003
Posts: 359
Location: Germany

PostPosted: Thu Apr 22, 2004 7:55 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2367
Location: Richmond, BC, Canada

PostPosted: Wed May 05, 2004 1:47 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
rusty
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 181
Location: St.Louis

PostPosted: Fri May 14, 2004 3:28 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Fri May 14, 2004 4:29 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Fri May 14, 2004 11:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Drooling Iguana
Tux's lil' helper
Tux's lil' helper


Joined: 07 Apr 2004
Posts: 94
Location: Sector ZZ9 Plural Z Alpha

PostPosted: Fri May 14, 2004 1:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2148
Location: Manchester UK

PostPosted: Fri May 14, 2004 5:30 pm    Post subject: Reply with quote

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?
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi


Last edited by charlieg on Sat May 15, 2004 2:25 am; edited 1 time in total
Back to top
View user's profile Send private message
regeya
Apprentice
Apprentice


Joined: 28 Jul 2002
Posts: 270
Location: Desoto, IL, USA

PostPosted: Fri May 14, 2004 5:46 pm    Post subject: Reply with quote

[quote="charlieg"]
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:
Back to top
View user's profile Send private message
Drooling Iguana
Tux's lil' helper
Tux's lil' helper


Joined: 07 Apr 2004
Posts: 94
Location: Sector ZZ9 Plural Z Alpha

PostPosted: Fri May 14, 2004 8:52 pm    Post subject: Reply with quote

I haven't tried Porthole since it's masked, but I've looked at the screenshots adn I didn't see any progress bar.
Back to top
View user's profile Send private message
far
Guru
Guru


Joined: 10 Mar 2003
Posts: 394
Location: Stockholm, Sweden

PostPosted: Fri May 14, 2004 9:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Dr Gonzo
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 276
Location: Austin, TX

PostPosted: Sat May 15, 2004 5:25 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
rusty
Apprentice
Apprentice


Joined: 07 May 2004
Posts: 181
Location: St.Louis

PostPosted: Sat May 15, 2004 6:18 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Sat May 15, 2004 6:57 am    Post subject: Reply with quote

Nice job so far rusty. :) Looks like it might become useful since it's not too bloated.
Back to top
View user's profile Send private message
bicolao
n00b
n00b


Joined: 05 Jan 2004
Posts: 50

PostPosted: Sat May 15, 2004 10:35 am    Post subject: Reply with quote

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:

#!/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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum