Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Three simple questions

  • 29-08-2004 10:01pm
    #1
    Closed Accounts Posts: 4,763 ✭✭✭


    One is something that's been bugging me for a bit. How can I force applications (gnome terminal in this case) to launch in a given window size. This would also, I guess, apply to a program I'm running though Wine. I just want it in a small window, whereas it launches in fullscreen each time.

    The next one is scripts. How hard would it be to write simple scripts? :D

    And lastly, how do I deal with spaces in file names (such as /mnt/windows/Program Files/)?


Comments

  • Registered Users, Registered Users 2 Posts: 4,751 ✭✭✭Ste-


    Afaik in the properties of a shortcut when you have the command try -nofs I think that worked for mplayer.
    Never tried scripts so I dunno.
    As for the spaces in file directories afaik there should be no change just type as you see.

    U hope some of this helps as it's been a while since I had a linux system running.


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    This is what I'm referring to when I talk about spaces:
    [root@localhost mark]# dir /mnt/windows/Program Files/
    dir: /mnt/windows/Program: No such file or directory
    dir: Files/: No such file or directory
    

    I guess terminals in Fedora just don't like it. Nautilus picks up on it fine, but konsole, xterm and gnome terminal hiccup on it.


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    I'm happy with my window sizes, so I've never had to do anything about them. Good question though.
    Simple scripts are not hard - (obvious answer :D) . Seriously though, trawl through your files and look at some of the scripts on your system, and you'll start to get the idea. I'm only a beginner myself in this regard, and my first few attempts have basically been clones of stuff that's there already - they're working fine, and I'm gradually picking up more tricks.
    Spaces in file names - sounds like Ste has discovered a magic solution, and fair play to him. However, you may not be as lucky as him - I'm not - in which case the answer is to use the "escape" character - "\". Your example will look like this:

    /mnt/windows/Program\ Files


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    tomk wrote:
    I'm happy with my window sizes, so I've never had to do anything about them. Good question though.
    Simple scripts are not hard - (obvious answer :D) . Seriously though, trawl through your files and look at some of the scripts on your system, and you'll start to get the idea. I'm only a beginner myself in this regard, and my first few attempts have basically been clones of stuff that's there already - they're working fine, and I'm gradually picking up more tricks.
    Spaces in file names - sounds like Ste has discovered a magic solution, and fair play to him. However, you may not be as lucky as him - I'm not - in which case the answer is to use the "escape" character - "\". Your example will look like this:

    /mnt/windows/Program\ Files

    You're my saviour. :D


  • Registered Users, Registered Users 2 Posts: 1,569 ✭✭✭maxheadroom


    Another way to make sure your paths or filenames are correct is to use bash's tab completion feature. Type the first few letters, press tab, and it'll either fill in the rest for you, or give you a list of possible matches. Keep adding single letters untill bash has only one choice to make. Once you get used to it you'll never type a full filename again ;)


  • Advertisement
  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    The spaces issue can be simply solved by using the 'escape character' (\) before them or by encasing the path in quotes:

    cd /My\ Spaced\ Directory

    cd "My Spaced Directory"

    Tab completion should work as normal with either scheme.


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    Another way to make sure your paths or filenames are correct is to use bash's tab completion feature. Type the first few letters, press tab, and it'll either fill in the rest for you, or give you a list of possible matches. Keep adding single letters untill bash has only one choice to make. Once you get used to it you'll never type a full filename again ;)

    I have a deep and vibrant hate for auto-completion anything. :(


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    The tab thing is wonderfully helpful. You can also use Control-U to clear a line.

    Bash scripts aren't hard to do. If you have some previous programming experience you'll be grand. If not, you're be grand. Just read a howto on Bash programming. I'm sure The Linux Documentation Project would have something.


  • Registered Users, Registered Users 2 Posts: 249 ✭✭yaledo


    Fenster wrote:
    I have a deep and vibrant hate for auto-completion anything. :(

    Hi fenster,
    Any autocompletion that tries to be smarter than you is a pain in the neck, but with the tab completion in bash, it waits humbly for you to press tab before it does anything. I was using bash for weeks before I knew it even existed.
    Joe


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    I'll give it a look later as I want them for macros more than anything. :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    yaledo wrote:
    Hi fenster,
    Any autocompletion that tries to be smarter than you is a pain in the neck, but with the tab completion in bash, it waits humbly for you to press tab before it does anything. I was using bash for weeks before I knew it even existed.
    Joe
    True. Computers should be obedient. They should do what they are told. they should never suggest anything.

    However the autocompletion in bash is totally obiedent. For example if I have 2 files, test1.txt and test2.txt in the current directory and type in "t", then press tab, all that will come up is "test", it'll wait for my input. Pressnig tab agaion won't change it. If I press tab twice, it will print on a new line "test1.txt test2.txt", ie the files that match, it'll also put in everything I've alread typed. It also works with commands. If I type mpl<tab>, it autocompletes to mplayer.

    This kind of autocompletion is good if you had a buch of files that started with the same bunch of letters, eg Letter - To Boss.txt, Letter - Rent.txt, Letter - Suicide Note.txt, etc. This ay you don't have to type loads.


  • Registered Users, Registered Users 2 Posts: 1,419 ✭✭✭nadir


    you can set the resolution of stuff ran through wine in the wine config, and whether it should be full screen or not.

    I have a problem also, when you resize terminal windows in X the text can get screwey, as in running back over the line you are on when typing beyond the physical window size.
    Any solution?

    ps: fluxbox supports setting window sizes for anything you run, and/or can remember window features locations, dimensions, sticky, and a whole more.


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Fenster wrote:
    I have a deep and vibrant hate for auto-completion anything. :(

    Don't knock it 'til you've tried it, this won't ever fill in things it thinks you mean!
    It's almost interactive spell checking for the shell - prevents a lot of mistakes.

    You can open a window to a named size using the --geometry argument.
    It works for pretty much any X program, in your case gnome-terminal --geometry 80x10+0+0 would give you an 80x10 character terminal in the top left corner.
    mplayer even allows you to use percentages, though it's unusual.
    mplayer -nofs --geometry 30%x30% will use that much screen real-estate.

    And do give that TAB button a go, you don't have to like it.
    Good luck,
    NiallB


Advertisement