0
votes
2answers
61 views

Rename files in subfolders with parent folder names

I have a main directory that has four folders f1, f2, f3 and f4 each of these folders has 10 folders, and each of these 10 folders ff1...ff10 has some .jpeg images with some names lets say image1.... ...
0
votes
1answer
24 views

Run scripts in a folder from “Run Application” launcher in ubuntu

I have some bash scripts in my ~/bin folder. I have added this folder to my PATH variable in ~/.bashrc, so I can run them from terminal easily. But I want to run them by simply typing them in the "Run ...
0
votes
1answer
28 views

echo “${txtred}Text${txtrst}” color not always working

I have a .sh file through terminal and I'm using echo "${txtred}Text${txtrst}" as a display of what's happening when running the script. But sometimes the color is not red, although I used {txtred}. I ...
1
vote
1answer
42 views

shell file opens terminal and run a sequence of commands in specific order

What I used to do is: Manually open a terminal instance to run the following commands and shell files Run PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PAT‌​H run: cd ...
1
vote
1answer
81 views

how to run command in an already opened terminal through a shell script

I'm running a shell script.sh which is supposed to open terminal and then run some commands in this opened terminal. What happens is that the terminal starts but the following commands are not ...
0
votes
1answer
45 views

Simulate power button using command?

When I hit the power button on my laptop (Ubuntu 14.04.1 without any modifications), I receive a pop window saying Goodbye, what would you like to do? Lock Suspend Restart Shutdown How can I get ...
2
votes
1answer
187 views

Run .bash_profile script at login

i'm working on a deb package that allows the administrator to create another account and run that account automatically in kiosk mode. I created the user, specified a shortkey and put that in a hidden ...
3
votes
1answer
106 views

How can “git gui” open repository from parent directory?

I start Git GUI tool using command git gui or git citool. I wanted to add another entry to right click script menu (already have dozens of commands) and created a script like this: #!/bin/sh git ...
0
votes
0answers
61 views

How to auto-run a script each time a Global Keyboard Shortcut is used in Ubuntu?

I don't want to reassign the Global Keyboard Shortcut keys. They should be doing their what they were meant to do. But in addition to that, I would like a bash script to run every time the particular ...
3
votes
1answer
176 views

Shell script errors?

I am trying to create an interactive bash shell script to make it easier to install and configure a postfix mail server,But have them still enter the commands and then the shell run them, but I keep ...
0
votes
2answers
74 views

Shell script compsrison does not work as intended

The follwing code is for to compare two strings or variables. But, I cannot do it. I did a lot of googling, but no use. Here, output doesn't depend upon the changing of inputs. Can any one correct ...
7
votes
2answers
7k views

How to change default action when running a .sh file?

Every time I want to run a .sh file, Ubuntu asks whether I want to Run in Terminal/Display/Run it. Is there a way to set default action for some sh files? -- I am using Ubuntu 12.04 without any ...
4
votes
1answer
3k views

Ubuntu 12.04 doesn't seem to execute my .profile file

(I'm kinna n00bish) 1: I had ubuntu 11.10 installed, then upgraded to 12.04. 2: I had a script in my .profile file to turn off my laptop's touchpad (it worked, and was executed on login) 3: Now it ...
1
vote
0answers
316 views

Epiphany Web Application Mode strangeness [closed]

Using Epiphany in GNOME 3.2 I've saved Google Docs as a web application. I have a script set-up that will either switch to an app (using wmctrl) or launch it if it's not open - I then xbindkeys to ...
2
votes
1answer
142 views

Help convert console command to right-click command

I use this console command to automatically send all files in some directory to the JAR file, catch the output of that JAR file and finally create new files from the output. Here is the command for i ...
3
votes
2answers
568 views

Use user's icons in a bash script

I am looking for a way to use the icons from the users theme (in gnome) in a bash script. The solution could be a environment variable or a file where the path to the users icon set is written. Eg. ...
15
votes
2answers
3k views

How can I find the location (on the desktop) of a window on the command line?

I'm trying to write a little script to help manage my windows via keyboard shortcuts. In order to do what I want, I need to be able to find the current location and size of the "active" (focused) ...
5
votes
1answer
1k views

Changing media key defaults in Gnome

Under XFCE, I had option to set my keyboard media keys to run particular programs or scripts. I understand the options to adjust the Keyboard Shortcuts under Gnome, but how do I change the default ...
1
vote
3answers
484 views

How can I manage saved complete web pages and their directories (e.g n.html and n_files) in Nautilus

Using an arbitrary web browser, e.g. firefox, you can save a web page (complete web page), for which it saves the html file, say n.html, and web page elements in a corresponding directory, n_files. ...
5
votes
3answers
496 views

How do I add a program that must be run from within its own directory to the panel or main menu?

Some programs can only be run from within their own directories. If I go to System --> Preferences --> Main Menu --> Add Item and select the file, it will not work. Similarly, if I right ...