SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-05-11 20:48:01

neal
Member
Registered: 2012-10-21
Posts: 17

For next release: Config files should use alternatives

Hello,

One thing that drove me nuts is that there is a link to change default applications in the menu, but it
isn't actually used in the default config. For example, if I change my default x-terminal-emulator to stterm,
all the shortcut keys and menu items still launch terminator.

For example, instead of this snippet in rc.xml:

     <keybind key="W-h">
       <action name="Execute">
         <startupnotify>
           <enabled>true</enabled>
           <name>htop</name>
         </startupnotify>
         <command>terminator --command=&quot;htop&quot;</command>
       </action>
     </keybind>

we pointed it at

       <keybind key="C-A-Delete">
           <action name="Execute">
               <startupnotify>
                   <enabled>true</enabled>
                   <name>htop</name>
               </startupnotify>
               <command>x-terminal-emulator -e htop</command>
           </action>
       </keybind>

This should be changed in rc.xml, menu.xml, and defaults.list. The apps I got working were terminal and editor, maybe there should be alternatives for file manager and media player too.

-neal

Offline

Help fund CrunchBang, donate to the project!

#2 2013-05-12 08:34:22

Jeeves
New Member
Registered: 2013-05-10
Posts: 3

Re: For next release: Config files should use alternatives

Seconded!

To be honest, I don't mind it so much in my own configuration files because I can easily change them. But there are also hardcoded calls to geany, terminator and nano (and undoubtedly others) in a whole lot of scripts in /usr/bin. That is really, really bad. The freedom of choice is my number 1 reason to use Linux, and now I'm having these applications forced upon me, and no way of getting around them.

Bad crunchbang. Bad, bad crunchbang.

Offline

#3 2013-05-12 09:10:14

fatmac
#! Die Hard
Registered: 2012-11-14
Posts: 1,948

Re: For next release: Config files should use alternatives

Offline

#4 2013-05-12 10:07:43

Jeeves
New Member
Registered: 2013-05-10
Posts: 3

Re: For next release: Config files should use alternatives

Offline

#5 2013-05-12 10:56:18

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 840

Re: For next release: Config files should use alternatives

alias comp_edit='text_editor_of_your_choice /usr/bin/cb-compositor'

Offline

#6 2013-05-12 11:51:56

VastOne
#! Ranger
From: V-Ger
Registered: 2011-04-26
Posts: 10,165
Website

Re: For next release: Config files should use alternatives

We all 'hack the contents' of whatever we are using.  Debian out of the box is ugly as sin (IMO) and requires as much work as any other distro to get it flowing the way we want it

It's about a solid base to work from, not subjective perfection that is going to suit every persons needs...

Having said that, I am sure corenominal will look at neal's suggestions and if they work for his plans/goals/objectives, he will use them

@VDP76, excellent suggestion and example of the power of aliases... well done

Offline

#7 2013-05-12 11:57:55

uname
#! Junkie
Registered: 2013-03-15
Posts: 484

Re: For next release: Config files should use alternatives

Terminator uses too much RAM. I think there is no problem to change in the openbox menus from terminator to the alterrnatives-system. Same for editors. I use vim or graphic based vims like vim-gtk.

Last edited by uname (2013-05-12 11:58:28)

Offline

#8 2013-05-12 17:52:21

neal
Member
Registered: 2012-10-21
Posts: 17

Re: For next release: Config files should use alternatives

Offline

#9 2013-05-12 22:48:49

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives

The freedom in linux and openbox might require the ability to change a few entrys in the openbox-menu, or create a fully custom one. If a user isn`t able to edit menu.xml or not interested in learning to do so, then it`s the users own faulth that he/she doesn`t experience the freedom in linux.


- apt-mark hold account

Offline

#10 2013-05-12 23:38:11

rkwurth
#! Junkie
Registered: 2012-09-04
Posts: 365

Re: For next release: Config files should use alternatives

I'd be happy to see Crunchbang's rc.xml make more use of the update-alternatives system, not necesssarily because it's more or less correct, but as a matter of consistency in relation to the Default Applications dialog. I personally do think it's more correct, but am too a guest in the Crunchbang house.

Offline

#11 2013-05-13 00:11:27

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives

Last edited by ew (2013-05-13 00:12:08)


- apt-mark hold account

Offline

#12 2013-05-13 00:24:37

rkwurth
#! Junkie
Registered: 2012-09-04
Posts: 365

Re: For next release: Config files should use alternatives

Offline

#13 2013-05-13 01:42:24

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives

<item label="Edit Default Applications">
	<action name="Execute">
			<command>
					terminator --command="sudo update-alternatives --all"
			</command>
	</action>
</item>

Last edited by ew (2013-05-13 01:48:22)


- apt-mark hold account

Offline

#14 2013-05-13 01:48:23

rkwurth
#! Junkie
Registered: 2012-09-04
Posts: 365

Re: For next release: Config files should use alternatives

I agree! Whether you should use exo-open or x-terminal-emulator is raises another issue- multiple environmental variables for the same thing...

Offline

#15 2013-05-13 01:54:33

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives


- apt-mark hold account

Offline

#16 2013-05-13 02:07:11

neal
Member
Registered: 2012-10-21
Posts: 17

Re: For next release: Config files should use alternatives

Offline

#17 2013-05-13 07:24:39

uname
#! Junkie
Registered: 2013-03-15
Posts: 484

Re: For next release: Config files should use alternatives

Why use the lightweight distribution the big terminal-emulator "terminator" and not "xterm" with perhaps a nice ~/.Xdefaults or ~/.Xresources. You can save perhaps 10 MB of RAM. Test it.

Offline

#18 2013-05-13 07:56:25

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: For next release: Config files should use alternatives

Offline

#19 2013-05-13 10:41:44

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives


- apt-mark hold account

Offline

#20 2013-05-13 10:47:41

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives


- apt-mark hold account

Offline

#21 2013-05-13 12:54:56

ancwd
New Member
Registered: 2013-05-12
Posts: 3

Re: For next release: Config files should use alternatives

I use xterm personally but I'm not sure how well xterm supports japanese, chinese, arabic, farsi  and such languages. so maybe that would hinder it being set as the default out of the box term emulator.

not to mention xterm by itself is one ugly terminal, i personally have 2 scripts in my ~/bin folder that run xterm for me in truetype and fixed, i've added 2 entries to my menu.xml pointing to each one of them

for anyone interested the scripts are

~/bin/xterm-truetype.sh

#!/bin/bash
font="DejaVu Sans Mono"
font_size=12
 
exec xterm -bg black -fg white \
    -fa "$font" \
    -fd "$font" \
    -fs $font_size \
    -j -s \
    -sb -si -sk \
    -sl 1024 -rightbar \
    +sf +dc -cr green  \
    -u8 \
    $@ & 
exit

~/bin/xterm-fixed.sh

#!/bin/sh

exec xterm -bg black -fg white \
    -j -s \
    -sb -si -sk -sl 1024 -rightbar \
    +sf +dc -cr green  \
    -u8 \
    -xrm "xterm*font:-misc-*-*-*-*-*-20-*-*-*-*-*-iso10646-*"  \
    -xrm "xterm*wideFont:-misc-*-*-*-*-*-20-*-*-*-*-*-iso10646-*"  \
    $@ & 
exit

I didn't write these scripts, i found them on the net somewhere a long time ago

as for tmux, there seems to be a new one called byobu. i'm personally a screen user but for that too i had to heavily modified screenrc to run along with it

Offline

#22 2013-05-13 15:21:00

neal
Member
Registered: 2012-10-21
Posts: 17

Re: For next release: Config files should use alternatives

Offline

#23 2013-05-13 15:31:16

ew
#! Die Hard
Registered: 2012-09-27
Posts: 1,975

Re: For next release: Config files should use alternatives


- apt-mark hold account

Offline

#24 2013-05-13 15:38:06

ancwd
New Member
Registered: 2013-05-12
Posts: 3

Re: For next release: Config files should use alternatives

I converted the scripts i posted earlier into .Xresources format.
Hope this is helpful to someone

just append the following to your ~/.Xresources file and run
$ xrdb ~/.Xresources
or
$ xrdb -merge ~/.Xresources
or just restart you computer

For fixed font, uncomment the font and wideFont rescources and comment the faceSize, faceName and faceNameDoublesize resources
Lines starting by ! are comment lines and will be ignored

! Xterm ---------------------------------------------------------------
!XTerm*font:-misc-*-*-*-*-*-20-*-*-*-*-*-iso10646-*
!XTerm*wideFont:-misc-*-*-*-*-*-20-*-*-*-*-*-iso10646-*
XTerm*faceSize:12
XTerm*faceName:DejaVu Sans Mono
XTerm*faceNameDoublesize:DejaVu Sans Mono
!XTerm*faceName:Terminus
!XTerm*faceNameDoublesize:Terminus
XTerm*VT100.geometry:80x24
XTerm*background:black
XTerm*cursorColor:green
XTerm*dynamicColors:true
XTerm*eightBitInput:true
XTerm*foreground:white
XTerm*jumpScroll:true
XTerm*keyboardType:default
XTerm*multiScroll:true
XTerm*rightScrollBar:true
XTerm*saveLines:1024
XTerm*scrollBar:true
XTerm*scrollKey:true
XTerm*scrollTtyOutput:false
XTerm*toolBar:false
XTerm*utf8:2

Offline

Help fund CrunchBang, donate to the project!

#25 2013-08-27 20:20:38

neal
Member
Registered: 2012-10-21
Posts: 17

Re: For next release: Config files should use alternatives

Just wanted to pop in and mention that my patch for terminator has been merged on launchpad and available through the nightly ppa. I'm not sure how long it will take for it to propogate to the debian repos, but hopefully we can get this fixed for Janice.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo