General :: Ubuntu Etc/profile: Environmental Variable Doesn't Display Content?
Jul 28, 2011
i am trying to declare an environmental variable in the /etc/profile' (as per the tutorial i'm following) but when i declare it and do an echo i get nothing.Here's what i've done so far..nside /etc/profile:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ -d /etc/profile.d ]; then
I'm trying to make an environmental variable RPMS that will resolve to a website. I know I have to make the changes in .bash_profile, but all the things I try don't seem to want to work.
I've tried: PATH=$RPMS:ftp://rha-server/pub/os/rhel5/Server/ or simply just making the variable itself $RPMS=ftp://rha-server/pub/os/rhel5/Server/
The second one made a variable just fine, but when I attempted to run this command:
I created some new accounts on a dev seat: Code: useradd -m newUser1.Users get created fine and can log in but are missing all the bash files (.bashrc, .bash_history, etc). When these users try to use the up and down arrows to view shell history they get junk characters. I checked and there is no history file in their homes. Where is the environmental variable set and how can I get this working?
I am Just trying to set the Environmental variable using a script file and my code is as follows:
#!/bin/bash echo $PATH PATH=${PATH}:/opt/bin export PATH echo Environmental Variable path is Set echo $PATH
When I am running the above script, from the last line "echo $PATH" I am getting that /opt/bin has been appended to the PATH but again when I am typing echo $PATH in the terminal I am not getting the newly appended path.
I'm trying to read content of file to variable and use this variable in for loop. The problem is, when I have c++ comment style in file - /*. Spaces in line are also interpreted as separated lines.
For example:
Code:
Changing $files to "$files" eliminate these problems but causes that whole content of variable is treated as one string (one execution of loop).
#the file temp contain a path to a directory int the first line a= `head -1 temp` bash: /home/ram/linuxTraining/scripting/testDir/test1Dir/test2Dir: is a directory
When i ssh to server using -X, i always confuse about which display number i should export. It seems to me sometimes the display number has been used by something, so what i can do is only
java version "1.6.0_15" Java(TM) SE Runtime Environment (build 1.6.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)
And when i am trying to run my gameserver scripts i get this error.
root:~# /home/l2jserver/login # ./L2JConfig.sh Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) at java.awt.Window.<init>(Window.java:431) at java.awt.Frame.<init>(Frame.java:403)
[code]....
This is not my desktop computer but my remote server.
I needed to install a new OS on a new HD but i also need the data on the old HD which has some problems (it doesn't boot anymore). The problem is that in the old one i had linux (Slackware) and so it doesn't allow me to view the content of the folder /home/myself. If there was something possible to do to recover all the data or if it will be forever lost.
I am currently using and working on Fedora 10 and have couple of monitors set up to itNow, I want to display different content on different monitors (not the same content on all monitors). It should keep displaying Pictures and/or videos with a certain intervals of time as soon as the fedora loads. How should make this happen.
This server is for dhcp and sharing purposes.I can actually access one nfs share via other ubuntu and osx clients on the network, then I configured another share with different mount point (different drive, different forlder, different contents).The problem is: when I connect form a client to the new one it displays the same exact content of the first share. It seems that is mounting the same share on a different mount point on the client and exporting the shares via the exportfs -ra command doesn't solve nothing.This is my fstab file
Code: proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda1 during installation
I am using find to search for .tgz files modified more than 7 days ago and delete them.find /directory/ -iname backup*.tgz -daystart -mtime +7 -exec rm -rf {} My problem is that find will go through the content of tarball as well and list all content. I want to only search main tarball and delete it if older than 7 days.
I am using the sudo command to log on locally as another user by the following command:
sudo -u theotheruser -s or sudo -u theotheruser sh
As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.
I recently got the problem that Thunderbird does not displays the messages anymore. The e-mails are downloaded form the server, a new email warning is given, but the e-mail cannot be displayed (in fact it is not loaded in the message window. I could only see the TB start page). I cannot even see the old messages.
However, when use "see message source" I can see the e-mails.
I also noticed this message in the error console:
server does not support RFC 5746, see CVE-2009-3555
I use Fedora 12 + thunderbird 3.0.6-1
On another linux box F9+ThB 2.0.0 I do not have that issue.
Today I upgraded to Fedora 13 + TB 3.1.1. This should be the latest one, but I still cannot see the message.
Also, on F13 I got another issue with Firefox 3.6.7. When I switch between the tabs, the tabs will turn black and will not get back to normal for 10-15 sec. It looks liek a random effect because often only part fo the page turns black. This issue appear in the windows of TB 3.1.1 since updated to F13.
My hardware is a Sony SR49 laptop with ATI mobility Radeon HD3470
Have Google chrome and this black page issue is not present. The same with Evolution mail, but I do not like it.
I have a fresh install OpenSuSE 11.4 installation. I have install Apache 2 ,I have change the content on the owner and group to chown wwwrun.nobody Directory /srv/www/htdocs. Now apache cannot display the content anymore there is no error in the error_log. If I change the content to my user the content is displayed. Why and how can I fix this the permission are the same as on the previous web server and I'm using index.php as the index page..
go about developing this add-on. i am testing this on my xbmc-live set-up; i am fairly affluent in bash/ c but unfortunately i dont have experience with python.i trimmed the data using this bash 1-liner so the output looks like:
If you have the value 100 in File1 and the value 5 in File2, how do you write a script to divide the 100 in File1 by the 5 in File2 in Linux Bash Shell?The operating system I am using is Ubuntu 10 and object is to write a script to accomplish this task.
I run opensuse 11.3/KDE:Factory. Recently, kmail updated to using akonadi. The following problem came up. My local emails are now managed by a "local folders" component of akonadi. The folder structure is displayed correctly in Kmail. However, no emails are shown for some folders. Emails still live in the .kde4/share/app/kmail directory hierarchy and can be imported into a new folder after moving them somewhere else. However, even after a fresh import sometimes emails are no longer recognized.
For example, if I'm in csh, I can use `setenv VARNAME varVALUE` while I can use export in Bash. Given that the environmental variables are created, can BASH read env vars from csh and vice versa?
I have Debian 8.4.0 with lightdm. I'm trying to load some command lines at session startup, putting these in ~/.profile but the file is not loaded. The same procedure works well if I switch lightdm to gdm3.
Anyway, there is some idea to load some script lines at the session startup? The file .bash_profile neither works. I don't want to use ~/.bashrc because it would load every time I open a terminal. Neither to use init.d because it would load for all users.
I have noticed whenever someone install Ubuntu 10.04 the grub menu doesnt get display. Is this a bug? Recently I did installed Ubuntu 10.04 with Windows as dual boot config and I did notice nothing like menu.1st instead it had grub.cfg. how to fix it?
I have updated my php from version 5.3.2 to version 5.3.3 on Centos OS. And after updating, when click to phpmyadmin-URL, it displays a blank page. I tried updating phpmyadmin to latest version, it still doesn't display phpmyadmin page. And when I clicked to [url], it downloaded automatically the file.
Powersaving on my desktop is way to agressive, it behaves like a notebook. The monitor switches off after just 4 minutes.Disabling PowerDevill makes no difference. Editing energy profile settings doesn't help either.Is there another way to force these settings?