#1 Le 07/01/2014, à 13:30
- ridouchet
[RESOLU]console/terminal binder commande shell
Bonjour à tous,
depuis peu en essayant d'installer Tor browser a partir de cette source :
http://tutorialforlinux.com/2013/10/21/ … asy-guide/
j'ai du faire une mauvaise manipulation, du coup mon terminal a fusionné avec la commande shell de démarrage Tor browser. C'est a dire quand je démarre le terminal il essaie de me lancer automatiquement Tor browser ( d’ailleurs il n'y arrive pas ) . J'ai désactivé la fonction "quitter après avoir executé la commande/fonction" grâce a l'éditeur de configuration,du coup je suis en mesure de vous copier le message d'erreur inscrit dans le terminal :
bash: [: 64: unary operator expected
Launching Tor Browser Bundle for Linux in /home/belhani
bash: ./Browser/firefox: Aucun fichier ou dossier de ce type
Tor Browser exited abnormally. Exit code: 127
Comme un problème ne vient jamais seul , je n'ai non plus accès a l'affichage en mode console CTRL+ALT+ F1 ou F2 ou F3...Quand je me met dans ce mode je ne peux tout simplement pas me logger, c'est a dire Ubuntu me demande mon log in + password, et quand je me log il exécute des commande rapidement puis me redemande log in + password indéfiniment .
je vous sollicite donc pour éclairer ma lanterne, je suis perdu dans la savane lol.
Merci a tous bonne journée
Dernière modification par ridouchet (Le 07/01/2014, à 22:07)
asus z87 expert | i7 4770k | GTX 660 | 2x SSD 120go RAID0 sur distrib Ubuntu
Hors ligne
#2 Le 07/01/2014, à 13:42
- Postmortem
Re : [RESOLU]console/terminal binder commande shell
Salut,
Aurais-tu ajouter quelque chose dans un fichier .bashrc (ou .bash_profile ou .profile) qui se trouve dans ton répertoire personnel ?
Si c'est le cas, va supprimer ce que tu as rajouté et essaie d'ouvrir à nouveau un terminal.
Ce sont des fichiers cachés, pour les voir, il faut dire à ton navigateur de les afficher.
Edit : suis allé consulté le tuto, t'as du faire une erreur dans la partie 5.
Dernière modification par Postmortem (Le 07/01/2014, à 13:44)
Mot' a dit : « Un Hellfest sans Slayer, c'est comme une galette-saucisse sans saucisse ! »
Hors ligne
#3 Le 07/01/2014, à 13:56
- ridouchet
Re : [RESOLU]console/terminal binder commande shell
alors oui il me semble que j'avais rajouter une ligne ( tout a la fin du code):
export PATH=$PATH:/opt/tor-browser_fr
problème quand j'ouvre avec gedit .bashrc , j'vois dans le code a plusieurs reprise des phrases fessant allusion a Tor ou firefox et je penses pas que c'est normal je supprime seulement la ligne ? ou une partie du code ?
le contenu du fichier .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 or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# 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 programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
#!/bin/sh
#
# GNU/Linux does not really require something like RelativeLink.c
# However, we do want to have the same look and feel with similar features.
#
# To run in debug mode simply pass --debug
#
# Copyright 2011 The Tor Project. See LICENSE for licensing information.
complain_dialog_title="Tor Browser Bundle"
# First, make sure DISPLAY is set. If it isn't, we're hosed; scream
# at stderr and die.
if [ "x$DISPLAY" = "x" ]; then
echo "$complain_dialog_title must be run within the X Window System." >&2
echo "Exiting." >&2
exit 1
fi
# Do not (try to) connect to the session manager
unset SESSION_MANAGER
# Determine whether we are running in a terminal. If we are, we
# should send our error messages to stderr...
ARE_WE_RUNNING_IN_A_TERMINAL=0
if [ -t 1 -o -t 2 ]; then
ARE_WE_RUNNING_IN_A_TERMINAL=1
fi
# ...unless we're running in the same terminal as startx or xinit. In
# that case, the user is probably running us from a GUI file manager
# in an X session started by typing startx at the console.
#
# Hopefully, the local ps command supports BSD-style options. (The ps
# commands usually used on Linux and FreeBSD do; do any other OSes
# support running Linux binaries?)
ps T 2>/dev/null |grep startx 2>/dev/null |grep -v grep 2>&1 >/dev/null
not_running_in_same_terminal_as_startx="$?"
ps T 2>/dev/null |grep xinit 2>/dev/null |grep -v grep 2>&1 >/dev/null
not_running_in_same_terminal_as_xinit="$?"
# not_running_in_same_terminal_as_foo has the value 1 if we are *not*
# running in the same terminal as foo.
if [ "$not_running_in_same_terminal_as_startx" -eq 0 -o \
"$not_running_in_same_terminal_as_xinit" -eq 0 ]; then
ARE_WE_RUNNING_IN_A_TERMINAL=0
fi
# Complain about an error, by any means necessary.
# Usage: complain message
# message must not begin with a dash.
complain () {
# Trim leading newlines, to avoid breaking formatting in some dialogs.
complain_message="`echo "$1" | sed '/./,$!d'`"
# If we're being run in a terminal, complain there.
if [ "$ARE_WE_RUNNING_IN_A_TERMINAL" -ne 0 ]; then
echo "$complain_message" >&2
return
fi
# Otherwise, we're being run by a GUI program of some sort;
# try to pop up a message in the GUI in the nicest way
# possible.
#
# In mksh, non-existent commands return 127; I'll assume all
# other shells set the same exit code if they can't run a
# command. (xmessage returns 1 if the user clicks the WM
# close button, so we do need to look at the exact exit code,
# not just assume the command failed to display a message if
# it returns non-zero.)
# First, try zenity.
zenity --error \
--title="$complain_dialog_title" \
--text="$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try kdialog.
kdialog --title "$complain_dialog_title" \
--error "$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try xmessage.
xmessage -title "$complain_dialog_title" \
-center \
-buttons OK \
-default OK \
-xrm '*message.scrollVertical: Never' \
"$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try gxmessage. This one isn't installed by default on
# Debian with the default GNOME installation, so it seems to
# be the least likely program to have available, but it might
# be used by one of the 'lightweight' Gtk-based desktop
# environments.
gxmessage -title "$complain_dialog_title" \
-center \
-buttons GTK_STOCK_OK \
-default OK \
"$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
}
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
debug=0
usage_message="usage: $0 [--debug]"
if [ "$#" -eq 1 -a \( "x$1" = "x--debug" -o "x$1" = "x-debug" \) ]; then
debug=1
printf "\nDebug enabled.\n\n"
elif [ "$#" -eq 1 -a \( "x$1" = "x--help" -o "x$1" = "x-help" \) ]; then
echo "$usage_message"
exit 0
fi
# If the user hasn't requested 'debug mode', close whichever of stdout
# and stderr are not ttys, to keep Firefox and the stuff loaded by/for
# it (including the system's shared-library loader) from printing
# messages to $HOME/.xsession-errors . (Users wouldn't have seen
# messages there anyway.)
#
# If the user has requested 'debug mode', don't muck with the FDs.
if [ "$debug" -ne 1 ]; then
if [ '!' -t 1 ]; then
# stdout is not a tty
exec >/dev/null
fi
if [ '!' -t 2 ]; then
# stderr is not a tty
exec 2>/dev/null
fi
fi
# If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority
# before we change HOME below. (See xauth(1) and #1945.) XDM and KDM rely
# on applications using this default value.
if [ -z "$XAUTHORITY" ]; then
XAUTHORITY=~/.Xauthority
export XAUTHORITY
fi
# If this script is being run through a symlink, we need to know where
# in the filesystem the script itself is, not where the symlink is.
myname="$0"
if [ -L "$myname" ]; then
# XXX readlink is not POSIX, but is present in GNU coreutils
# and on FreeBSD. Unfortunately, the -f option (which follows
# a whole chain of symlinks until it reaches a non-symlink
# path name) is a GNUism, so we have to have a fallback for
# FreeBSD. Fortunately, FreeBSD has realpath instead;
# unfortunately, that's also non-POSIX and is not present in
# GNU coreutils.
#
# If this launcher were a C program, we could just use the
# realpath function, which *is* POSIX. Too bad POSIX didn't
# make that function accessible to shell scripts.
# If realpath is available, use it; it Does The Right Thing.
possibly_my_real_name="`realpath "$myname" 2>/dev/null`"
if [ "$?" -eq 0 ]; then
myname="$possibly_my_real_name"
else
# realpath is not available; hopefully readlink -f works.
myname="`readlink -f "$myname" 2>/dev/null`"
if [ "$?" -ne 0 ]; then
# Ugh.
complain "start-tor-browser cannot be run using a symlink on this operating system."
fi
fi
fi
# Try to be agnostic to where we're being started from, chdir to where
# the script is.
mydir="`dirname "$myname"`"
test -d "$mydir" && cd "$mydir"
# If ${PWD} results in a zero length HOME, we can try something else...
if [ ! "${PWD}" ]; then
# "hacking around some braindamage"
HOME="`pwd`"
export HOME
surveysays="This system has a messed up shell.\n"
else
HOME="${PWD}"
export HOME
fi
SYSARCHITECTURE=$(getconf LONG_BIT)
TORARCHITECTURE=$(expr "$(file Tor/tor)" : '.*ELF \([[:digit:]]*\)')
if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then
complain "Wrong architecture? 32-bit vs. 64-bit."
exit 1
fi
LD_LIBRARY_PATH="${HOME}/Tor/"
export LD_LIBRARY_PATH
# XXX: Debug mode for Firefox??
# not in debug mode, run proceed normally
printf "\nLaunching Tor Browser Bundle for Linux in ${HOME}\n"
cd "${HOME}"
# XXX Someday we should pass whatever command-line arguments we got
# (probably filenames or URLs) to Firefox.
./Browser/firefox -no-remote -profile Data/Browser/profile.default
exitcode="$?"
if [ "$exitcode" -ne 0 ]; then
complain "Tor Browser exited abnormally. Exit code: $exitcode"
exit "$exitcode"
else
printf '\nTor Browser exited cleanly.\n'
fi
export PATH=$PATH:/opt/tor-browser_fr
merci pour ta réponse qui fut rapide
Dernière modification par ridouchet (Le 07/01/2014, à 14:04)
asus z87 expert | i7 4770k | GTX 660 | 2x SSD 120go RAID0 sur distrib Ubuntu
Hors ligne
#4 Le 07/01/2014, à 15:34
- Postmortem
Re : [RESOLU]console/terminal binder commande shell
Pour moi, mais je peux me tromper, toute cette partie n'a rien à faire là :
#!/bin/sh
#
# GNU/Linux does not really require something like RelativeLink.c
# However, we do want to have the same look and feel with similar features.
#
# To run in debug mode simply pass --debug
#
# Copyright 2011 The Tor Project. See LICENSE for licensing information.
complain_dialog_title="Tor Browser Bundle"
# First, make sure DISPLAY is set. If it isn't, we're hosed; scream
# at stderr and die.
if [ "x$DISPLAY" = "x" ]; then
echo "$complain_dialog_title must be run within the X Window System." >&2
echo "Exiting." >&2
exit 1
fi
# Do not (try to) connect to the session manager
unset SESSION_MANAGER
# Determine whether we are running in a terminal. If we are, we
# should send our error messages to stderr...
ARE_WE_RUNNING_IN_A_TERMINAL=0
if [ -t 1 -o -t 2 ]; then
ARE_WE_RUNNING_IN_A_TERMINAL=1
fi
# ...unless we're running in the same terminal as startx or xinit. In
# that case, the user is probably running us from a GUI file manager
# in an X session started by typing startx at the console.
#
# Hopefully, the local ps command supports BSD-style options. (The ps
# commands usually used on Linux and FreeBSD do; do any other OSes
# support running Linux binaries?)
ps T 2>/dev/null |grep startx 2>/dev/null |grep -v grep 2>&1 >/dev/null
not_running_in_same_terminal_as_startx="$?"
ps T 2>/dev/null |grep xinit 2>/dev/null |grep -v grep 2>&1 >/dev/null
not_running_in_same_terminal_as_xinit="$?"
# not_running_in_same_terminal_as_foo has the value 1 if we are *not*
# running in the same terminal as foo.
if [ "$not_running_in_same_terminal_as_startx" -eq 0 -o \
"$not_running_in_same_terminal_as_xinit" -eq 0 ]; then
ARE_WE_RUNNING_IN_A_TERMINAL=0
fi
# Complain about an error, by any means necessary.
# Usage: complain message
# message must not begin with a dash.
complain () {
# Trim leading newlines, to avoid breaking formatting in some dialogs.
complain_message="`echo "$1" | sed '/./,$!d'`"
# If we're being run in a terminal, complain there.
if [ "$ARE_WE_RUNNING_IN_A_TERMINAL" -ne 0 ]; then
echo "$complain_message" >&2
return
fi
# Otherwise, we're being run by a GUI program of some sort;
# try to pop up a message in the GUI in the nicest way
# possible.
#
# In mksh, non-existent commands return 127; I'll assume all
# other shells set the same exit code if they can't run a
# command. (xmessage returns 1 if the user clicks the WM
# close button, so we do need to look at the exact exit code,
# not just assume the command failed to display a message if
# it returns non-zero.)
# First, try zenity.
zenity --error \
--title="$complain_dialog_title" \
--text="$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try kdialog.
kdialog --title "$complain_dialog_title" \
--error "$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try xmessage.
xmessage -title "$complain_dialog_title" \
-center \
-buttons OK \
-default OK \
-xrm '*message.scrollVertical: Never' \
"$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
# Try gxmessage. This one isn't installed by default on
# Debian with the default GNOME installation, so it seems to
# be the least likely program to have available, but it might
# be used by one of the 'lightweight' Gtk-based desktop
# environments.
gxmessage -title "$complain_dialog_title" \
-center \
-buttons GTK_STOCK_OK \
-default OK \
"$complain_message"
if [ "$?" -ne 127 ]; then
return
fi
}
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
debug=0
usage_message="usage: $0 [--debug]"
if [ "$#" -eq 1 -a \( "x$1" = "x--debug" -o "x$1" = "x-debug" \) ]; then
debug=1
printf "\nDebug enabled.\n\n"
elif [ "$#" -eq 1 -a \( "x$1" = "x--help" -o "x$1" = "x-help" \) ]; then
echo "$usage_message"
exit 0
fi
# If the user hasn't requested 'debug mode', close whichever of stdout
# and stderr are not ttys, to keep Firefox and the stuff loaded by/for
# it (including the system's shared-library loader) from printing
# messages to $HOME/.xsession-errors . (Users wouldn't have seen
# messages there anyway.)
#
# If the user has requested 'debug mode', don't muck with the FDs.
if [ "$debug" -ne 1 ]; then
if [ '!' -t 1 ]; then
# stdout is not a tty
exec >/dev/null
fi
if [ '!' -t 2 ]; then
# stderr is not a tty
exec 2>/dev/null
fi
fi
# If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority
# before we change HOME below. (See xauth(1) and #1945.) XDM and KDM rely
# on applications using this default value.
if [ -z "$XAUTHORITY" ]; then
XAUTHORITY=~/.Xauthority
export XAUTHORITY
fi
# If this script is being run through a symlink, we need to know where
# in the filesystem the script itself is, not where the symlink is.
myname="$0"
if [ -L "$myname" ]; then
# XXX readlink is not POSIX, but is present in GNU coreutils
# and on FreeBSD. Unfortunately, the -f option (which follows
# a whole chain of symlinks until it reaches a non-symlink
# path name) is a GNUism, so we have to have a fallback for
# FreeBSD. Fortunately, FreeBSD has realpath instead;
# unfortunately, that's also non-POSIX and is not present in
# GNU coreutils.
#
# If this launcher were a C program, we could just use the
# realpath function, which *is* POSIX. Too bad POSIX didn't
# make that function accessible to shell scripts.
# If realpath is available, use it; it Does The Right Thing.
possibly_my_real_name="`realpath "$myname" 2>/dev/null`"
if [ "$?" -eq 0 ]; then
myname="$possibly_my_real_name"
else
# realpath is not available; hopefully readlink -f works.
myname="`readlink -f "$myname" 2>/dev/null`"
if [ "$?" -ne 0 ]; then
# Ugh.
complain "start-tor-browser cannot be run using a symlink on this operating system."
fi
fi
fi
# Try to be agnostic to where we're being started from, chdir to where
# the script is.
mydir="`dirname "$myname"`"
test -d "$mydir" && cd "$mydir"
# If ${PWD} results in a zero length HOME, we can try something else...
if [ ! "${PWD}" ]; then
# "hacking around some braindamage"
HOME="`pwd`"
export HOME
surveysays="This system has a messed up shell.\n"
else
HOME="${PWD}"
export HOME
fi
SYSARCHITECTURE=$(getconf LONG_BIT)
TORARCHITECTURE=$(expr "$(file Tor/tor)" : '.*ELF \([[:digit:]]*\)')
if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then
complain "Wrong architecture? 32-bit vs. 64-bit."
exit 1
fi
LD_LIBRARY_PATH="${HOME}/Tor/"
export LD_LIBRARY_PATH
# XXX: Debug mode for Firefox??
# not in debug mode, run proceed normally
printf "\nLaunching Tor Browser Bundle for Linux in ${HOME}\n"
cd "${HOME}"
# XXX Someday we should pass whatever command-line arguments we got
# (probably filenames or URLs) to Firefox.
./Browser/firefox -no-remote -profile Data/Browser/profile.default
exitcode="$?"
if [ "$exitcode" -ne 0 ]; then
complain "Tor Browser exited abnormally. Exit code: $exitcode"
exit "$exitcode"
else
printf '\nTor Browser exited cleanly.\n'
fi
Il me semble que ça devrait être un script à part (le script qui lance Tor ?? j'ai pas regardé en détail ce que ça fait)
Par contre, il faut bien garder la ligne export PATH=$PATH:/opt/tor-browser_fr à la fin.
Mot' a dit : « Un Hellfest sans Slayer, c'est comme une galette-saucisse sans saucisse ! »
Hors ligne
#5 Le 07/01/2014, à 20:07
- ridouchet
Re : [RESOLU]console/terminal binder commande shell
Bonsoir,
je reviens du boulot du coup je viens tout juste de voir ton poste, Oui sa n'avait rien a faire ici je pense d'ailleurs j'ai viré toute cette partie et mon Terminal s'ouvre a nouveau ! Merci mec ! j'vais vérifier que tout marche bien mais j'penses que c'est goooood yeaaah .
au cas ou je penses que j'vais faire :
sudo aptitude purge gnome-terminal
puis :
sudo aptitude purge `dkpg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2 `
et enfin :
sudo aptitude install gnome-terminal
pour désinstaller puis réinstaller par sécurité le terminal, bonne idée ?
asus z87 expert | i7 4770k | GTX 660 | 2x SSD 120go RAID0 sur distrib Ubuntu
Hors ligne
#6 Le 07/01/2014, à 21:24
- Postmortem
Re : [RESOLU]console/terminal binder commande shell
Je ne pense pas que ça serve s'il fonctionne correctement maintenant.
Mot' a dit : « Un Hellfest sans Slayer, c'est comme une galette-saucisse sans saucisse ! »
Hors ligne