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

Linux/Unix bits and bobs thread

  • 31-08-2010 10:12am
    #1
    Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭


    I thought it'd be cool to have a thread where we could post up "bits and bobs" that enhance the Linux/Unix experience, mostly programs but also other things like good icon sets, pretty wallpapers, informative websites etc.

    I'll get started with three things I think are really handy; some of you will have seen these things before.

    zenity (CLI progam)
    Zenity is a command line program that displays GTK+ dialog boxes and (if applicable) returns any data the user put into that dialog. For example, run the following at a prompt
    zenity --info --text="Hello, boards.ie user."
    
    For a list of things you can do with zenity run `zenity --help` and see these examples.

    Suggested usage: zenity is really handy for making shell scripts user friendly. You can make your script completely GUI based, allowing you to have non-techie people use it, and also making it easier for yourself. ;)



    rhythmbox-client (CLI program)
    rhythmbox-client is a program that allows you to control the Rhythmbox audio player through a command line interface. The following command, for example, will skip to the next song.
    rhythmbox-client --next
    
    A full list of options can be found through `man rhythmbox-client`.

    Suggested usage: I use this program to control Rhythmbox using keyboard shortcuts. On my system, Ctrl+Alt+P plays/pauses the player, while Ctrl+Alt+> skips to the next song. This is really cool, in my opinion! You could also use this feature to create contol icons in GNOME panel.

    Note: If you haven't started Rhythmbox before running one of these commands, it will start up automatically.



    nautilus-image-converter (Nautilus plugin)
    This is very handy plugin for batch resizing images. Article. When it's installed you just highlight some images, right click and select "Resize images". Very easy.

    Tip: There isn't any scope for putting resized pictures into a different folder, which is what you really want. However, there is a way around this. Resize the images like normal, ensuring that ".resized" is appended to each file (before the file extension). (Example: image.jpg is resized to file image.resized.jpg.) You can now use terminal wildcards to move all the resized files. For example:
    mv *.resized.* small/

    will move all the resized images into the "small" sub-directory. (The small sub-directory must be created before running this command; `mkdir small`.




    I've used all these 3 things a bit, so if you've any questions I might be able to answer. :)


Comments

  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    This is a handy command for purging old config files from orphan packages on a Debian based machine. apt-get autoremove of orphaned packages does not appear to purge config files. Such a simple thing to overlook:pac:
    deborphan --find-config | xargs dpkg --purge
    


  • Moderators, Arts Moderators Posts: 35,731 Mod ✭✭✭✭pickarooney


    Zenity looks fantastic - can't believe I never knew about it.

    I use mogrify to resize images and a few other manipulations on a batch of files


  • Registered Users, Registered Users 2 Posts: 85 ✭✭rfrederick


    Naikon wrote: »
    This is a handy command for purging old config files from orphan packages on a Debian based machine. apt-get autoremove of orphaned packages does not appear to purge config files. Such a simple thing to overlook:pac:
    deborphan --find-config | xargs dpkg --purge
    

    Nice to know, thanks for that. Usually I do the following, which is the same using a couple more commands:
    # dpkg -l | grep ^rc | awk '{print $2}' | xargs dpkg -P
    


  • Closed Accounts Posts: 5,082 ✭✭✭Pygmalion


    Pretty colours from my .bashrc.
    alias ls="ls --color=auto"
    eval $(dircolors -b)
    
    export GREP_COLOR="1;33"
    alias grep='grep --color=auto'
    

    I think some distros have this (or something similar) by default, not all do though, so handy to have if yours doesn't.


  • Registered Users, Registered Users 2 Posts: 425 ✭✭Mathiasb


    Speed up ssh:

    .bashrc
    alias ssh='ssh -C4c arcfour,blowfish-cbc'
    
    ~/.ssh/config
    Host *
       ControlMaster auto
       ControlPath ~/.ssh/master-%r@%h:%p
    
    Makes ssh use sockets for more than 1 connection to the same server, brilliant :)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,721 ✭✭✭E39MSport




  • Registered Users, Registered Users 2 Posts: 425 ✭✭Mathiasb


    rhythmbox-client:

    I'd rather use mpd instead :), because you have many different clients to choose from (win32, linux, web, phone, cli...): http://mpd.wikia.com/wiki/Clients


  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭Eliot Rosewater


    Pressing Super+M (the super key is the Windows button) in GNOME inverts the colours of each window. I use it to make the background of gVim and the terminal black. This is great for programming, as the glare from a white background hurts your eyes after a while.

    Pressing Super+N inverts the colours of the active window.


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,260 Mod ✭✭✭✭Jonathan


    End to end encrypted access to hosts behind restrictive firewalls. Useful for when ssh hostA 'ssh hostB' just doesn't cut it.

    hostA is firewall.
    hostB is behind firewall.


    Stick the following in your .ssh/config file:
    Host hostB
    Hostname hostB.local
    User hostBuser
    ProxyCommand ssh hostAuser@hostA /bin/nc -w 1 hostB.local 22
    

    The netcat argument -w 1 kills the process when the connection is finished.


  • Registered Users, Registered Users 2 Posts: 1,889 ✭✭✭evercloserunion


    Similar to zenity, notify-send is very handy. Instead of dialog boxes, it simply pops up a notification box in the corner of your screen with a message of your choice. It's good for letting the user know when a script has finished running or some event occurs. It's just
    notify-send [message]
    or
    notify-send [title] [message]
    There are other options too of course, including icon support I think.

    ---

    Another thing I swear by is a drop-down terminal emulator; Yakuake (KDE), Guake (Gnome) or Tilda. One press of the key of your choice and a terminal drops down in front of you; another press sends it back up. It's so so handy.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 14,048 ✭✭✭✭Johnboy1951


    For KDE users ..... Dolphin file manager can have an integrated terminal ......... press the F4 key to toggle ....... and the terminal follows the path of the displayed page ...... very handy I find ....


  • Closed Accounts Posts: 5,082 ✭✭✭Pygmalion


    For KDE users ..... Dolphin file manager can have an integrated terminal ......... press the F4 key to toggle ....... and the terminal follows the path of the displayed page ...... very handy I find ....

    Also useful is that Kate (the text editor) has this, so if you're writing a script or anything you can test it without ever leaving the editor.


  • Registered Users, Registered Users 2 Posts: 1,889 ✭✭✭evercloserunion


    Pygmalion wrote: »
    Also useful is that Kate (the text editor) has this, so if you're writing a script or anything you can test it without ever leaving the editor.

    Ditto for Geany, a cross-platform IDE.


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,260 Mod ✭✭✭✭Jonathan


    gedit also has an inbuilt terminal. I think the plugin is in the gedit-plugins package.


Advertisement