Author Topic: .profile issues  (Read 778 times)

0 Members and 1 Guest are viewing this topic.

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
.profile issues
« on: November 04, 2012, 01:48:43 am »
Okay, so I wrote a python script and added it to run in .profile in my /home/user_name dir. My searching shows that .profile will run after my OS login. BTW Ubuntu 10.04 Lucid 32Bit.


I have Ubuntu to automatically log into my account (still have to unlock the key-ring when desktop loads though). Before I did the .profile edit things booted smoothly. Now it gets past GRUB and everything, but then it will hang on a black screen for almost 10 minutes before the Desktop loads.


My program does have time.sleep() for about 15min right off the bat, and I'm thinking that may be effecting it?
>>>import this
-----------------------------

Offline Xires

  • Noob Eater
  • Administrator
  • Knight
  • *
  • Posts: 379
  • Cookies: 149
    • View Profile
    • Feed The Trolls - Xires
Re: .profile issues
« Reply #1 on: November 04, 2012, 03:05:04 am »
It is entirely possible.  You may have better luck placing it in ~/.bash_profile rather than ~/.profile.  Some things, usually scripts, may run /bin/sh which could, on some configurations, source ~/.profile.  The .bashrc file should be sourced for non-login shells and .bash_profile is only supposed to be sourced for login shells.  On the other hand, you probably shouldn't be calling your python script quite that way.  Fork it off if you have to.
-Xires