Page 4 of 19 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 183

Thread: HOWTO: get a Fluxbox menu (and customization)

  1. #31
    Join Date
    Dec 2006
    Beans
    1,806

    Re: HOWTO: get a Fluxbox menu (and customization)

    Quote Originally Posted by gary4gar View Post
    Thanks a ton!
    helped a lot
    You are most welcome.

  2. #32
    Join Date
    Dec 2006
    Beans
    1,806

    Re: HOWTO: get a Fluxbox menu (and customization)

    Over the past couple of days, I have revised the custom menu section rather substantially and added a Tips section. I hope it helps (and doesn't hurt).

  3. #33
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: HOWTO: get a Fluxbox menu (and customization)

    Nicely done. I'm glad that you did it as I didn't have the patience to write all of that up. (nor the skill )

    To paraphrase Steve Martin: "Woo hoo! I was credited in a Howto. I am somebody!"

  4. #34
    Join Date
    Dec 2006
    Beans
    1,806

    Re: HOWTO: get a Fluxbox menu (and customization)

    Quote Originally Posted by yabbadabbadont View Post
    Nicely done. I'm glad that you did it as I didn't have the patience to write all of that up. (nor the skill )
    Thanks. It took longer than I would have thought, but it was definitely time for an update. [Documentation? What's that? ]


    Quote Originally Posted by yabbadabbadont View Post
    To paraphrase Steve Martin: "Woo hoo! I was credited in a Howto. I am somebody!"


    What is that from? (I've been living in a cave, I guess...)

  5. #35
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: HOWTO: get a Fluxbox menu (and customization)

    Quote Originally Posted by RedSquirrel View Post
    What is that from? (I've been living in a cave, I guess...)
    I was referring to his movie, "The Jerk", when he is running through the streets yelling that "he is someone" because his name was listed in the new phone book.

  6. #36
    Join Date
    Oct 2005
    Beans
    244
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: HOWTO: get a Fluxbox menu (and customization)

    This is an impressive HowTo. Congratulations.

    I thought I might just add my little piece of information to this, though it is only partially related. This is a little trick that I got from the fluxbox developers a couple of years ago.

    This will allow you to embed the menu in your taskbar.

    1) Get the fluxbox source files.
    2) Edit fluxbox/src/ToolFactory.cc
    3) Find the line that reads:

    Code:
    } else if (name == "prevworkspace" ||
               name == "nextworkspace") {
    4). Add 'name == "rootmenu" || ' to that section. It should look like this:

    Code:
    } else if (name == "rootmenu" ||
               name == "prevworkspace" ||
               name == "nextworkspace") {
    5. Recompile and install.
    6. In your ~/.fluxbox/init, you can now add the word rootmenu to the session.screen0.toolbar.tools line. For example:

    Code:
    session.screen0.toolbar.tools:  iconbar, systemtray, prevwindow, nextwindow, clock
    Change it to this:
    Code:
    session.screen0.toolbar.tools:  rootmenu, iconbar, systemtray, prevwindow, nextwindow, clock
    This has been confirmed to work all all major releases of Fluxbox since 0.9x until their latest release candidate.
    Last edited by SadaraX; August 4th, 2007 at 07:06 AM.
    Fresh install of Windows XP SP2 with updates. Used a firewall and anti-virus software. I stopped counting the horrible crippling and irritiating Windows crashing after I passed 10 times. Windows is just an expensive piece of sh*t....

  7. #37
    Join Date
    Dec 2006
    Beans
    1,806

    Re: HOWTO: get a Fluxbox menu (and customization)

    Quote Originally Posted by SadaraX View Post
    This is an impressive HowTo. Congratulations.
    Thanks.


    Quote Originally Posted by SadaraX View Post
    I thought I might just add my little piece of information to this, though it is only partially related. This is a little trick that I got from the fluxbox developers a couple of years ago.

    This will allow you to embed the menu in your taskbar.
    This is a great idea. Thanks for mentioning it.

    I don't use the toolbar on my setup (just conky and fbpager) but I'll try this out a little later today when I update to the latest SVN version.
    Last edited by RedSquirrel; August 4th, 2007 at 02:14 PM.

  8. #38
    Join Date
    Dec 2006
    Beans
    1,806

    Re: HOWTO: get a Fluxbox menu (and customization)

    OK, I compiled the SVN 4997 code with that modification to ToolFactory.cc and it works fine. I put mine on the right side of the clock for the screenshot.

    It puts a 'left arrow' button on the toolbar for the menu, but this can be changed to a 'right arrow' by modifying the code a little more.

    Code:
    ...
    
        } else if (name == "rootmenu" ||  name == "nextworkspace" ||  name == "prevworkspace") {
            FbTk::RefCount<FbTk::Command> cmd(CommandParser::instance().parseLine(name));
            if (*cmd == 0) // we need a command
                return 0;
    
            // TODO maybe direction of arrows should depend on toolbar layout ?
            FbTk::FbDrawable::TriangleType arrow_type = FbTk::FbDrawable::LEFT;
            if (name == "nextworkspace" || name == "rootmenu")
                arrow_type = FbTk::FbDrawable::RIGHT;
    
    ...
    The blue text is the additional code to make a right arrow instead of a left one. That should work, but I haven't recompiled to test it (and I probably won't right away since I hide the toolbar on my setup).

    Screenshots... The first one is what the toolbar looks like and the second one is what happens when I clicked on the arrow button (gee, my menu popped up ).
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	sc01.jpg 
Views:	197 
Size:	240.6 KB 
ID:	39796   Click image for larger version. 

Name:	sc02.jpg 
Views:	253 
Size:	252.4 KB 
ID:	39797  
    Last edited by RedSquirrel; August 4th, 2007 at 06:26 PM.

  9. #39
    Join Date
    Oct 2005
    Beans
    244
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: HOWTO: get a Fluxbox menu (and customization)

    Glad it worked for you. This is not especially useful unless you want to have a 'normal' desktop feel with the application menu embedded in your taskbar. Or if you have a system without a right-click button for your mouse (like a PDA).
    Fresh install of Windows XP SP2 with updates. Used a firewall and anti-virus software. I stopped counting the horrible crippling and irritiating Windows crashing after I passed 10 times. Windows is just an expensive piece of sh*t....

  10. #40
    Join Date
    Jun 2006
    Location
    Somewhere too cold!
    Beans
    Hidden!

    Re: HOWTO: get a Fluxbox menu (and customization)

    Nice Howto, it taught me some useful new tricks.

    I think the fluxbox menu is great, and though it can be an extra workload to update it manually I think this is more than compensated by the flexibility it offers. However, one thing that I really want in my menu is the option to shutdown and reboot the computer, not just to restart fluxbox or log out. This, like just about anything else in fluxbox, can be configured but it requires a little more tweaking than adding the regular menu stuff. Here's how I went about it.

    First, I have my menu manually configured with the most common apps first (terminal, firefox, thunderbird and thunar), then three submenus (Multimedia, Internet, Office) with the apps I use fairly frequent, then I got the Debian menu (which contain all applications), the Fluxbox menu and then I got the submenu called Quit. That part of the menu looks like this:

    Code:
       [submenu] (Quit)
          [exit] (Log out) 
          [exec] (Reboot) {sudo /sbin/shutdown -r now} <>
          [exec] (Shutdown) {sudo /sbin/shutdown -h now} <>
       [end]
    Now, the 'Log out' part is the standard from the fluxbox menu so there's no need to define it. The commands for Reboot and Shutdown must be configured as above. Also, they are root commands which means that when you issue them in the terminal you'll be prompted for a password. So, just adding it to menu will issue the correct command to the system but it won't be executed. In order for it to be executed you must allow the user to use the command 'shutdown' without password. This is done in the file /etc/sudoers

    Now, be *really careful* when you edit this file. Even to have a peak at it (e.g. cat /etc/sudoers) requires you to have administrative privileges and this should be a warning to anyone. To edit it you must use the visudo command as root:

    Code:
    # visudo -f /etc/sudoers
    What you must do is to allow your ordinary user to shutdown the computer as root without password, and to do absolutely nothing else without a password. In my file, I've added these line under the relevant sections:
    Code:
    # Cmnd alias specification
    Cmnd_Alias      SHUTDOWN = /sbin/shutdown
    Code:
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    
    mojoman ALL = SHUTDOWN
    
    mojoman ALL = NOPASSWD: SHUTDOWN
    (The %admin ALL=(ALL) ALL is there by default, I just include it for reference.)

    Add these lines but with your users username. Save and exit. You might have to reboot for all changes to take effect but from here on you'll be able to reboot and shutdown your computer with the fluxbox menu, no questions asked.

    I got the information on how to give ordinary users root privileges here.

    Hope you find it useful
    /mojoman

Page 4 of 19 FirstFirst ... 2345614 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •