Symlink and target running different apps

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Symlink and target running different apps

Post by JASpup »

xterm in /usr/bin is a symbolic link to urxvt in the same directory.

Code: Select all

lrwxrwxrwx 1 root root 5 Mar 21  2017 xterm -> urxvt

When I run xterm, it runs rxvt.

When I run its target, it runs urxvt.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
April
Posts: 493
Joined: Tue Dec 29, 2020 9:06 pm
Has thanked: 57 times
Been thanked: 28 times

Re: Symlink and target running different apps

Post by April »

Yes its been pointed out before . There is a mixup in the scripts somewhere but its a bit of a nightmare to find and fix and then no-one fixes the distro so its a waste of time too.

The Australian State Governments have all enacted laws to steal your assets on your death. All legal paperwork is binned and all assets seized on one disgruntled child's complaint.Move them well before you die or go into a home.

User avatar
MochiMoppel
Posts: 1232
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Re: Symlink and target running different apps

Post by MochiMoppel »

JASpup wrote: Wed Dec 22, 2021 11:04 am

xterm in /usr/bin is a symbolic link to urxvt in the same directory.

Code: Select all

lrwxrwxrwx 1 root root 5 Mar 21  2017 xterm -> urxvt

When I run xterm, it runs rxvt.

??? The window title should read "xterm", does it? When you run the symlink it should run urxvt in rxvt mode. You can try yourself: Make a symlink to urxvt and name it whatever you like. urxvt will then run in rxvt mode. Rename the symlink to urxvt and the symlink will run urxvt with all its options. In my case rxvt and urxvt can easily be distinguished by their different font.

When I run its target, it runs urxvt.

Of course.

April wrote: Thu Dec 23, 2021 2:10 am

There is a mixup in the scripts somewhere but its a bit of a nightmare to find and fix and then no-one fixes the distro so its a waste of time too.

No mixup. Depending on distro xterm is a script or a symlink, but eventually all roads lead to urxvt (aka rxvt-unicode).

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: Symlink and target running different apps

Post by JASpup »

@MochiMoppel you are right. Symlink runs rxvt. The window title reads the name of the working directory.

Why does the symlink name have to be urxvt?

Can we make a xterm script always run urxvt instead of rxvt?

Goal: run-in-terminal urxvt scripts

Example (I run this everyday): xterm -hold -e 'ls -l /etc/hosts' &

urxvt runs and closes instantly. The command that works is xterm.

I want xterm to always run urxvt. It is easier to see (rxvt is small black text on white). It is working right now (xterm runs urxvt), but I do not know how I did it.

I change the font too.

I also use lxterminal and xfce4-terminal, but only know xterm for run-in-terminal.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
MochiMoppel
Posts: 1232
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 437 times

Re: Symlink and target running different apps

Post by MochiMoppel »

JASpup wrote: Thu Dec 23, 2021 3:36 am

Can we make a xterm script always run urxvt instead of rxvt?

This script exists - since almost 10 years. It's called xterm and can be found in older Puppies..

Code: Select all

#!/bin/sh
#rxvt does not understand the '-hold' option.
#urxvt 20120214

if [ "`echo -n ${*} | grep '\-hold '`" != "" ];then
 EXECCOMMAND="`echo -n ${*} | grep -o ' \-e .*' | sed -e 's/ \-e //'`"
 if [ "$EXECCOMMAND" != "" ];then
  echo '#!/bin/sh' > /tmp/xterm_simulate_hold.sh
  echo "$EXECCOMMAND"  >> /tmp/xterm_simulate_hold.sh
  echo 'echo' >> /tmp/xterm_simulate_hold.sh
  echo 'echo -n "FINISHED. PRESS ENTER KEY TO CLOSE THIS WINDOW: "' >> /tmp/xterm_simulate_hold.sh
  echo 'read simuldone' >> /tmp/xterm_simulate_hold.sh
  chmod +x /tmp/xterm_simulate_hold.sh
  exec urxvt -e /tmp/xterm_simulate_hold.sh
 fi
fi
exec urxvt "${@}"
williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Symlink and target running different apps

Post by williams2 »

# xterm -hold -e 'ls -l /etc/hosts' &

This works in BionicPup64:

urxvt -hold -e ls -l /etc/hosts &

ls -l /etc/hosts should not be in quotes, AFAIK.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: Symlink and target running different apps

Post by JASpup »

@williams2 naturally I am in 32 Bionic to test again elsewhere.

I copied the quotes probably from StackExchange. Not sure why they would need to be there or not.

xterm and urxvt both work here, but urxvt looks like rxvt and there's no config tool present in this distro.

That's how I can truly tell the difference. If I can change the font, colors, and move the scroll bar over to the right, I know I'm running urxvt.

There is an output difference: xterm includes FINISHED. PRESS ENTER KEY TO CLOSE THIS WINDOW: while urxvt does not.

Peebea defaulted lxterminal in Bionic, more like an alt-DE terminal.

There isn't even a u/rxvt launcher except to run process viewers or text editors.

I was running urxvt in terminal as written to Moppel, probably in Slacko6 and not default. This is just motivated by output and quality and legibility.

Before I knew rxvt existed, I didn't want to use urxvt because I didn't know it could be configured. At the time I was installing xfce4-terminal for normal cut-and-paste and in-window configuration without too much overhead. In JWM configured urxvt can be good enough.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Symlink and target running different apps

Post by williams2 »

there's no config tool present in this distro.

BionicPup64 has urxvtcontrol

People that complain about blurry text often prefer to turn antialiasing off.

urxvtctrl.jpg
urxvtctrl.jpg (73.53 KiB) Viewed 283 times
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: Symlink and target running different apps

Post by JASpup »

williams2 wrote: Sat Dec 25, 2021 4:27 am

there's no config tool present in this distro.

BionicPup64 has urxvtcontrol

People that complain about blurry text often prefer to turn antialiasing off.

I am still struggling with features (currently partition mounting and window clarity), but I basically use Tahr to Xenial-era JWM & XFCE 32/64.

I will boot Fossa 64 if I need to test something new. I like Bionic's Numix theme, but Fossa has a lower glitch factor on my pc. Memory serves Fossa is how I found findnrun. Every modern Upup that does not have an alt-DE terminal (like Bionic 32) seems to have urxvt terminal control. It is one of the apps I use most.

I will test antialiasing with low expectations. It's not just urxvt but the entire 32 Bionic X desktop. Like the other current thread, I consider 32/64 versions apples:oranges. They are enough different to be treated as such.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

Post Reply

Return to “Users”