Use the 'Home Key' to bring up the menu under Xfce & more

Discussion in 'Linux' started by Pegasus, Oct 18, 2008.

  1. Pegasus

    Pegasus

    Joined:
    Oct 18, 2008
    Messages:
    4
    Likes Received:
    0
    I've had my AAO for a couple of days - now starting to play with the setup.
    First to go was the Acer desktop. I followed rjm's excellent guide on making the change http://www.aspireoneuser.com/forum/viewtopic.php?f=39&t=4310&start=0&st=0&sk=t&sd=a - highly recommended!

    One thing that bugged me though was that the 'Home Key' doesn't work under Xfce. This is reasonable as there is no Home screen to go to anymore.
    I know I can just right click for the menu, but I like hitting a key & scrolling up & across for my apps.

    Digging around on the web, I found a post showing how to disable the key http://the.taoofmac.com/media/Acer/Aspire One/AA1notes.html, which gave me a clue as to how it works. The key ref is 115 and what it does is contained in the file ~/.XHkeys.

    Open a terminal (Alt-F2) and type
    Code:
    mousepad ~/.XHkeys
    
    This brings up a text file. Search down the list to find the ref for 115 and you'll see it refers to /usr/bin/superhome.sh. You can close this file; I just wanted to share my thinking.

    We can edit superhome.sh. Open a terminal (Alt-F2) and type
    Code:
    sudo mousepad //usr/bin/superhome.sh
    
    This is what you get:

    Code:
    #!/bin/sh
    
    xfdesktop2 --gohome &
    #showdt > /dev/null 2>&1 &
    The # on each line nulls out the code, so the only thing going on here is 'xfdesktop2 --gohome' which as I've said doesn't do anything. We need to change it - but what to?

    I tried
    Code:
    xfdesktop2 --help
    in a terminal, which said there wasn't any help, but told me the options for the command, which was a help. Try it.

    I changed
    Code:
    xfdesktop2 --gohome &
    to
    Code:
    xfdesktop2 --menu &
    which worked, but brought up the menu at the mouse position, which rather defeats the object. I want it nice and familiar - in the bottom left hand corner.

    I was struggleing now :cry: , but perseverence and google pays off in the end. I found this in and ubuntu page http://manpages.ubuntu.com/manpages/intrepid/man1/xfce4-popup-menu.html. My answer was xfce4-popup-menu!

    My superhome.sh file now looks like this:
    Code:
    #!/bin/sh
    
    #xfdesktop2 --gohome &
    xfce4-popup-menu
    #showdt > /dev/null 2>&1 &
    
    and when I press the 'home key' my menu pops out of the bottom left hand corner :lol:

    Thats a long winded story of how to make a one line change to a text file, but working it out for myself was brilliant, and I wanted to share.

    Its only a one line change - think of all of the other commands you could use instead.......

    btw I think you have to have the Xfce menu button in the bottom left for it to work. I have and I haven't tried it without.
     
    Pegasus, Oct 18, 2008
    #1
  2. Pegasus

    ztryfe

    Joined:
    Sep 21, 2008
    Messages:
    2
    Likes Received:
    0
    Thanks, while it solves the issue that you had, I still think that editing the X config to make use of the key as Meta, will allow us to combine the home key with the 'r' key for example, im used to that kind of accelerators and i really miss them in linpus.

    I'll digg around when i have some time, just a though for you.
     
    ztryfe, Oct 19, 2008
    #2
  3. Pegasus

    uschan

    Joined:
    Sep 4, 2008
    Messages:
    5
    Likes Received:
    0
    There is a tool you may use:
    Hit Alt+F2, enter xhkconf and check "Run in terminal".

    xhkconf is self-explaining:
    • It asks you to hit a key-combination. [/*:m:dup90yge]
    • Then it tells you which (if any) action is linked to this combination and asks if you want to overwrite it.[/*:m:dup90yge]
    • If you type "y" xhkconf wants you to select a command type; "2" stands for application.[/*:m:dup90yge]
    • Now enter the shell command: e.g. /usr/bin/<name-of-script>[/*:m:dup90yge]
    • And after ENTER hit "3" to disable an on-screen-display (OSD) message.[/*:m:dup90yge]
    • Accept y/n and you´re done[/*:m:dup90yge]

    There is a manual at
    http://wmalms.tripod.com/xhkeys_manual.html#Using_xhkeys
     
    uschan, Oct 23, 2008
    #3
  4. Pegasus

    jaslar

    Joined:
    Sep 13, 2008
    Messages:
    10
    Likes Received:
    0
    Well all of this is very interesting, but unless I'm being dense (always a possibility) no one ever answers the question. How can you get the little house key to give you a blank desktop, that is, hide all active windows?

    Note: I did find this post about creating a little program to toggle "show desktop" on and off.
    http://www.linuxquestions.org/questions ... e4-601161/

    In combination with some of the other tips -- assigning a key to that script -- this might work. But I haven't tried it.

    P.S. OK, I got it to work, but backwards. That is, I followed the steps above to edit the superhome.sh script to load the Xfce menu, which I left mapped to the House key. That works fine, and it is indeed handy. Then I went into the Settings>Window Manager to Show Desktop, which I mapped to the menu key (between Alt-Gr and Ctrl). And that, apparently because it isn't mapped to anything in the .XHkeys file doesn't require any further dinking around. Press it once to get the desktop, press it again to restore your apps.

    I have to say, Xfce seems a little bipolar. On the one hand, here are all these great settings that you can get to by mouse: background image, key changes. But they don't work, or they aren't permanent, unless you ALSO edit a configuration file. It seems like the philosophy should be one OR the other, but it shouldn't require both.
     
    jaslar, Oct 26, 2008
    #4
  5. Pegasus

    smlh

    Joined:
    Oct 10, 2008
    Messages:
    3
    Likes Received:
    0
    jaslar,

    Code:
    sudo mousepad /usr/bin/superhome.sh
    
    Code:
    #!/bin/sh
    
    #xfdesktop2 --gohome &
    showdt > /dev/null 2>&1 &
    
    will make the home key work to show/hide desktop

    btw thanks for the help Pegasus :)
     
    smlh, Oct 27, 2008
    #5
  6. Pegasus

    ZexCo

    Joined:
    Oct 18, 2008
    Messages:
    9
    Likes Received:
    0
    That is EXACTLY what I wanted, thanks a lot! :)
    Any way to make the "PrtSc" button work again too?
     
    ZexCo, Nov 2, 2008
    #6
  7. Pegasus

    fmazzanti

    Joined:
    Sep 1, 2008
    Messages:
    8
    Likes Received:
    0
    Hi folks,
    I did that to get the home thingy showing up the menu... and it worked.
    Then I shut down the computer and fired it again, and that didn't work. Then I used the xfkconfig command to try to fix things up with no luck...
    Now my One doesn't do NAYTHING when I hit the home key. Before touching things, pressing the home key minimized all progs on the screen, which was nice enough, but now I've lost this functionality.
    I tried to touch again the script to no avail. I tried to run again the xfkconfig script to no avail either... what can I do?
    It looks as if the computer refused to understand this key has code 115
    Best regards and thanks,
    Ferran.
     
    fmazzanti, Nov 4, 2008
    #7
  8. Pegasus

    nugroho2

    Joined:
    Oct 6, 2008
    Messages:
    50
    Likes Received:
    0
    Pegasus and smlh, great post. ...

    BTW, how do you map the Home icon (lower left) to work as Show-desktop? I hate the icon of the Show-desktop, but could not change this.
     
    nugroho2, Nov 9, 2008
    #8
  9. Pegasus

    libssd

    Joined:
    Jan 17, 2009
    Messages:
    244
    Likes Received:
    0
    Location:
    Atlanta, GA
    Related to this, default keyboard mapping for xfce4-popup-menu is Ctrl+Esc. Nothing happens.

    When I type xfce4-popup-menu at the command line, I get:

    ** (xfce4-popup-menu:20635): WARNING **: Can't find the xfce4-panel menu to popup.

    I have right-click enabled, so that I can display the popup menu from the AA1 home desktop, but I was hoping that Ctrl+Esc would pop it up anywhere.
     
    libssd, Feb 4, 2009
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.