sakura

Thérèse's picture

Forums: 

I like sakura enough to have made it my default x-terminal emulator. However, apparently because it uses -t instead of the usual -T, items in my Debian menus don’t work unless I edit them.

For example, in my fluxbox menu, if I change [exec] (mc) { x-terminal-emulator -T "mc" -e /usr/bin/mc} to [exec] (mc) { sakura -t "mc" -e /usr/bin/mc}, then everything works.

However, some window managers have menus that aren’t so easily edited. Is there a way to handle this problem without editing all menus by hand?

Maybe a script like this?

1's picture

myxterm.sh
===========

#!/bin/bash

argl="$@"

newargs=$(echo $argl|sed 's/-T/-t/g')

sakura $newargs

======

What this script does is to take the argument list and replace any occurence of -T with -t . Just use this script
as your default x-terminal-emulator, and things should work.

Thanks for this interesting

Thérèse's picture

Thanks for this interesting suggestion. I’m having trouble implementing it, though. If I su to root and use the alternatives command, the options presented are x-terminal-emulators I’ve installed through aptitude, not scripts I’ve copied. If I try to set this script as the default x-terminal-emulator for my personal account only, using xdg-utils, I get error messages about “unknown desktop environment.” Is that because I’m not using a desktop environment, just whatever window manager appeals to my mood (fluxbox, blackbox, Window Maker, pekwm, wm2...)? I’ve been looking for sample .bashrc files that would help me set a script as my default x-terminal-emulator, but no luck so far.

Hello again,

1's picture

Hello again,

Try out the package galternatives, this is a graphical interface to alternatives. It has a button "Add" which allows
you to give a path to a new alternative.

EDIT:

Command line alternative to this is:

update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator path/to/yoursakurascript 20

Then you select this as a default alternative.

EDIT 2:

If you opted for sakura just because of the tabbing feature, check out the fluxbox WM which extends this to all the application windows. I often use this to bunch up a couple of urxvt-s and a gvim editor into one group window.

tabbing and virtual desktops make my life easier :-)

EDIT 3: Fixed the garbage in this post