desktop setup script

Forum rules
Before you post please read this

desktop setup script

Postby Kent88 on Wed Mar 14, 2012 7:00 pm

I'm trying to make a script to do post install tasks for desktops used by the computer club on campus. So far I've managed to get my script to install/update popular software (Eclipse and monodevelop IDEs, libreoffice, firefox, various compilers, etc) but really I don't have much experience scripting.

I was thinking it would be nice if, after those programs have been installed, I could have the script put .desktop files in the desktop folder linking to specific, predetermined programs that would also save time. Is this feasible? If so what would be the best way to get that to work?
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Linux Mint is funded by ads and donations.
 

Re: desktop setup script

Postby xenopeek on Thu Mar 15, 2012 9:11 am

Are you still using LM11 LXDE, or which Linux Mint version + desktop environment are you currently using?
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: desktop setup script

Postby Kent88 on Thu Mar 15, 2012 2:38 pm

Sorry about that, we're running Mint 12 KDE.
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Re: desktop setup script

Postby xenopeek on Thu Mar 15, 2012 4:56 pm

If from the menu (right-click on an application) I select to add something to the desktop, the file that changes in my user's home folder is ~/.kde/share/config/plasma-desktop-appletsrc. I can see where it adds the application icon in that, but it doesn't seem to be as easy as on other desktops (sequence numbers to entries and all). Probably there is documentation out there, or probably an API to interface to this file. But here ends my KDE knowledge :wink:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: desktop setup script

Postby Kent88 on Fri Mar 16, 2012 2:00 am

I was pushing for them to use LXDE mint, but our advisor really wants a 64-bit OS, not to get off topic, but I don't suppose there are plans for a mint 13 LXDE 64-bit?
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Re: desktop setup script

Postby xenopeek on Fri Mar 16, 2012 5:06 am

I don't know, but you could pull fast one and do this? http://forum.linuxmint.com/viewtopic.ph ... 7&p=554458
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: desktop setup script

Postby Kent88 on Fri Mar 16, 2012 12:01 pm

What kind of extras could I get rid of by doing that? I would still want some KDE components, (KATE, K3B, Konsole) but I don't need the option of logging in to KDE if we went with LXDE like that. Would it be beneficial to use another login manager? If we were to go this route I'd see it as:
1) post-install apt-get stuff (done except would add LXDE and a login manager, remove certain KDE components)
2) change default login manager
3) get those .desktop files into the /home/~/Desktop folder

Preferably all in one script, no restarts.
would that be simpler than trying to add the .desktop files to plain mint KDE?
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Re: desktop setup script

Postby xenopeek on Fri Mar 16, 2012 12:30 pm

That sounds horribly complex :shock: If you intend to use all those KDE applications, just stick with KDE and figure out how to add shortcuts to the desktop. From what I've see here http://techbase.kde.org/KDE_System_Admi ... pScripting, I think you can script this with JavaScript and the Plasma Desktop API. No idea how though, but perhaps try the KDE forums? http://forum.kde.org/
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: desktop setup script

Postby Kent88 on Fri Mar 16, 2012 5:21 pm

.desktop files are just text files with entries for the name, command, icon, description, etc? Is it possible to make a new .desktop file, write the needed fields to it, then copy the file and add the specifics for each predetermined application?

Seems needlessly complicated for something so simple, but creating, writing, and editing files via a bash script sounds useful, if it can be done, can it?
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Re: desktop setup script

Postby xenopeek on Fri Mar 16, 2012 5:32 pm

On Gnome, MATE, LXDE, and I think Xfce, yeah. But I think KDE doesn't do .desktop files, or does it? I copied one of the .desktop files to the desktop, it didn't magically turn into a shortcut as it does on Gnome. I'm really thinking you are stuck with either going at the plasma-desktop-appletsrc file or the mentioned API. May I again raise the option of the KDE forums :wink:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14994
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: desktop setup script

Postby Kent88 on Fri Mar 16, 2012 5:45 pm

KDE does .desktop files, when you first put a .desktop file in the folder it usually asks you if it is ok the first time you run it, perhaps this caused issues?
Kent88
Level 1
Level 1
 
Posts: 36
Joined: Wed Dec 22, 2010 1:57 am

Linux Mint is funded by ads and donations.
 

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 2 guests