LinuxQuestions.org
Help answer threads with 0 replies.
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 07-19-2012, 03:54 AM   #1
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Rep: Reputation: 1
how to run exec file at startup using rc.local


I want to execute a qt exe program at startup. That is after automatic login instead of loading Desktop and seeing it, the program quickly pop up to the screen. For this, I think we should add the script to rcx.local rather than rc.local I guess though.. I tried adding a script to /etc/rc.local and giving it permission, but non works out.

I would thank if you explain the procedure in detail.
 
Old 07-19-2012, 04:22 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
"rcx.local"? From where you get this information - I never heard about this file. Anyway to autostart program you can login on this automatic login account and there use standard way to do this. For example in KDE you add program to execute after login in "System settings" / "System administration" and there is something like "Starting and stopping". And for autostarting programs on every account after someone login you can use "/etc/X11/Xsession.d" directory.

Last edited by eSelix; 07-19-2012 at 04:24 AM.
 
Old 07-19-2012, 05:07 AM   #3
sharadchhetri
Member
 
Registered: Aug 2008
Location: INDIA
Distribution: Redhat,Debian,Suse,Windows
Posts: 179

Rep: Reputation: 23
Quote:
Originally Posted by eSelix View Post
"rcx.local"? From where you get this information - I never heard about this file. Anyway to autostart program you can login on this automatic login account and there use standard way to do this. For example in KDE you add program to execute after login in "System settings" / "System administration" and there is something like "Starting and stopping". And for autostarting programs on every account after someone login you can use "/etc/X11/Xsession.d" directory.
is it " qt exe " a .exe file ?
.exe will not run
 
Old 07-19-2012, 05:23 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Auto-starting a GUI program to open on the Desktop :

Add an entry in /home/<user-name>/.config/autostart/
... The new file can be a "desktop entry" = program.desktop,
or a link to the executable.
Example : ~/.config/autostart/firefox.desktop

.

Last edited by knudfl; 07-19-2012 at 05:41 AM.
 
Old 07-21-2012, 02:59 AM   #5
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Original Poster
Rep: Reputation: 1
how to execute an exe at startup using rc.local

I want to execute a qt exe program at startup. That is after automatic login instead of loading Desktop and seeing it, the program quickly pop up to the screen. For this, I think we should add the script to rcx.local rather than rc.local I guess though.. I tried adding a script to /etc/rc.local and giving it permission, but non works out.
I would thank if you explain the procedure in detail.

(I did try adding the rc.local n also creating a symbolic link to rcx.local, but unfortu. none works out)
 
Old 07-21-2012, 04:18 AM   #6
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
How many threads are you going to start for the same issue? Do you think the answers are going to be different this time? You have been replied by some very technically sound people in your last post. Why do you not continue with the same thread?
 
Old 07-21-2012, 05:44 AM   #7
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by honeybadger View Post
How many threads are you going to start for the same issue? Do you think the answers are going to be different this time? You have been replied by some very technically sound people in your last post. Why do you not continue with the same thread?
easy, easy. I didn't notice I already asked this question before. Thank for reminding though, I will do report it.
 
Old 07-21-2012, 05:47 AM   #8
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by sharadchhetri View Post
is it " qt exe " a .exe file ?
.exe will not run
It's a qt exe
 
Old 07-21-2012, 05:58 AM   #9
saman_artorious
Member
 
Registered: Sep 2008
Posts: 78

Original Poster
Rep: Reputation: 1
there is no such ~/.config/autostart folder

Quote:
Originally Posted by knudfl View Post
Auto-starting a GUI program to open on the Desktop :

Add an entry in /home/<user-name>/.config/autostart/
... The new file can be a "desktop entry" = program.desktop,
or a link to the executable.
Example : ~/.config/autostart/firefox.desktop

.
There is no such folder autostart in .config inside my user folder. I tried
adding it to /etc/xdg/autostart instead, and it failed.

So, where is it? is it the same as using settings->startup application? if so, it's not what i want.
adding an exe to settings-startup does not pop it up as soon as we login. I want the exe to open so that
the user does not even see the desktop background.

this is urgent, what should I do ?
 
Old 07-21-2012, 12:28 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
If no ".config/autostart/" folder : $ mkdir .config/autostart
... Then you can add applications for autostart.

( In Gnome, KDE the directory ".config/autostart/" is generated automatically,
when you add an application in 'System - Settings - Autostart' or Startup ..
https://kororaa.org/forums/viewtopic.php?f=2&t=305 )

.
 
Old 07-22-2012, 03:51 AM   #11
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Sorry if I sounded harsh. It was just annoying to see the same person post the same thing.
 
Old 07-22-2012, 04:45 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Threads merged - settle people =)
 
Old 07-23-2012, 04:29 AM   #13
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Quote:
Originally Posted by saman_artorious View Post
It's a qt exe
Please by more detailed. By exe you mean an ".exe" file extension (program compiled for Microsoft Windows operating system) or just this is short of "executable" (but file was compiled for Linux system)? For first you need to install "wine" package, it is designed to run Windows programs (but not everything can work). For second you need to add access right for execute this file - in file manager you should have that option under properties of file, in shell you do
Code:
chmod +x /path_to_program/program_name
.
 
Old 07-23-2012, 11:34 AM   #14
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Code:
[schneidz@hyper breaking-bad]$ cat ~/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

#/home/schneidz/nfs-w/leaderboard.ksh &

echo \~ \"\" \$ \^ \&\& \( \) \{ \} \>\> \@ \: \| \_ >> /home/schneidz/.bash_history

alias grep='grep --color=auto'

nautilus &
 
  


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
[SOLVED] Problems with rc.local, it wont run my bash-script at startup ScorchPipe Linux - Software 10 01-10-2011 04:41 PM
how do i run firefox using exec() in php? vaporizel Linux - Software 1 11-09-2010 06:46 AM
Run An sh File on startup in ubuntu server 9.10 Jamie Kugelmann Linux - General 3 05-15-2009 02:24 AM
in RedHat linux 9, how can i configure a startup file in /etc/rc.local perathprabha Linux - Newbie 1 03-13-2008 01:42 PM
Help using exec() with php to run BitTornado linux nsdothack Linux - Software 0 03-18-2007 06:33 PM


All times are GMT -5. The time now is 06:41 PM.

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