notsecure / uTox

Lightweight Tox client
utox.org
GNU General Public License v3.0
597 stars 149 forks source link

Portable mode #370

Closed NewEraCracker closed 9 years ago

NewEraCracker commented 10 years ago

Hello, I am running uTox on Windows and wondering if there is any way to disable the usage of AppData\Local as setting location and using own folder as the place where the settings are saved.

I tried copying the utox_save and tox_save to own dir but this still results in files being saved at AppData\Local.

Any ideas?

jf99 commented 10 years ago

Tox already saves its config file at the same location where the utox.exe is. However, windows doesn't allow programs without admin privileges to write to the directory "C:\Program Files\". Instead it redirects such file accesses to %appdata%.

So you just need to run tox from a directory with write permission.

reyaz006 commented 10 years ago

Tox already saves its config file at the same location where the utox.exe is

Maybe it was true for previous versions, but not anymore. Right now, with 0.1.6 x64 under Windows 8.1 I can't make it use its own directory.

I'm already running it with admin privileges, UAC is disabled, the directory has write permission and located outside of "Program Files" or any other system directory.

tsudoko commented 10 years ago

Yes, the save location is for now hardcoded to %LOCALAPPDATA%\tox. According to the source code there will be an option to choose where uTox should store its data.

jf99 commented 10 years ago

Okay, i didn't know that. I'd also prefer the portable mode.

fcore117 commented 10 years ago

My vote goes to portable mode option too that works on every OS

LittleVulpix commented 10 years ago

Especially since tox-based products don't have the ability to log into the same account from more places, I'm kinda forced to run tox from a flash drive, carrying it around with me. This new "change" makes the job a lot more annoying since now I always have to go to the appdata folder and copy out the newly saved data.

My vote goes for portability.

PureSpider commented 10 years ago

What is the latest version putting the profile aside the executable and would I still be able to use that version without major implications?

darkman088 commented 10 years ago

@tsudoko - WONDERFUL news! But when is this option going to be implemented ?

darkman088 commented 10 years ago

Hello,

would you kindly update us on the implementation status ?

irungentoo commented 10 years ago

Latest uTox now has a portable mode that can be activated with the --portable command line argument.

darkman088 commented 10 years ago

Dear irungentoo,

many thanks for the good news, but it would be very nice, if there could also be an option for this in the settings screen, as it would be necessary to create a special shortcut for the --portable option, and also, more important, it would enable all the users to make use of this function, not only the ones, who have read this specific thread... Thanks a lot!

LittleVulpix commented 10 years ago

I agree with this. I had to create a special shortcut too and that's a bit problematic since when I use utox_runner to update tox, it will also automatically launch the new version, ignoring my shortcut. Not to mention if the filename changes, my shortcut will become useless as well.

fcore117 commented 10 years ago

still currently at least i am happy that there is some chance to launch in portable, i hated that user profile mess always to copy files and sometimes i even forgot profile to someones computer. Lets see what developers decide in future.

irungentoo commented 10 years ago

I can't really put a portable option in the utox settings because it would be a bit of a mess.

How about if it checks if a file named portable exists in the current dir? if the file exists uTox is launched in a portable mode, if it doesn't, uTox is launched normally.

darkman088 commented 10 years ago

Hello irungentoo,

I totally agree with this! It is OK for me and I guess for most of the users. Just I do not quite understand your statement "I can't really put a portable option in the utox settings because it would be a bit of a mess". Just have a look at qTox - they have it like that and it works flawlessly. And qTox is now getting quite some advantages, because they implemented the Alias function in order to rename a user and they have also a possibility to "extract" the Tox ID of a contact... I am REALLY missing those ones in uTox and though I have requested those features in uTox, nothing has been done yet in this direction (sorry if this sounds a bit harsh to you, it is not meant to sound like that!)

fcore117 commented 10 years ago

maybe file (fixed, i meant file)way is better than option and works very easily everywhere, very simple people may mess this up? like creating portable where it creates negative side effect or even profile loss or theft.

darkman088: what do you think, folder option would be really easy to accomplish by every person

darkman088 commented 10 years ago

Hello fcore117,

not sure what exactly do you mean by 'folder option', but I think that the entire Program Files thing is... let's call it softly... COMPLETE nonsense. I think that storing and looking for the utox_save and tox_save files should ONLY be the current folder of utox.exe and nothing else... The rest is just the screwed understanding of Microsoft people which makes data structures and locations on a Windows based system totally fuzzy!!

fcore117 commented 9 years ago

i mean if file "portable" exists then utox is portable, if not then casual mode and it should work on Linux and Win... like irungentoo last comment was something about file or what he meant?

LittleVulpix commented 9 years ago

I like the check. tox_save in current folder? Launch portable. If not? Look in roaming appdata.

irungentoo commented 9 years ago

Currently --portable makes it save in a folder named Tox in the current dir.

You want me to make it check for that folder and make it launch in portable mode if it's present?

fcore117 commented 9 years ago

what is better for future so there are no changes anymore after this change, for me the important thing is that utox is portable whitch already works. Let other people discuss this furter what is better, is it file or folder based or???.

tsudoko commented 9 years ago

I'd prefer a command line option that would let you specify which tox_save file uTox should use, but that wouldn't preserve the settings; also people seem to complain about not being able to enable the portable mode from the GUI. Maybe add a portable option in the "Switch Profile" section?

LittleVulpix commented 9 years ago

@irungentoo not sure if the folder should be called tox - or if there should be a folder. Maybe call it profile or something, because you'll already (usually) have a folder called "Tox" where your own tox is running. The current --portable makes it so that the save file is in Whereever\Tox\Tox\tox_save which is a bit strange. Either name the folder something else - or store the files in the same directory as tox. This is how it was at the very beginning, I believe.

irungentoo commented 9 years ago

@LittleVulpix the logs get stored there if you enable logging so creating a folder is kind of necessary.

Unless you want a mess of files in your tox directory.

fcore117 commented 9 years ago

i agree subfolder is needed because files could create chaotic mess.

LittleVulpix commented 9 years ago

@irungentoo True, also the "avatars" and everything else. Therefore, I agree that there should be a subfolder. Definitely not named "Tox" though. Profile sounds good to me, since it clearly states your personal info is inside. Any other suggestions?

darkman088 commented 9 years ago

Guys, why are you trying to over-complicate it ? The tox file is as important as the .exe. Let them be in the same (current) directory. For logs (if someone enables logging), it should create a Log subfolder or History or name it as you want and there should these chat logs be stored.

LtanHonor commented 9 years ago

I too would love a portable option.

In the interim, I cut the Tox folder from %appdata% and copied it into my saved uTox folder on my Google Drive. This can be done for a flash drive as well.

I then ran cmd as Admin and issued:

mklink /J %appdata%\Tox "c:\users\MEMEMEME\Google Drive\uTox\Tox\Tox"

No problems after that. Granted this is a pain and requires admin rights on every computer that it is going to be run on... Since I have Admin on the systems it is not much of a bother for me at the moment.

Just another option for those tied to Windows like me at work :/

zetok commented 9 years ago

@LtanHonor I have a question, totally unrelated to this issue.

Do you realize that what you're doing is dumb as hell?

LtanHonor commented 9 years ago

@zetok :

If you have a better method of forcing this into portability without programming I would enjoy reading it.

Otherwise, instead of just stating that a method is "dumb" explain why it is so that others can learn from it.

Just keep in mind that not everyone who uses GitHub codes. Some people try to contribute by testing software, or putting up with bugs so that they can use something that they see merit in.

zetok commented 9 years ago

@LtanHonor Basically tox_save, which you promptly put in cloud, contains public and private key pair. The exact thing that allows you to use Tox in a secure way. In the moment you have put them in cloud, you basically render all Tox security for yourself useless.

To help with that kind of dumb thing that people will be doing, clients are supposed to offer a way to encrypt profile, so that even if user would put it in cloud, public/private key pair should be safe.

Unfortunately, so far only Toxic support it well, there's ongoing work on it in qTox, and µTox… one could hope that µTox would get to that feature too.

Also, the way you put it… generally uploading unencrypted data to cloud is far from being smart. Additionally, you put it in a way suggesting for other users that this is like it should be done, which is clearly not the case (at least until there will be profile encryption).

Edit: currently Tox isn't yet in a shape that would be best for normal usage. All you can do (provided you can't code), is to wait for features to be implemented and in meanwhile contribute by testing (or something) :)

Hope it helps.

LtanHonor commented 9 years ago

@zetok: Ahhh... yeah. I see that point now that it is pointed out.

I completely agree about using a cloud based service for storing the encrypted bits. And I really should have thought beyond my initial testing of the app on that particular point.

I appreciate the call out on that lapse of intelligence, and the caveat would have to be "use mlink with removable media only".

darkman088 commented 9 years ago

This is why I never dared to store my utox_save file somewhere on the internet. A small question - once encryption will be implemented, will that mean that the user will need to enter a password before the utox client would be able to decrypt, read and load the profile ?

muchweb commented 9 years ago

+1 for storing files in the same directory by default (and adding an option to specify a path).

mohamedkomalo commented 9 years ago

@irungentoo like @darkman088 why utox can't be portable by default ? it would be nice if the download is just a zip file, the person can extract it anywhere he likes, and all the data are saved inside the folder. if a person wants to update

EDIT: second thought, I think it is mainly to support multiple users on same computer, right ?

GrayHatter commented 9 years ago

closed as fixed tag me if I missed something

darkman088 commented 9 years ago

@GrayHatter - what exactly is the fix. I didn't see a consensus on some of the suggested solutions. The --portable option is not a transparent solution, as it is not obvious from the interface. Thank you!

fcore117 commented 9 years ago

At least it can be made portable somehow and i use it absolutely every day.