• Like 0

    The autostart desktop icon doesn't work.


    It is the content of my desktop icon, please help
    I put them in ~/.config/autostart/, it doesn’t work, but I can open them manually.

    [Desktop Entry]
    Comment[zh_TW]=xrandr --output HDMI1 --set "Broadcast RGB" "Full"
    Exec=xrandr --output HDMI1 --set "Broadcast RGB" "Full"
    Icon=application-default-icon
    Name[zh_TW]=FullRangeRGB
    Type=Application
    
  • Like 0

    @s9209122222
    Hi!
    Which desktop are you using?
    Do you launch through terminal with gtk-launch FullRangeRGB or other command? I guess just clicking the file doesn’t work you will need to create a launcher for it (at least i can’t launch .desktop from /usr/share/applications directly)
    If you want to launch a command on startup you can launch through script also.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Like 0

    @fernandomaroto It will work if I double click on it, but it won’t open at startup.

  • Like 0

    interesting, then i guess the desktop is already set as executable (unless you set the file manager to execute it)
    Just in case open a terminal in that folder and type chmod +x [the_name_of_your_desktop.desktop] (perhaps the command doesn’t need the file extesion…
    Then reboot and see if it’s launched on startup…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Like 0

    @fernandomaroto It doesn’t work, I still need to double click it.
    Would it be caused by the desktop environment? I am using Deeping Desktop Environment.

  • Like 0

    .desktop files do not need to be executable, except if you would want to lauch them by doublke-clicking, for example as launcher on the desktop.

    • Try putting “evince” as the command: if evince launches upon the next login, then you know it is not an issue with the desktop file itself
    • Perhaps delaying the command somewhat may help: change the command to
    Exec=sh -c 'sleep 5 && xrandr --output HDMI1 --set "Broadcast RGB" "Full"'```
    This will delay the command by 5 seconds (adjust as needed). That might be needed, because gnome shell might not like you are changing the xserver settings while it is starting up.
  • Like 0

    @s9209122222 I don’t know… i never tried to launch a .desktop file from startup, i usually create a .sh script.
    Try to follow @antimony instructions and see if it works, if not i’d recommend using a script until you find the proper solution…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Like 0

    hi! i discoverd mate desktop need another line in the .desktop file, perhaps your desktop need it too, example:

    [Desktop Entry]
    Type=Application
    Exec=/path/to/executable
    Hidden=false
    Name=Autostart example
    Comment=This file shows that the line below is needed for MATE to autostart an executable
    X-MATE-Autostart-enabled=true

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Like 0

    There is indeed such a line for gnome-shell:
    X-GNOME-Autostart-enabled=true
    but there is no need to add it. When the line is there with “false”, it effectively will prevent the autostart.

autostart7 work4 icon22 Posts 9Views 273
Log in to reply