Adding applications to start up

I have been using Ubuntu since 2010 and I have no idea how to add apps to start up. Can’t we make it simple ? Maybe a list of applications is available when we click an " Add new " button. It is too complex right now.

Are you asking somebody to make a Startup Applications control panel?

Because there already is one…

1 Like

There is the autostart section in Gnome Tweaks for that. Or do I misunderstand?

1 Like

What about the Startup Applications Preferences app? That should be installed by default at least in Ubuntu?

grafik

EDIT:
If you wonder what the last entry in the pic means: I had set xhost +si:localuser:root in my autostart app to still be able to run Synaptic under Wayland. I always opened it on the commandline by typing sudo synaptic that way.

But I shouldn’t have set that command globally for security reasons. And I wasn’t able to open synaptic by just clicking the icon.

The following method is FAR more elegant:

Just create a new script for Synaptic by typing

gedit admin:///usr/bin/synaptic-pkexec

(Don’t worry, you might have to enter your superuser password twice. That still seems to be a bug with the new and shiny gvfs admin backend)

Within the script file make sure that you add the xhost commands properly. The text should look like this:

#!/bin/sh
xhost +si:localuser:root
pkexec “/usr/sbin/synaptic” "$@"
xhost -si:localuser:root

Now press “save” and from now on you can open Synaptic just by clicking the icon like in the old “X” times. It looks scary but it isn’t.

When Ubuntu switches to Wayland again such scripts should probably be installed by default then.

2 Likes

When I select " Startup Applications ", I see no option to select an app. Instead, I get a few text fields.

I always thought that exists. I haven’t used Gnome as much so I’m not sure, but remember it exists in Unity, and I have it in Kubuntu.

In Unity, it shows up when I search “startup”, but not “autostart”. Shows up using either search terms on Plasma.

Can you send a screenshot of what it looks like?

Your trick for synaptic is very useful and I used it right away but i’m unable to imagine a similar solution for gparted, may you suggest one? thanks.

1 Like

Hmm. I don’t use gparted myself, so I do not know if an adapted script would work with gparted as well.

gparted carries an interim fix since 0.30: https://gparted.org/news.php?item=214 , but Ubuntu decided not to set ./configure --enable-xhost-root
[see Bug #1737248 “Do not use --enable-xhost-root” : Bugs : gparted package : Ubuntu and @jbicha’s reasoning for it]

Debian sets the workaround https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883812 . So I guess that you could try to manually install the deb file from Debian Sid if you are adventurous: https://packages.debian.org/de/sid/amd64/gparted/download But don’t blame me if that kills your cat or breaks your Ubuntu :wink:

being curious I looked in /usr/sbin/gparted and i’ve found my modif is ready:

# Interim workaround to allow GParted run by root access to the
# X11 display server under Wayland.  If configured with
# './configure --enable-xhost-root', the xhost command is
# available and root has not been granted access to the X11
# display via xhost, then grant access.
#
ENABLE_XHOST_ROOT=no
GRANTED_XHOST_ROOT=no
if test "x$ENABLE_XHOST_ROOT" = 'xyes' && xhost 1> /dev/null 2>&1; then
	if ! xhost | grep -qi 'SI:localuser:root$'; then
		xhost +SI:localuser:root
		GRANTED_XHOST_ROOT=yes
	fi
fi

thanks

1 Like