{{{ #!rst ======== Trac FAQ ======== Here you can find the answer to some of the most frequently asked questions about Trac. If you have a question not answered by this page you can ask it on the `MailingList`:trac: or in the `IrcChannel`:trac:. See the `TracSupport`:trac: page for more options on getting support for Trac. .. contents:: .. sectnum:: ----- .. ** BEFORE INSTALLATION ** Management Summary ================== Where is the bird's eye view documentation? ------------------------------------------- Where do I find the two-page summary on what Trac and its features are? I'm looking for some kind of documentation that I can show my boss, so that he'll get interested enough to allow me to spend the time and resources to test-install and evaluate further. Maybe here: http://www.edgewall.com/trac/ .. ** INSTALLING AND RUNNING TRAC ** Installing and Running Trac =========================== What operating systems does Trac run on? ---------------------------------------- Trac will run on any system supported by Python and the depending modules. Today we are aware of people running Trac on various Linux distributions, Mac OS X, FreeBSD, NetBSD and MS Windows. See also: `TracOnFreeBsd`:trac: , `TracOnNetBsd`:trac: , `TracOnOsx`:trac:, `TracOnMandrakelinux`:trac:, `TracOnGentoo`:trac:, `TracOnDebian`:trac:, `TracOnWindows`:trac: What license governs the use of Trac? ------------------------------------- Trac is released under the GNU General Public License (GPL). Can I migrate my bugs from Bugzilla? ------------------------------------ There is a script to assist with the migration at http://projects.edgewall.com/trac/file/trunk/contrib/bugzilla2trac.py For more information see: `TracImport`:trac: What are the dependencies of Trac? ---------------------------------- Trac depends on the following software: Subversion w/Python bindings, Clearsilver_, `SQLite w/Python bindings`_. Syntax coloring requires `GNU Enscript`_ and/or SilverCity_. See also: `TracInstall`:trac:, `TracSyntaxColoring`:trac:. .. _Clearsilver: http://www.clearsilver.net/ .. _`SQLite w/Python bindings`: http://www.sqlite.org/ .. _`GNU Enscript`: http://people.ssh.fi/mtr/genscript/ .. _SilverCity: http://silvercity.sf.net/ Can I replace SQLite with MySQL or PostgreSQL? ---------------------------------------------- See `#126`:trac: re Database Independance and `DatabaseBackend`:trac:. Can I manage multiple projects from a single installation of Trac? ------------------------------------------------------------------ (or do I have to setup a different directory for each one?) Only one installation is required, then for each project create an Environment (using trac-admin initenv). They will be separate projects, all handled by the same installation of Trac. **Note:** Right now there is no support for sharing information between projects. The rationale for this is that the scope of Trac (1.0) is to manage a single project, and do it well. Support for larger multi-project management adds alot of complexity, but is planned for post-1.0 development, probably as a separate framework around Trac. See also: `TracMultipleProjects`:trac: How can I create a nice URL to access trac.cgi? ----------------------------------------------- If you are serving Trac with Apache, you can use the following directives to let your users access Trac with URLs like "http://www.example.com/trac/" rather than the default "http://www.example.com/cgi-bin/trac.cgi". This example shows how to set it up for Apache 2 on a Windows server, but it works just as well with Apache 1.3 or on Unix. :: # Map the Trac CGI into /trac/ ScriptAliasMatch ^/trac(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi$1" # Tell Trac where its environment is stored SetEnv TRAC_ENV "C:/Subversion/trac/CogTool.db" # Authenticate the user AuthType Basic AuthName "Trac" AuthUserFile C:/Subversion/Repo/svn-users Require valid-user # Link the static files into /trac-static/ # You'll need to change the trac.ini to point to /trac-static/ instead of /trac/ Alias /trac-static/ "C:/Subversion/trac/htdocs/" # Allow access to the Trac static files AllowOverride None Order allow,deny Allow from all See also: `TracPrettyUrls`:trac: Great software. Is there a guide on hacking the templates? ------------------------------------------------------------------ FIXME: I have no idea. ;-) I haven't found one but, according to `this post`_ to the trac list, the templates are stored here:: $PYTHON_HOME/share/trac: miscellaneous resources, including: htdocs: images and CSS; templates: ClearSilver templates; and $TRAC_DB/conf/trac.ini: settings, including (but not limited to): templates_dir: where page templates are stored; htdocs_location: the base URL for this Trac installation; and and you can read more about the clearsilver templating language at http://www.clearsilver.net/docs/. .. _`this post`: http://lists.edgewall.com/archive/trac/2004-December/001348.html How do I reliably create backups of my Trac environment? ------------------------------------------------------------------ With the `TracAdmin`:trac: command ''hotcopy''. See `TracBackup`:trac: for documentation, however this is not available in 0.7.1 but only in newer versions. Can I use Trac with a remote subversion repository? ------------------------------------------------------------------ You can't use Trac (not yet) with remote repository but you could mirror remote repository using this program: http://svk.elixus.org/ How do I change the format used for displaying date and time? ------------------------------------------------------------------ You change the format by setting an appropriate 'locale' in the Apache config. You do this by adding :: SetEnv LC_TIME "xx_YY" right after the line where you set TRAC_ENV. On a Linux/Un*x platform: :xx: The language code as defined in `ISO 639`_ :YY: The upper case, two letter country code as defined in `ISO 3166`_ Examples: *de_DE* is Germany, *en_GB* is Great Britain and *fr_FR* is France On a Windows platform: :xx: The language name as defined in `ISO 639`_ :YY: The country name as defined in `ISO 3166`_ Examples: 'German_Germany' is Germany, 'English_United Kingdom' is Great Britain and 'French_France' is France **When it does not work** First, you should check, if the chosen locale is installed on the system at all. On Linux, you can use :: localedef --list-archive or On FreeBSD you can use :: locale -a to list the installed locale definitions. If this is not the problem, then LC_TIME may be overridden by LC_ALL or LANGUAGE defined in the system environment. You may try one of them (LANGUAGE has highest priority) instead LC_TIME. Note that LC_TIME just affects the date and time display, whereas LC_ALL and LANGUAGE also affect handling of system messages, sorting and other country dependent output/input. So the conservative way is to stick to LC_TIME if possible. On RedHat change /etc/sysconfig/httpd and set :: HTTPD_LANG=xx_YY .. _`ISO 639`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_639 .. _`ISO 3166`: ftp://ftp.ilog.fr/pub/Users/haible/utf8/ISO_3166 -------- .. ** WIKI ** Wiki ==== What is a "Wiki"? ----------------- The term Wiki is a shortened form of WikiWikiWeb_. A Wiki is a database of pages that can be collaboratively edited using a web browser. See also: `TracWiki`:trac: .. _WikiWikiWeb: http://c2.com/cgi/wiki?WikiWikiWeb Did you copy the previous question from the MoinMoin FAQ? --------------------------------------------------------- Why yes, thanks for asking. How to add a new page to Wiki using the browser? --------------------------------------------------------- Just access the URL http://yourhost/trac/wiki/newpage and click on the "Edit This page link" How to remove a page from the Wiki? --------------------------------------------------------- This, as well as other Wiki management features, will be included in our next release, Trac 0.8. The trac-admin utility will have the ability to remove Wiki pages like so: :: trac-admin wiki remove PageName FIXME: how does one link to a Roadmap? Could the Wiki perhaps get a RecentChanges page, showing the changed pages in anti-chronological order? ------------------------------------------------------------------------------------------------------- The timeline_ contains information about all the changes to Trac content. By deselecting the *view ticket changes* and *view repository checkins* boxes you can view only the Wiki changes. .. _timeline: http://projects.edgewall.com/trac/timeline/ I get the following error message when editing a wiki page with Trac 0.6.1: --------------------------------------------------------------------------- :: columns name, version are not unique SQLite_ version 2.8.13 has a bug in the max() function. Either downgrade/upgrade sqlite or replace trac/Wiki.py with this file: Wiki.py_ .. _SQLite: http://www.sqlite.org/ .. _Wiki.py: http://svn.edgewall.com/repos/trac/branches/0.6-stable/trac/Wiki.py Does Trac support Unicode/UTF-8 or any other encodings? ------------------------------------------------------- Yes, Trac uses UTF-8 internally for all text. See `TracUnicode`:trac: for a detailed description. How can I make links to files on the network via UNC path links? ---------------------------------------------------------------- Make a wiki link that looks like [file:///%5C%5Cserver/path/to/file/readme.txt Readme]. In Mozilla or Firefox type about:config in your browser window and change security.checkloaduri to false. More info: http://tinyurl.com/4xg9c Is it possible to insert a Wiki command in which would let you see all the pages which are linked to or reference the current page? ------------------------------------------------------------------------------------------------------------------------------------ That would be useful. To me. Can I directly add questions to this Wiki FAQ? ---------------------------------------------- Yes, you can! Just click *Edit this page* at the bottom of the page. Be aware that this page is written using reStructuredText_, so you may want to check `WikiRestructuredText`:trac: first... Thanks to ReST, the index for this FAQ is generated automatically, using the ``.. contents::`` directive. .. _reStructuredText: http://docutils.sourceforge.net/rst.html But then how do we control spammers and malicious contributors? --------------------------------------------------------------- I guess you would get an answer rapidly if you added a malicious contribution, and you just might get a bruise. Can I let the anonymous user edit only certain pages? ----------------------------------------------------- FIXME: new question Can I restrict the anonymous user to only the start page? --------------------------------------------------------- To answer my own question - it doesn't look possible. See the "login page" thread on the mailing lists. Is there a way to view nested html pages inside the subversion repository as html and not as html source? --------------------------------------------------------------------------------------------------------- ----- .. ** TIMELINE ** Timeline ======== How do I get Trac to resync the timeline with my subversion repository? ----------------------------------------------------------------------- trac-admin in trac 0.8 and above has a built-in command to resync the repository that works like this. :: trac-admin resync ----- .. ** BROWSER ** Browser ======= On Windows, why does Trac not display diffs? -------------------------------------------- The tree diff functionality provided by the subversion python bindings use an external diff_ command. On UNIX-like systems, diff is usually installed already, so this wasn't an issue there. Installing diffutils_ should solve the problem. After installing diffutils, you will need to add the path to the diff executable to the Windows PATH environment variable and reboot the machine. Diffutils for windows: http://gnuwin32.sourceforge.net/packages/diffutils.htm .. _diff: http://gnuwin32.sourceforge.net/packages/diffutils.htm .. _diffutils: http://gnuwin32.sourceforge.net/packages/diffutils.htm Does Trac support syntax coloring/highlighting of source code files? -------------------------------------------------------------------- Yes, using several methods. See `TracSyntaxColoring`:trac: for details. ----- .. ** TICKETS ** Tickets ======= Is there any way to remove tickets ? ------------------------------------ You have to go through the db file in order to remove a ticket. No web interface is available for the moment (see `#298`:trac:). Is there any way to migrate tickets from one Trac installation to another? -------------------------------------------------------------------------- For example, is it possible to import and export in the same way as one can using trac-admin for the wiki? A possible approach (until someone comes up with a better one?!) is to use the sqlite engine to export the tickets and changes, generate a script, and then insert the records into the second trac installation. E.g.: :: [root@xgbemf6002 root]# sqlite SQLite version 2.8.15 Enter ".help" for instructions sqlite> select * from ticket; 1|1092797666|1094723786|component1|normal|normal|Martin|someone@somewhere.com|||||reopened||test|testing| sqlite> select * from ticket_change; 1|1092798124|leigh|comment||Testing notification 1|1092798319|leigh|owner|somebody|Leigh ... ... It should be possible to take this output , and produce a script that would insert records into the ticket and ticket_change tables in the new trac installation. As provided below, the database schema can be found here_. .. _here: http://projects.edgewall.com/trac/file/trunk/trac/db_default.py?rev=latest How can I associate usernames (e.g. for assigned tickets) with email addresses for notification? ------------------------------------------------------------------------------------------------- FIXME: I'd really like to know.... Can Trac automatically relate user "joesmith" to email address "joesmith@myorg.com", so that we don't have to manually add CC: entries? How do I get notifications on a particular ticket without adding a comment? --------------------------------------------------------------------------- And why does a section have to have some text in it? Can Trac automatically update a ticket when I commit a changeset? ----------------------------------------------------------------- Yes, you can setup Subversion to update the Trac ticket when you commit changes with a message listing tickets that are fixed or related. You can read the comments in the beginning of the file contrib/trac-post-commit-hook http://projects.edgewall.com/trac/file/trunk/contrib/trac-post-commit-hook for more information on how to set this up. If you are using a stable version rather than the latest development version you should instead get the script which matches your release - for example http://projects.edgewall.com/trac/file/branches/0.8-stable/contrib/trac-post-commit-hook We're already using Bugzilla, can I disable tickets? ---------------------------------------------------- Use `TracAdmin`:trac: and disable the permissions for tickets: :: trac-admin permission remove TICKET_VIEW TICKET_CREATE TICKET_MODIFY TICKET_ADMIN ----- .. ** REPORTS ** Reports ======= Is there any way to remove reports? ----------------------------------- Yes, if you have the proper permissions, you should be able to delete a report simply by viewing it and clicking *delete*. ----- .. ** DEVELOPMENT ** Development =========== How can I contribute to the project? ------------------------------------ There are several ways to contribute, including submitting patches, sending feedback and reporting bugs. For details, see `HowToContribute`:trac:. Are there any provisions for I18N and L10N? Is it enough to translate the templates? ------------------------------------------------------------------------------------ Yes and no. Merely translating the templates is not enough to provide complete internationalization of Trac. Python supports gettext_ just fine, but templates might require some extra work, using Clearsilver's built-in `trans.py`_ mechanism or the new `gettext patch`_. The standpoint of the `TracTeam`:trac: right now is to postpone translation efforts until the feature base and source code has stabilized somewhat, so as to not add too much extra work until 1.0. That said, people have already started looking into it, and making some good suggestions already. We will need help with translation efforts. If you're interested in volunteering, please consider joining `the mailing list`_. See also `TracL10N`:trac:. .. _gettext: http://www.gnu.org/software/gettext/gettext.html .. _`trans.py`: http://groups.yahoo.com/group/ClearSilver/message/211 .. _`gettext patch`: http://groups.yahoo.com/group/ClearSilver/message/210 .. _`the mailing list`: http://projects.edgewall.com/trac/wiki/MailingList Is the Database scheme available anywhere? ------------------------------------------ Yes you can find it here_. .. _here: http://projects.edgewall.com/trac/file/trunk/trac/db_default.py?rev=latest ----- .. ** MISCELLANEOUS ** Miscellaneous ============= How do I create or change a milestone with an associated date? -------------------------------------------------------------- Using *trac-admin*, specifically the *milestone time* or *milestone add* command. The input format for the date is rather limited still, and should be a string like this: 'Jun 3, 2003'. Note the string **must** be quoted for proper parsing. Example: :: trac-admin myprojenv milestone add anniversary 'Jun 3, 2003' Are there similar systems for CVS? ---------------------------------- CVSTrac is a similar but far simpler system which can track a CVS repository. It doesn't (IMO) look as nice as trac and migrating from CVS to subversion is easy, but a lot of the CVSTrac functionality is similar to trac. Go here: http://www.cvstrac.org/ And for Arch? ---------------------------------- FIXME: New question. More generally, is there an extensible repository plugin architecture so that tools like OpenCM_ could be used? .. _OpenCM: http://www.opencm.org ---------------------------------- FIXME: New Question Is there a way to remove an attached file from a page? ------------------------------------------------------ Users with WIKI_DELETE permissions can delete attachments. To do this, login as the privileged user, click on the attachment. The attachment page will now have a "Delete Attachment" button you can use to delete the attachment. Note that is an irreversible operation. Is there a way to edit attachments? ----------------------------------- Could I download attached file, update it and upload it back with same name? See related `#948`:trac:. ldap user authentication support ? ---------------------------------- http://anciens.enib.fr/trac/public/wiki/TracLdap See also: `TracGuide`:trac:, `TitleIndex`:trac: }}}