Categories
Uncategorized

Further Ubuntu notes

For the last day or so I have been actively trying to code on Ubuntu. I took some notes on my experiences. Ubuntu: On bootup in order to get internet through the wireless network, I have to go to System / Administration / Network, open the Wireless connection properties, and retype my password every time. […]

For the last day or so I have been actively trying to code on Ubuntu. I took some notes on my experiences.

Ubuntu:

On bootup in order to get internet through the wireless network, I have to go to System / Administration / Network, open the Wireless connection properties, and retype my password every time. I believe what fixes the network is not that though but something internal to the the “Changing interface configuration” screen. The funny thing is that didn’t work this morning. Every other time I did this I already had my Windows XP computer already turned on (which uses a cable to the wireless router). As a guess I turned on Windows, tried again, and now I could connect to the internet. Is it an IP confict? Is Windows providing DHCP?

I like Synaptic Package Manager, it’s very nice having instant download access to so much software. However, it’s hard to tell what you are getting or where it installs to. For example, I installed subversion but I can’t find the executible svn when I search on disk so I don’t know how to start it as a server. I also installed Eclipse for C++ but it just seemed to have gotten some files, I couldn’t find an executible to run.

I like the update manager. It just works and works for every package as far as I can tell. This is an improvement over Windows.

Searching for files doesn’t seem to work. I figured out how to fix it by searching the bug reports. You have to change System / Preferences / Indexing preferences and install some package the name of which I no longer remember. People in the bug report were complaining about this and I agree with them.

Under Applications / Programming I have dead links to KDevelop and I don’t know how to get rid of them. I also don’t know how to add Evolution to the menu system, which I downloaded independently.

The application installer and update manager shouldn’t take focus away from what you are doing. It made me die while playing Chromium.

When I click switch desktop in the lower right gedit won’t stay on the desktop I left it on, but follows me to the new one. This is true even if I deselect it. The desktop icons also stay around.

I wish the File Browser had a button to open the Terminal at the current directory I am looking at.

gedit:

I like it! Much snappier than notepad but with more features.

Cmake:

I tried CMake on Windows. It seemed to me I’m just replacing one set of text commands with another set of text commands, when what I actually want is a GUI.

Evolution:

The reason Evolution didn’t work originally was g++ and various programmer packages were not installed. This should have been noted in an error message when trying to run it the first time rather than giving a cryptic message when you first try to compile. Better yet, it could have installed this automatically.

Evolution has a better interface than KDevelop but it’s an order of magnitude behind Visual Studio and not as good as the Windows interfaces to Code Blocks or Dev-CPP. It didn’t seem to make a project file like KDevelop does and didn’t modify or create makefiles as far as I could tell.

It took me about an hour to figure out how to add files to the project to get them to compile. It’s not intuitive to me to import a file system.

If you create the project in an existing directory, such as RakNet, it adds every file, not just source files or just the source files you want. You can exclude directories but if I exclude the root directory of Samples I can’t individually unexclude the sample sources I want. Also the icon indicating what is excluded is inconsistently shown. They should have just did it the way Visual Studio does, where I add the files I want and if I want to add a directory of files I type a filter for the filename (*.cpp) select them all and hit OK.

Once I copied the sample I wanted out of the excluded base Samples directory I was able to build. However, when I tried to run the application said it couldn’t find an executable. When I looked under /Debug there was an icon with the name of my project whose properties said it was an executible, but double clicking it did nothing. I gave up at that point.

In order to test my program I copied the sources to one directory and typed g++ *.cpp -l pthread and ran ./a.out and it worked. I knew to do this because I took a class on Linux in college.

Code Blocks:

I tried to install the nightly build of Code Blocks on Ubuntu 7.10. I got as far as installing the wxwidgets source and then the instructions got too complicated. I didn’t know for sure what steps I needed to do and I didn’t know if it was compatible with Ubuntu 7.10. I didn’t want to spend a lot of time guessing only to have it not work in the end. So I gave up.

KDevelop:

In KDevelop, if I hit Project / New Project there is no option for a static library. So I’m not sure how to make RakNet as a static library. The equivalent with g++ is three commands, assuming you are already at the RakNet download:

cd Source
g++ -c *.cpp
ar cq libRakNet.a *.o

So in KDevelop I tried selecting C++ / Automake project / Empty Autotools template and tried to place it where I have the RakNet download at present. But it wouldn’t let me as that directory already existed.

It took about 20 minutes to figure out how to add files to the project. It’s on the right side under Automake manager, which you can figure out as it’s a tooltip on one of the buttons. There is already one item in the listbox there (Header in noinst) but I have no idea what that is.

One of the buttons is to add a directory of existing files. This is good since I have RakNet/Source. In the dialog, unlike Eclipse, there is no filter to not add the the .o files, CMakeLists.txt, configure.ac, and some others. Rather than remove those one by one I deleted those files in the File Browser with the dialog still open in another window. However, this deletion didn’t get reflected in the dialog box. I hit cancel to do the process over again, but that crashed KDevelop. I gave up at that point.

3 replies on “Further Ubuntu notes”

hi

about cmake: if you use the full set of autotools (autoconf, automake und libtool), which is still quite common, then you’ll have to learn 4 different text file formats. CMake reduces this to one. You propably wonder why you wouldn’t just use Makefiles and be fine. Well, the reason is, people programming opensource stuff usually programm tend to code not only for 32 (or 64) bit, one intel-compatible i386 based processor systems running ubuntu 7.10. Instead they want to support systems with big and small endian, from embedded 8bit to 64bit, with one to thousands of processors and with every flavour of linux, just as well as BSD, Solaris, AIX, whatever (sometimes even Windows). gcc works on most of those plattforms, but it’s rarely the best solution available. So the point of this autotools stuff was to check what features and characteristics the system u’re using has and to enable you to adapt your code with macro variables (usually by some #define ‘s in a file called config.h). So autotools does this with 4 languages, Make doesn’t do it, msvc either and CMake does it with only one relatively readable language.

about kdevelop: theire currently working on the next big version, which features full-blown cmake integration.

about the terminal: there are nautillus scripts, which allow you to do this. It’s a buildin feature in Konqueror (F4).

about the icon, which is executable and so propably is an executable but does nothing: the samples have no gui, why would you see anything? run it in a terminal and you propably will. Linux can work well without any GUI, so linking every programm to a GUI library so that it can open a terminal by default would be quite of the point.

about the bugs: file a bugreport and see them die

hope that helps
by wrt

Have you tried Netbeans as IDE? It is very good, much better than Eclipse with CDT. The Indexer does not work with the hundreds of megabytes of source code we have here, but this should not be a problem for you 😉

Leave a Reply

Your email address will not be published. Required fields are marked *