Ubuntu mysterious proxy [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Can't find where my proxy settings are stored.
I'm on Ubuntu 12.04. Once upon a time I created a "manual" proxy through Network app GUI.
Turned it off same way but now I everytime I use shell I have to "empty" proxies with export http_proxy="" and so on.
It's there.
env | grep proxy
http_proxy=http://proxy1.bsu:3128/
https_proxy=https://proxy1.bsu:3128/
Proxy is up but where?
/etc/environment - not there
/etc/apt/apt.conf - not there
/etc/apt/apt.conf.d/ folder - not there
/etc/profile - not there
/etc/bash.bashrc - not there
~/.bashrc - not there
~/.profile - not there
~/.bash_profile - not there
~/.bash_login - not there
~/.pam_environment - not there
Ran gsettings set org.gnome.system.proxy mode 'none' with no effect.
Tried through gconf-editor \ dconf-editor still no luck. I tried to update system with apt-get update too. Logged out and in, restarted shell sessions, etc.
It's more like superuser q, but still.

Even bruteforce method of grep -rl proxy1.bsu / didn't find any files.
Had to override variables in ~/.bashrc
Probably my system's bug.

Related

View environment variables in gunicorn linux [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have a project that is deployed by a previous dev on a linux server. The environment variables are stored in /etc/systemd/system/gunicorn.service. The file doesn't seem to be present anywhere in the server but still the code runs fine. There are multiple steps to get this file set up but none to read it. I need the information to get it running on my local machine. Any cli commands to read the same?
The directory is in format:
app.py
requirements.txt
README.md
The app.py is the main function and the rest 2 also don't have anything to do woth gunicorn.
Did you try:
sudo cat /etc/systemd/system/gunicorn.service

python 2.7 not working when I use it with sudo [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am trying to install python2.7 on a VM which is centos 6.5. I followed a following guide to install it
http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/
However when I try to install run python as sudo i get the following error.
-bash: python2.7: command not found
running just python2.7 works. It even works when i run it as a root user. Also I noticed that:
which python2.7
returns
/usr/bin/which: no python2.7
when I do sudo -i and then run the command.
Any idea why it is like that?
If you're using CentOS 6.5, this is likely due to the fact that sudo does not set /usr/local/bin as part of the PATH.
CentOS 6.x's /etc/sudoers file sets the secure_path (which is used during sudo sessions) to a very restricted set of paths.
Use the visudo command and look at the contents of your /etc/sudoers file. You will likely find this section:
#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults env_keep += "HOME"
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
So sudo doesn't use the /usr/local/bin path.
You can solve your problem in a couple ways:
Add /usr/local/bin to the secure_path - This can open up security problems if you don't know what's gonna be in your /usr/local/bin directory. Though typically, this is probably not a huge concern because only root has write access to /usr/local/bin by default.
Disable secure_path entirely by commenting it out - again, you're overriding a feature designed to restrict access and improve security.
Try the following
sudo env PATH=$PATH python2.7
What this does is copy the current path you have into your new sudo's environment.

Execute my Shell and Bash scripts without starting my terminal in Ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm a user of Ubuntu 12.04 LTS and in a future a user of Ubuntu 14.04 LTS.
I have a problem, when I run Ubuntu my .bashrc script doesn't work unless I open the terminal.
This is a problem because, for example, the paths I write doesn't work unless I execute the programs from the terminal.
Are there an user config startup file for Ubuntu and not for the terminal?
P.D.:Maybe I don't explain very well, in other words, I'd like to execute mi scripts on Ubuntu startup without using the terminal.
Shell initialisation files (.profile, .bashrc, etc.) are intended for preparing the user's (interactive) environment.
For standalone scripts, it's better to make them independent from the environment, including
$HOME, $PATH, etc.
If you need to share code (functions, configuration) with other scripts, store that in a separate
shell library that you source from a known location, either through a fixed path or from a
path relative to the script's own location.
you can add the line below at the start of your script file
source ~/.bashrc
grep '/etc/bashrc' ~/.bashrc
if [ -f /etc/bashrc ]; then
. /etc/bashrc # --> Read /etc/bashrc, if present.
by default /etc/bashrc gets loaded when opening a console.
What are you trying to do - if you want to do something without it being executed as part of a console and more to do with system startup ? then you need to look into modifying existing service or adding a new service.
If this is related to when users ssh or connect it via console then its be bashrc file

Always hide cursor in Xfce 4.8 with Debian Wheezy [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to hide my cursor always. I have only SSH access to the machine.
Try with unclutter, is a small program that does just that.
http://ftp.x.org/contrib/utilities/unclutter-8.README
http://ftp.x.org/contrib/utilities/unclutter-8.tar.Z
It's present on the repositories of various distributions, for example on Arch Linux you can install it with:
pacman -S unclutter
Then you can start it by adding an entry for it on Settings » Session and Startup » Applications Autostart or (preferred method) by adding it to your .xinitrc file like this:
run unclutter
EDIT: obsolete now
My solution was to download: A transparent cursor theme and do:
./configure
cd cursors
make install-data-local DESTDIR=/home/user/.icons/default CURSOR_DIR=/cursors
chown -R user:user /home/user/.icons

How to update ubuntu 12.04 through squid proxy server at my university ?? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I wish to update the local package index with the latest changes made in repositories and am using following command :
sudo apt-get update
On executing this command I get several error messages such as one below :
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages 407 Proxy Authentication Required
What i did to in order to try resolving this issue is the following :
Open terminal and the file
/etc/bash.bashrsc
sudo gedit /etc/bash.bashrc
and add at the bottom of the file these 2 lines :
export http_proxy=http://user:password#host:port/
export ftp_proxy=http://user:pass#host:port/
However it is still not working for me and am getting the same error.
Thanks in advance.
For apt-get to work
sudo gedit /etc/apt/apt.conf
And then add
Acquire::http::Proxy "http://username:password#proxyhost:port/";
The syntax should be strictly followed
This may fail if our password or possibly username (i don't know) has '#' in it.
We can add proxy for other protocols like ftp etc. also there..

Resources