Jump to content

Need Help Getting Progrram to AutoStart (FC 6)

SlayerOfHellWyrm

So, long story short, I have an assignment to get a program running on start for all users in cli, or gui. I  have it working via cli, but I cannot get the file to start when in GUI automatically.

 

I need it to start in GUI automatically as well, but cannot get it to.

 

I tried adding it to the autostart section under gnome-session-properties, but it doesn't seem to work, and when I added the lines in /etc/profile I added, to /etc/bashrc so it at least autostarts in a bash window opened in GUI, it causes the VM to halt on boot at udev.

 

File: /usr/bin/phmenu/phmenu

 

Supporting files:

 

in the same /usr/bin/phmenu directory:

phlist1

phoneadd

phonefind

sort_phones

corp_phones

.myfuncs

 

 and a temp directory (/usr/bin/phmenu/tmp)

 

Let me know if you need to know the code of the files, and I can paste it in, but it can also be found in the ends of Chapters 6 and 7 of: Guide to UNIX Using Linux, FOURTH EDITION (ISBN-13: 978-1-4188-3723-5).

 

Basically what I've done so far, is:

 

  • Added some lines to /etc/profile to get the file to run at startup for init 3 which works for all users
    • PATH=$PATH:.:/usr/bin/phmenu
    • CLEAR=`clear`
    • export CLEAR
    • . /usr/bin/phmenu/.myfuncs
    • phmenu
  • Added the same lines to /etc/bashrc for GUI (startx window bash terminal)
    • Worked, but caused VM to stop loading after udev for all subsequent loads
  • Selected phmenu file via gnome-session-properties for autostart
  • Tried adding it to /etc/xdg/autostart
    • Don't know how it works, as it appears everything already in there is a directory and not a file

 

Any help would be appreciated!

NOTE: I'm a severe noob with Linux, this is part of an assignment for my second course on it, and my knowledge is limited to what's been taught in the textbook mentioned above.

 

"Any sufficiently advanced technology is indistinguishable from magic" - Arthur C. Clarke
Just because it may seem like magic, I'm not a wizard, just a nerd. I am fallible. 


Use the quote button or @<username> to reply to people | Mark solved troubleshooting topics as such, selecting the correct answer, and follow them to get replies!

Community Standards | Guides & Tutorials Troubleshooting Section

Link to comment
Share on other sites

Link to post
Share on other sites

bump

"Any sufficiently advanced technology is indistinguishable from magic" - Arthur C. Clarke
Just because it may seem like magic, I'm not a wizard, just a nerd. I am fallible. 


Use the quote button or @<username> to reply to people | Mark solved troubleshooting topics as such, selecting the correct answer, and follow them to get replies!

Community Standards | Guides & Tutorials Troubleshooting Section

Link to comment
Share on other sites

Link to post
Share on other sites

Have you tried using xinitrc?

The global one should be located in

/etc/X11/xinit/xinitrc
or something like that (that's where mine is, I'm using Arch).

Then each user has their own in

~/.xinitrc.
The user ones, when present, will override the global one.

Depending on what sort of program it is, launching it as a deamon might also be

a possibility.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

So, it turns out editing /etc/profile, or /etc/bashrc to add in a line phmenu at the end, to call the script, 'causes the GUI to load to a black screen for everyone, and thus didn't work. I need to figure out how to get phmenu to run automatically now, every time a bash shell is opened, either in init 3, or 5.

"Any sufficiently advanced technology is indistinguishable from magic" - Arthur C. Clarke
Just because it may seem like magic, I'm not a wizard, just a nerd. I am fallible. 


Use the quote button or @<username> to reply to people | Mark solved troubleshooting topics as such, selecting the correct answer, and follow them to get replies!

Community Standards | Guides & Tutorials Troubleshooting Section

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×