You are not logged in.

#1 2017-01-23 11:53:09

imp2021
Member
Registered: 2015-10-02
Posts: 31

[Solved] Distrohopping // dotfiles // Openbox

While writing i figured that this is more Sysadmin related, then GUI related, so:

So Openbox is totally sufficent for me, and i dont see, why i should switch.
I currently have that dotfilemess i carry around, and i like to keep it *cough* ..simple.

so my dotfilemess does symlink its own rc.xml file into ~/.config/openbox/ (also preservingly saving the old one, neat neat).

But lets say there are some neat distros that have also custom stuff, like bl-exit or bl-file-manager. ..then my dotfilemess fails.

My attempt is to write a wrapper function.
this is what i got in some file that is sourced with my .bashrc:

obox-exit(){
    if [ $(type -t bl-exit) ]; then
        bl-exit;
    fi

    if [ $(type -t oblogout) ]; then
        oblogout;
    fi
}

and in my symlinked rc.xml i have

    <keybind key="W-x">
      <action name="Execute">
        <startupnotify>
          <enabled>enabled</enabled>
          <name>Logout</name>
        </startupnotify>
        <command>obox-exit</command>
      </action>
    </keybind>

but this fails (ofc after reconfiguring ob), it says:
"Failed to execute child process "obox-exit" (No such file or directory)"

As far as I know i can / should put an executable file (obox-exit e.g.) into /usr/bin/, but that needs a sudo.

And im looking for a non sudo solution. (for like id like to use them 'mobile' / 'at work')

regards

------------------------------------

Solution, motivated by damo does the trick.

So now I put my wrapper functions as executable files next to my "portable" rc file.
This rc file has now the <command> lines as follows.

        <command>sh -c ~/path/to/dotfilemess(symlinked works fine)/wrapperfunc.sh</command>

Note: I'd prefer one file with functions, instead of one file for each function. But I'm totally fine with this. Especially, when or if there are more Openbox distros to run at.

(I'm very happy about this! Ty)

Last edited by imp2021 (2017-01-23 14:39:18)

Offline

#2 2017-01-23 12:10:25

damo
....moderator....
Registered: 2015-08-20
Posts: 5,059

Re: [Solved] Distrohopping // dotfiles // Openbox

You need to explicitly use a shell command, as described in http://openbox.org/wiki/Help:Actions#Action_syntax

<command>sh -c 'obox-exit'</command>

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

Board footer

Powered by FluxBB