[texworks] SCRIPTING: on linux say Ubuntu - script write priveledges

Paul A Norman paul.a.norman at gmail.com
Tue May 24 09:08:52 CEST 2011


On 24 May 2011 18:15, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi,
>
> On 2011-05-24 03:01, Paul A Norman wrote:
>> Appreciate any info please from Linux user(s) on some basic questions.
>>
>> For reference I'm looking at Ubuntu 11.04.
>

<ramblings>

> Welcome to the Linux world :).

Thnx :)

Been in and out of it for years - had always wanted to be in a
position to just use it only, used to use a little Kylix, then Lazarus
now, but as to being able to be based on Linux only ... alas not yet
... We do have one dedicated box for visitors here to use, rest is
dual boot or VMs regrettably.

Remember when everyone was just trying to get X Windows servers to
work ~~ oops ... then RedHat was it for a while ...

Now various Linux distributions will give any OS a run for their
money! -- I mean license ...

I really like Ubuntu family K- and X-   .. as well.

Been able to setup old machines and get more life out of them ....

Would look to putting current Xp systems into sandboxed VBoxes under
say Ubuntu when the time for Xp expires...

</ramblings>

>
>> After setting the ppa required
>> https://launchpad.net/~texworks/+archive/ppa, Using sudo apt-get
>> install stuff to setup TeXworks 0.5 ver813 (works really nicely), when
>> a user runs a Tw script from TeXworks, can the script automatically
>> (if Tw's preferences permissions are already set) write/read to
>> subdirectories of the Tw script's own directory?
>
> Yes, that should be possible in the same way as on the other OSs by default.
> <random rambling>
> Of course, the user must have read/write permissions to the files and
> directories in question. This is required by Linux independent of Tw.
> Since, by default, the resources are put under the user's home
> directory, this shouldn't be a problem.

Ok, please see point below. This is leading to what I am thinking about.

>  Note, though, that resources
> provided by Tw typically are installed read-only (on my machine,
> anyway). I haven't investigated this yet, as it is not a problem for me
> (any noone else has complained yet ;)) - you wouldn't want to overwrite
> "official" files, anyway, would you?
> </random rambling>
>
>> Also I have found that when logged in under the user name established
>> during Ubuntu install, running TeXworks form a console produces a
>> version that shows the TeXworks menu items in the new Unity top frame,
>> however if I start TeXworks as sudo TeXworks I get a more classical
>> looking (similar to Windows) appearance of TeXworks layout with the Tw
>> menus in the program's own frame. What should I make of that please?
>
> Interesting, I haven't noticed this before, but I can confirm it. Is
> there a special reason to run Tw with sudo (normally, one wouldn't; btw,
> GUI applications should be run with gksudo, but this doesn't change the
> effect)?
> I tried with other Qt/KDE applications as well (kcalc, kdenlive), and
> they exhibit the same problem. So I'd say this is a problem with the
> interaction Qt-unity as the root user. Did you try creating a new user
> (different from the one created during installation) and running Tw or
> other Qt/KDE apps there?

Well this is where I am at...

Using a new user, would require that the scripts were copied to their
(new) home directory?
Or what happens to Linux file permissions, or does TeXworks install as
it's own group with linux file permissions to everyone or as its in
HOME/USER obviously then scripts are limited to that User?

That's when/why I started looking at sudo - thanks for note on gksudo,
it floats back into memory dimmly :)

(I like Jamie's comment when talking about gksudo , "...Man pages are
extremely useful for this kind of thing, a lot of the time
they seem to contain gibberish or language that only experienced
unix/linux sysadmins can understand, but this really just depends on
the author. ...
https://lists.ubuntu.com/archives/ubuntu-studio-users/2007-September/000472.html)

In some educational situations say, and  in other shared
circumstances, does each User maintain their own Script folder (yes),
or/and can an administrator set up a central Tw script repository on
each PC, or preferably even for a whole local network?

Thanks,
paul

>
> Cheers,
> Stefan
>



More information about the texworks mailing list