• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Overclockix Custom App requests

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Stratus_ss

Overclockix Snake Charming Senior, Alt OS Content
Joined
Jan 24, 2006
Location
South Dakota
I have spoken with Matt, and I will attempt to develop custom applications for the Overclockix distro (main thread) as requested by you, the users.

I am a python programmer/shell scripter so it will be limited to GTK gui apps or terminal apps.

If there is something you would like to see make it into overclockix post it here and I will get to work on it
 
I would quite like to see a front end for shred

its a utility for overwriting files or complete drives. I always use it from a live cd on the command line before selling a hard drive. a simple front end would make things easier.

http://linux.die.net/man/1/shred
 
I can get to work on it. I have used shred before

Thanks for the suggestion
 
Once you have anything that is ready for implementation, please create a post in the master thread so that it can be evaluated.

Thanks!
 
Stratus_ss - I'm not sure if you did this by design, but you can't use your python installer for your aptitude gui frontend as root because it wants to install to /home/root. Also, you have a line that specifies your username instead of the username variable:
Exec=/home/stratus/.tux_search/aptitude_frontend.py

*edit: I just tested and it looks like the version of gtk+ in Debian stable isn't high enough:

error.png
 
Last edited:
I will get on testing for Debian Stable, I didn't realize that they had such a low version of gtk+

I will add installation for root. I had not considered that. I just assumed it would be (as under best practices) run as a regular user
 
Fixed it,
here is the fixed code. Tested on Debian stable as of whatever ISO I grabbed 2 days ago
 

Attachments

  • aptitude.7z
    90.1 KB · Views: 170
I am having trouble with login into gdm3 as root with debian stable, therefore I am skipping the "root" aptitude installation. However I am posting the code that I THINK will work but remains untested

This is the setup_aptitude.py code

Code:
#!/usr/bin/python
#This script is intended to put all of the files in the correct locations
import os
import sys
import getpass
import shutil
import stat

get_username = getpass.getuser()

if get_username != "root":

	try:
	    os.makedirs('/home/%s/.tux_search/icons' % get_username)
	except:
	    pass

	os.chdir('../')
	    
	for file in os.listdir('.'):
	    if "png" in file or "jpeg" in file:
		print "moving image: ", file
		shutil.copy(file, '/home/%s/.tux_search/icons' % get_username) 
	    elif "INSTALL" in file:
		pass
	    else:
		print "moving other files", file
		shutil.copy(file, '/home/%s/.tux_search/' % get_username)
		
		
	print "installation complete"

	launcher = open('/home/%s/Desktop/Package Search.desktop' % get_username, 'w')
	launcher.write("""
		        #!/usr/bin/env xdg-open

		        [Desktop Entry]
		        Version=1.0
		        Type=Application
		        Terminal=false
		        Icon[en_CA]=/home/%s/.tux_search/icons/aptitude.jpeg
		        Name[en_CA]=Search for Packages
		        Exec=/home/%s/.tux_search/aptitude_frontend.py
		        Name=Search for Packages
		        Icon=/home/%s/.tux_search/icons/aptitude.jpeg
		       """ % (get_username, get_username, get_username))
	launcher.close()
	os.system('sleep 3')
	os.system('chmod 777 /home/%s/Desktop/Package\ Search.desktop' % get_username)
else:
	try:
	    os.makedirs('/root/.tux_search/icons')
	except:
	    pass

	os.chdir('../')
	    
	for file in os.listdir('.'):
	    if "png" in file or "jpeg" in file:
		print "moving image: ", file
		shutil.copy(file, '/root/.tux_search/icons') 
	    elif "INSTALL" in file:
		pass
	    else:
		print "moving other files", file
		shutil.copy(file, '/root/.tux_search/')
		
		
	print "installation complete"

	launcher = open('/root/Desktop/Package Search.desktop', 'w')
	launcher.write("""
		        #!/usr/bin/env xdg-open

		        [Desktop Entry]
		        Version=1.0
		        Type=Application
		        Terminal=false
		        Icon[en_CA]=/root/.tux_search/icons/aptitude.jpeg
		        Name[en_CA]=Search for Packages
		        Exec=/root/.tux_search/aptitude_frontend.py
		        Name=Search for Packages
		        Icon=/root/.tux_search/icons/aptitude.jpeg
		       """ )
	launcher.close()
	os.system('sleep 3')
	os.system('chmod 777 /root/Desktop/Package\ Search.desktop')
 
Stratus_ss: I was thinking that if you could modify the installer to just make a menu item in gnome, it would make this that much more awesome. In order to install a menu item, you just need to place the .desktop file in /usr/share/applications. Here is an example of what synaptic's .desktop file has:

Code:
[Desktop Entry]
Name=Synaptic Package Manager
GenericName=Package Manager
Comment=Install, remove and upgrade software packages
Exec=su-to-root -X -c /usr/sbin/synaptic
Icon=synaptic
Terminal=false
Type=Application
Categories=PackageManager;GTK;System;Settings;
NotShowIn=KDE;

If you want, I can probably modify it to work for all users to make it installable in general.

*edit: I just ran the installer from the live-user account and it worked great! Now it is just a matter of how to install it without the home directory to make it more like a typical application.
 
Last edited:
It can be modified to install to /opt or any directory you think best. I chose the home directory to store the icons and stuff. If I was going all out I would compile it as a binary instead of just a python script.

Do you prefer a compiled binary?
 
A compiled binary would be very cool. I definitely want to have this as a super light weight alternative to synaptic as it just works :)
 
Alright, I will get on compiling the binary (its architecture dependent) so I will compile a pair of them, test them out and then post them (if i can post binaries)
 
Should be able to attach them as long as you do so as a 7z, tar, tgz or zip archive.
 
Last edited:
I have to hard code the path for the binary, where would you like it? /opt/<some_program_name> ?
 
Here is the compiled 64 bit version.

I need to pull down the 32 bit image before testing/compiling it

There is a setup.py inside the archive that will do the setup. After it finishes just remove the extracted directory.

Tested on Debian stable and on overclockix-amd64-014
 

Attachments

  • aptitude_linux_64.tgz
    3 MB · Views: 103
Last edited by a moderator:
Back