Proposal: deprecate /root/Startup

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Proposal: deprecate /root/Startup

01micko
Administrator
technosaurus has been on about this one for a few years now. There is a standard where the directories

$XDG_CONFIG_HOME/autostart

and

$XDG_CONFIG_DIRS/autostart

... are the appropriate places to start applications when the window manager starts.

Respectively, the default locations for these are $HOME/.config/autostart and /etc/xdg/autostart.

The files that go in there are simple .desktop files which can have the
NoDisplay=true
 key attribute set.

Here is simple one for retrovol, simply named retrovol.desktop

[Desktop Entry]
Type=Application
Name=retrovol
Exec=retrovol -hide
NoDisplay=true

Works like a charm, but, JWM doesn't have a clue about it. This is where we can use the
<StartupCommand>
 tag in the JWM configuration. If you look in ~/.jwmrc you'll see a set of those tags empty. The trick is what do you put in there? Simple, just a call to the desktop file using
xdg-open
. Fortuitously, the JWM configuration files can understand shell commands so in mine I out this to execute my .desktop files in $HOME/.config/autostart/ :

<StartupCommand>
	for i in $HOME/.config/autostart/*.desktop;do xdg-open $i;done
</StartupCommand>

Now, the main debate will be.. where do we want it? In $XDG_CONFIG_HOME/autostart or $XDG_CONFIG_DIRS/autostart  ??

So why change?

The current method is a kludge.. (erm.. there isn't much kludge in Puppy is there? )

It's slow, the apps have to wait until other stuff completes in /usr/sbin/delayedrun before they get their chance, which on initial startup isn't until a user has completed quicksetup, and on second boot, bootmanager.

It's ugly, look at /usr/sbin/delayedrun.. most of it can go. Really only need a place to exec all the pupmode=5 stuff.

Autostart is a standard. If you install a more advanced WM then it will pick it up and use it.

/root/Startup is bloat. There are all sorts of crazy scripts in there, they will be replaced by nice neat .desktop files, hidden away from the casual user who happens to go clickety here, clickety there and wonders why he has a tray full of volume icons.

I rest my case. Rebuttal.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

mavrothal
> Now, the main debate will be.. where do we want it? In $XDG_CONFIG_HOME/autostart or $XDG_CONFIG_DIRS/autostart  ??

What debate? Even if puppy is single user for now,  $XDG_CONFIG_DIRS/autostart should be the place for most things in /root/Startup while fido, spot, max and molly can have  $XDG_CONFIG_HOME/autostart  to distinguish themselves from each other ;)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

zigbert
In reply to this post by 01micko
I fear trouble. - do we have enough knowledge of all the scripts?
Is it possible to support both in a transition period?
If it comes to a change, pSchedule would like to store its startup-script in $HOME. Like this it's not bound to a single-user system.


Where does the $HOME/Startup come from?
Sigmund
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

iguleder
I agree with 01micko, JWM has the startup feature for this. By the way, delaydrun uses sleep ... it's so ugly!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

01micko
Administrator
In reply to this post by zigbert
Well, 'deprecating' doesn't mean immediately chopping off support (though I'd like too )... we can support the old way for six months or so until the transition is complete.

Yes, I know, users will be moaning about this old pet and that old pet not working, but there can be a thread explaining how to fix it, or even a separate downloadable pet called "fix_old_startup_apps" or whatever and it can just parse the startup script, and if it's too complex, move it to /usr/sbin and construct a simple desktop file calling it. It's all relatively simple and I think the positives far outweigh the negatives.

If you need to make something user specific sure, put it in $HOME, either hidden or in a subdir, and a call to $XDG_CONFIG_HOME can be used as well as $XDG_CONFIG_DIRS in ~/.jwmrc.. actually I'm leaning to ward $XDG_CONFIG_HOME anyway, as if multiuser is ever supported then we'd probably copy fatdog and use /root as a pseudo /etc/skel. BTW, spot doesn't run the WM, so no use him having an autostart. Fido is .. well... waiting for euthanasia I think!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

01micko
Administrator
In reply to this post by zigbert
zigbert wrote
Where does the $HOME/Startup come from?
It's called in /usr/sbin/delayedrun toward the end, which in turn is called by ~/.xinitrc.. hmm that's another story.


#v2.17 suggested by andrei...

That's the comment. I don't know who andrei is or was.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

mavrothal
Symlink $HOME/Startup to $XDG_CONFIG_HOME and we are set for a smooth transition, I believe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
In reply to this post by 01micko
I vote for it, too .

Not that I am fond of new things, and of standards and of .desktop files .

But top output with less delayedrun would be welcomed by me .

My Startup code for preventing top output with delayedrun and only run files, not dirs :
#v2.17 suggested by andrei...
if [ -d /root/Startup ];then
find /root/Startup -type d -exec chmod 0660 {} \;
 for a in /root/Startup/*
 do
  [ -f "$a" -a -x "$a" ] && exec "$a" &
  sleep 1
 done
fi
Mainly using exec program &  .
Works for me in the loop to fire up several programs in there and then leaving the shell .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
In reply to this post by 01micko
Hopefully everything would be able to use

01_program_this.desktop
02_program_that.desktop
..

sorting like rc.services runs /etc/init.d/ .


> <StartupCommand>
> for i in $HOME/.config/autostart/*.desktop;do xdg-open $i;done
> </StartupCommand>

looks quite usable to me .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
In reply to this post by 01micko
01micko wrote
Well, 'deprecating' doesn't mean immediately chopping off support (though I'd like too )...

Fido is .. well... waiting for euthanasia I think!
.desktop files are much more work by navigating there first and creating the .desktop files.
/root/Startup has the advantage to put in bins there , without the need to drop them additionally in /root/my-applications/bin .

About fido : I am not using it, and ran it only one frugal installation for two or three boots.
I lost the interest after detecting that everything(?) in /root is chown fido:downtknow .
Fido is a kind of crazy idea. It might block attacks from people of knowing GNU/Linux, but not being aware of Puppy Linux.
Strange, since Puppy is part of the top ten on distrowatch, but there are people out there, who are programming on Linux, but don't know Puppy .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

01micko
Administrator
Karl Godt wrote
.desktop files are much more work by navigating there first and creating the .desktop files.
/root/Startup has the advantage to put in bins there , without the need to drop them additionally in /root/my-applications/bin .
Yeah.. but a case of pros and cons. In delayedrun your tray doesn't get loaded until the end, it's populated instantly if started by the WM. I intend to leave /root/Startup there for a while, or even just the code in delayed run. But I'm definitely removing all the other crap in delayedrun, part of which I am responsible. It was back when Lucid was using Icewm as default desktop .
Karl Godt wrote
About fido : I am not using it, and ran it only one frugal installation for two or three boots.
I lost the interest after detecting that everything(?) in /root is chown fido:downtknow .
Fido is a kind of crazy idea. It might block attacks from people of knowing GNU/Linux, but not being aware of Puppy Linux.
Strange, since Puppy is part of the top ten on distrowatch, but there are people out there, who are programming on Linux, but don't know Puppy .
I do really think Puppy is a noobs distro. People baulk at downloading 3GB then to find out a) they hate it or b) it doesn't work. <200M is a good gamble...
As for fido.. well BK has only the occasional tipple ..but

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
Made a fido-save-file .
Forgot password .
Is there a difference between administrator and root ?

And urxvt refused to launch but rox and geany were working  and xerrs.log showed that it could not get a pseudo tty . mknod permission problem i guess .



Further drinking ..
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

scsijon
In reply to this post by zigbert
zigbert wrote
Where does the $HOME/Startup come from?
Wasn't the reason for this origonally (~2.14) with BarryK was to get the desktop up as quick as possible,
as well as having those items needing the desktop up before they started to config themselves.

I know that both my Mageia and Opensuse builds use it, as both "bases" have equivalents,
and it was easiest to just have a set to deal with the crosspaths.

jon
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
What for equivalents ?

Do Mageia and Suse use a $HOME/Startup folder , or do your builds already use $HOME/.config/autostart/ ?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

scsijon
Karl Godt wrote
What for equivalents ?

Do Mageia and Suse use a $HOME/Startup folder , or do your builds already use $HOME/.config/autostart/ ?
Both I'm afraid are used
the First for Apps that only are for that particular user (consider single user licence apps as a rough equivalent).
the Later for Common Apps for the users Group.

and then there are "specials" only relating to the root user that I have used SET to have in $HOME/Startup In both

Some things just won't run in root or a change to spot etc. The login must not be root user/group related and i've 'cludged' to get around it for a few cases only.

Neither operating systems are configured for user apps to run in root.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator
Found something here :

>    Re: how stop a startup application?

>    In kde check the contents of

>   /.kde4/Autostart/

http://forums.opensuse.org/english/get-technical-help-here/applications/468862-how-stop-startup-application.html

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

Karl Godt
Administrator

https://bbs.archlinux.org/viewtopic.php?id=69966 :  Howto: Autostart in KDE4

I found it out. Things have changed from KDE3. Here I copy a mail from the KDE mail list:

~/.kde4/Autostart is a container for .desktop files, not shell scripts.
You'll need to write a .desktop file that has your shell script on the Exec
line if you want to use Autostart.

You might want to use ~/.kde4/env instead.  It is a container for files that
are sourced (run in the current shell environment) during kde session
startup.

IIRC, anything done from .kde4/env should not expect kded-type services
running, where as ~/.kde4/Autostart can depend on those services.

I use both for my purposes.  A script in env to start ssh/gpg agents and set
environment variables.  A script in Autostart to load my keys, asking for
passwords with graphical dialogs.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

dejan555
In reply to this post by 01micko
My suggestion:
Remove /root/Startup completely
Leave code in delayedrun script to launch if Startup exists
Something like:
if [ -d $HOME/Startup ];then for i in ...
I vote for user's .config/autostart if that's standard rather then /etc/xdg/autostart
If .desktop files are standard then use that, binaries should not be there anyway, they should be in path so all users can either symlink to them or launch via .desktop file

P.S. First post on this forum and there's no "Reply" on bottom of all posts so I clicked on Reply of first post? Am I doing it right?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

dejan555
In reply to this post by 01micko
I just booted slacko 5.7 and I see that this is already implemented, except there's a symlink left to xbindkeys in /root/Startup
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Proposal: deprecate /root/Startup

01micko
Administrator
This post was updated on .
/root/Startup can hang around forever.. but it's not much use when/if we go multiuser

dejan555 wrote
I just booted slacko 5.7 and I see that this is already implemented, except there's a symlink left to xbindkeys in /root/Startup
Loading...