Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343455 - app-crypt/truecrypt fails if DISPLAY is set and is inaccessable
Summary: app-crypt/truecrypt fails if DISPLAY is set and is inaccessable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Dane Smith (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-31 03:20 UTC by Glynn Clements
Modified: 2011-12-07 17:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glynn Clements 2010-10-31 03:20:02 UTC
Even when built with the "-X" USE flag, truecrypt won't run without X:

$ truecrypt --help
Error: Unable to initialize gtk, is DISPLAY set properly?

AFAICT, this is because it derives from wxApp, which tries to initialise the GUI unconditionally.

This is a bit of a problem because:
1. /home is on a truecrypt drive
2. I can't log in via X without /home
3. root isn't allowed to log in via X
4. truecrypt.org no longer distributes older versions
5. Gentoo has removed the ebuilds for older versions

I'm fairly sure that emerge never warned me that the upgrade would make my data inaccessible. If it did, I would have stuck with a working version.

Given the inability of either the TrueCrypt or the Gentoo developers to get basic issues like this right, I strongly suggest adding a warning about this issue to the ebuild before someone permanently loses important data.


Reproducible: Always

Steps to Reproduce:
1. Run truecrypt with no X server available, e.g.
2. truecrypt --help
3. truecrypt /dev/sdb1 /home

Actual Results:  
Error: Unable to initialize gtk, is DISPLAY set properly?


Expected Results:  
display a help message or mount the drive
Comment 1 Dane Smith (RETIRED) gentoo-dev 2010-11-06 01:54:35 UTC
As far as I can tell, this is an upstream bug. I just ran the same tests with the Binary versions and ran into the same problems. This also appears to have happened in 5.0 as well. I will send a report upstream and see if I can get this resolved for you.

In regard to the older source downloads, we tried to get support for them upstream and were denied it as the old versions contain a lot of resolved bugs. As the source was unavailable, it seemed prudent to remove the old ebuilds.

Sorry for the inconvenience.
Comment 2 Dane Smith (RETIRED) gentoo-dev 2010-11-06 01:58:53 UTC
Upstream bug filed. I will keep you posted.
Comment 3 Glynn Clements 2010-11-06 06:30:30 UTC
Some more information: it appears that it works if DISPLAY doesn't exist in the environment. It fails if DISPLAY is set but it can't connect (even if the operation shouldn't require X).

DISPLAY= truecrypt --help
=> fails
env -u DISPLAY truecrypt --help
=> works

So it isn't as much of a problem as I initially thought.
Comment 4 Jan-Erik Skata 2011-05-22 14:17:13 UTC
I encountered this problem now also when I made an old machine headless. After investingating another old headless machine that was built with USE="-X" I tried building wxGTK with USE="-X" on the new machine, followed by Truecrypt - and it worked. So is this bug more on truecrypt or wxgtk side?
Comment 5 Dane Smith (RETIRED) gentoo-dev 2011-05-23 14:19:12 UTC
(In reply to comment #4)
> I encountered this problem now also when I made an old machine headless. After
> investingating another old headless machine that was built with USE="-X" I
> tried building wxGTK with USE="-X" on the new machine, followed by Truecrypt -
> and it worked. So is this bug more on truecrypt or wxgtk side?

Do me a favor please. Check to see if DISPLAY is set in your environment.

env | grep DISPLAY is the command you want.

If it's set to anything that exists, it will work. If it doesn't show up at all it will work.

If you get nothing on the output from the above command, try doing:

export DISPLAY=""

And running truecrypt --help

and let me know what happens.

Thanks for the help!
Comment 6 Jan-Erik Skata 2011-06-08 15:26:20 UTC
Nope, it seems to not be set. And X is not running.
Comment 7 Jan-Erik Skata 2011-06-08 15:30:40 UTC
After setting DISPLAY I get
# env|grep DISPLAY
DISPLAY=

but
# truecrypt --help 
Error: Unable to initialize gtk, is DISPLAY set properly?


This is before rebuilding with USE="-X" emerge wxGTK && emerge truecrypt.
Comment 8 Dane Smith (RETIRED) gentoo-dev 2011-06-08 16:04:17 UTC
(In reply to comment #7)
> After setting DISPLAY I get
> # env|grep DISPLAY
> DISPLAY=
> 
> but
> # truecrypt --help 
> Error: Unable to initialize gtk, is DISPLAY set properly?
> 
> 
> This is before rebuilding with USE="-X" emerge wxGTK && emerge truecrypt.

Just to make sure I follow you, if you have:
wxGTK with USE=X and truecrypt with USE=X and you do:
env | grep DISPLAY you get nothing and truecrypt --help works?
Comment 9 Dane Smith (RETIRED) gentoo-dev 2011-06-08 16:33:52 UTC
I answered my own question. If wxGTK is build with USE="-X" when truecrypt is build with USE="-X" it no longer cares about DISPLAY at all.
Comment 10 Dane Smith (RETIRED) gentoo-dev 2011-12-07 17:10:01 UTC
This seems to be fixed as of 7.1 which is now in CVS. Closing this. If the issue does resurface, please feel free to reopen.