You are not logged in.
Ok so I have been trying to run chkrootkit (a program that checks for rootkits)
from the openbox menu. To run chkrootkit you have to open a terminal and simply type chkrootkit. That works, but I wish to do this from the OB menu and that just will not work.
I have tried as the command the following
chkrootkit
terminator chkrootkit
terminator -x chkrootkit
/path/to/chkrootkit
You name it I have tried everything I can think of.
I have even tried writing a bash script to start chkrootkit
and it will not work from the OB menu.
I have searched google and still cannot find an answer that works
I have tried to make this work so much that I was thinking of just asking someone to shoot me and put me out of my misery, but I thought I would ask Bunsenlabs if anyone here knows a way to make a terminal open and run a program from the OB menu..
Last edited by THX1138 (2019-01-22 14:29:50)
I’ve got this horrible feeling that if there is such a thing as reincarnation, knowing my luck, I’ll come back as me!
---------
Robotic Santa on Deviant Art
Offline
This
terminator -e 'ls; sleep 6'
seems to work. p.s. This was discussed before, search may help.
Edit: Same example, escaped, in openbox menu may look like
<item label="terminator -e 'ls; sleep 6'">
<action name="Execute">
<execute>terminator -e 'ls; sleep 6'</execute>
</action>
</item>
p.s. function
# xmlescape and trim whitespace bash
# https://stackoverflow.com/questions/12873682/short-way-to-escape-html-in-bash
xmlescape () {
echo "$@" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g; s/^[ \t]*//;s/[ \t]*$//'
}
Last edited by brontosaurusrex (2019-01-22 14:25:07)
Offline
Have a look at the menu config & see how htop is done, you'll get clues for the window title too, and an example right in front of you
Last edited by Bearded_Blunder (2019-01-22 13:42:41)
Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me
Offline
Thanks for the help. I actually searched these forums many times looking for the answer but found nothing. I am pretty sure I at least have something of a clue to work on now, thanks
Edited in later
Yes I can now make bash scripts work by using the line
<command>x-terminal-emulator -T 'chkrootkit' -e /home/myusername/scripts/chkrootkit.sh</command>
simply using the following did not work
<command>x-terminal-emulator -T 'chkrootkit' -e chkrootkit</command>
I never tried whether it would start the program if I made a path to that rather than my script I assume it would. I need to experiment more
Thanks a lot for the help I did look through the menu but didnt make the connection between what I wanted to achieve and what was already staring me in the face - DUHHHHH !
Last edited by THX1138 (2019-01-22 14:32:46)
I’ve got this horrible feeling that if there is such a thing as reincarnation, knowing my luck, I’ll come back as me!
---------
Robotic Santa on Deviant Art
Offline
Sometimes you may need to invoke the $SHELL
xterm -e "bash -c 'echo hello;$SHELL'"
Or with an example command..
xterm -e "bash -c 'nmtui;$SHELL'"
Where nmtui is a curses front end for networkmanager for example.
You would be better of creating a desktop application such as.
[Desktop Entry]
Version=1.0
Name=Test
Comment=Test the terminal running a command inside it
Exec=x-terminal-emulator -e "bash -c 'chkrootkit.sh;$SHELL'"
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=Application;
Put chkrootkit.sh in your $PATH and call the desktop entry application from the OB menu <command>
Last edited by S7.L (2019-01-22 15:29:47)
Offline
Thanks S7.L, I just added my scripts folder to the environment path
I’ve got this horrible feeling that if there is such a thing as reincarnation, knowing my luck, I’ll come back as me!
---------
Robotic Santa on Deviant Art
Offline
Thanks brontosaurus rex
I’ve got this horrible feeling that if there is such a thing as reincarnation, knowing my luck, I’ll come back as me!
---------
Robotic Santa on Deviant Art
Offline