Building Graphical on Linux (and other Linux Q&A)


I don’t know that I’ve ever heard of such a thing. What would it even do, show you the commands before running them?


behave as though it were running the full command and show the results. Did I imagine it?!!?

could have sworn there was like a run-test or test-run command with some arguments something along those lines, that when run would run the rest of the line without actually writing anything just run a simulation of running the command so you made sure you didn’t botch anything with a typo, or mistep etc…


Ok if not, cat dev/sdb > dev/sdc should work for moving windows to a new (larger) drive right? Will keep the original just in case something goes wrong?


That will dump the contents of sdb to sdc, yes. dd might be faster.
It’ll work, but I’d probably use a dedicated tool like gparted instead, with support for resizing and stuff. Or whatever the GPT one is, I forget its name.


ah, saw stuff that said dd was oveerused since its meant for mag tape, and cat was faster. That sounds much better though thanks.


Hmm Mind walking me through this a bit more? It sounds like a practice I should use.

Any good place to learn more of these tricks/ habits I should get in the habit of?


It’s pretty straightforward. The .bashrc file contains settings for your command line. Open it up and add export PATH=$PATH:$HOME/bin to it. This adds the $HOME/bin directory to the end of your path, which is searched for executables. (export will ensure it gets into the environment settings, I accidentally left it out earlier)

Then you add yourself a bin directory to your home, throw scripts in there, and chmod +x them.

Restart your terminal to load the setting (or just enter PATH=$PATH:$HOME/bin directly) and presto, you can now just type and it will automatically find and run /home/litppunk/bin/ for you. Complete with tab completion.

I also put aliases in .bashrc, and routinely add export HISTCONTROL=ignoreboth as well. That one makes bash drop duplicate lines from its history, and also lines that start with a space which I find useful for commands I don’t want to repeat.


why… routinely add export HISTCONTROL=ignoreboth? shouldn’t that stay in? Or… like just get typed into console every now and then… maybe for looped into .bashrc for every 100 lines or something?

The bin… so you just dump basically all your scripts into bin?

What do I need to be doing to launch stuff like cataclysm-tiles in a single command? I’ve been trying to
./Path/To/Catacysm-DDA/catacylsm-tiles but I keep getting ‘not a file or directory’ until I manually cd Cataclysm-DDA then ./catacysm-tiles

I can’t alias a command that won’t work.


By routinely I mean I add that to the .bashrc on any machine I’m going to use for any length of time. It’s handy to be able to tell it “don’t fill my history up with this” by adding a space, and keeping dupes out, so I can reduce the time spent going back through previous commands

Yes, you just dump scripts (and some executables will happily live there too) in your home folder’s bin directory.

To launch catacylsm-tiles with a single command, you want a script that looks like this:

pushd /path/to/cataclysm

That’ll switch your current directory to /path/to/cataclysm, run the executable, and then return you to whatever directory you were in before.
Don’t forget to chmod +x ./ on the script (assuming that’s what you name it) so it’ll be executable.


Note that all of this is written in the compilation instructions on the GitHub page. If you go to then scroll down to the description and click on, you will even find specific instructions for Debian (which is the basis for Ubuntu that you’re using). It says what to install, how to run the make command and what are the possible parameters you might need.

You can usually find these instructions somewhere unless the process is so straightforward it doesn’t require much else besides running the make command.


yep once I saw that stuff, I was able to integrate it into the instructions I had gotten so far, and proooobably would have been able to figure out the install from there, luckily I had these guys to expidite it, and teach/tell me WHAT I was actually doing.

And then follow through with this personal shit too ^.^


Hey guys. Im trying to get CDDA on an old laptop but every time I put in the
./catacylsm-tiles &

command it just stays blank and I don’t get any the normal prompt back, nor the -tiles file. Is there a way to run this command in a way I know whats going on? It a potato and I think it might ave some hardware issues or something the way it freezes up from time to time but I’d like to be able to find what is oging on with this. Thanks.


Maybe drop the ./cataclysm-tiles from the end as that’s the command to launch the binary, not compile it.

It should spit out some compilation messages after a bit. You can see what’s happening by running top (or htop if you have that, it’s nicer) in another terminal window. If the laptop’s really a potato, it may take a while.

You also might want to check the ram if it’s freezing. Memtest86 will do the trick, install it, reboot, select it from the boot menu, and let it run for a while. It’ll go for as long as you let it, but usually if no errors have popped up by test #5 or so your ram is okay.


I’ve done everything up until after the make command, but in the Cataclysm-DDA folder, there’s no cataclysm or cataclysm-tiles. What do I do?


Remove the -s from the command, so you’re running this:


and see why the build is failing.


No rule to make target 'all'. Stop.

wait I forgot to cd into Cataclysm-DDA


think I just found that command I was looking for. Looks like --dry-run might be it. Now I just need to keep in on file/ remember it for the next time I might actually need it.

hmm. Ok looks like that might only be for rsync?

How would you guys test run a script or command to make sure it wasn’t going to do something unintended? There has to be a way to do this right?


…Um so. I was toying with some scripts and I accidentally changed my computers default ‘open shell script with’ program. How do I change it back to default opener = terminal instead of text edit or some other default program?


If it’s your desktop opening things wrong, then it’ll be in your desktop environment’s settings somewhere. Exact location will vary; I’m using Mate and it’s under Preferences->Personal->Preferred Applications here.


right. But how do I get it to be opened by the console again? I can easilly switch it around to be opened /attempted to be opened by many different programs but how do I get console to open it? its not in the list.