Ubuntu :: Bashrc Take Effect Immediately In Root Shell?

Mar 9, 2011

How do you get your bashrc take effect immediately in your root shell? I read this.

[URL]

Code:
. ~/.bashrc

Does this not work in your root shell?

View 1 Replies


ADVERTISEMENT

Ubuntu :: Do Env Vars Set In .bashrc Not Effect The Gnome Desktop

Feb 15, 2011

I've installed python2.7 and I want all those convenient python libs I've installed from the repos to work with python2.7, but the libs in the repos get installed to python2.6.

No problem, I'll just set the $PYTHONPATH env var so that python2.7 will look at the python2.6 libs. I defined $PYTHONPATH as I wanted in the .bashrc file, and now python2.7 works as I desire when starting it from the shell.

The problem is when I start python2.7 from the gnome desktop (by clicking an application shortcut or button) it doesn't work. My guess is that the env vars set in .bashrc do not effect the gnome desktop, and so my question is what can I do to set an env var on the desktop?

To demonstrate my problem. If I open a bash shell and type "idle-python2.7 -n" idle will open, and I can "import twisted" without any problem in the idle python shell. However, if I do alt-f2 and run "idle-python2.7 -n" idle will still open but sys.path is not set as I would like and I cannot "import twisted". So there is clearly different behavior between an application started from the shell vs one started from the gnome desktop.

Environmental variables have long confused me, I'm also open to other solutions to my "getting python2.6 libs to run in python2.7" problem.

FULL INSTRUCTION: Both .bashrc and .gnomerc are located in your home directory. Put the following at the end of both files:

You should now be able to import the python libs installed from the repos in python2.7.

View 2 Replies View Related

Fedora :: Xinput Settings Don't Take Effect Immediately?

Aug 4, 2011

I'm writing a udev rule to disable the trackpad when a mouse is plugged in, and I'm having a bit of trouble re-enabling the trackpad when the mouse is disconnected.Here's the script that the udev rule calls (with the appropriate argument of course).

Code:
#!/bin/bash
. /home/holden/.bash_env/backup

[code].....

View 2 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related

Ubuntu :: Shell Command Output Not Showing Immediately?

Jan 18, 2011

This is an extremely weird issue that I can't find any help with on Google. It is minor but extremely annoying.

When I type in a linux command in the terminal, (e.g. "ls -la"), and then press enter, the cursor goes to the next line and just sits there, as if its processing some long command.

If I press enter again, I see the ls output as well as my prompt twice. It's like the terminal window isn't auto-scrolling, but I've also seen this happen when there wasnt even enough text in the console screen to warrant a scrollbar. Has anyone seen this before and know what I need to do? I hope what I'm asking about makes sense.

View 3 Replies View Related

Ubuntu :: Appearance Effect Change Automatically From Extra Effect To No Effect?

May 7, 2010

I have upgraded to 10.4 and and after try to install mac look in ubuntu.My screen start flickering, I found it this due to in system => preference => appearance => effect become no effect automatically (as each and every time I select extra effect)After some time.for changing this setting i need to turn off the computer and restart then after i can do it i.e. change effect to extra effect. Its done after following installation

[URL]

View 4 Replies View Related

Fedora :: Create A Shell Script File With Two Functions - Bash Scripting & /etc/bashrc

Oct 6, 2010

how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:

[Code]....

Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.

View 1 Replies View Related

General :: Automate Sourcing .bashrc When Su - To Root

Oct 16, 2010

I need to source the my /home/me/.bashrc file every time I "su -" to root. Is there any way to automate this? I cannot edit any thing in the root's environment as it is shared by people.

View 7 Replies View Related

General :: Erasing Default Root Bashrc In Fedora 13

Mar 6, 2011

I erasing default text in fedora 13 root bashrc and when I want to swich user ( with su command ) to root , icant,and i see bash-4.1????

View 1 Replies View Related

General :: Change Root Password To Effect A Manual Fsck ?

Sep 27, 2009

I have pc/os linux 2009 installed and I recently got the following message while trying to boot up my system:

*checking root file system...fsck 1.41.4 (27-Jan-2009) dev/sda1 contains a file system with errors, check forced. /dev/sda1:Inodes that were part of a corrupted orphan linked list found. /dev/sda1:Unexpected inconsistency;run fsck manually. (i.e., without -a or -p options) fsck died with exit status 4

*An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode.

*The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. after performing system maintenance press Control-D to terminate the maintenance shell and restart the system.

Give root password for maintenance:

The problem is, when I enter my password I get an incorrect password prompt. How can I change my password so that a manual fsck can start? Why did this message error message appear in the first place?

View 5 Replies View Related

Ubuntu :: Make A Shell Script Run With Root AND Non-root Priveledges?

Jul 28, 2010

I have a bit of a dilemma.

I'm using XFCE and it doesn't by default lock the screen before hibernating. I see this as a bit of a security risk, and as I can't hibernate while the screen is locked, I'm a bit lost as to how to achieve this.

I've begun editing /etc/acpi/hibernate.sh, here's what I have so far code...

If I run with sudo, the system hibernates, but gnome-screensaver will not fire. I can verify this by trying "sudo gnome-screensaver-command --lock". The screen goes black, but is not locked. The screen locks properly without sudo.

So the only solution I can see is to edit /etc/acpi/hibernate.sh in such a way that gnome-screensaver-command runs under the current user, and pm-hibernate is called as root.

Also, when I click the HIBERNATE button in XFCE, how does it call pm-hibernate under root without prompting me for a password? I normally wouldn't be interested in such things, but as it seems relevant to my problem I'm a little more eager to learn

View 3 Replies View Related

Fedora :: Add Path In .bashrc By Commenting Out Old Path And Adding New One - Command Source ~/bashrc

Jun 14, 2011

When I add some path in .bashrc by commenting out old path and adding new one like this:

#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY

After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.

View 10 Replies View Related

Fedora :: Can't Login Into The Root Account: It Returns Me Immediately To The Login Prompt?

Jan 27, 2010

I just installed Fedora 12 on a laptop. I changed the default shell on the root account to /bin/tcsh and changed the runlevel to 3 and then rebooted. Now I can't login into the root account: it returns me immediately to the login prompt and I can't see any error message (the screen is cleared).Why is this happening?Can I boot into some sort of safe mode so I can undo my changes to the /etc/inittab and /etc/passwd file?I tried booting with a Live CD with the intention of mounting the filesystem and making the changes, but the new filesystem is a LVM and it won't let me mount it (or I don't know how to mount a Logical Volume).

View 3 Replies View Related

Fedora :: Enable Wooby Effect - Compiz Desktop Effect - In 15

Jun 23, 2011

How to enable wooby effect (compiz desktop effect like ubuntu) in fedora 15.

View 1 Replies View Related

OpenSUSE Multimedia :: ATI 5650 But No Desktop Effect No 3D Effect?

Oct 16, 2010

i got driver and when i install driver and reboot computer I got just terminal and when I type startx I get error FLGRX and sam log file or something like that.

instruction i found here but some comands didn't worked openSUSE Lizards

View 9 Replies View Related

Slackware :: The Computer Booted Up, But Displayed A Message That Said Something To The Effect Of, "Error Occurred During Root File System Check?

Mar 3, 2010

Started slackpkg upgrade-up and went to bed. Woke up to find the power had gone out during the night. The computer booted up, but displayed a message that said something to the effect of, "Error occurred during root file system check. You will be given the option of doing maintenance......"I can get to a command prompt, but regardless of what I do a message pops saying it can't find libblkid.so.1

View 14 Replies View Related

Ubuntu :: Waiting For Root Device - Dropping To Shell

Nov 29, 2010

I was upgrading online through my android phone's easytether app. My phone rang, and I was bounced offline. When I came back the upgrade did not resume, and when I tried to start over, dpkg and whatever was busy so I closed all my windows and tried to reboot. This is where I ended up: Here is a screenshot:

View 3 Replies View Related

Ubuntu :: Unresponsive Keyboard At Root Shell Prompt?

Jan 28, 2011

I have no user name or password and cannot log in. In recovery mode, I after I enter "drop to root shell prompt" my keyboard does not respond when I try to "give root password for maintenance" or try to enter "Control-D" at the blinking cursor.

View 3 Replies View Related

General :: How To Login As Root In Shell

Jul 20, 2010

How to login as root in linux shell?

View 3 Replies View Related

Ubuntu :: Setting Root Password For Maintenance Shell - Failed

Aug 10, 2010

I'd like to keep root pw==sudo pw==user pw on a box with Code: $ lsb_release -ds Ubuntu 9.10 $ uname -rv 2.6.31-22-generic #61-Ubuntu SMP Wed Jul 28 02:02:56 UTC 2010 Just now it hung going to sleep, so I shutdown via BRS. On cold boot, HD mount failed and I got the prompt to hit Esc to goto maintenance shell. I did that, got the prompt for the root password, and entered my sudo.

That failed! though it has worked before ... but I changed my user password on that box recently, and I'm pretty sure I haven't needed to fsck between then and now. I'm wondering: What do I need to do to set my root pw? I was able to C-d out of the shell, and karmic took care of itself, but I'd prefer not to rely on that. Is there a way to make my root pw always equal my user pw? If so, is that a Very Bad Idea?

View 2 Replies View Related

Ubuntu Installation :: Root Disk Does Not Exist - Dropping To Shell

Oct 13, 2010

Just tried installing Ubuntu 10.10 from a USB device on my Windows 7 machine but something goes wrong. Far into the installation the computer restarts, asks me which operating system I want to start (it had already done this once before) and I choose Ubuntu. Then I get three alternatives:

Ubuntu, Linux 2.6.35-22-generic
Ubuntu, Linux 2.6.35-22-generic (recovery mode)
Windows 7 (loader) (on /dev/sdb1)

I pick the top choice, and get the following message:
ALERT! /host/ubuntu/disks/root.disk does not exist. Dropping to a shell.

If I start recovery-mode i get the same message. There's some text above the message that reads "new low speed USB device using ohci_hcd and address"... Could there be a problem with the usb-drive? If I remove the USB drive I get the message: Gave up waiting for root device.

View 2 Replies View Related

General :: Running My Shell Scripts As Root ?

Aug 18, 2010

I have been playing around with shell scripting, nothing too complex just learning the basics. if i try to run a script as root (by entering "sudo" then the "command") it says command not found. i can only do it ass root if i specify the full path (/home/username/bin/command) im pretty sure the directory that my scripts are in are part of the superusers path.

View 14 Replies View Related

Ubuntu :: Deleted User Main Folder - How To Restore Using Root Shell

Apr 14, 2011

I have system that was cloned from another system hence the user was same in both computer. I changed the computer name - to TANU. Then I added another user - BANU. I gave admin rights to second user. Logged out the first user DON- who is now only the desktop user. Before deleting the account through users and groups - I deleted the folder DON from home folder. I restarted the comp. unable to login. I had created automatic login for both users. How to restore the folder DON while using root shell.

View 2 Replies View Related

Ubuntu :: E233 - Cannot Open Display - When Starting Gvim On Root Shell

Aug 30, 2009

However, "E233: cannot open display" error appears when starting gvim on ubuntu 8.04root shell.

E233: cannot open display Press ENTER or type command to continue # kdesudo gvim /etc/fstab kdesudo: cannot connect to X server.

View 5 Replies View Related

General :: Switching To Root Account In A Bash Shell?

Jul 15, 2011

Today I faced a very strange issue while switching to root account in a bash shell.My OS : CentOS-5.1.4

I logged in my system with account name user1 and I open the terminal and below shell opens

[user1@localhost ]$

Now when I type su and want to switch to root account , it fails

[user1@localhost ~]$ su
Password:
su: incorrect password
[user1@localhost ~]$ exit

I know the password is 123 & I m 100% sure .

View 8 Replies View Related

Ubuntu Installation :: Boot Fails: Can't Find Root Device + Drop To Shell

Dec 27, 2010

From one day to the other my system stopped booting properly. Since I (finally) fixed it, I wanted to share my solution. It runs on a fakeraid pair of SSD's of 60 GB each (actually a single Revodrive device, but it shows up as two devices). When Ubuntu 10.10 boots, I'm dropped to a shell.During boot, when I removed "silent splash" from the kernel's command line, I got these messages:

Code:

[ 4.960240] scsi 6:0:0:0: Direct-Access ATA OCZ-REVODRIVE 1.20 PQ: 0 ANSI: 5
[ 4.960425] sd 6:0:0:0: [sdg] 117231408 512-byte logical blocks: (60.0 GB/55.8 GiB)

[cod]....

I doubt that this is what was needed (as I had that already when it didn't work, but I might be required in addition to installing dmraid)

# update-initramfs -a

After installing this, the problem was solved!! This is strange since I don't recall uninstalling this package or changing anything important, for that matter (perhaps did apt-get upgrade, but that's about it!). [URL]

View 2 Replies View Related

General :: Running Shell Program On Startup As Root In Terminal

Aug 4, 2010

I am running Linux Mint 9..I play xbox live and run it through my laptops wireless network connection so i dont have to pay 100 dollars for the usb wireless adapter for the xbox. In windows 7 this is easy to configure so that when i turn my laptop on and then xbox it automatically connects.

View 10 Replies View Related

General :: Sudo For Www User To Run Root Shell Script Via Browser?

Sep 7, 2010

I need sudo for www (apache) user to run a shell script('ip.sh' contains iptables rules) from cgi-bin directory via browser using a per script. I edit sudoers( www ALL=(ALL) NOPASSWD: ALL ),but when run the bellow command that's with err:

# sudo -u www sh /srv/www/cgi-bin/ip.sh

iptables v1.4.4: can't initialize iptables table `filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded. And:

# ls -al ip.sh
-rwxr-xr-x 1 root root 243 Sep 7 14:18 ip.sh

I edit sudoers so

'www ALL=(ALL) NOPASSWD: /srv/www/cgi-bin/ip.sh,/usr/sbin/iptables' too. but it doesn't work too. how can I execute this script via browser ?

View 14 Replies View Related

Software :: Execute Shell Commands That Require Root Password From PHP?

Jun 26, 2010

php. I am developing a web-interface for an application that sometimes needs root privs. Editting /etc/sudoers is not an option since the web interface needs to be portable to other users when they install my application. Is there any workaround ?PHP Code:

php code:$command = "./script.sh /dev/$DISKNAME &";$shellOutput = shell_exec($command); 
Code:

[code]...

View 2 Replies View Related

Debian Multimedia :: Skype Starting Every Time When Open Interactive Root Shell

Jan 20, 2015

I recently "upgraded" to the latest skype and now every time I open an interactive root shell, up pops skype. I can close skype then control-C in the terminal window to get the shell I want, but this is annoying to say the least. Maybe my google-foo is off, but all I can find is articles on how to run skype as root, which is no use. I've tried searching the startup files for "skype" (case independant), but so far all I can find is "LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ /usr/bin/skype" in the root .bashrc which shouldn't be starting the app.

what could be causing this?

(Running Wheezy)

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved