The officially official Devuan Forum!

You are not logged in.

#1 2018-06-02 09:48:04

oui
Member
Registered: 2017-09-02
Posts: 55  

Redefine alternatives in /etc/alternatives

I only want to use uxrt as my prefered x-terminal-emulator. what is to do?

Offline

#2 2018-06-02 12:40:24

fsmithred
Administrator
Registered: 2016-11-25
Posts: 736  

Re: Redefine alternatives in /etc/alternatives

update-alternatives --config x-terminal-emulator

Offline

#3 2018-06-02 21:16:34

oui
Member
Registered: 2017-09-02
Posts: 55  

Re: Redefine alternatives in /etc/alternatives

Hi, And thank you very much for the fast answer. I did find in the subdir alternatives a file x-terminal-emulator and simply open it through clex entering in the commando line of clex

sudo nano F2 (F2 complete with the file name, i DID suppose! The complete file name...)

I did change in nano in to line and terminate the change with CTRL X.

surprise, surprise, nano did save back...
...under an other name (without ending "1.gz")

so is the situation now and it is my problem: was this way wrong although permitted by the system?

I have now a text file without some ending.

will update-alternatives --config make all right itself?

Offline

#4 2018-06-02 23:46:44

fsmithred
Administrator
Registered: 2016-11-25
Posts: 736  

Re: Redefine alternatives in /etc/alternatives

/etc/alternatives/x-terminal-emulator is not a file. It is a symbolic link to a file. The command I gave you allows you to choose which terminal to be the default. It does that by changing the target of the symbolic link.

I don't understand what you did. It sounds like you edited a file, but I don't know what file it was or what you did to it. If it saved under another name, then I suppose the original has not been changed.

You do not need to edit a file to change alternatives.

Run the command I gave you and select your favorite terminal. That one will become the default terminal.

Offline

#5 2018-06-03 14:09:16

oui
Member
Registered: 2017-09-02
Posts: 55  

Re: Redefine alternatives in /etc/alternatives

oh! ok! I am a lover of the little directory and tree manager "clex" (try it please! it's very good and fast). the last line in clex ist the "bash" line. you can enter a bash command (or sudo plus a bash command) and hit on F2. F2 makes that the name of the file where the cursor is in the directory tree branch is completed in the bash line without to have to write yourself all the long name of the file. you confirm with return. and bash executes! very simply

I did do it in /etc/alternatives on the line with the long name "x-terminal-emulator" and bash did open nano on the linked file hidden by the link! nano did open a shell script and I did change in the shell script! very simply ...

... but it does not work.

ok! now, I did use your methode "update-alternatives --config x-terminal-emulator"

a terminal dialog appears and offer me to select one of 6 possible choices or keep the current choice entering a *

but doesn't not offer under the 6 possible choices the extra terminal emulator rxvt-unicode (is installed! and it appears under Debian menu under Applications > Terminal Emulators but only simple choice Rxvt, and hitting on this selection, rxvt version unicode really appears! Debian menu is part of the 2 files in /etc/jwm !).

conclusion: that way also does not work!

Offline

#6 2018-06-03 15:32:41

fsmithred
Administrator
Registered: 2016-11-25
Posts: 736  

Re: Redefine alternatives in /etc/alternatives

There's a way to add an alternative to a link group. I have not memorized the command, and I don't have time right now to figure it out. Look at 'man update-alternatives' or wait until tomorrow when I can answer, or maybe someone else know it and will answer.

Offline

#7 2018-06-03 20:33:22

fsmithred
Administrator
Registered: 2016-11-25
Posts: 736  

Re: Redefine alternatives in /etc/alternatives

rxvt is a dummy package. With both rxvt and rxvt-unicode installed, this is what I see. (in jessie and ascii)
rxvt runs rxvt-xterm, and rxvt-unicode runs urxvt.

ls -l /usr/bin/*rxvt*
lrwxrwxrwx 1 root root      22 Jun  3 16:10 /usr/bin/rxvt -> /etc/alternatives/rxvt
lrwxrwxrwx 1 root root       5 Aug 15  2014 /usr/bin/rxvt-unicode -> urxvt
-rwxr-sr-x 1 root utmp  196232 Jul 30  2014 /usr/bin/rxvt-xpm
-rwxr-sr-x 1 root utmp  138680 Jul 30  2014 /usr/bin/rxvt-xterm
-rwxr-sr-x 1 root utmp 1312280 Aug 15  2014 /usr/bin/urxvt
-rwxr-xr-x 1 root root   72688 Aug 15  2014 /usr/bin/urxvtc
-rwxr-xr-x 1 root root      86 Aug 15  2014 /usr/bin/urxvtcd
-rwxr-sr-x 1 root utmp 1320536 Aug 15  2014 /usr/bin/urxvtd

ls -l /etc/alternatives/*rxvt*
lrwxrwxrwx 1 root root 19 Jun  3 16:10 /etc/alternatives/rxvt -> /usr/bin/rxvt-xterm
lrwxrwxrwx 1 root root 35 Jun  3 16:10 /etc/alternatives/rxvt.1.gz -> /usr/share/man/man1/rxvt-xterm.1.gz

With only rxvt-unicode installed, I see the following:
Both rxvt and rxvt-unicode will run urxvt.

ls -l /usr/bin/*rxvt*
lrwxrwxrwx 1 root root      22 Jun  3 16:10 /usr/bin/rxvt -> /etc/alternatives/rxvt
lrwxrwxrwx 1 root root       5 Aug 15  2014 /usr/bin/rxvt-unicode -> urxvt
-rwxr-sr-x 1 root utmp 1312280 Aug 15  2014 /usr/bin/urxvt
-rwxr-xr-x 1 root root   72688 Aug 15  2014 /usr/bin/urxvtc
-rwxr-xr-x 1 root root      86 Aug 15  2014 /usr/bin/urxvtcd
-rwxr-sr-x 1 root utmp 1320536 Aug 15  2014 /usr/bin/urxvtd

ls -l /etc/alternatives/*rxvt*
lrwxrwxrwx 1 root root 14 Jun  3 16:23 /etc/alternatives/rxvt -> /usr/bin/urxvt
lrwxrwxrwx 1 root root 30 Jun  3 16:23 /etc/alternatives/rxvt.1.gz -> /usr/share/man/man1/urxvt.1.gz

I think you want to choose rxvt-xterm for your alternative. If that's not a choice, installing rxvt should provide it.

Offline

Board footer