Author Topic: code::blocks runs only under root  (Read 618 times)

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
code::blocks runs only under root
« on: February 07, 2019, 11:01:11 pm »
I followed the instructions at:
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux
to install wxWidgets-3.0.3.tar.bz2 to use with the latest version of Code::Blocks available at svn://svn.code.sf.net/p/codeblocks/code/trunk. Made a few changes to account for the different version number. I did it on my Ubuntu 18.04 OS. Although the installation is successful, and it does run, there are two issues:

1) The command "tar zxf wxWidgets-3.0.3.tar.bz2" did not work due to it being an incompatible file type. I had to use the Archive Manager to expand it. This is a minor issue.

2) The command "make install" did not work to install code::blocks due to permissions issues. So I had to use "sudo make install". The use of sudo meant that the installation is owned by root, and due to permissions issues, the shortcuts in Ubuntu's menu and desktop did not work. To invoke it I have to use the command "sudo codeblocks". To solve this I could change codeblocks's owner to myself, I could also set permissions for anyone to run it, or only a specific group I am a member of already, or would create. Which of these is the preferred way, or is the preferred way something else?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6636
    • My Best Post
Re: code::blocks runs only under root
« Reply #1 on: February 07, 2019, 11:16:12 pm »
Code: [Select]
tar zxf wxGTK-2.8.7.tar.gz
The option to untar wxWidgets-3.0.3.tar.bz2 would be different. Edit "bz2" is not the same as "gz".

sudo make install should not do what you said! Did you remember to exit out after doing the sudo?

Tim S.


C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline sodev

  • Regular
  • ***
  • Posts: 325
Re: code::blocks runs only under root
« Reply #2 on: February 07, 2019, 11:16:47 pm »
  • z is for gunzip, since your archive is bz2 you have to use j
  • Something is messed up. You always have to be root to install but that should not limit regular users from running the application. Did you fully compile codeblocks as regular user? And are you really sure that you can't run CodeBlocks because of permissions?

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 119
Re: code::blocks runs only under root
« Reply #3 on: February 07, 2019, 11:44:43 pm »
Right after installation the shortcuts did not work. I assumed it was due to permissions. But now they are working.