Comments (9)
agkozak, I have seen something like this before with gnome/gdm. I didn't think it was polyglot issue so I solved it using this in my .bashrc:
if tty -s
then
. /path/to/polyglot.sh
fi
That seemed to be all that was needed.
I believe the issue is that the DE loads profiles like .bashrc on login - so the if tty -s
just checks if you are loading .bashrc from a terminal/console (which the DE would not be) and then loads polyglot.sh. Something similar could be added at the beginning of the code to check if it's a console and exit if not...
from polyglot.
@edklem, thanks for providing @schwabfk with a quick fix.
@schwabfk, what's in your .bash_profile
, .profile
, and .bash_login
files? Is there any possibility that one of them is sourcing .bashrc
?
from polyglot.
@edklem and @schwabfk - I want to thank both of you for reporting this bug. It was a case of typing exit
when I meant return
! Sorry for any inconvenience.
from polyglot.
I haven't seen that problem before! Please start out by posting your .bashrc
. Thanks.
from polyglot.
agkozak, I have seen something like this before with gnome/gdm. I didn't think it was polyglot issue so I solved it using this in my .bashrc:
if tty -s then . /path/to/polyglot.sh fi
That seemed to be all that was needed. I believe the issue is that the DE loads profiles like .bashrc on login - so the
if tty -s
just checks if you are loading .bashrc from a terminal/console (which the DE would not be) and then loads polyglot.sh. Something similar could be added at the beginning of the code to check if it's a console and exit if not...
That's it!
I just added the lines as you suggested them, and now there is no problem anymore, thanks a lot.
@agkozak Perhaps you can add it as a "troubleshoot" to the readme.md?
from polyglot.
@edklem, thanks for providing @schwabfk with a quick fix.
@schwabfk, what's in your
.bash_profile
,.profile
, and.bash_login
files? Is there any possibility that one of them is sourcing.bashrc
?
Sure, but as it is a complete new installation, they are pretty empty, but here you go:
[only .profile and .bashrc, as .bash_profile and .bash_login do not exist in opensuse (as far as I know)]
.profile:
# Sample .profile for SUSE Linux
# rewritten by Christian Steinruecken <[email protected]>
#
# This file is read each time a login shell is started.
# All other interactive shells will only read .bashrc; this is particularly
# important for language settings, see below.
test -z "$PROFILEREAD" && . /etc/profile || true
# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)
#export EDITOR=/usr/bin/vim
#export EDITOR=/usr/bin/mcedit
# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server
# Some people don't like fortune. If you uncomment the following lines,
# you will have a fortune each time you log in ;-)
#if [ -x /usr/bin/fortune ] ; then
# echo
# /usr/bin/fortune
# echo
#fi
.bashrc
# Sample .bashrc for SUSE Linux
# Copyright (c) SUSE Software Solutions Germany GmbH
# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
# settings made here will also take effect in a login shell.
#
# NOTE: It is recommended to make language settings in ~/.profile rather than
# here, since multilingual X sessions would not work properly if LANG is over-
# ridden in every subshell.
test -s ~/.alias && . ~/.alias || true
# polyglot bash colours
if tty -s
then
. /home/schwabfk/bash-polyglot/polyglot
fi
from polyglot.
. home/schwabfk/bash-polyglot/polyglot
Should it be . home/schwabfk/bash-polyglot/polyglot.sh
, or perhaps you renamed the script?
from polyglot.
. home/schwabfk/bash-polyglot/polyglot
Should it be
. home/schwabfk/bash-polyglot/polyglot.sh
, or perhaps you renamed the script?
It's just renamed ;)
from polyglot.
It's just renamed ;)
Got it, thanks. OK, I'll have time to think about this a little later, and perhaps you can help me to troubleshoot more.
from polyglot.
Related Issues (12)
- [bug] Prompt takes long time on very large git repos HOT 17
- feature (python venv) HOT 10
- In zsh when I switch to command mode the status does not reset if I hit enter or ctrl-c while still in command mode. HOT 3
- Escape codes not interpreted properly in /bin/ksh on macOS Big Sur HOT 16
- Relicensing as MIT HOT 1
- Colors for pdksh removed HOT 16
- Theme and font? HOT 3
- mksh $HOME not shortened to "~" HOT 6
- Whats the difference between $ and % in the prompt? HOT 3
- dash login shell invocation issue HOT 3
- Simpler version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyglot.