FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-18-2008, 08:11 PM
Mario Vukelic
 
Default Annoying behavious of Nautilus when drag+drop as link

On Fri, 2008-07-18 at 21:46 +0200, Loc Greni wrote:
> There are more system scripts than you'd think that barf on
> spaces. In addition by default xargs for instance takes spaces
> as filename separators and filenames with embedded spaces
> are a pain to manipulate with ssh/scp.

Thanks for the info. I am not a cmd line expert, but I find this a sad
state of affairs. I give you scp, but on first glance it seems that
there is little excuse not to handle spaces properly with xargs:


man xargs:

"OPTIONS
-0 Input items are terminated by a null character instead of by
whitespace, and the quotes and backslash are not special (every
character is taken literally).Disables the end of file string, which is
treated like any other argument. Useful when input items might contain
whitespace, quote marks, or backslashes. The GNU find -print0 option
produces input suitable for this mode.

<snip>

"EXAMPLES

find /tmp -name core -type f -print | xargs /bin/rm -f

Find files named core in or below the directory /tmp and delete them.
Note that this will work incorrectly if there are any filenames
containing newlines or spaces.

find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f

Find files named core in or below the directory /tmp and delete them,
processing filenames in such a way that file or directory names
containing spaces or newlines are correctly handled."


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2008, 08:16 PM
Mario Vukelic
 
Default Annoying behavious of Nautilus when drag+drop as link

On Fri, 2008-07-18 at 21:46 +0200, Loc Greni wrote:
> In addition by default xargs for instance takes spaces
> as filename separators and filenames with embedded spaces
> are a pain to manipulate with ssh/scp.

Oh, I forgot:

Anyway, I still consider a system script (ergo, Ubuntu-delivered), but
also any other script broken if it fails to deal with _all_
filesystem-allowed characters in user files.

You simply can't allow to use a character when naming a file, and then
barf on it. (Windows gets around this by complaining about half the keys
on the keyboard when naming files, which is still broken


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2008, 08:44 PM
"Loc Greni"
 
Default Annoying behavious of Nautilus when drag+drop as link

2008/7/18 Mario Vukelic <mario.vukelic@dantian.org>:
> On Fri, 2008-07-18 at 21:46 +0200, Loc Greni wrote:
>> There are more system scripts than you'd think that barf on
>> spaces. In addition by default xargs for instance takes spaces
>> as filename separators and filenames with embedded spaces
>> are a pain to manipulate with ssh/scp.
>
> Thanks for the info. I am not a cmd line expert, but I find this a sad
> state of affairs. I give you scp, but on first glance it seems that
> there is little excuse not to handle spaces properly with xargs:

[snip]

There is indeed little excuse and I think all scripts use the
print0/-0 combination. Fact is: the "special" characters in
filenames tend to be a nuisance when you use command-line
(because you have to put quotes everywhere, use print0/-0).
To the point: better not to name "Link to " if it can be helped !

Loc

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-18-2008, 09:10 PM
Peter Garrett
 
Default Annoying behavious of Nautilus when drag+drop as link

On Fri, 18 Jul 2008 22:16:08 +0200
Mario Vukelic <mario.vukelic@dantian.org> wrote:

> Anyway, I still consider a system script (ergo, Ubuntu-delivered), but
> also any other script broken if it fails to deal with _all_
> filesystem-allowed characters in user files.

I kind of expected a reaction to my "spaces are stupid: comment
I quite agree that they *can* be handled, but I must old-school...

Or more accurately, lazy ;-)

I also get annoyed by commands with unexpected capital letters ;-)
(Yes, I do know about tab completion...)

On the other hand, my comment provoked several people to explain how to
handle spaces.... quite informative for list members.

*grin*

--
Peter Garrett <peter.garrett@optusnet.com.au>
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 06:27 AM
Mario Vukelic
 
Default Annoying behavious of Nautilus when drag+drop as link

On Fri, 2008-07-18 at 22:44 +0200, Loc Greni wrote:
> To the point: better not to name "Link to " if it can be helped

I don't make my scripts always deal with spaces, either. Or deal with
command line errors gracefully, etc. I also consider them broken

Not to quote is fine for personal quick-and-dirty scripts, when you know
you can count on input w/o special characters. But for professsional
scripts that shall be distributed it is inexcusable, because users WILL
create spaces in filenames. IMHO there is little point in avoiding "Link
to" at all costs by default.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 10:06 AM
"Johnny Rosenberg"
 
Default Annoying behavious of Nautilus when drag+drop as link

2008/7/19 Mario Vukelic <mario.vukelic@dantian.org>:

On Fri, 2008-07-18 at 22:44 +0200, Loïc Grenié wrote:

> To the point: better not to name "Link to " if it can be helped



I don't make my scripts always deal with spaces, either. Or deal with

command line errors gracefully, etc. I also consider them broken



Not to quote is fine for personal quick-and-dirty scripts, when you know

you can count on input w/o special characters. But for professsional

scripts that shall be distributed it is inexcusable, because users WILL

create spaces in filenames. IMHO there is little point in avoiding "Link

to" at all costs by default.




Well, different people – different opinions. In my opinion it's very important, plus that I actually hate that "Link to" thing. It irritated me in Windows, but fortuntaely I found out how to get rid of it there. It irritates me just as much in Linux, and I want this solved. Going back to Windows is NOT an option… I will try some of the suggestions I already got here and I want to thank you all for replying.



Since different people have different opinions, I wouldn't mind a few checkboxes somewhere among the settings for Nautilus, easily accessible:

"☒ Add text to name of link: ________________________
* * * * * *☒ Before (Example: Text=´Link to ´, File name=´My File.txt´ → Link name= ´Link to My File.txt´)

* * * * * *☐ After (Example: Text=´ (Link)´, File name=´My File.txt´ → Link name= ´My File (Link).txt´)"

or something like that. Unchecking everything would, of course, give me the result I'm looking for.


(The quote above requires UTF-8 to be viewed properly)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 10:42 AM
Mario Vukelic
 
Default Annoying behavious of Nautilus when drag+drop as link

On Sat, 2008-07-19 at 12:06 +0200, Johnny Rosenberg wrote:
>
> Well, different people – different opinions. In my opinion it's very
> important, plus that I actually hate that "Link to" thing. It
> irritated me in Windows, but fortuntaely I found out how to get rid of
> it there.

Oh, I did not mean to say that I am against changing the default text or
providing an option to remove the "Link to" part. Sorry if I was
unclear.

What I did mean was that "scripts (even system scripts) can fail on
filenames with spaces" can not be a justification for such an option.
This is so because spaces are allowed by the filesystem, the user is not
prevented from creating such files, and therefore someone WILL do it).
If a script (especially a system script) fails on spaces it should be
fixed.

I'd agree with a change or option on the grounds of removing redundancy
and improving aesthetics.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 11:15 AM
Peter Garrett
 
Default Annoying behavious of Nautilus when drag+drop as link

On Sat, 19 Jul 2008 12:42:05 +0200
Mario Vukelic <mario.vukelic@dantian.org> wrote:

> What I did mean was that "scripts (even system scripts) can fail on
> filenames with spaces" can not be a justification for such an option.

Mario, it was a throw-away comment, not a justification.

Let me rephrase it...

There's no need to rename the link at all. An ordinary symlink pointing
at the file concerned would simply use the file's original name. The
user is free to change that name if desired. The icon can have an arrow,
or whatever seems appropriate, to show it as a link. The icon could even
have the words "Lnk to /path/to/foo" on it. Rox shows the target
location on mouseover of a link icon, for example.

Nothing to see here, move along folks...

--
Peter Garrett <peter.garrett@optusnet.com.au>
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 11:53 AM
"Johnny Rosenberg"
 
Default Annoying behavious of Nautilus when drag+drop as link

2008/7/19 Peter Garrett <peter.garrett@optusnet.com.au>:

On Sat, 19 Jul 2008 12:42:05 +0200

Mario Vukelic <mario.vukelic@dantian.org> wrote:



> What I did mean was that "scripts (even system scripts) can fail on

> filenames with spaces" can not be a justification for such an option.



Mario, it was a throw-away comment, not a justification.



Let me rephrase it...



There's no need to rename the link at all. An ordinary symlink pointing

at the file concerned would simply use the file's original name. The

user is free to change that name if desired. The icon can have an arrow,

or whatever seems appropriate, to show it as a link. The icon could even

have the words "Lnk to /path/to/foo" on it. Rox shows the target

location on mouseover of a link icon, for example.



Nothing to see here, move along folks...



--

Peter Garrett <peter.garrett@optusnet.com.au>


--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



About Rox: I just installed it, but I couldn't find a way to make it show the tree or something similar to the left panel in Nautilus. Did I miss something or just isn't there one?


Johnny Rosenberg


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-19-2008, 12:23 PM
Peter Garrett
 
Default Annoying behavious of Nautilus when drag+drop as link

On Sat, 19 Jul 2008 13:53:50 +0200
"Johnny Rosenberg" <gurus.knugum@gmail.com> wrote:

> > About Rox: I just installed it, but I couldn't find a way to make it show
> the tree or something similar to the left panel in Nautilus. Did I miss
> something or just isn't there one?

Rox uses a different way. As far as I know the "tree view" is absent.
In some respects it is more like the "Nautilus spatial" method, where each
directory can be a separate window. The difference is that rox does not
open new windows *by default* for a clicked directory.

For example, a "middle click" in rox opens a new directory in a new
window - which is convenient for "drag and drop". A normal left click
opens in the same window.

There are lots of configurable options - exploring the right-click menu is
a good start. One thing that some people find annoying is that rox does
not set default apps to open files - it allows you to enter your own
preference (for example, I am fond of the "feh" image program, and set
it to open images like jpg and png). I like this, some people don't It
is quite flexible - for example, you can create a menu of apps to choose
from to open a directory or file, accessible from "right click", and so on.

There are also useful key combinations, including a "mini command
line" ( Shift + 1 - the "!" key on a US-style keyboard).

Rox repays a bit of time taken to learn its possibilities - once you have
it set for your preferred methods, the configuration can be found in
~/.config/rox.sourceforge.net/ , so reinstalls or moves to another machine
etc. can replicate your preferred settings by backing up and replacing
that.

Peter

--
"INX Is Not X" Live CD based on Ubuntu : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org