Tag Info

New answers tagged

0

A Linux scripts Shell are not 100% Compatible with Windows CMD Script , you need make adaptations Look this Files 1 -> Bash Script 2 -> Batch Script But if you wanna , you can make a Windows CMD Script , and test with "wine cmd" , its works 100% in wine , in Windows works too The Env Vars , are not the same , and some things must be write in diferent ...


2

It looks like a hybrid between Unix shell script and DOS batch script :) In DOS the environment variables are access by enclosing the environment variable between %. Like %PATH%, but in Linux this cannot be done. Just try $ echo %PATH% %PATH% this will not expand the environment variable. But is the script really working ?, because in the later part of ...


0

If you are installing netbeans as root, your problem may be due to X not allowing root access to the session (this was the case when I initially attempted to install). The following web page gives a number of different ways to give the root user access to the current X session and also briefly discusses the security issues: ...


0

Another good option might be to place the export in the file and source it: export XAUTHLOCALHOSTNAME="localhost" export DISPLAY=":0" export XAUTHORITY="/tmp/some-XAuthority" and then: . "$1"


0

how do I set the LD_LIBRARY_PATH env variable? You already set it when you did this: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64 But that will not solve your problem. $LD_LIBRARY_PATH is consulted at time of execution, to provide a list of additional directories in which to search for dynamically linkable libraries. It is not consulted at link ...


0

You can set it in your ~/.profile and/or specific init file of your shell (e.g. ~/.bashrc for bash, ~/.zshenv for zsh). Then you need to restart your shell (and possibly log out and log in again, depending on your choice). You can check your settings with: env | grep '^LD_LIBRARY_PATH'


1

You most likely haven't started the cygwin/X server, or maybe not even installed it, you should do that first, so that there is an actual X Display to connect to. cygwin normally only handles commandline programs and the idle development invorment for Python is X based Alternatively you can use the Windows idle environment for development and run the ...


3

That would not make sense because the started service is not a child of the process which caused the start. systemctl connects to the running systemd and makes it start the processes. So even if the environment was preserved (maybe it even is...) then it would be systemd's environment that gets inherited. And that does not contain the entries you want.


0

If your ~/.bashrc doesn't set PROMPT_COMMAND, you can start xfce4-terminal as: PROMPT_COMMAND='PS1="> "; unset PROMPT_COMMAND' xfce4-terminal


0

Do change your .bashrc, and test the name of the parent process. parent_process=$(ps -o comm= -p $PPID) parent_process=${parent_process##*/} case "$parent_process" in xfce4-terminal) PS1='> ';; esac Another method would be to set an environment variable: run PROMPT_THEME=plain xfce4-terminal and test the value of PROMPT_THEME in your .bashrc. You may ...


0

One way to do this would be to start with the current BASH PID (you get it with $$) and then get the PPID, and so on, until you find what terminal is the ancestor of the bash shell. Based on that information then you set the PS. Usually the parent of the shell will be the terminal Proof of concept in my system (Debian 7). $ PARENT_PID=$(ps --pid=$$ -o ...


0

Check which terminal is being opened: case "$TERM" in gnome-terminal ) PS1="[\h] \W > \[\033]0;[\u@\h] \w\007\]" ;; xfce4-terminal ) PS1="> " ;; esac


0

SUGGESTION, inspired on the idea of an anonymous pipe, and the need to use the output of a function as the input to an array, I found a co-process can help. MyFunction() { echo "One line" ; echo "Second line" ; echo "Third line" } set -A array MyFunction 'SomeInputToFunction' < /dev/null |& while read -p -r line; do print "READING from ...



Top 50 recent answers are included