Changing Rox's default terminal

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Changing Rox's default terminal

#1 Post by mikeslr »

Hi all,

Edit: After reading 01micko's post, next following, which I had to interpret, I think the method should be as indicated in the 3rd post of this thread. So just scan the balance of this post to understand the problem.

Problem:
It seems that by default rxvt is the default terminal Rox expects to use. Perhaps it's a woof thing or something you automatically would have if Rox is somewhere selected during the build process. But rxvt isn't necessarily the default terminal, as Devs change change it. In Slacko 5.6, 01micko changed it to urxvt. 01micko knows a hell of a lot more than I do, so I'm sure he had his reasons. But you'll notice that part of the change he made involved deleting the rxvt executable which would have been found at /usr/bin and substituting a symlink named "rxvt" which called /usr/bin/urxvt.

I, however, prefer a terminal which makes it easy to "cut and paste" and as I installed vicmz's Openbox Plus pet with lxpanel, decided to install lxterminal which has "cut and paste" under its edit menu. I think I got lxterminal from the Saluki repo Smokie maintains. To run it, you also have to install the vte-0.26.2-i686.pet also found there.

Easy so far, until I tried to figure out how to change things so that lxterminal would open when I right-clicked within a folder and selected "window>terminal here".

There's no "defaultterminal" file in /usr/local/bin to be edited. Nor did simply deleting the "rxvt" symlink in /usr/bin and creating a new "rxvt" symlink pointing to lxterminal change anything. Not sure why not. pfind "rxvt" and pfind "urxvt", and manually examining those and possible "config" files didn't reveal why urxvt would still appear when "terminal here" was chosen. Perhaps someone who actually understands what makes Puppy tick can find a better way. But, if you're desperate to have the terminal emulator of your choice, the following worked.
Backup your SaveFile before trying this. Following the advice of someone who admittedly doesn't know how everything fits together --or politicians and economists who never studied ecology and social psychology-- is not without the risk of fostering a disaster.

In the following order:
1. Open two rox windows to /usr/bin.
2. In the first window, click the lxterminal icon/executable. That will open an lxterminal at /usr/bin.
3. In the second rox window, scroll to the urxvt icon/executable, right-click it, and "rename" it "urxvt1". --With luck you may be able to later rename it back to "urxvt" if things go wanky.
4. Switch to the opened lxterminal and type the following:

ln -s lxterminal urxvt

which will create a symlink named "urxvt" pointing to lxterminal.

Calls to the former default terminal --urxvt-- will be re-directed to lxterminal, which will now open when "window>terminal here" is selected.

Of course, if your favorite terminal emulator is sakura or rox-term, substitute it for lxterminal when following the above instructions.

mikesLr
Last edited by mikeslr on Sun 09 Feb 2014, 16:06, edited 1 time in total.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#2 Post by 01micko »

No mikeslr :)

Move /usr/bin/xterm (it's a script)

Symlink whatever replacement you have to /usr/bin/xterm.

That's it.
Puppy Linux Blog - contact me for access

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

My interpretation of 01micko's post

#3 Post by mikeslr »

Hi 01micko,

I said someone who knows what they're doing might have a better method. But I couldn't follow the logic of your instructions exactly.

Moving the script "xterm" out of /usr/bin has two effects: (1) "open terminal here" no longer functions; and (2) its absence enables creating a symlink named "xterm" in /usr/bin. I couldn't think of any reason why "move" shouldn't be interpreted as "remove". But see below.

I also interpreted your instuction "Symlink whatever replacement you have to /usr/bin/xterm" to mean "create a symlink of the replacement giving the symlink the name xterm".

So, ["open terminal here" no longer working] I clicked the lxterminal executable [conveniently located in /usr/bin] which opened an lxterminal at /usr/bin and typed in the following CODE:

ln -s lxterminal xterm

That created a symlink named xterm in /usr/bin.

Now "open terminal here" opens lxterminal "here", where ever here might be.

The disadvantage of removing/deleting the xterm script is that if you later want to change your default terminal to one which needs the first part of the script --emulating as I recall some instruction not otherwise available-- it's become difficult to find and replace the script. Perhaps just renaming, rather than moving or deleting, the script would be sufficient. In fact, if I recall correctly, the last line of the xterm script was --in Slacko 5.6-- to call urxvt, which may be why "open terminal here" opened urxvt. If so, changing that line to execute lxterminal might also accomplish my objective of having lxterminal as the default. But, of course, having deleted the script I face the difficulty mentioned above of testing that idea. So, I leave it to you, the reader, to explore that hypothesis.

mikesLr

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

Rox should really try getenv("TERM") first and then fallback to hard coded terminals
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply