That's why I used the nautilus variable. It allows for multiple files to be packed into the variable.
That's why I used the nautilus variable. It allows for multiple files to be packed into the variable.
Linux User #460341 || Ubuntu User #19510 || Unanswered Posts Team
Here's a script that works for me under Ubuntu 8.10:
Code:#!/bin/bash # add filename to .hidden file echo "$1" >> "$PWD/.hidden" #simulate the pressing of the F5 key to refresh the window xte "keydown Control_L"; xte "key r"; xte "keyup Control_L"
ryanhaigh,
I have to say, your solution was flippin great. Worked like a charm. Now I can hide all those pesky files Thanks!
-cloudstrifejr1
I have been using Linux (mostly Ubuntu 9.04) for a few months now, but this is my first forum post. I still use Mac OS 10.5 for my main laptop and I have Netatalk and Avahi (as described in this tutorial: http://www.kremalicious.com/2008/06/...achine-volume/ ) to allow me to use AFP between my computers.
Using Mac OS results in the creation of a ":2eDS_Store" file on any shared directory, I have tried hiding it using the aboved described .hidden method with no luck. Anyone have any other ideas that dont require changing the file name (as it needs to stay named ":2eDS_Store" for Mac OS).
Thanks in advance, these boards have already proved invaluable with out even posting.
Thank you all for your solutions, now I can hide all those non-dotted Mac OS X generated files!
As for k6martini's problem, you should edit your /etc/netatalk/AppleVolumes.default file and add to the line of each share "options:usedots"
ex. for home folder share:
It creates regular .DS_Store files which are hidden under both Linux and Mac OS XCode:~/ "Home" options:usedots,upriv
I also use the upriv option for the share to use unix privileges, you could although ommit it
Last edited by Z4mp4n0; February 14th, 2010 at 10:31 AM. Reason: OCD
This is a nice script. I have one problem though. This scripts writes the entire path of the file (even when i remove the $PWD part.)
for example, it writes "file:///home/pranav/Music/cover.jpg" to the .hidden file. But for the file to hide, we need just "cover.jpg" written in the .hidden file. Can someone tell me how can I remove the other part from the nautilus variable that is being used here?
hide hTML folders:
#!/bin/bash
touch $PWD/hidden
find $PWD *_files -maxdepth 0 | tee -a .hidden
HIde selected:
#!/bin/bash
touch $PWD/.hidden
touch $PWD/.tmp
echo "$PWD/$NAUTILUS_SCRIPT_SELECTED_URIS" | tee -a $PWD/.tmp
grep .*/ .tmp|sed /.*\/// > .hidden
rm -f .tmp
scripts not debugged!!!!
I cant get any one of those two scripts working?
The first one. I have no idea why its not working? Instead of adding it directly to the menu, I just made a script in the:
~/.gnome2/nautilus-scripts
and set it as executable.
The second sript gives output of:
which doesnt work either.../home/username//home/username/.gnome2/nautilus-scripts/Hide This File.sh
Am I missing something? even if I take the $PWD out, it just makes a line saying:
and that doesnt work either... if I manualy delete everything up to "Hide" then it hides the file perfectly fine...file:///home/username/.gnome2/nautilus-scripts/Hide This File.sh
weird.
On ubuntu 10.04
Last edited by zero2xiii; September 14th, 2011 at 02:41 PM.
Switched away from windows XP to Ubuntu 9.04. Never turned around to look back.
BUGS:
hide hTML folders:
#!/bin/bash
touch $NAUTILUS_SCRIPT_CURRENT_URI/.hidden
find $PWD *_files -maxdepth 0 | tee -a $NAUTILUS_SCRIPT_CURRENT_URI/.hidden
HIde selected:
#!/bin/bash
touch $NAUTILUS_SCRIPT_CURRENT_URI/.hidden
touch $NAUTILUS_SCRIPT_CURRENT_URI/.tmp
echo "$NAUTILUS_SCRIPT_CURRENT_URI/$NAUTILUS_SCRIPT_SELECTED_URIS" | tee -a $NAUTILUS_SCRIPT_CURRENT_URI/.tmp
grep -P .*/ .tmp | sed 's/.*\///' > .hidden
rm -f .tmp
scripts not tested!!!!
Last edited by yaskhan; September 16th, 2011 at 11:17 AM.
Bookmarks