Page 1 of 1

How to change ROX's home icon path?

Posted: Sat 08 Dec 2007, 16:28
by GrantsV
In the ROX Filer I want the home icon to take me somewhere else by default.

I read that there should be a file in /root/choices folder, but theres nothing inside I can see to alter.

Can anyone help me understand how to adjust this?
Thanks,
Colin

Posted: Sat 08 Dec 2007, 23:54
by Bruce B
Home will be what ever the directory is that you startx from.

If you startx from /root, that will be ROX' home.

If you startx from /root and you want another 'home' or ROX start directory you could make a script as follows:

Code: Select all

#!/bin/sh
cd /other/directory
rox
or

Code: Select all

#!/bin/sh
rox /other/directory

Delete your current home icon from desktop, copy your new script to the desktop and for an icon you can you the default one at:

/usr/local/lib/X11/pixmaps/home48.png

Also use this same script if you start ROX from other locations such as the menu.

Posted: Sun 09 Dec 2007, 00:10
by disciple
If you startx from /root and you want another 'home' or ROX start directory you could make a script as follows:

Code:
#!/bin/sh
cd /other/directory
rox


or

Code:
#!/bin/sh
rox /other/directory



Delete your current home icon from desktop, copy your new script to the desktop and for an icon you can you the default one at:

/usr/local/lib/X11/pixmaps/home48.png

Also use this same script if you start ROX from other locations such as the menu.
Isn't this just dealing with the icon on the desktop - not the one on the ROX toolbar?

So we have to figure out some way to start X from somewhere other than ~?

Posted: Sun 09 Dec 2007, 09:24
by Bruce B
disciple wrote:Isn't this just dealing with the icon on the desktop - not the one on the ROX toolbar?
I didn't think GrantsV was talking about that icon.
disciple wrote:So we have to figure out some way to start X from somewhere other than ~?
If we are talking about that icon, which it seems that we are. I think it gets home location from the HOME variable and we don't want to change it because other programs use it.

I searched the binary ROX-Filer and didn't see a text hack. A source code hack may be required.

Also, I went to the ROX site, there are some user addons, one of which may work, that seems to add user defined menu items. I'll leave it to GrantsV or others to look into that, but I do think it warrants attention.

Posted: Mon 10 Dec 2007, 08:30
by disciple
It's funny that this isn't configurable - I would have thought it would be so easy to do that it would be :)

The easiest hack would probably be to compile ROX for the button to point to a symlink (say /~/home), and by default have the symlink point to /~
If anyone wants it to point somewhere else they just make a new symlink.

(from the ROX users group) I think what we want is
> my questions now are:
>
> *) is there a way to link the "home" button with that one directory
> where they are allowed to work? This directory is NOT the home directory
> of the user!!!

You could change toolbar_home_clicked() in toolbar.c. Why is the user's
data area not their home directory?

Changing $HOME is probably a bad idea, since lots of programs use it to
find their preferences.
rather than
1. How to change the folder of the "home" button?
Just edit main.c of the ROX-Filer sources: where there is

home_dir = g_get_home_dir();

replace it with

home_dir = "/network/directory";

and recompile rox.

Posted: Mon 10 Dec 2007, 08:54
by Bruce B
Disciple,

I just want to say, "Very good. Your idea seems solid and flexible."

Bruce

Posted: Tue 11 Dec 2007, 14:39
by GrantsV
The recompile looks exactly what I need, shame it takes a full recompile to change that option, but glad we found an answer.
Many thanks for your effort in finding this!

Posted: Sat 05 Aug 2017, 10:46
by BarryK
I have created a patch for ROX-Filer, for my experimental Easy Linux, to modify 'home_dir', see my blog post:

http://barryk.org/news/?viewDetailed=00638

I have also hard-coded it, but what we really should do is have the code read a file, say /etc/working-path, if that has something in it, then read it and assign to, well, in my patch I created a new variable 'easy_home_dir'.

If /etc/working-path is empty or does not exist, then set easy_home_dir to "~"

if anyone feels like creating that improved patch, go for it!