Posts with the tag GNU/Linux:
I needed an SQL dump of my Global GoldSrc Database to continue work locally. Un-/Fortunately, the server owner and sysadmin is very concerned about server security, so I was unable to just dump the database with this:
mysqldump -p -u osaft osaft_gtfcdb4 > osaft_gtfcdb4-20130213.sql The server wouldn’t let me because of insufficient access.
mysqldump: Got error: 1044: Access denied for user ‘osaft’@’localhost’ to database ‘osaft_gtfcdb4’ when using LOCK TABLES
Fortunately, there’s a simple solution that should work like a charm: –single-transaction.
mysqldump -p -u osaft osaft_gtfcdb4 --single-transaction > osaft_gtfcdb4-20130213.sql Then just bzip it (or not) and you’re done!
tar -cvjf osaft_gtfcdb4-20130213.
Soo, I was told that the font I use isn’t a proper coding font and I should use Source Code Pro. Fine. But if we’re already installing fonts, let’s download Source Sans Pro aswell. Source Code Pro is obviously for development environments, while Source Sans Pro is meant for user interface usage.
Installing fonts on a GNU/Linux machine is really simple; you just have to move them to a /usr/share/fonts/ folder and update the font cache. Thanks to Linux And Friends for providing me with this solution. Alright, let’s begin.
Download the font packages
wget http://sourceforge.net/projects/sourcecodepro.adobe/files/SourceCodePro_FontsOnly-1.017.zip wget http://sourceforge.net/projects/sourcesans.adobe/files/SourceSansPro_FontsOnly-1.038.zip Extract the files
I’ve always loved to start programmes automatically. Just boot up the computer, maybe even log in automatically if it’s a desktop at home, and start all the programmes you need. It took me quite a while, but I figured out the one and only, perfect way to do that: *.desktop files.
Let’s go to our applications folder, which should contain most of the *.desktop files responsible for your Applications menu.
cd /usr/share/applications/ Let’s assume you want to autostart guake. Check for folder contents with ls or find the programme you want to auto start with ls | grep guake. Then, copy that file to your autostart folder.
Wait, what’s going on? Device not managed? But I didn’t even do anything I swear! Here’s how to fix it, solution found on ask Ubuntu.
Open up your NetworkManager config file and change the line managed=false to managed=true.
sudo vim /etc/NetworkManager/NetworkManager.conf Then, restart the network-manager service.
sudo service network-manager restart Everything should work fine now.
I know of no clean way to detect an unplugged screen, so I figured I’d force re-detection with a cron job.
To detect the monitors I’m using disper, you can get it from the Wheezy and Sid repositories.
Let’s open up our crontab.
crontab -e If you’re doing this for other users too, you may use
sudo crontab -eu username Now add a new entry:
0-59 * * * * DISPLAY=:0.0 disper -ld auto > /dev/null This will automatically detect (-d auto) and list (-l) all monitors every minute.
Of course, you can also use xrandr:
0-59 * * * * DISPLAY=:0.
All you have to do is install the General Purpose Mouse interface, GPM.
sudo apt-get install gpm As soon as the installation finishes you’re ready to use your mouse.
If you are using XFCE with GDM and are tortured by the “slow keys”-feature after holding down Shift, you might want to take a look at this: bugzilla.redhat.com/show_bug.cgi?id=816764
I don’t remember when I had this problem, but I feel it was sitting around as a draft long enough. I hope this can help someone out there! I can’t test it anymore, since I’ve been using MATE for some time now.
A proper DC++ / ADC compatible implementation was one of the more important reasons I got my server. In a graphical environment I use EiskaltDC++ as a client, so I had no experience with text-based DC clients. Today, I finally had time to set up NCurses Direct Connect.
First, I compiled it myself. You should always compile things yourself if they aren’t available in your repository.
Then I created a new user ’ncdc’ to run the programme.
adduser ncdc I created a very basic, simple init.d/ script that executes this line:
su -c screen\ -U\ -dmS\ ncdc\ ncdc ncdc This will start NCDC with its own user (giving it limited rights) and in a UTF-8 enabled screen that is automatically detached.
I had a really annoying problem on my laptop: When I wanted to add a printer, the window would freeze at some point and just not respond. I found the solution in a Debian bug report: you have to add the user to the lpadmin group.
sudo usermod -aG lpadmin username After that, adding new printers immediately worked and was a matter of a few seconds.
If you want to start something automatically, you can use these commands either after logging in (user startup) or without logging in (system startup). But what if you want to run something from init.d/, you’re going to have to exec it as a specific user. See my previous post on NCDC to see why anyone would ever need that. First off, I had to find out how I’d start a detached screen and execute a command. That was pretty easy:
screen -dmS screenname command But since I wanted to create an init.d/ script, I had to change the user with su first - or even better, just execute a command as the user.