Mint 13 KDE self-created Autostart Problem

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
pjdyns01

Mint 13 KDE self-created Autostart Problem

Post by pjdyns01 »

I've managed to make my Mint 13 KDE installation 98% useless by misusing the Autostart section of Startup & Shutdown in System Settings.
I stupidly clicked to remove the "gtk2-default-theme.rc.sh" script in Autostart, then realised there was no 'reset' facility, then eventually powered down - three stupid decisions on the trot I'm afraid.
Now I have a desktop that looks superficially like the original desktop but virtually nothing works on it - no launcher (apart from Firefox for some reason), no menus, no power-off.
Is there a relatively straightforward way of reinstating this script in the boot-up process? It's still there as a file in /.kde/env in my home/user directory but doesn't seem to be getting called (unsurprisingly) and certainly not at the right point in the boot-up process.
I'm using the 32-bit version.
All help gratefully received.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Iurydice

Re: Mint 13 KDE self-created Autostart Problem

Post by Iurydice »

Can't you just re-add the script via Autostart, like you removed it?
The path should be /usr/share/mintkde-default-settings/gtk2-default-theme.rc.sh (I'm also using Mint 13 KDE and it's the same here). So in Autostart, try clicking Add Script, paste the path and if prompted, set it to run on Pre-KDE startup.
pjdyns01

Re: Mint 13 KDE self-created Autostart Problem

Post by pjdyns01 »

Unfortunately I can't get back to Autostart because none of the programs will launch, not even the Start Menu. The only program I've been able to run is Firefox. I could get into the command line from the Rescue boot but would need to know how to operate Autostart from the command line if that were to work.
Sorry, I should have made it clear that Autostart was inaccessible to me via the desktop
Iurydice

Re: Mint 13 KDE self-created Autostart Problem

Post by Iurydice »

Oh, sorry, I didn't realize you were unable to access System Settings. :?

Are you sure this script is the only thing you removed? Because from what I see, the script controls the look and behavior of GTK apps and it shouldn't have such a devastating effect on the entire KDE system.

Anyway, you can try to run System Settings from the command line. The command is simply systemsettings. If it works, you should be able to access the Autostart module from there.

Just in case, I'll post the output of my gtk2-default-theme.rc.sh files so you can compare it with yours and, if necessary, overwrite them.

This is from /usr/share/mintkde-default-settings/gtk2-default-theme.rc.sh

Code: Select all

#!/bin/bash

# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0-kde4
As you can see, this is a bash script that creates this file in your home folder. This means that the file should be there, otherwise the script won't work. Also, the script should be executable.

My $HOME/.gtkrc-2.0-kde4 looks like this:

Code: Select all

# File created by KDE Gtk Config
# Configs for GTK2 programs 

include "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc"
style "user-font" 
{
	font_name="Droid Sans"
}
widget_class "*" style "user-font"
gtk-font-name="Droid Sans 9"
gtk-theme-name="oxygen-gtk"
gtk-icon-theme-name="oxymentary"
gtk-fallback-icon-theme="oxymentary"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=0
gtk-button-images=0
As you can see, it controls the look of GTK apps.

There's also /home/username/.kde/env/gtk2-default-theme.rc.sh that you mentioned. This file should be executable. On my computer it looks the same as the first one:

Code: Select all

#!/bin/bash

# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0-kde4
pjdyns01

Re: Mint 13 KDE self-created Autostart Problem

Post by pjdyns01 »

Iurydyce,
Many thanks for your detailed response. I did draft a response yesterday but it looks as though I got stuck at the Preview stage and didn't do the Submit. Sorry.
Anyway, I've now been able to research on my system the points that you highlighted and I can confirm the following:
My gtk2-default-theme.rc.sh is in $HOME/.kde/env and is the same as yours and has executable permissions.
My $HOME/.gtkrc-2.0-kde4 is similar to yours but the gtk-fallback-icon-theme is Gnome rather than oxymentary (and the font is DejaVu rather than Droid).
Unfortunately I couldn't find a way to access 'systemsettings'. A normal boot produced a desktop where the only program I could run was Firefox and the keyboard shortcuts to launch a run command or terminal didn't work either. I then tried using the recovery boot but of course X-windows wasn't running and the program aborted "Unable to autolaunch -daemon without a $DISPLAY for X11".
I have been able to set up a new version of KDE Mint on an old hard drive I had and from that I can access my damaged setup but if I try to run System Settings it of course refers to the one in the new installation, not the instance in the old installation. I'm reluctant to put much on to this drive as it's now 12-13 years old so repair of the old installation is still the preferred option, though I can now do proper backups and reinstall I suppose. Just seems a bit drastic for a simple, if very stupid, mistake.
I have also found " How to auto load a script on KDE startup " on https://www.linuxquestions.org/question ... up-177441/ and started to hope again.
Sadly placing the "gtk2-default-theme.rc.sh" in either of the locations mentioned failed to give me a functioning desktop though there was slightly more activity when I used the "rc.local" file - i.e. the Start Menu appeared, but it wouldn't go any further and launch any of the entries. The postings date from 2004, though, so the procedures for KDE 4+ may well be different to those described.
Somehow or other I think I need to find out what actions Autostart actually takes when the script entries are processed and see if I can implement them manually. However "systemsettings" is a binary file and 'whereis autostart' gives me a directory in /usr/share, so i'm not really any further forward.
I don't fancy ploughing through source code for this, given my level of understanding, but don't know of any other possible source for the required information.
If you're able to help at all further then that would be great but I quite understand if this is getting more detailed than you want or have the time to go into.
Your help so far is very much appreciated.
Iurydice

Re: Mint 13 KDE self-created Autostart Problem

Post by Iurydice »

I'm sorry to have left you hanging without a proper answer, but I'm really out of ideas and I didn't want to just randomly suggest stuff without having properly researched the problem. :|

Have you tried creating a new user? This can be done from the console relatively easily. The new user will have all the default settings, including the autostart scripts. It might help...I hope it does.
pjdyns01

Re: Mint 13 KDE self-created Autostart Problem

Post by pjdyns01 »

Hi Iurydice
Many thanks for your further reply and I appreciate you didn't want to rush into a response. I've been away from the machine for a while and so couldn't respond more quickly but I have now tried creating a new user as that seemed a very practical solution to me. I went into Recovery mode and used adduser but unfortunately I got the message that groupadd couldn't lock the group file and so the process aborted (error message 10).

I checked this out and there were some suggestions on other forums that this could be got around by removing the group and gshadow files in /etc but that hasn't worked for me.

I am inclined to your earlier view that I must have done something more than remove the gtk2-default-theme.rc.sh from the boot process and that is causing these other impacts. it looks as though a reinstall may well be beckoning!

If you have any further bright ideas I'd be very glad to hear them but it's got to the stage now that I think reinstallation is probably going to prove no more difficult than some of the remedies and probably more reliable anyway.

Thanks very much for your support anyway, very much appreciated.
Locked

Return to “Software & Applications”