News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Launch codeblocks with a shell script

Started by raphasauer, December 08, 2016, 07:54:04 PM

Previous topic - Next topic

raphasauer

Hello! I'm trying to make codeblock's executable execute a shell script instead of starting codeblocks. I modified the codeblocks.desktop file to execute the script like this:

[[Desktop Entry]
Exec=/usr/share/start_dark.sh
#didn't alter the rest#

And I get an error saying that it can't launch the application. This is the script:

GTK2_RC_FILES=/usr/share/themes/Elegant-GTK/gtk-2.0/gtkrc codeblocks

It's purpose is to launch codeblocks using a custom theme (Elegant GTK). If I run this script in the terminal it launches codeblocks perfectly. However, I want to always start codeblocks with this theme, hence the modification of the executable. Trying to do it in Linux Mint. Any advice? Thanks in advance!

oBFusCATed

1. add shebang https://en.wikipedia.org/wiki/Shebang_(Unix)
2. if you're using bash use env BLA=bla codeblocks
3. instead of codeblocks use <fullpath_to>/codeblocks
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]