WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to autostart Desktop Applications?  (Read 17285 times)

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
How to autostart Desktop Applications?
« on: December 13, 2008, 03:30:10 AM »
I have made fbxkb.tce Keyboard Indicator/switcher applet and I want to start it after loading of the desktop through fbxkb command.

How to do it?

kagashe

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: How to autostart Desktop Applications?
« Reply #1 on: December 13, 2008, 03:33:12 AM »
If it's an X dependent, edit ~/.xserverrc and add your command before the last/exec line

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: How to autostart Desktop Applications?
« Reply #2 on: December 13, 2008, 04:01:37 AM »
If it's an X dependent, edit ~/.xserverrc and add your command before the last/exec line
I have modified .xsession and replaced Xvesa with /usr/local/bin/Xorg as per instructions. There is no .xserverrc file. Should I create one?

kagashe

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to autostart Desktop Applications?
« Reply #3 on: December 13, 2008, 04:15:28 AM »
.xsession, sorry, .xserverrc was the file in DSL :)
The only barriers that can stop you are the ones you create yourself.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: How to autostart Desktop Applications?
« Reply #4 on: December 13, 2008, 04:16:24 AM »
Right, thanks curaga :P

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: How to autostart Desktop Applications?
« Reply #5 on: December 13, 2008, 04:46:24 AM »
I tried adding "fbxkb &" line before "exec.." line in .xsession. It does not work.

I think it can't come before JWM desktop loads.

kagashe
« Last Edit: December 13, 2008, 05:05:21 AM by kagashe »

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: How to autostart Desktop Applications?
« Reply #6 on: December 13, 2008, 05:17:14 AM »
Quote
I think it can't come before JWM desktop loads.
It must, necessarily, every time.  The 'exec' signifies that it is the last command and any following commands will be ignored.

That said, I have seen some inconsistencies with the way .xsession seems to work, although it may not be the same issue.

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: How to autostart Desktop Applications?
« Reply #7 on: December 13, 2008, 06:09:18 AM »
Quote
I think it can't come before JWM desktop loads.
It must, necessarily, every time.  The 'exec' signifies that it is the last command and any following commands will be ignored.

That said, I have seen some inconsistencies with the way .xsession seems to work, although it may not be the same issue.
I think I have not put it correctly. fbxkb command loads the applet in the tray and this does not happen if it is executed before the JWM desktop loads.

My question is how to autostart applications on JWM Desktop. I have checked this on Puppy Linux. There is a start up folder on Puppy where you put the command and it gets executed.after the desktop loads.

kagashe

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: How to autostart Desktop Applications?
« Reply #8 on: December 13, 2008, 07:12:26 AM »
Look in $HOME/.jwmrc
At the end of the file there is this line:
Code: [Select]
<StartupCommand>wbar.sh</StartupCommand>I assume you can use the same method to load your applet.
I can't say for certain, but perhaps puppy  put a command in that same place to load whatever you add to the startup folder
« Last Edit: December 13, 2008, 07:15:12 AM by mikshaw »

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: How to autostart Desktop Applications?
« Reply #9 on: December 13, 2008, 11:32:58 PM »
Look in $HOME/.jwmrc
At the end of the file there is this line:
Code: [Select]
<StartupCommand>wbar.sh</StartupCommand>I assume you can use the same method to load your applet.
I can't say for certain, but perhaps puppy  put a command in that same place to load whatever you add to the startup folder
Thanks. I created a startup script as I wanted to autostart conky as well and inserted the script file before wbar.sh. It launches conky and fbxkb but for fbxkb there is a problem.

If fbxkb is launched before the JWM top panel (which is happening if I put it in .jwmrc) it sort of freezes in the tray and I can't switch the Keyboard Layout.

kagashe

Offline kagashe

  • Full Member
  • ***
  • Posts: 129
    • My Tryst with Linux
Re: How to autostart Desktop Applications?
« Reply #10 on: December 14, 2008, 11:53:18 AM »
I can't say for certain, but perhaps puppy  put a command in that same place to load whatever you add to the startup folder
I am running Puppy Linux 4.0 just now specifically to check this point after putting shortcut to fbxkb in /root/Startup folder (Puppy has /root user only) I have rebooted and fbxkb applet is there on the panel working and there is no entry in .jwmrc between <StartupCommand></StartupCommand>

Puppy Linux must be executing some script running the applications in Startup folder immediately after the JWM desktop loads.

I can see autostart folder in ~/.config on Ubuntu where .desktop files of such applications exist.

How to do this?

kagashe

Offline esb

  • Newbie
  • *
  • Posts: 1
Re: How to autostart Desktop Applications?
« Reply #11 on: April 07, 2021, 05:59:31 PM »
In 2021, the way to autostart desktop applications is to put a script in /home/tc/.X.d