How to change ROX's home icon path?

Using applications, configuring, problems
Post Reply
Message
Author
GrantsV
Posts: 58
Joined: Wed 16 May 2007, 19:24

How to change ROX's home icon path?

#1 Post 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

Bruce B

#2 Post 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.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post 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 ~?

Bruce B

#4 Post 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.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post 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.

Bruce B

#6 Post by Bruce B »

Disciple,

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

Bruce

GrantsV
Posts: 58
Joined: Wed 16 May 2007, 19:24

#7 Post 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!

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post 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!
[url]https://bkhome.org/news/[/url]

Post Reply