Rxvt/Xterm-Replacement with sakura

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

Rxvt/Xterm-Replacement with sakura

#1 Post by aragon »

i want to replace rxvt and xterm with sakura. i have a script (see attached) that does convert the input and strips out every option that is not supported by sakura. it basically works (tested with rxvt) but i have the felling that some things could be done better/lighter/faster.

any recommendations are welcome.

thanks aragon

Code: Select all

#!/bin/sh
#
# this script should be a replacement for xterm and rxvt using sakura. as sakura
# does not understand most option of xterm/rxvt, we try to only commit those it 
# does:
# -hold (only Xterm)
# -title/-T
# -e
#
# aragon, 2010.01.19 

## variables
inp="${*}" #all params
hold="`echo "${inp}" | grep -e -hold`" #is hold in params
title="`echo "${inp}" | tr "-" "\n" | grep -e "^title " | sed 's/title //'`" #get title from -title
ttitle="`echo "${inp}" | tr "-" "\n" | grep -e "^T " | sed 's/T //'`" #get title from -T
exe="`echo "${inp}" | tr "-" "\n" | grep -e "^e " | sed 's/e //'`" #get command to execute from -e

## set hold-option from -hold
if [ ! -z "${hold}" ]
then 
sakhold="-h" 
else 
sakhold=""
fi

## set title-option from -title or -T
if [ ! -z "${title}" ]
then
	saktitle="-t '"${title}"'"
	elif [ ! -z "${ttitle}" ]
	then
		saktitle="-t '"${ttitle}"'"
else
saktitle=""
fi

## set execute-option from -e 
if [ ! -z "${exe}" ]
then
sakexe="-e ${exe}"
else
sakexe=""
fi

## build output and squeeze blanks in output
sakoutput="`echo "sakura "${sakhold}" "${saktitle}" "${sakexe}"" | tr -s " "`"

## output (later without echo)
echo "${sakoutput}"

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

Re: Rxvt/Xterm-Replacement with sakura

#2 Post by ttuuxxx »

aragon wrote:i want to replace rxvt and xterm with sakura. i have a script (see attached) that does convert the input and strips out every option that is not supported by sakura. it basically works (tested with rxvt) but i have the felling that some things could be done better/lighter/faster.

any recommendations are welcome.

thanks aragon]
Hi aragon, yes that is one of the draw backs of it. I found that out like 2yrs ago, when I made my first Sakura pet post on here, The petget pet manager stopped being fully functional because of it, it wouldn't install packages when I made it default.
I then contacted the Sakura developer and he mentioned that he would like to fix it, but just never did, Slacker!!
But really isn't it a vte issue? and if so you might be able to find a patch for it, I haven't looked in years.

Also have you tried Mrxvt if you place rxvt on a 1 to 10 scale and rxvt is a 1 and sakura is a 10, Mrxvt is about a 6.5. But its way,way,way,way,way smaller than sakura since its rxvt based and not vte
You can read about it at, and it doesn't need any patching to be fully compatible with puppy :) works straight out of the compiler's box :)
http://www.murga-linux.com/puppy/viewto ... 193#383193

ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#3 Post by aragon »

hi ttuuxxx,

yes i'm using mrxvt on my home-machine, i do like it very much.

generally i don't see any problem in the fact that sakura doesn't understand the whole Xterm/rxvt-optionset. i think -e/-hold/-title are the only 'really' necessary option, correct me if i'm wrong.
The petget pet manager stopped being fully functional because of it, it wouldn't install packages when I made it default.
i'm actually working in virtualbox for the scripts so this won't kill me, but thanks for the tip will test that soon.

aragon

Post Reply