LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2012, 09:53 PM   #1
dwaldn
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
How can i execute a python file from my ubuntu desktop or at logon


I wrote a small file with python to update a file in my home dir and would like to execute it when i log on. How can that be done?

Thanks
 
Old 01-10-2012, 01:29 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
Try by putting the command to execute your script in the file /etc/rc.local
 
Old 01-13-2012, 12:08 AM   #3
dwaldn
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks

Thanks alot for your help

I did screw up my .profile file in the home dir and can't log into my disktop' Is there any way I could log on or edit the file. My daughter has an account on the same computer. If I use it to log on to my account files are read only

I have used ubuntu for about a year and don't know much about it. It's all new and diffrent.

Thanks a million you all.

Last edited by dwaldn; 01-13-2012 at 12:16 AM. Reason: spelling
 
Old 01-13-2012, 11:41 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
sudo your commands to gain full access, eg:

Code:
sudo vim /home/user/.profile
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Logon Script execute??? dpoggi Linux - Server 2 09-16-2011 03:19 PM
How to execute file in different process on ubuntu? officially.rahul Linux - Newbie 3 10-29-2010 01:49 PM
Bash- :cannot execute binary file (Ubuntu VM on ESXI server) maas187 Linux - Virtualization and Cloud 17 04-03-2010 10:25 AM
Help? how to execute the /etc/profile without having the user exit then logon? icecoolcorey Programming 3 06-12-2008 10:48 AM
execute a script upon logon Starch Linux - Newbie 3 05-12-2005 05:04 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration