You are not logged in.

#1 2008-03-13 12:34:04

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

"less" and "sux" are creating problems!!

Hai,
well in my other distro(debian) "less" command in terminal(gnome terminal) allows "scrolling" using mouse's middle wheel.
but,I am missing this option in archlinux's less.what can be a solution neutral

I need the scroll option somehow sad
although I can scroll through terminal(konsole) output easily.

another problem.
I am used to a xwrapper to "su" called "sux" which is available in AUR.
when I open a terminal and run sux -gave root password,I can login fine.
but all shell (environment) variables are pretty fcuked up.
while in a normal shell or as "su",I am getting below shell variables:

prakash ~  $  echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/:/opt/qt/bin:/opt/kde/bin

and:

prakash ~  $  su -
Password:
root ~ #  echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/

But,as "sux:

prakash ~  $  sux -
Password:
root ~ #  echo $PATH
/usr/ucb:/bin:/usr/bin:/etc

Before guessing that I have to edit and append the PATH's in ~/.bashrc or ~/.bash_profile or /etc/profile or /etc/profile_bash ,I have tried all these sad

still,my /etc/profile looks as below:

oot ~ #  cat /etc/profile
#
# /etc/profile
#
# This file is intended to be used for ALL common
# Bourne-compatible shells. Shell specifics should be
# handled in /etc/profile.$SHELL where $SHELL is the name
# of the binary being run (discounting symlinks)
#
# Sections taken from SuSe's /etc/profile
# Note the explicit use of 'test' to cover all bases
#  and potentially incompatible shells

#Determine our shell without using $SHELL, which may lie
shell="sh"
if test -f /proc/mounts; then
   case $(/bin/ls -l /proc/$$/exe) in
        *bash) shell=bash ;;
        *dash) shell=dash ;;
        *ash)  shell=ash ;;
        *ksh)  shell=ksh ;;
        *zsh)  shell=zsh ;;
    esac
fi

# Load shell specific profile settings
test -f "/etc/profile.$shell" &&  . "/etc/profile.$shell"

#Set our umask
umask 022

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

# Some readline stuff that is fairly common
HISTSIZE=1000
HISTCONTROL="erasedups"

INPUTRC="/etc/inputrc"
LESS="-R"
LC_COLLATE="C"

export HISTSIZE HISTCONTROL INPUTRC LESS LC_COLLATE

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
        test -x $profile && . $profile
    done
    unset profile
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/"

and /etc/profile.bash

root ~ #  cat /etc/profile.bash
#
# /etc/profile.bash
# Global settings for bash shells
#

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

export PS1 PS2 PS3 PS4

#In the future we may want to add more ulimit entries here,
# in the offchance that /etc/security/limits.conf is skipped
ulimit -Sc 0 #Don't create core files

if test "$TERM" = "xterm" -o \
        "$TERM" = "xterm-color" -o \
        "$TERM" = "xterm-256color" -o \
        "$TERM" = "rxvt" -o \
        "$TERM" = "rxvt-unicode" -o \
        "$TERM" = "xterm-xfree86"; then
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    export PROMPT_COMMAND
fi

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/"

My ~/.bash_profile:

root ~ #  cat .bash_profile
. $HOME/.bashrc

and ~/.bashrc:

root ~ #  cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

#fancy color prompt
PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\] '


# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi


#aliases
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

So some help?:):)

Offline

#2 2008-03-13 13:57:16

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

Is both these problems due to wrong environment variables?
also, :

root ~ #  cat /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on seperate lines

PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/"
LANG="en_US.utf8"
LANGUAGE="en_US.utf8"
PAGER=less

Where what went wrong sad:(:(

Offline

#3 2008-03-13 13:59:20

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

Is below output helps?Please go through below and point me what is wrong :?

root ~ #  printenv
SHELL=/bin/bash
TERM=xterm
USER=root
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/opt/qt/bin:/opt/mozilla/bin/
PWD=/root
SHLVL=1
HOME=/root
LOGNAME=root
DISPLAY=:0.0
_=/usr/bin/printenv

Offline

#4 2008-03-13 15:01:55

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: "less" and "sux" are creating problems!!

Hi,
I am maintaining sux on AUR since it has been dropped from community. I have browsed around in it a little and would like you to check if the situation improves when you install debianutils from AUR (it seems sux needs the 'tempfiles' command that's provided there).
If this does help, please accept my apologies for overlooking this earlier. I will then update the PKGBUILD accordingly.
Thanks,
Andreas

PS. Also, browsing around I got the impression that there are several implementations of sux around, and that sometimes even plain su does what you'd expect from sux. Can you verify that whatever it is you're trying does not already work with plain su?

Last edited by awagner (2008-03-13 15:25:15)

Offline

#5 2008-03-13 15:24:04

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

^hey!thanks!will just install it and reply thank you again smile

Offline

#6 2008-03-13 15:26:01

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: "less" and "sux" are creating problems!!

ooops. edited my posting above too late. pls look at the PS above, too. Thanks.

Offline

#7 2008-03-13 15:39:40

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

well,I cannot build the p04a package as I am getting a md5 sums error validating sad
also,some perl dependencies ...
when I tried as local user "makepkg -s" it is asking for "sudo" permissions.I dont want "sudo" things.I am a Debian user and always liked the simple way of login as "su -" in a console.Hope u can help me.
is there any alternate method to build packages from AUR?
Thank you.
smile


Regarding cannot scroll through "less" command ,is there any solution?actually in all other distros I have seen,less allows scrolling with mouse wheel!only in arch is this weird behaviour,I want scroll functionality,please someone can help me sad neutral

Last edited by praka123 (2008-03-13 15:41:06)

Offline

#8 2008-03-13 15:48:49

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: "less" and "sux" are creating problems!!

There is an option -p which has to be given to the command line for preserving environment variables.

Offline

#9 2008-03-13 16:28:53

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

^pls,can u walkthrough where we need to do that?reg less?

Offline

#10 2008-03-13 17:06:08

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: "less" and "sux" are creating problems!!

regarding sux:
please download debianutils and sux PKGBUILDS from AUR again. Then a simple makepkg with subsequent pacman -U <packagename> should work okay (first debianutils, then sux).
You should end up with "which tempfile" reporting /usr/bin/tempfile and either "sux -" or "sux -p -" should do what you want. If it doesn't please describe the error again.

regarding less:
Based on internet pages here and here, please report the version of your less/gnome-terminal/vte packages/programs. Do you run gpm daemon?

Offline

#11 2008-03-13 17:13:44

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

^thank you very much.
yes,I will try the build method.

regarding less:
yes,I have configured gpm successfully during install itself.
is that have anything to do here?

rakash ~  $  cat /etc/conf.d/gpm
#
# Parameters to be passed to gpm
#
#GPM_ARGS="-m /dev/misc/psaux"
GPM_ARGS="-m /dev/input/mice -t exps2  -p -r 25"

Offline

#12 2008-03-14 03:42:31

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

so,what can be done with "less".I really want the "Scroll" feature.
even vim,nano all support scrolling through file content via mouse wheel neutral
please shed some light smile

Offline

#13 2008-03-14 08:37:17

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: "less" and "sux" are creating problems!!

Regarding less I have no further idea. I have searched the web and encountered stuff about vte (alternate mode), but nothing seems to fit. I also tried several other terminal emulators, and every time it's te same: vim scrolls, less doesn't. I suppose it's neither gnome-terminal nor vte but something about less itself. I haven't found any commandline (nor even a configuration/compilation) option that seemed to apply. Sorry.

(PS. you could use vim as $PAGER hmm )

Last edited by awagner (2008-03-14 08:37:55)

Offline

#14 2008-03-14 14:50:59

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

sad sad sad someone?

Offline

#15 2008-03-14 15:04:19

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: "less" and "sux" are creating problems!!

About less: I think it *is* a gnome-terminal/vty thing, since my less does *not* mouse-wheel scroll in xterm and urxvt, but *does* mouse-wheel scroll in gnome-terminal.

Using: less-418-1, vte-0.16.12-1, gnome-terminal-2.18.4-1. I did not mess around with environment variables. Tested also with lesspipe-1.53-6 (but that should not affect anything, since it just passes textfiles to the usual /bin/less).

Offline

#16 2008-03-14 15:16:30

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: "less" and "sux" are creating problems!!

oh, I should've posted the versions I am using (where less doesn't scrolls anywhere):
less 418-1, vte 0.16.12-1, gnome-terminal 2.18.4-1

Seeing it's the same versions... probably more info is needed. But right now I can't look up configs/env vars. I'm on Arch64 and am not using any DE (dwm only). What about you, bender02, are you using gnome DE?

Offline

#17 2008-03-14 15:47:35

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: "less" and "sux" are creating problems!!

Also arch64, and just xmonad. But I have dbus, hal running, and spawning gnome-terminal runs also stuff like bonobo-activation-server, gconfd-2 and notification-daemon (gnome processes). Don't know if that matters.

EDIT: I use zsh, and have LESS=-R set (so that less can display colored output). It should not matter, but who knows?

Last edited by bender02 (2008-03-14 15:55:42)

Offline

#18 2008-03-15 01:52:37

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

LESS=-R is set as env variable in /etc/profile . neutral
So,can we conclude that,scrolling through "less" contents are available only in gnome-terminal ? neutral

may be I should put this in konsole wishlist sad a very useful feature,naturally expected neutral

Offline

#19 2008-03-15 09:00:22

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

filed in konsole wishlist:
https://bugs.kde.org/show_bug.cgi?id=159340

but,I got below details about "less" -less invoking buttons are :

Less has its own buttons for paging up and down: [b]w/B] and [b] z/B]. When reading a file with less, press the h key for more nifty help.

Offline

#20 2008-03-15 15:43:26

eerok
Member
From: Canada
Registered: 2005-03-20
Posts: 171

Re: "less" and "sux" are creating problems!!

praka123 wrote:

when I tried as local user "makepkg -s" it is asking for "sudo" permissions.I dont want "sudo" things.I am a Debian user and always liked the simple way of login as "su -" in a console.Hope u can help me.
is there any alternate method to build packages from AUR?

I don't understand why you can't do "su -" in Arch.  Anyway, if you don't like sudo, just do "makepkg" then do your su, then do "pacman -U" on the package you've made.  But sudo is easier -- yaourt with sudo is easiest.


noobus in perpetuus

Offline

#21 2008-03-15 18:09:02

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

^used to "su" only.DONT like "sudo" tongue
I am happy to find that "makepkg -c" helps !
Thank you!

Offline

#22 2008-03-18 16:42:13

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

well,konsole developers seems notified of this wishlist or...may be a bug!
http://bugs.kde.org/show_bug.cgi?id=159340

Offline

#23 2008-03-20 20:24:45

praka123
Member
From: Kerala,India
Registered: 2008-03-04
Posts: 188
Website

Re: "less" and "sux" are creating problems!!

latest status is,this bug(wishlist) is RESOLVED and FIXED :- big_smile
here is it:

Robert Knight  wrote:

SVN commit 786780 by knight:

If the terminal application is not interested in mouse events and the display's scroll bar is not movable then send Up/Down key press events to the terminal instead.

This makes it possible to scroll up and down in 'less' and other applications using the mouse wheel.  One key press is sent for every 5 degrees of mouse wheel rotation.  Typical mouse wheels operate in steps of 15 degrees which equals 3 lines scrolled per notch.  This default is the same as Vim's default mouse wheel scroll step.

As in gnome-terminal and others, this has side effects such as the mouse wheel scrolling through history results in the shell if the shell is run in a program such as screen.

BUG: 159340


M  +36 -1     TerminalDisplay.cpp 
M  +3 -0      TerminalDisplay.h 


WebSVN link: http://websvn.kde.org/?view=rev&revision=786780

and an interesting discussion was on :
http://www.linuxquestions.org/questions … it-627821/

Thank You all! smile

Last edited by praka123 (2008-03-20 20:25:12)

Offline

Board footer

Powered by FluxBB